资源预览内容
第1页 / 共58页
第2页 / 共58页
第3页 / 共58页
第4页 / 共58页
第5页 / 共58页
第6页 / 共58页
第7页 / 共58页
第8页 / 共58页
第9页 / 共58页
第10页 / 共58页
亲,该文档总共58页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Chapter 10 路由器配置和应用路由器配置和应用ISSUE 2.1日期:杭州华三通信技术有限公司 版权所有,未经授权不得使用与传播n路由器的功能、结构和接口路由器的功能、结构和接口n路由器的基本配置路由器的基本配置n常见广域网协议常见广域网协议课程目标课程目标学习完本课程,您应该能够:学习完本课程,您应该能够:n路由器的功能、结构和接口路由器的功能、结构和接口n路由器的基本配置路由器的基本配置n常见广域网协议常见广域网协议目录目录www.h3c.com4路由器工作流程路由器工作流程IPETHPPP以太网口以太网口串口串口IPPPPETH串口串口以太网口以太网口协议封装协议封装路由选择路由选择协议转换协议转换路由器路由器路由器路由器传送传送拆包拆包接收接收发送发送工作过程工作过程www.h3c.com5路由器的结构路由器的结构l硬件硬件组成成CPU(处理器)RAM(存储正在运行的配置文件)FLASH(负责保存OS的映像和路由器的微码)NVRAM(保存配置件)ROM(加载OS)接口(完成路由器与其它设备的数据交换)l 软件件结构构BOOT ROM:主要功能是路由器加电后完成有关初始化工作,并向内存中加入操作系统代码COMWARE:H3C路由器上运行的软件平台www.h3c.com6COMWARE体系结构体系结构www.h3c.com7中低端路由器发展路标中低端路由器发展路标199619961998199820022002200320032000200020042004n路由器的功能、结构和接口路由器的功能、结构和接口n路由器的基本配置路由器的基本配置n常见广域网协议常见广域网协议目录目录www.h3c.com9AR28-31备备份份口口配配置置口口www.h3c.com10配置路由器配置路由器l通通过console口配置口配置l通通过拨号号远程配置程配置l通通过telnet方式配置方式配置l通通过哑终端方式配置端方式配置l通通过FTP方式方式传送配置文件送配置文件www.h3c.com11通过通过console口配置口配置建立本地配置环境配置口配置口(Console)配置口(配置口(console)电缆R232 串口串口 www.h3c.com12创建超级终端(创建超级终端(II)www.h3c.com13选择串口(选择串口(III)www.h3c.com14端口设置(端口设置(IV)www.h3c.com15通过拨号线路配置路由器通过拨号线路配置路由器l将路由器和将路由器和PC分别与分别与modem连接连接 备份电缆备份电缆modemmodemPSTN/ISDNwww.h3c.com16通过通过Telnet配置本地路由器配置本地路由器lH3C-Ethernet0/0ip address 10.0.0.100 24 l缺省的缺省的telnet登录用户名:登录用户名:admin 口令:口令:admin服务器服务器PC工作站工作站工作站工作站10Base-T 网口网口www.h3c.com17通过哑终端配置通过哑终端配置lH3C-Serial0/0physical-mode async同同/异步串口异步串口www.h3c.com18通过通过FTP配置配置l在路由器上启动在路由器上启动FTP服务器服务器l在终端上启动在终端上启动FTP客户端程序客户端程序FTP server10.110.0.1FTP client10.110.0.2Ethernetwww.h3c.com19命令行概述命令行概述l用户视图用户视图l系统视图系统视图 lRIP视图视图lOSPF视图视图lBGP视图视图l以太网接口视图以太网接口视图l同步串口视图同步串口视图lDialer接口视图接口视图www.h3c.com20进入路由器配置界面进入路由器配置界面 User interface Con 0 is available. Press ENTER to get started. consolewww.h3c.com21用户视图常用命令用户视图常用命令l? cdChange current directory debugging Enable system debugging functions delete Delete a file displayDisplay current system informationpingSend echo messagessaveSave current configuration resetReset operationreboot Reboot systemwww.h3c.com22系统视图常用命令系统视图常用命令lsystem-viewlH3C?aclSpecify acl configuration information arpAdd static ARP entry bgpSpecify BGP(Border Gateway Protocol) configuration informationfirewallSpecify firewall configuration information ipsecSpecify IPSec(IP Security) configuration information local-userSpecify local user configuration information pppSpecify PPP(the Point-to-Point Protocol)www.h3c.com23接口视图命令接口视图命令lH3Cinterface s0/0 lH3C-Serial0/0? baudrateSet transmit and receive baudrate async Asynchronous line configuration 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 interfacewww.h3c.com24在线帮助在线帮助lH3C 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 setting of debugging switches dhcp DHCP configuration subcommands diagnostic-information System Information for Diagnosis www.h3c.com25命令行错误信息命令行错误信息 H3Cdispaly ? % Unrecognized command found at position. H3Cdisplay % Incomplete command found at position. H3Cdisplay interface Serial 0/0 0 % Too many parameters found at position.www.h3c.com26l历史命令史命令display history-commandl补全命令全命令使用Tab键l查看看历史史记录使用 键使用Ctrl P快捷键历史命令历史命令历史命令历史命令www.h3c.com27编辑特性编辑特性l普通按普通按键 输入字符到当前光入字符到当前光标位位置置l退格退格键BackSpace 删除光除光标位置的前一个字位置的前一个字符符l删除除键Delete 删除光除光标位置字符位置字符l左光左光标键 光光标向左移向左移动一个字符位置一个字符位置l右光右光标键 光光标向右移向右移动一个字符位置一个字符位置l上下光上下光标键 显示示历史命令史命令www.h3c.com28lLanguage中英文中英文显示方式切示方式切换l暂停停显示示时键入入Ctrl+c 停止停止显示和命令示和命令执行行l暂停停显示示时键入空格入空格键继续显示下一屏示下一屏信息信息l暂停停显示示时键入回入回车键继续显示下一行示下一行信息信息显示特性显示特性显示特性显示特性www.h3c.com29l状态查看命令状态查看命令状态查看命令状态查看命令display versiondisplay current-configurationdisplay interfacedisplay ip route 基本操作命令基本操作命令基本操作命令基本操作命令www.h3c.com30display versionH3Cdisplay version H3C Comware Platform Software Comware software, Version 3.40, Feature 1711P01 Copyright(c). Without the owners prior written consent, no decompiling nor reverse-engineering shall be allowed. H3C AR18-22S-8 uptime is 0 week, 0 day, 4 hours, 48 minutes Last reboot 2000/01/01 00:00:00 CPU type: PowerPC 8248 400MHz 128M bytes SDRAM Memory 16M bytes Flash Memory 0K bytes NvRAM Memory Pcb Version:3.0 Logic Version:1.0 BootROM Version:14.52 SLOT 0 AUX (Hardware)3.0, (Driver)1.0, (Cpld)1.0 www.h3c.com31display current-configurationH3Cdisplay current-configuration# sysname H3C# FTP server enable# domain default enable system#radius scheme system server-type extended primary authentication 127.0.0.1 1645 primary accounting 127.0.0.1 1646 user-name-format without-domain#domain system access-limit disable state active#www.h3c.com32display interface显示接口信息显示接口信息H3Cdisplay 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 : disabledInternet 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, 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 frame errors Output:0 packets, 0 bytes 0 errors, 0 underruns, 0 collisions 0 deferred DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP www.h3c.com33H3C interface serial 0/0H3C-serial0/0 undo shutdown开启或关闭端口开启或关闭端口l开启已经关闭的端口开启已经关闭的端口H3C interface serial 0/0H3C-serial 0/0 shutdownl人工关闭端口人工关闭端口www.h3c.com34解读端口状态解读端口状态H3Cdisplay 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,物理层组件的状态物理层组件的状态数据链路层的状态数据链路层的状态www.h3c.com35displaydisplay ipip routing-tablerouting-tableH3Cdis ip 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 0 20.0.0.1 Ethernet0 20.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 . www.h3c.com36lterminal 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 module调试命令:调试命令:调试命令:调试命令:debuggingdebuggingwww.h3c.com37l H3Cping 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 ms 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:网络连通测试命令网络连通测试命令网络连通测试命令网络连通测试命令www.h3c.com38tracert:网络连通测试命令网络连通测试命令l H3C 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 msn路由器的功能、结构和接口路由器的功能、结构和接口n路由器的基本配置路由器的基本配置n常见广域网协议常见广域网协议目录目录www.h3c.com40广域网广域网 V.24 ,V.35, X.21BisEIA/TIA-232/449LAPB,Frame Relay,HDLC,PPP,SDLC网络层网络层X.25物理层物理层数据链路层数据链路层路由器路由器 A A广域网的下三层广域网的下三层网络层网络层物理层物理层数据链路层数据链路层路由器路由器 B Bwww.h3c.com41广域网的数据链路层广域网的数据链路层专用点到点专用点到点HDLC,PPP分组交换分组交换X.25,帧中继电路交换PSTN:PPPISDN B信道:PPPISDN D信道:LAPDwww.h3c.com42高级数据链路控制高级数据链路控制HDLCl 面向比特面向比特l 透明传输零比特填充法透明传输零比特填充法l 运行于同步串行线路运行于同步串行线路地址地址标志标志控制控制信息信息帧校验帧校验标志标志www.h3c.com43HDLC协议的配置协议的配置l在接口上封装在接口上封装HDLC协议协议link-protocol hdlcl打开打开HDLC所有报文调试信息开关所有报文调试信息开关 debugging hdlc all interface type number l打开打开HDLC事件调试信息开关事件调试信息开关 debugging hdlc event interface type number l打开打开HDLC数据包调试信息开关数据包调试信息开关 debugging hdlc packet interface type number www.h3c.com44PPP配置命令配置命令l封装封装PPPlink-protocol pppl设置验证类型设置验证类型ppp authentication-mode pap|chap l设置用户名、口令、服务类型设置用户名、口令、服务类型H3Clocal-user huaweiH3C-luser-huaweipassword simple sharepassH3C-luser-huaweiservice-type pppwww.h3c.com45PAP配置命令配置命令l验证方配置验证方配置配置验证方式ppp authentication-mode pap配置用户列表H3Clocal-user huaweiH3C-luser-huaweipassword simple sharepassH3C-luser-huaweiservice-type pppl被验证方配置被验证方配置配置PAP用户名ppp pap local-user username password simple|cipher passwordwww.h3c.com46CHAP配置命令配置命令l主验证方配置主验证方配置:配置本地验证对端(方式为CHAP) ppp authentication-mode chap配置本地名称 ppp chap user username将对端用户名和密码加入本地用户列表 H3Clocal-user huawei H3C-luser-huaweipassword simple sharepass H3C-luser-huaweiservice-type pppl被验证方配置被验证方配置:配置本地名称密码H3C-Serial0/0 ppp chap user usernameH3C-Serial1/1ppp chap password simple|cipher passwordwww.h3c.com47PPP典型配置举例一典型配置举例一主验证方主验证方被验证方被验证方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 local-user routerb password simple hellowww.h3c.com48PPP典型配置举例二典型配置举例二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 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主验证方主验证方被验证方被验证方www.h3c.com49帧中继的配置帧中继的配置l封装帧中继协议封装帧中继协议link-protocol frame-relay MFR |nonstandard | ietf l配置帧中继接口的终端类型配置帧中继接口的终端类型fr interface-type dce | dte | nni l选择选择LMI类型类型fr lmi type ansi | nonstandard | q933a www.h3c.com50配置帧中继地址映射配置帧中继地址映射l手工配置静态映射:手工配置静态映射:fr map ip | ipx protocol-address dlci broadcast l动态建立:使能动态逆向地址解析协议动态建立:使能动态逆向地址解析协议fr inarp ip | ipx dlci 帧中继地址映射也就是建立对端协议地址与本地帧中继地址映射也就是建立对端协议地址与本地DLCI的映射的映射关系,该地址映射可静态配置,也可动态建立关系,该地址映射可静态配置,也可动态建立www.h3c.com51配置帧中继本地虚电路配置帧中继本地虚电路l为主接口分配一条虚电路号为主接口分配一条虚电路号fr dlci dlciwww.h3c.com52配置帧中继子接口配置帧中继子接口l创建帧中继子接口,进入子接口配置模式创建帧中继子接口,进入子接口配置模式interface type number.subinterface-number multipoint | point-to-point l配置帧中继子接口的虚电路号配置帧中继子接口的虚电路号fr dlci dlci建立地址映射的命令和物理接口相同,可以使用静态或动态地建立地址映射的命令和物理接口相同,可以使用静态或动态地址映射。地址映射只有在点到多点的情况下才需要配置址映射。地址映射只有在点到多点的情况下才需要配置子接口有两种类型:点到点和点到多点子接口有两种类型:点到点和点到多点www.h3c.com53配置帧中继交换配置帧中继交换l允许帧中继进行允许帧中继进行PVC交换交换fr switchingl设置帧中继接口类型设置帧中继接口类型fr interface-type dce | dte | nni l配置帧中继配置帧中继PVC交换的路由交换的路由H3C-Serial1/0fr dlci-switch 16 interface Serial 1/1 dlci 40注意:如果使用帧中继交换,接口类型必须为注意:如果使用帧中继交换,接口类型必须为DCE或或NNIwww.h3c.com54帧中继典型配置举例一帧中继典型配置举例一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-protocol frame-relayfr interface-type dtefr inarp( fr map ip 202.38.163.251dlci 100)202.38.163.251/24202.38.160.252/24www.h3c.com55帧中继典型配置举例二帧中继典型配置举例二IP 202.38.11.251/24DLCI 50l通通过帧中中继网网络互互连局域网局域网DLCI 70IP:202.38.11.252/24Router BRouter ARouter CDLCI 60DLCI 80IP:202.38.11.253/24帧中继帧中继www.h3c.com56帧中继的监控与维护帧中继的监控与维护操作操作命令命令显示帧中继显示帧中继LMILMI类型报文的收发统计类型报文的收发统计显示协议地址与帧中继地址映射表显示协议地址与帧中继地址映射表显示帧中继显示帧中继PVCPVC统计信息统计信息显示帧中继显示帧中继PVCPVC路由表路由表显示各接口的帧中继协议状态显示各接口的帧中继协议状态清除所有动态建立的帧中继地址映射清除所有动态建立的帧中继地址映射打开帧中继的所有报文调试开关打开帧中继的所有报文调试开关打开帧中继打开帧中继ARPARP报文信息调试开关报文信息调试开关打开帧中继事件信息调试开关打开帧中继事件信息调试开关打开帧中继打开帧中继LMILMI协议信息调试开关协议信息调试开关display fr lmi-info interface type number 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 n路由器的功能、结构和接口路由器的功能、结构和接口n路由器的基本配置路由器的基本配置n常见广域网协议常见广域网协议本章总结本章总结杭州华三通信技术有限公司www.h3c.com
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号