1、波特率为9600bit/s 、8 位数据位、1 位停止位、无校验和无流控。如图4-2 至图4-4 所示。图4-2 新建连接图4-3 连接端口设置图4-4 端口通信参数设置第三步:路由器上电,终端上显示路由器自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如Quidway),即进入路由器的系统视图。第四步:键入命令,配置路由器或查看路由器运行状态。需要帮助可以随时键入“?”, 具体的配置命令请参考本书中以后各章节的内容。华为路由器与华为交换机一样均采用命令行的方式进行配置,为了我们实验的顺利进行,先来介绍一下Quidway 系列路由器的几种配置视图: 系统视图:通过Console
2、方式登录路由器即可进入系统视图,在该视图下主要完成全局参数的配置。 接口视图:在系统视图下输入interface interface-type interface-number 即可进入接口配置,在该视图下主要完成接口参数的配置。 路由协议视图:在系统视图下输入rip 即可进入路由协议配置视图,该配置视图下可以完成路由协议的一些相关配置。下面是在路由器上进行视图切换的界面,学生可以参照它来熟悉视图切换。Router /系统视图,通过Console 方式登录路由器即可进入Routerinterface e0 /进入接口视图Router-Ethernet0interface s0 /进入接口视图R
3、outer-Serial0quit /退至系统视图Routerrip /进入路由协议视图waiting. RIP is running Router-rip注意上面几种视图的提示符的变化。有的命令只能在某一视图执行,有的则可以在多个视图下执行,在实验时要多加注意。使用quit 命令能逐步退至系统视图。4.5.2 Telnet 配置如果路由器的以太网口配置了IP 地址,我们就可以在本地或者远程使用Telnet 登录到路由器上进行配置,通过Telnet 和使用Console 口配置的界面完全相同,这样大大的方便了工程维护人员对设备的维护。Telnet 配置的具体步骤如下:按照图4-1 连接各网络设
4、备,并设置各主机的IP 地址。分别配置路由器RouterA 和RouterB 的E0 口的IP 地址及用户登录帐号。参考命令如下:/RouterA Routerinterface e0 Router-Ethernet0ip address 172.18.1.8 255.255.255.0 Router-Ethernet0quit Routerlocal-user router1 password simple huawei service-type administratior /RouterB 的配置和RouterA 类似在PC2 上通过telnet 进行测试是否能够登录路由器RouterA
5、 。对路由器RouterB 的测试和RouterA 的测试相类似。4.5.3 基本命令的使用1. 显示VRP 软件版本以及路由器硬件版本在任何视图下均可显示VRP 软件版本和路由器硬件版本,如在系统视图下执行display version 命令即可看到如下信息:Routerdisplay version Copyright Notice:All rights reserved (Oct 13 2004). Without the owners prior written consent, no decompiling or reverse-engineering shall be allowe
6、d. Huawei Versatile Routing Platform Software VRP (R) software, Version 1.74 Release 0110 /VRP 版本1.74 Copyright (c) 1997-2003 HUAWEI TECH CO., LTD. Quidway R2611 uptime is 0 days 0 hours 3 minutes 52 seconds System returned to ROM by reboot. Quidway R2611 with 1 MPC 8241 Processor Router serial numb
7、er is 8040C5ED0A394C6C 64M bytes SDRAM 8192K bytes Flash Memory 0K bytes NVRAM Config Register points to FLASH Hardware Version is MTR 1.0 CPLD Version is CPLD 1.0 Bootrom Version is 7.03 /Bootrom 版本7.03LAN 0 1FE Hardware Version is 2.0, Driver Version is 2.0 LAN 1 1FE Hardware Version is 2.0, Drive
8、r Version is 2.0 AUX AUX Hardware Version is 1.0, Driver Version is 1.0, Cpld Version is 1.0 WAN WAN Hardware Version is 1.0, Driver Version is 1.0, SLOT 0 8AS Hardware Version is 2.1, Driver Version is 1.0 2. 擦除配置信息(delete) 、保存配置信息(save) 、显示配置信息为了实验能够顺利进行,我们常常在配置路由器前需要恢复路由器的默认配置,避免以前的配置对实验造成影响,我们可以
9、在系统视图下执行delete 命令,擦除FLASH 中的信息。为了让路由器重新启动,可以在系统视图下执行reboot 命令。为了让路由器当前配置的信息保存到FLASH 中,我们可以在系统视图下执行save 命令来完成此功能。在系统视图下我们还可以通过执行display current-configuration 命令查看路由器的当前配置信息。命令执行结果参考如下:Routerdelete This will erase the configuration in the flash memory. The router configurations will be erased to recon
10、figure Are you sure?Y/Ny Now erasing the configuration in flash memory. Please wait for a while. Erase the configuration in flash memory successfully Please reboot the router Routerdisplay current-configuration Now create configuration. Current configuration !version 1.74 local-user router1 service-
11、type operator password simple huawei firewall enable aaa-enable aaa accounting-scheme optionalinterface Aux0 async mode flow link-protocol pppinterface Ethernet0interface Ethernet1 !interface Serial0 interface Async0physical-mode async async mode protocol link-protocol ppp interface Async1 interface
12、 Async2 interface Async3 interface Async4 interface Async5 interface Async6 interface Async7 return Routersave Now writing the running config to flash memory. write the running config to flash memory successfully3. 修改路由器名(sysname) 缺省情况下路由器的名字为Quidway,为了管理方便常常需要给路由器取一个有意义的名字。给路由器取名只需要在系统视图下执行sysname
13、命令即可。参考配置命令如下:Quidwaysysname SwitchA SwitchA 此时前面的提示符已经改变成我们所需要的名字了。4. 查看接口状态我们常常需要判断一个物理接口是否工作正常,这可以通过接口信息来判断。我们执行下面的命令即可查看接口信息:以太网接口信息RouterAdisplay interface e0 Ethernet0 current state:up, line protocol current state:down /接口是否启动Description: Ethernet interface, Ethernet0 Interface The Maximum Tra
14、nsmit Unit is 1500 IP Sending Frames Format is Ethernet_II,Hardware address is 00-e0-fc-27-bd-db Media type is twisted pair, loopback is not set, promiscuous mode not set /接口工作方式、速率Full-duplex mode, 100Mbps-speed mode, link type is autonegotiation Input queue : (size/max/drops) 0/200/0 FIFO queueing
15、: FIFO (Outbound queue:Size/Length/Discards) FIFO: 0/75/0 Last 5 minutes input rate 9.25 bytes/sec, 0.08 packets/sec Last 5 minutes output rate 0.00 bytes/sec, 0.00 packets/sec Input: 42 packets, 4351 bytes 34 broadcasts, 8 multicasts 0 errors, 0 runts, 0 giants 0 CRC,0 frame errors, 0 overrunners 0
16、 aborted sequences 0 no buffers 0 packets with dribble condition detected Output:0 packets, 0 bytes 0 broadcasts, 0 multicasts 0 errors, 0 underruns, 0 collisions 0 packets had been deferred 串口接口信息RouterAdisplay interface s0 Serial0 current state:up /接口是否启动physical layer is synchronous, baudrate is
17、64000 bps interface is DCE, clock is DCECLK, cable type is V35 Link-protocol is PPP /广域网协议类型/广域网协议状态LCP opened, IPCP initial, IPXCP initial, CCP initial, BRIDGECP initial (size/max/drops) 0/50/0Last 5 minutes input rate 1.96 bytes/sec, 0.16 packets/sec Last 5 minutes output rate 2.50 bytes/sec, 0.19
18、 packets/sec 99 packets, 1200 bytes 108 packets, 1362 bytes DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP /控制信号比较两种接口信息有什么不同吗?上面黑体信息是我们关注最多的信息,要多加注意。5. 查看路由表(display ip routing-table) display ip routing-table 命令用来显示路由器的当前路由表,这有助于我们在配置路由协议时,检查网络运行状况。在默认配置下显示路由表如下所示:RouterAdisplay ip routing-table Routing Tables
19、:Destination/Mask Proto Pref Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 其中的两个地址是专用于路由器自身的,具体详解在路由协议中进行介绍。6. 修改语种显示华为路由器支持中文和英文两种语言。只要执行language 命令就可以相互切换语种。具体输入输出信息如下:RouterAlanguage Current Language : ENGLISH Will you switch langu
20、age mode ?(Y/N)y You have changed the language mode 现在可以通过执行display version 看看和以前的结果有什么不同。3.5.4 路由器的升级随着网络的发展,功能需求越来越多,所以需要使用功能更加强大的高版本软件来代替低版本软件,这就涉及到软件升级问题。下面我们介绍最常用的通过Console 口进行升级的方法。具体操作步骤如下:重启路由器,将会见到路由器的启动界面。路由器自检结束,出现“Press Ctrl-B to enter Boot Menu”时,按下“ctrl+b” 后提示输入密码。输入密码后将出现如下信息:Boot Men
21、u:1: Download application program with XMODEM 2: Download application program with NET 3: Clear configuration 4: Start up and ignore configuration 5: Boot ROM Operation Menu 6: Do not check the version of the software 7: Exit and reboot Enter your choice(1-7):选择1,升级路由器的应用程序。出现如下界面:Please choose your
22、 download speed: 9600 bps 19200 bps 38400 bps 57600 bps 115200 bps Exit to Main Menu Enter your choice(1-6):第五步:选择5,将波特率115200bps 作为升级文件下载速度。接着将出现如下提示信息:Download speed is 115200 bps. Change the terminals speed to 115200 bps, and select XMODEM protocol. Press key when ready. 第六步:选择超级终端的“文件|属性”菜单,在出现的
23、对话框中按“配置”按钮(如图4-5 所示),将Com 口的波特率修改为115200 。先后点击断开、连接按钮后回车,会出现如下提示:Now Downloading Program File. Please Start Transfer Program File And Use Xmodem Protocol. If You Want To Exit. Press . Downloading.CCCCCCCCCCCCCCCCCCCCCC 图4-5 超级终端属性对话框第七步:点击超级终端工具栏中的“发送”按钮,在弹出的对话框中,选择相应的升级软件,并选择Xmodem 协议后,点击“发送”按钮(如图
24、4-6),将会出现图3-7 所示的升级文件发送界面。图4-6 发送文件对话框图4-7 升级文件发送界面发送完成后将出现如下提示信息:Download completed. Writing to flash memory. Please wait, it may take a long time# # Writing into Flash Succeeds. Please use 9600 bps.Press key to exit to Main Menu . 第八步:将串口的波特率改回9600,断开、连接后按回车键,将会看到如下信息: Do not check the version of the software第九步:选择7,退出Boot 菜单,重起路由器。至此,路由器的应用程序升级完成。您可以在路由器启动完后,通过display version 命令检查路由器的新的版本号。3.6实验总结通过本实验,应该掌握路由器常用的两种基本配置方式,熟悉一些基本的路由器配置命令,了解路由器的升级方法。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1