《路由器基础及配置.ppt》由会员分享,可在线阅读,更多相关《路由器基础及配置.ppt(46页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、5、路由器基础及配置、路由器基础及配置目标 掌握路由器基本原理掌握路由器基本原理 能能够够利用一些常用命令配置路由器利用一些常用命令配置路由器 能能够够升升级级路由器路由器 课程内容路由器基础路由器基础路由器基础路由器基础路由器配置路由器配置路由器配置路由器配置命令行简介命令行简介命令行简介命令行简介升级路由器升级路由器升级路由器升级路由器路由器的概念及基本构成F路由器路由器路由器路由器一种重要的网一种重要的网一种重要的网一种重要的网络设备络设备F用于网用于网用于网用于网络络互互互互连连的的的的计计算机算机算机算机设备设备F作作作作为为路由器,必路由器,必路由器,必路由器,必须须具具具具备备:
2、两个或两个以上的接口两个或两个以上的接口两个或两个以上的接口两个或两个以上的接口协议协议至少向上至少向上至少向上至少向上实现实现到网到网到网到网络层络层具有存具有存具有存具有存储储、转发转发、寻寻径功能径功能径功能径功能路由器的作用F路由器的核心作用是路由器的核心作用是路由器的核心作用是路由器的核心作用是实现实现网网网网络络互互互互连连F分分分分组组数据数据数据数据转发转发路由路由路由路由(寻寻径径径径):路由表建立、刷新、:路由表建立、刷新、:路由表建立、刷新、:路由表建立、刷新、查查找找找找子网子网子网子网间间的速率适配的速率适配的速率适配的速率适配隔离网隔离网隔离网隔离网络络,防止网,防
3、止网,防止网,防止网络风络风暴,指定暴,指定暴,指定暴,指定访问规则访问规则(防防防防火火火火墙墙)异种网异种网异种网异种网络络互互互互连连路由器工作流程IPIPETHETHPPPPPP以太口以太口以太口以太口串口串口串口串口IPIPETHETHPPPPPP以太口以太口以太口以太口串口串口串口串口协议封装协议封装协议封装协议封装路由选择路由选择路由选择路由选择协议转换协议转换协议转换协议转换路由器路由器路由器路由器路由器路由器路由器路由器WANWAN传送传送传送传送拆包拆包拆包拆包LAN1LAN1LAN2LAN2接收接收接收接收发送发送发送发送工作过程工作过程工作过程工作过程路由表路由表内容示
4、例路由表内容示例路由表内容示例路由表内容示例下一跳地址下一跳地址下一跳地址下一跳地址掩掩掩掩码码目的地址目的地址目的地址目的地址Quidway R1602同同同同异异异异步步步步串串串串口口口口同同同同异异异异步步步步串串串串口口口口以以以以太太太太网网网网口口口口备备份份份份口口口口配配配配置置置置口口口口电电源源源源插插插插座座座座电电源源源源开开开开关关关关课程内容路由器基础路由器基础路由器基础路由器基础路由器配置路由器配置路由器配置路由器配置命令行简介命令行简介命令行简介命令行简介升级路由器升级路由器升级路由器升级路由器配置路由器F通通通通过过consoleconsole口配置口配置口
5、配置口配置F通通通通过拨过拨号号号号远远程配置程配置程配置程配置F通通通通过过telnettelnet方式配置方式配置方式配置方式配置F通通通通过哑终过哑终端方式配置端方式配置端方式配置端方式配置F通通通通过过FTPFTP方式方式方式方式传传送配置文件送配置文件送配置文件送配置文件通过console口配置建立本地配置环境配置口配置口配置口配置口(Console)(Console)配置口配置口配置口配置口(console)(console)电缆电缆R232 R232 串口串口串口串口 步骤一:连接配置电缆F将路由器随机所将路由器随机所将路由器随机所将路由器随机所带带的配置的配置的配置的配置电缆电
6、缆取出取出取出取出FRJ45RJ45头头一端接在路由器的一端接在路由器的一端接在路由器的一端接在路由器的consoleconsole口上口上口上口上F9 9针针(或或或或2525针针)RS232)RS232接口一端接在接口一端接在接口一端接在接口一端接在计计算机的算机的算机的算机的串行口上串行口上串行口上串行口上步骤二:创建超级终端(1)以以WINDOWS98 WINDOWS98 所带的所带的“超级终端超级终端”为例为例 点击点击“开始开始”“”“程序程序”“”“附件附件”“”“超级终端超级终端”进入进入“超级终端超级终端”目录后,选择目录后,选择“Hypertrm”Hypertrm”,即可新
7、,即可新建一建一“超级终端超级终端”步骤二:创建超级终端(2)通过拨号线路远程配置路由器将路由器和微机分别与modem连接 备备份份份份电缆电缆modemmodemmodemmodemPSTN/ISDNPSTN/ISDN通过Telnet配置本地路由器Quidwaylogin telnetQuidwaylogin telnetQuidwaylocal-user huawei service-type exec-operator password Quidwaylocal-user huawei service-type exec-operator password simple quidways
8、imple quidway服务器服务器服务器服务器配置路由器的一台微机配置路由器的一台微机配置路由器的一台微机配置路由器的一台微机工作站工作站工作站工作站工作站工作站工作站工作站10Base-T 10Base-T 网口网口网口网口通过哑终端配置Quidway-Serial0physical-mode asyncQuidway-Serial0physical-mode async同同同同/异步串口口异步串口口异步串口口异步串口口通过FTP配置在路由器上启在路由器上启在路由器上启在路由器上启动动FTPFTP服服服服务务器器器器在在在在终终端上启端上启端上启端上启动动FTPFTP客客客客户户程序程序
9、程序程序FTP serverFTP serverFTP clientFTP clientEthernetEthernet课程内容路由器基础路由器基础路由器基础路由器基础路由器配置路由器配置路由器配置路由器配置命令行简介命令行简介命令行简介命令行简介升级路由器升级路由器升级路由器升级路由器命令行概述F普通用普通用户模式模式 F特特权用用户模式模式F全局配置模式全局配置模式F接口配置模式接口配置模式F路由路由协议配置模式配置模式进入路由器配置界面 Press ENTER key to get start when you see ATS0=1.Press ENTER key to get star
10、t when you see ATS0=1.System now is starting.ATS0=1 System now is starting.ATS0=1QuidwayQuidwayconsoleconsole普通用户模式命令列表?enable Turn on privileged commands enable Turn on privileged commands exit Exit from EXEC exit Exit from EXEC help Description of the interactive help help Description of the inter
11、active help systemsystem language Switch language mode(English,language Switch language mode(English,Chinese)Chinese)ping Send echo messages ping Send echo messages show Show running system information show Show running system information telnet Connect remote computer telnet Connect remote computer
12、 tracert Trace route to destination tracert Trace route to destination系统视图命令列表configureconfigureEnter configuration modeEnter configuration modeDebugDebugDebugging functionsDebugging functionsDeleteDeleteErase the configuration file in flash or nvramErase the configuration file in flash or nvramRebo
13、otRebootReboot the routerReboot the routerDisplayDisplayShow running system informationShow running system informationSaveSaveWrite running configuration to flash or nvramWrite running configuration to flash or nvramUndoUndoDisable some parameter switchsDisable some parameter switchsQuidway?Quidway?
14、接口视图命令列表BandwidthBandwidthbandwidth information parameterbandwidth information parameterBaudrateBaudrateSet transmite and receive baudrateSet transmite and receive baudrateLink-protocolLink-protocolSet encapsulation type for an interfaceSet encapsulation type for an interfaceIpIpInterface Internet P
15、rotocol configure commandInterface Internet Protocol configure commandShutdownShutdownShutdown the selected interfaceShutdown the selected interfacePhysical-modePhysical-modeConfigure sync or async physical layer on serial Configure sync or async physical layer on serial interfaceinterfaceUndoUndoNe
16、gate a Command or Set its defaultNegate a Command or Set its defaultDialerDialerDial-On-Demand routing(DDR)commandDial-On-Demand routing(DDR)commandQuitQuitExit from config interface modeExit from config interface modeLoopbackLoopbackConfigure internal loopback on an interfaceConfigure internal loop
17、back on an interfaceMtuMtuMaximum transmission unitMaximum transmission unitFFQuidwayinterface serial 0Quidwayinterface serial 0FFQuidway-Serial0?Quidway-Serial0?在线帮助Quidway?Quidway?aaa-enable Enable AAA(Authentication,Authorization aaa-enable Enable AAA(Authentication,Authorization and Accounting)a
18、nd Accounting)acl Specify structure of access-list configure acl Specify structure of access-list configure information information arp Add a ARP entry arp Add a ARP entry bgp Enable/disable BGP protocol bgp Enable/disable BGP protocol bridge Bridge Set bridge Bridge Set 命令行错误信息QuidwaydisplayQuidway
19、display Incorrect command Incorrect commandQuidwaydisplayQuidwaydisplay Incomplete command Incomplete commandQuidwaydisplay interface serial 0 0Quidwaydisplay interface serial 0 0 Too many parameters Too many parameters历史命令Quidwaydisplay history-commandQuidwaydisplay history-commandint s 0int s 0exi
20、texit 或或或或 上一条历史纪录上一条历史纪录上一条历史纪录上一条历史纪录 或或或或 下一条历史纪录下一条历史纪录下一条历史纪录下一条历史纪录 编辑特性FF普通按普通按普通按普通按键键 输输入字符到当前光入字符到当前光入字符到当前光入字符到当前光标标位置位置位置位置FF退格退格退格退格键键BackSpaceBackSpace 删删除光除光除光除光标标位置的前一个字符位置的前一个字符位置的前一个字符位置的前一个字符FF删删除除除除键键DeleteDelete 删删除光除光除光除光标标位置字符位置字符位置字符位置字符FF左光左光左光左光标键标键 光光光光标标相左移相左移相左移相左移动动一个字符
21、位置一个字符位置一个字符位置一个字符位置FF右光右光右光右光标键标键 光光光光标标相右移相右移相右移相右移动动一个字符位置一个字符位置一个字符位置一个字符位置FF上下光上下光上下光上下光标键标键 显显示示示示历历史命令史命令史命令史命令显示特性Language中英文显示方式切换中英文显示方式切换中英文显示方式切换中英文显示方式切换暂停显示时键入暂停显示时键入暂停显示时键入暂停显示时键入Ctrl+c Ctrl+c 停止显示和命令执行停止显示和命令执行停止显示和命令执行停止显示和命令执行暂停显示时键入空格键暂停显示时键入空格键暂停显示时键入空格键暂停显示时键入空格键继续显示下一屏信息继续显示下一屏
22、信息继续显示下一屏信息继续显示下一屏信息暂停显示时键入回车键暂停显示时键入回车键暂停显示时键入回车键暂停显示时键入回车键继续显示下一行信息继续显示下一行信息继续显示下一行信息继续显示下一行信息课程内容路由器基础路由器基础路由器基础路由器基础路由器配置路由器配置路由器配置路由器配置命令行简介命令行简介命令行简介命令行简介升级路由器升级路由器升级路由器升级路由器口令忘了!怎么办?进入特入特权模式的口令忘了?模式的口令忘了?口令忘了!口令忘了!口令忘了!口令忘了!没法配置没法配置没法配置没法配置路由器了路由器了路由器了路由器了l l 重起路由器重起路由器重起路由器重起路由器l l 按下按下按下按下C
23、trl+b Ctrl+b l l 输输入入入入BootromBootrom密密密密码码 l l 选择选择清除密清除密清除密清除密码码,重起路由器,重起路由器,重起路由器,重起路由器l l 修改密修改密修改密修改密码码 升级路由器F通通通通过过consoleconsole口升口升口升口升级级F通通通通过过FTPFTP升升升升级级F通通通通过过TFTPTFTP升升升升级级更多的功能更多的功能更多的功能更多的功能更更更更简简便的配置便的配置便的配置便的配置通过Console口升级路由器QuidwayrebootQuidwayreboot WARNING:System will REBOOT!Cont
24、inue?Y/Ny WARNING:System will REBOOT!Continue?Y/Ny.CTR+B.CTR+B Boot Menu:Boot Menu:1:Download application program with XMODEM 1:Download application program with XMODEM 2:Download application program with TFTP 2:Download application program with TFTP 3:Clear application password 3:Clear application
25、password 4:Clear configuration 4:Clear configuration 5:Exit and reboot 5:Exit and reboot Enter your choice(1-5):1 Enter your choice(1-5):1consoleconsole通过Console口升级路由器(续)通过FTP升级路由器FTP serverFTP serverFTP clientFTP client10.110.0.210.110.0.2EthernetEthernetF启启启启动动FTPFTP服服服服务务器功能器功能器功能器功能QuidwayQuidwa
26、yftp-server enableftp-server enableF增加用增加用增加用增加用户户名并名并名并名并设设置密置密置密置密码码 Quidwaylocal-Quidwaylocal-user XXX service-type ftp password user XXX service-type ftp password simple|cipher 123 simple|cipher 123 通过TFTP升级路由器FTP serverFTP serverFTP clientFTP clientEthernetEthernetl l选择选择指定的以太口指定的以太口指定的以太口指定的以太
27、口l l在配置在配置在配置在配置电脑电脑上运行上运行上运行上运行TFTPTFTP服服服服务务器程序器程序器程序器程序l l指定指定指定指定应应用程序所在的路径用程序所在的路径用程序所在的路径用程序所在的路径l l运行超运行超运行超运行超级终级终端端端端通过TFTP升级路由器l l 重起路由器并按下重起路由器并按下重起路由器并按下重起路由器并按下“N”N”键键l l 修改参数修改参数修改参数修改参数(IP(IP地址地址地址地址,文件名等等文件名等等文件名等等文件名等等)l l 按按按按“C”(continue)C”(continue)l l 路由器重起后按路由器重起后按路由器重起后按路由器重起后
28、按Ctr+BCtr+Bl lBoot Menu:Boot Menu:1:Download application program with 1:Download application program with XMODEMXMODEM 2:Download application program with TFTP 2:Download application program with TFTP 3:Clear application password 3:Clear application password 4:Clear configuration 4:Clear configurati
29、on 5:Exit and reboot 5:Exit and reboot Enter your choice(1-5):2 Enter your choice(1-5):2 基本操作命令F系系系系统统状状状状态态和系和系和系和系统统信息信息信息信息查查看命令:看命令:看命令:看命令:displaydisplayF调试调试命令:命令:命令:命令:debugdebug、monitormonitorF测试测试工具:工具:工具:工具:pingping、tracerttracert常用display命令l ldisplay versionl ldisplay current-configuratio
30、nl ldisplay interfacedisplay versionQuidwaydisplay versionQuidwaydisplay version Copyright Notice:Copyright Notice:All rights reserved(Apr 10 2003).All rights reserved(Apr 10 2003).Without the owners prior written consent,no decompiling Without the owners prior written consent,no decompiling or reve
31、rse-engineering shall be allowed.or reverse-engineering shall be allowed.Huawei Versatile Routing Platform Software Huawei Versatile Routing Platform Software VRP(R)software,Version 1.74 Release 0006 VRP(R)software,Version 1.74 Release 0006 Copyright(c)1997-2003 HUAWEI TECH CO.,LTD.Copyright(c)1997-
32、2003 HUAWEI TECH CO.,LTD.Quidway R2630E uptime is 0 days 0 hours 3 minutes 10 seconds Quidway R2630E uptime is 0 days 0 hours 3 minutes 10 seconds System returned to ROM by reboot.System returned to ROM by reboot.Quidway R2630E with 1 MPC 8240 Processor Quidway R2630E with 1 MPC 8240 Processor Route
33、r serial number is 00E0FC067AF8523E Router serial number is 00E0FC067AF8523E 64M bytes SDRAM 64M bytes SDRAM 8192K bytes Flash Memory 8192K bytes Flash Memory 128K bytes NVRAM 128K bytes NVRAM Config Register points to NVRAM Config Register points to NVRAM Hardware Version is MTR 1.1 Hardware Versio
34、n is MTR 1.1 CPLD Version is CPLD 3.0 CPLD Version is CPLD 3.0 Bootrom Version is 4.33 Bootrom Version is 4.33 AUX AUX Hardware Version is 1.0,Driver Version is 1.0 AUX AUX Hardware Version is 1.0,Driver Version is 1.0 LAN 1FE Hardware Version is 2.0,Driver Version is 2.0 LAN 1FE Hardware Version is
35、 2.0,Driver Version is 2.0 Slot 1 RTB22SA Hardware Version is 1.1,Driver Version is 1.2 Slot 1 RTB22SA Hardware Version is 1.1,Driver Version is 1.2 display current-configurationQuidwaydisplay current-configurationQuidwaydisplay current-configuration Current configuration Current configuration hostn
36、ame huawei-bj hostname huawei-bj !interface Ethernet0 interface Ethernet0 !interface Serial0 interface Serial0 encapsulation ppp encapsulation ppp exit exit ip route 10.110.0.0 255.255.0.0 11.1.1.1 preference 60 ip route 10.110.0.0 255.255.0.0 11.1.1.1 preference 60 !end enddisplay interface:显示接口信息Q
37、uidwaydisplay interface Quidwaydisplay interface serial 0serial 0Serial0 is up,line protocol is upSerial0 is up,line protocol is up physical layer is synchronous,baudrate is 64000 bps physical layer is synchronous,baudrate is 64000 bps interface is DCE,clock is DCECLK,cable type is RS232 interface i
38、s DCE,clock is DCECLK,cable type is RS232 Encapsulation is PPP Encapsulation is PPP LCP opened,IPCP opened,IPXCP initial LCP opened,IPCP opened,IPXCP initial 5 minutes input rate 52.63 bytes/sec,0.96 packets/sec 5 minutes input rate 52.63 bytes/sec,0.96 packets/sec 5 minutes output rate 60.00 bytes/
39、sec,1.19 packets/sec 5 minutes output rate 60.00 bytes/sec,1.19 packets/sec Input queue is 0/75/0(current/max/drops)Input queue is 0/75/0(current/max/drops)Queueing strategy:FIFO Queueing strategy:FIFO Output Queue:(size/max/drops)0/75/0 Output Queue:(size/max/drops)0/75/0 539 packets input,24907 by
40、tes,0 no buffers 539 packets input,24907 bytes,0 no buffers 670 packets output,29586 bytes,0 no buffers 670 packets output,29586 bytes,0 no buffersDCD=UP DTR=UP DSR=UP RTS=UP CTS=UPDCD=UP DTR=UP DSR=UP RTS=UP CTS=UP调试命令:debug,info-centerQuidwayinfo-center enableQuidwayinfo-center enableQuidwayinfo-c
41、enter console debuggingQuidwayinfo-center console debuggingQuidwayinfo-center monitor debuggingQuidwayinfo-center monitor debuggingping:测试工具 PING 11.1.1.1:56 data bytes,press CTRL_C to break 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
42、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=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=2 ttl=255 time=32 ms Reply
43、 from 11.1.1.1:bytes=56 Sequence=3 ttl=255 time=31 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 Reply from 11.1.1.1:bytes=56 Sequence=4 ttl=255 time=31 ms -11.1.1.1 ping statistics-11.1.1.1 ping statistics-5 packets transmit
44、ted 5 packets transmitted 5 packets received 5 packets received 0.00%packet loss 0.00%packet loss round-trip min/avg/max=31/31/32 ms round-trip min/avg/max=31/31/32 mstracert:测试工具 traceroute to traceroute to 10.110.201.186(10.110.201.186)30 hops 10.110.201.186(10.110.201.186)30 hops max,40 bytes packetmax,40 bytes packet 1 11.1.1.1 29 ms 22 ms 21 ms 1 11.1.1.1 29 ms 22 ms 21 ms 2 10.110.201.186 38 ms 24 ms 24 ms 2 10.110.201.186 38 ms 24 ms 24 ms路由器工作原理通过console口本地和远程配置路由器系统视图和接口视图的区别 升级路由器常用的路由器命令和小工具