路由器配置和应用

上传人:人*** 文档编号:567266348 上传时间:2024-07-19 格式:PPT 页数:62 大小:2.83MB
返回 下载 相关 举报
路由器配置和应用_第1页
第1页 / 共62页
路由器配置和应用_第2页
第2页 / 共62页
路由器配置和应用_第3页
第3页 / 共62页
路由器配置和应用_第4页
第4页 / 共62页
路由器配置和应用_第5页
第5页 / 共62页
点击查看更多>>
资源描述

《路由器配置和应用》由会员分享,可在线阅读,更多相关《路由器配置和应用(62页珍藏版)》请在金锄头文库上搜索。

1、路由器配置和应用路由器配置和应用课前复习课前复习lPing 127.0.0.1 查看TCP/IP是否安装成功lTTL 经过几个设备(路由器或三层交换)lWindows TTL一般128lPing 192.168.1.5 或本地 观察结果lTracert 192.168.1.5 观察结果 (丢弃并产生ICMP报文)lRoute printlMicrosoft Office Visiol华为、思科模拟器l华为6台+思科5台(如何分组)2本章目标本章目标l路由器的功能、结构和接口路由器的功能、结构和接口l路由器的基本配置路由器的基本配置l常见广域网协议常见广域网协议学习本章节,您应该能够:学习本章节

2、,您应该能够:3课程内容课程内容路由器的功能、结构和接口路由器的功能、结构和接口路由器的基本配置路由器的基本配置路由器的基本配置路由器的基本配置常见广域网协议常见广域网协议常见广域网协议常见广域网协议4路由器工作流程路由器工作流程IPETHPPP以太网口以太网口串口串口IPPPPETH串口串口以太网口以太网口协议封装协议封装路由选择路由选择协议转换协议转换路由器路由器路由器路由器传送传送拆包拆包接收接收发送发送工作过程工作过程5路由器的结构路由器的结构l硬件组成CPU(处理器):中央处理单元,和计算机一样,它是路由器的控制和运算部件。RAM(存储正在运行的配置文件):内存,用于存储临时的运算结

3、果。如路由表、ARP表、快速交换缓存、缓冲数据包、数据队列、当前配置文件。众所周知,RAM中的数据在路由器断电后是会丢失的。FLASH Memory(负责保存OS的映像和路由器的微码):闪存,可擦除、可编程的 ROM,用于存放路由器的IOS,Flash的可擦除特性允许更新、升级IOS而不用更换路由器内部的芯片。路由器断电后,flash的内容不会丢失。Flash容量较大时,就可以存放多个IOS版本。6路由器的结构路由器的结构l硬件组成:NVRAM(保存配置件)ROM(加载OS) Cisco(Internetwork Operating System,网际操作系统)Huawei(Versatile

4、 Routing Platform,通用路由平台)接口(完成路由器与其它设备的数据交换)7路由器的结构路由器的结构l软件结构BOOT ROM:主要功能是路由器加电后完成有关初始化工作,并向内存中加入操作系统代码VRP(通用路由平台):Quidway路由器上运行的软件平台路由器的厂商:锐捷,神州数码8VRP体系结构体系结构9中低端路由器发展路标中低端路由器发展路标中低端路由器发展路标中低端路由器发展路标19961996199819982002200220032003统一的统一的统一的统一的VRPVRP平台平台平台平台200020002004200410AR 18-1XAR 18-2XAR 28-

5、0X/1XAR 28-3X/40/80AR 46-20/40/80SOHOSMB企业分支企业分支企业大型分支企业大型分支企业中心企业中心灵灵活活性性能能业业 务务 性性 能能Quidway ARQuidway AR全系列路由器全系列路由器全系列路由器全系列路由器11课程内容课程内容路由器的功能、结构和接口路由器的功能、结构和接口路由器的基本配置路由器的基本配置路由器的基本配置路由器的基本配置常见广域网协议常见广域网协议常见广域网协议常见广域网协议12AR28-31备备份份口口配配置置口口13配置路由器配置路由器l通过通过console口配置口配置l通过拨号远程配置通过拨号远程配置l通过通过te

6、lnet方式配置方式配置l通过哑终端方式配置通过哑终端方式配置l通过通过FTP方式传送配置文件方式传送配置文件14通过通过console口配置口配置建立本地配置环境建立本地配置环境配置口配置口(Console)配置口(配置口(console)电缆电缆R232 串口(串口(db9的的简简化化应应用)用) Console线就是反转线 (rollover cable):一端采用568A或568B做线标准,另一端把568A或568B的顺序刚好从第一根到最后一根反过来。一般小于15米,所以本地配置。反转线一般长度固定,可以购买RJ45-DB9转接器。15创建超级终端(创建超级终端(II)16选择串口(选

7、择串口(III)17端口设置(端口设置(IV)18通过拨号线路配置路由器通过拨号线路配置路由器l将路由器和将路由器和PC分别与分别与modem连接连接 备份电缆备份电缆modemmodemPSTN/ISDN19通过通过Telnet配置本地路由器配置本地路由器lQuidway-Ethernet0/0ip address 10.0.0.100 24 l缺省的缺省的telnet登录用户名:登录用户名:admin 口令:口令:admin服务器服务器PC工作站工作站工作站工作站10Base-T 网口网口20通过哑终端配置通过哑终端配置lQuidway-Serial0/0physical-mode asy

8、nc同同/异步串口异步串口21通过通过FTP配置配置l在路由器上启动在路由器上启动FTP服务器服务器l在终端上启动在终端上启动FTP客户端程序客户端程序FTP server10.110.0.1FTP client10.110.0.2Ethernet22命令行概述命令行概述l用户视图用户视图l系统视图系统视图 lRIP视图视图lOSPF视图视图lBGP视图视图l以太网接口视图以太网接口视图l同步串口视图同步串口视图lDialer接口视图接口视图注意:视图切换(华为) 模式切换(思科)23进入路由器配置界面进入路由器配置界面 User interface Con 0 is available.Us

9、er interface Con 0 is available. Press ENTER to get started. Press ENTER to get started. console用户视图:system 进入系统模式 H3C用户模式:Routerenable 进入特权模式 Router#24用户视图常用命令用户视图常用命令l? cdChange current directory debugging Enable system debugging functions delete Delete a file displayDisplay current system informa

10、tionpingSend echo messagessaveSave current configuration resetReset operationreboot Reboot system25系统视图常用命令系统视图常用命令lsystem-viewlQuidway?aclSpecify acl configuration information arpAdd static ARP entry bgpSpecify BGP(Border Gateway Protocol) configuration informationfirewallSpecify firewall configura

11、tion information ipsecSpecify IPSec(IP Security) configuration information local-userSpecify local user configuration information pppSpecify PPP(the Point-to-Point Protocol)26接口视图命令接口视图命令lQuidwayinterface s0/0 lQuidway-Serial0/0? baudrateSet transmit and receive baudrate async Asynchronous line conf

12、iguration command ipSpecify IP configuration information shutdownShut down the specified interface physical-mode Set synchronous or asynchronous mode on serial interfacedialer Specify DCC(Dial-Control-Center) configuration information quit Exit from current command view loopbackSet loopback on an in

13、terface27在线帮助在线帮助lQuidway display ?aclAcl status and configuration information arp Display ARP entryaspf ASPF status and configuration information auto-config Specify auto configuration information bgp BGP status and configuration informationcurrent-configurationCurrent configurationdebuggingCurrent

14、 setting of debugging switches dhcp DHCP configuration subcommands diagnostic-information System Information for Diagnosis 28命令行错误信息命令行错误信息 Quidwaydispaly ? % Unrecognized command found at position. Quidwaydisplay % Incomplete command found at position. Quidwaydisplay interface Serial 0/0 0 % Too ma

15、ny parameters found at position.29l历史命令历史命令display history-commandl补全命令补全命令使用使用Tab键键l查看历史记录查看历史记录使用使用 键键使用使用Ctrl P快捷键快捷键历史命令历史命令历史命令历史命令30编辑特性编辑特性l普通按键普通按键 输入字符到当前光标位置输入字符到当前光标位置l退格键退格键BackSpace 删除光标位置的前一个字符删除光标位置的前一个字符l删除键删除键Delete 删除光标位置字符删除光标位置字符l左光标键左光标键 光标向左移动一个字符位置光标向左移动一个字符位置l右光标键右光标键 光标向右移动一

16、个字符位置光标向右移动一个字符位置l上下光标键上下光标键 显示历史命令显示历史命令31lLanguageLanguage中英文显示方式切换中英文显示方式切换l暂停显示时键入暂停显示时键入Ctrl+c Ctrl+c 停停止止显显示示和和命命令令执执行行l暂停显示时键入空格键暂停显示时键入空格键继续显示下一屏信息继续显示下一屏信息l暂停显示时键入回车键暂停显示时键入回车键继续显示下一行信息继续显示下一行信息显示特性显示特性显示特性显示特性32l l状态查看命令状态查看命令状态查看命令状态查看命令display versiondisplay current-configurationdisplay

17、interfacedisplay ip route 基本操作命令基本操作命令基本操作命令基本操作命令33常用命令常用命令Quidwaydisplay flashRouter# show flashH3Ccopy tftp flashH3Ccopy cur startup-config (current-config)Router# copy run saved-config (running-config) 34display versionQuidwaydisplay version Copyright Notice: All rights reserved (Apr 08 2005). W

18、ithout the owners prior written consent, no decompiling nor reverse-engineering shall be allowed. Huawei-3Com Versatile Routing Platform Software VRP(R) software, Version 3.40, Release RT-0009 Copyright (c) 2003-2005 Hangzhou Huawei-3Com Tech. Co.,Ltd. All rights reserved. Copyright (c) 2000-2003 Hu

19、awei Tech. Co.,Ltd. All rights reserved. Quidway AR28-11 uptime is 0 week, 0 day, 0 hour, 1 minute CPU type: PowerPC 8241 200MHz 128M bytes SDRAM Memory 32M bytes Flash Memory Pcb Version:1.0 Logic Version:1.0 BootROM Version:9.09 SLOT 0 AUX (Hardware)1.0, (Driver)1.0, (Cpld)1.0 35display current-co

20、nfigurationQuidwaydisplay current-configuration# sysname Quidway# FTP server enable# local-server nas-ip 127.0.0.1 key huawei# domain default enable system#radius scheme system server-type huawei primary authentication 127.0.0.1 1645 primary accounting 127.0.0.1 1646 user-name-format without-domain#

21、domain system access-limit disable state active#36display interface显示接口信息显示接口信息Quidwaydisplay interface Serial 1/1Serial1/1 current state :UPLine protocol current state :UPDescription : Serial1/1 InterfaceThe Maximum Transmit Unit is 1500, Hold timer is 10(sec)Internet protocol processing : disabled

22、Internet Address is 10.0.0.1/8 Link layer protocol is PPPLCP initialOutput queue : (Urgent queue : Size/Length/Discards) 0/50/0Output queue : (Protocol queue : Size/Length/Discards) 0/500/0Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0Physical layer is synchronous,Baudrate is 64000 bps,

23、 Interface has no cable Last 300 seconds input rate 0.00 bytes/sec, 0.00 packets/sec Last 300 seconds output rate 0.00 bytes/sec, 0.00 packets/sec Input: 0 packets, 0 bytes 0 broadcasts, 0 multicasts 0 errors, 0 runts, 0 giants 0 CRC, 0 align errors, 0 overruns 0 dribbles, 0 aborts, 0 no buffers 0 f

24、rame errors Output:0 packets, 0 bytes 0 errors, 0 underruns, 0 collisions 0 deferred DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP 37Quidway interface serial 0/0Quidway-serial0/0 undo shutdown开启或关闭端口开启或关闭端口l开启已经关闭的端口开启已经关闭的端口Quidway interface serial 0/0Quidway-serial 0/0 shutdownl人工关闭端口人工关闭端口38解读端口状态解读端口状态Quid

25、waydisplay interface serial 0/0physical layer is synchronous, baudrate is 64000 bps, no cable Link-protocol is PPP LCP initial, IPCP initial, IPXCP initial, CCP initialline protocol is downSerial0/0 is down,物理层组件的状态物理层组件的状态数据链路层的状态数据链路层的状态39displaydisplay ipip routing-tablerouting-tableQuidwaydis ip

26、 routing-tableRouting Tables:Destination/Mask proto pref Metric Nexthop Interface 0.0.0.0/0 Static 60 0 120.0.0.2 Serial0 8.0.0.0/8 RIP 100 3 120.0.0.2 Serial0 9.0.0.0/8 OSPF 10 50 20.0.0.2 Ethernet0 10.0.0.0/8 RIP 100 4 120.0.0.2 Serial0 11.0.0.0/8 Static 60 0 120.0.0.2 Serial0 20.0.0.0/8 Direct 0

27、0 20.0.0.1 Ethernet0 20.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 . 40lterminal debuggingldebugging ? all All debugging functionsarp ARP moduleaspf ASPF moduleatm ATM modulebgp BGP modulebridge Debugging bridgedhcp DHCP moduledialer DCC moduledlsw Data Link Switching moduledns Domain name system modul

28、e调试命令:调试命令:调试命令:调试命令:debuggingdebugging41l Quidwayping 11.1.1.1 PING 11.1.1.1: 56 data bytes, press CTRL_C to break Reply from 11.1.1.1: bytes=56 Sequence=0 ttl=255 time = 31 ms Reply from 11.1.1.1: bytes=56 Sequence=1 ttl=255 time = 31 ms Reply from 11.1.1.1: bytes=56 Sequence=2 ttl=255 time = 32 m

29、s Reply from 11.1.1.1: bytes=56 Sequence=3 ttl=255 time = 31 ms Reply from 11.1.1.1: bytes=56 Sequence=4 ttl=255 time = 31 ms - 11.1.1.1 ping statistics - 5 packets transmitted 5 packets received 0.00% packet loss round-trip min/avg/max = 31/31/32 msping:ping:网络连通测试命令网络连通测试命令网络连通测试命令网络连通测试命令42tracer

30、t:网络连通测试命令网络连通测试命令l Quidway tracert 10.110.201.186 traceroute to 10.110.201.186(10.110.201.186) 30 hops max,40 bytes packet 1 11.1.1.1 29 ms 22 ms 21 ms 2 10.110.201.186 38 ms 24 ms 24 ms43课程内容课程内容路由器的功能、结构和接口路由器的功能、结构和接口路由器的基本配置路由器的基本配置常见广域网协议常见广域网协议常见广域网协议常见广域网协议44广域网广域网 V.24 ,V.35, X.21BisEIA/TIA

31、-232/449LAPB,Frame Relay,HDLC,PPP,SDLC网络层网络层X.25物理层物理层数据链路层数据链路层路由器路由器 A A广域网的下三层广域网的下三层网络层网络层物理层物理层数据链路层数据链路层路由器路由器 B B45广域网的数据链路层广域网的数据链路层专用点到点HDLC,PPP分组交换X.25,帧中继电路交换PSTN:PPPISDN B信道:PPPISDN D信道:LAPD46高级数据链路控制高级数据链路控制HDLCl 面向比特面向比特l 透明传输零比特填充法透明传输零比特填充法l 运行于同步串行线路运行于同步串行线路地址地址标志标志控制控制信息信息帧校验帧校验标志

32、标志47HDLC协议的配置协议的配置l在接口上封装在接口上封装HDLCHDLC协议协议link-protocol hdlclink-protocol hdlcl打开打开HDLC所有报文调试信息开关所有报文调试信息开关 debugging hdlc all interface debugging hdlc all interface typetype number number l打开打开HDLC事件调试信息开关事件调试信息开关 debugging hdlc event debugging hdlc event interface interface typetype numbernumber

33、l打开打开HDLC数据包调试信息开关数据包调试信息开关 debugging hdlc packet interface debugging hdlc packet interface typetype numbernumber 48PPP配置命令配置命令l封装PPPlink-protocol ppp设置验证类型ppp authentication-mode pap|chap l设置用户名、口令、服务类型Quidwaylocal-user huaweiQuidway-luser-huaweipassword simple sharepassQuidway-luser-huaweiservice-

34、type ppp49PAP配置命令配置命令l验证方配置验证方配置配置验证方式ppp authentication-mode pap配置用户列表Quidwaylocal-user huaweiQuidway-luser-huaweipassword simple sharepassQuidway-luser-huaweiservice-type pppl被验证方配置被验证方配置配置PAP用户名ppp pap local-user username password simple|cipher password50CHAP配置命令配置命令l主验证方配置:主验证方配置:配置本地验证对端(方式为CHA

35、P) ppp authentication-mode chap配置本地名称 ppp chap user username将对端用户名和密码加入本地用户列表 Quidwaylocal-user huawei Quidway-luser-huaweipassword simple sharepass Quidway-luser-huaweiservice-type pppl被验证方配置被验证方配置:配置本地名称密码Quidway-Serial0/0 ppp chap user usernameQuidway-Serial1/1ppp chap password simple|cipher pass

36、word51PPP典型配置举例一典型配置举例一主验证方主验证方被验证方被验证方RouterA RouterB PAP 验证验证S0/0S0/0RouterAlocal-user routerb RouterA-luser-routerbpassword simple helloRouterA-luser-routerbservice-type pppRouterAinterface serial 0/0RouterA-Serial0/0ppp authentication-mode papRouterBinterface serial 0/0 RouterB-Serial0/0ppp pap

37、local-user routerb password simple hello52PPP典型配置举例二典型配置举例二RouterARouterBCHAP 验证验证S0/0S0/0RouterAlocal-user routerbRouterA-luser-routerbpassword simple helloRouterA-luser-routerbservice-type pppRouterAinterface serial 0/0RouterA-Serial0/0ppp chap user routeraRouterA-Serial0/0ppp authentication-mode

38、chapRouterBlocal-user routera RouterB-luser-routerapassword simple helloRouterB-luser-routeraservice-type pppRouterBinterface serial 0/0RouterB-Serial0/0ppp chap user routerbRouterB-Serial0/0ppp authentication-mode chap主验证方主验证方被验证方被验证方53帧中继的配置帧中继的配置l封装帧中继协议封装帧中继协议link-protocol frame-relay MFR |nonst

39、andard | ietf l配置帧中继接口的终端类型配置帧中继接口的终端类型fr interface-type dce | dte | nni l选择选择LMI类型类型fr lmi type ansi | nonstandard | q933a 54配置帧中继地址映射配置帧中继地址映射l手工配置静态映射手工配置静态映射:fr map ip | ipx protocol-address dlci broadcast l动态建立:使能动态逆向地址解析协议动态建立:使能动态逆向地址解析协议fr inarp ip | ipx dlci 帧中继地址映射也就是建立对端协议地址与本地DLCI的映射关系,该

40、地址映射可静态配置,也可动态建立55配置帧中继本地虚电路配置帧中继本地虚电路l为主接口分配一条虚电路号为主接口分配一条虚电路号fr dlci dlci56配置帧中继子接口配置帧中继子接口l创建帧中继子接口,进入子接口配置模式创建帧中继子接口,进入子接口配置模式interface type number.subinterface-number multipoint | point-to-point l配置帧中继子接口的虚电路号配置帧中继子接口的虚电路号fr dlci dlci建立地址映射的命令和物理接口相同,可以使用静态或动态地建立地址映射的命令和物理接口相同,可以使用静态或动态地址映射。地址映

41、射只有在点到多点的情况下才需要配置址映射。地址映射只有在点到多点的情况下才需要配置子接口有两种类型:点到点和点到多点子接口有两种类型:点到点和点到多点57配置帧中继交换配置帧中继交换l允许帧中继进行允许帧中继进行PVC交换交换fr switchingl设置帧中继接口类型设置帧中继接口类型fr interface-type dce | dte | nni l配置帧中继配置帧中继PVC交换的路由交换的路由Quidway-Serial1/0fr dlci-switch 16 interface Serial 1/1 dlci 40注意:如果使用帧中继交换,接口类型必须为注意:如果使用帧中继交换,接口

42、类型必须为DCE或或NNI58帧中继典型配置举例一帧中继典型配置举例一DLCI 100Router ARouter B封装为帧中继封装为帧中继DCEDTEinterface serial 1/0ip address 202.38.163.251 255.255.255.0link-protocol frfr interface-type dcefr dlci 100fr inarp( fr map ip 202.38.163.252 dlci 100)interface serial 1/0 ip address 202.38.163.252 255.255.255.0link-protoco

43、l frame-relayfr interface-type dtefr inarp( fr map ip 202.38.163.251dlci 100)202.38.163.251/24202.38.160.252/2459帧中继典型配置举例二帧中继典型配置举例二IP 202.38.11.251/24DLCI 50l通过帧中继网络互连局域网DLCI 70IP:202.38.11.252/24Router BRouter ARouter CDLCI 60DLCI 80IP:202.38.11.253/24帧中继帧中继60帧中继的监控与维护帧中继的监控与维护操作操作命令命令显示帧中继显示帧中继L

44、MI类型报文的收发统计类型报文的收发统计显示协议地址与帧中继地址映射表显示协议地址与帧中继地址映射表显示帧中继显示帧中继PVC统计信息统计信息显示帧中继显示帧中继PVC路由表路由表显示各接口的帧中继协议状态显示各接口的帧中继协议状态清除所有动态建立的帧中继地址映射清除所有动态建立的帧中继地址映射打开帧中继的所有报文调试开关打开帧中继的所有报文调试开关打开帧中继打开帧中继ARP报文信息调试开关报文信息调试开关打开帧中继事件信息调试开关打开帧中继事件信息调试开关打开帧中继打开帧中继LMI协议信息调试开关协议信息调试开关display fr lmi-info interface type numbe

45、r display fr map-info display fr pvc-info serial interface-number dlci dlci-number display fr dlci-switch display fr interface reset fr inarp-info debugging fr all interface type number debugging fr arp interface type number debugging fr event interface type number debugging fr lmi interface type number 61小结小结l路由器的功能、结构和接口路由器的功能、结构和接口l路由器的基本配置路由器的基本配置l常见广域网协议常见广域网协议62

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号