1、计算机网络实验指引书昆明理工大学信息工程与自动化学院实验二 路由器配备和互换机配备1 实验目l 掌握路由器功能,特点及接口配备办法;l 掌握系列路由器Ethernet Interface配备办法;l 掌握系列路由器点到点接口配备办法(通过DCE电缆连接两个路由器WAN口,模仿DDN线路:,用HDLC帧格式);l 掌握掌握路由器点到点接口配备办法(用PPP帧格式);l 掌握系列路由器接口配备检查验证办法;2.。实验前准备阅读教材关于网络层和路由有关内容;阅读本实验内容及操作环节;参照资料:CCNA实验指南;CCNA2.0中文版教材;3. 实验内容l Ethernet Interface配备l 点
2、到点接口配备(用HDLC帧格式)l 点到点接口配备(用PPP帧格式)内容1 Ethernet Interface配备模仿软件“RouterSim-CCNA2”视图中RouterA,Router2611Ethernet Interface配备。 基本命令:enable(简写:en): 从顾客EXEC模式进入特权EXEC模式config terminal(简写:config t): 从特权EXEC模式进入全局配备模式hostname: 给路由器改名,后接路由器新名字interface(简写:int): 进入接口配备模式,后接接口标记ip address: 配备网络地址,后接ip地址和子网掩码no
3、shutdown: 保证该接口没关于闭copy running-config startup-config(简写:copy run start):很重要,用来保存运营配备文献操作环节 RouterA配备Router Con0 is now availablePress RETURN to get started.Router/进入顾客EXEC模式Routerenable /进入特权EXEC模式Router#config t /进入全局配备模式Enter configuration commands,one per line. End with CNTL/Z.Router(config)#hos
4、tname RouterA /设立路由器名字RouterA(config)#interface e0 /设立以太网接口,进入接口配备模式RouterA(config-if)#ip address 11.11.11.1 255.255.255.0 /配备ip地址RouterA(config-if)#no shutdown /启用该接口%LINEPROTO-5-UPDOWN:Line protocol on Interface Ethernet0,changed state to up/Ethernet 0上线路合同已启动%LINK-3-UPDOWN:Interface Ethernet0,cha
5、nged state to up/接口自身也已启动RouterA(config-if)#end /退出配备模式%SYS-5-CONFIG_I:Configured from console by consoleRouterA#show interface e0 /显示相应接口信息Ethernet0 is up,line protocol is upHardware is Lance,address is 0000.0c8d.5c9d (bia 0000.0c8d.5c9d)Internet address is 11.11.11.1/24 MTU 1500 bytes,BW 10000 Kbi
6、t,DLY 1000 usec,rely 255/255,load 1/255 Encapsulation ARPA,loopback not set,keepalive set (10 sec) ARP type:ARPA,ARP Timeout 04:00:00 Last input never,output 00:00:07,output hang never Last clearing of show interface counters never Queueing strategy:fifo Output queue 0/40,0 drops;input queue 0/75,0
7、drops 5 minute input rate 0 bits/sec,0 packets/sec 5 minute output rate 0 bits/sec,0 packets/sec 0 packets input,0 bytes,0 no buffer Received 0 broadcasts,0 runts,0 giants,0 throttles 0 input errors,0 CRC,0 frame,0 overrun,0 ignored,0 abort 0 input packets with dribble condition detected 472 packets
8、 output,47379 bytes,0 underruns 0 output errors,0 collisions,2 interface resets 0 babbles,0 late collision,0 deferred 0 lost carrier,0 no carrier 0 output buffer failures,0 output buffers swapped outRouterA#ping 11.11.11.2 /测试,必要在路由器2621配备后才干成功Type escape sequence to abort.Sending 5,100-byte ICMP Ec
9、hos to 11.11.11.2,timeout is 2 seconds:!Success rate is 100 percent (5/5),round-trip min/avg/max = 4/4/4 msRouterA#copy running-config startup-configBuilding configuration.OKRouterA#show running-config /显示运营配备文献内容Building configuration.Current configuration:!version 12.0service timestamps debug upti
10、meservice timestamps log uptimeno service password-encryption!hostname RouterA!interface Ethernet0ip address 11.11.11.1 255.255.255.0!interface Serial0no ip addressshutdown!interface Serial1no ip address!shutdown!interface TokenRing0no ip address!shutdown no ip classless !line con 0line aux 0line vt
11、y 0 4endRouterA#copy running-config startup-config /保存运营配备文献RouterA#Router2621配备Router Con0 is now availablePress RETURN to get started./进入顾客EXEC模式Routerenable /进入特权EXEC模式Router#config t /进入全局配备模式Enter configuration commands,one per line. End with CNTL/Z.Router(config)#hostname Router2621 /设立路由器名字Ro
12、uter2621(config)#interface f0/0 /设立网络接口,进入接口配备模式Router2621(config-if)#ip address 11.11.11.2 255.255.255.0 /配备ip地址Router2621(config-if)#no shut /启用该接口,全名是no shutdown%LINK-3-UPDOWN:Interface FastEthernet0/0,changed state to up/Ethernet 0上线路合同已启动%LINEPROTO-5-UPDOWN:Line protocol on Interface FastEthern
13、et0/0,changed state to up/接口自身也已启动Router2621(config-if)#end /退出配备模式%SYS-5-CONFIG_I:Configured from console by consoleRouter2621#show interface /显示相应接口信息FastEthernet0/0 is up,line protocol is upHardware is AmdFE,address is 00b0.6483.01c0 (bia 00b0.6483.01c0)Internet address is 11.11.11.2/24 MTU 1500
14、bytes,BW 100000 Kbit,DLY 100 usec, reliability 255/255,txload 1/255,rxload 1/255 Encapsulation ARPA,loopback not set Keepalive set (10 sec) Half-duplex,10Mb/s,100BaseTX/FX ARP type:ARPA,ARP Timeout 04:00:00 Last input 00:00:10,output 00:00:00,output hang never Last clearing of show interface counter
15、s never Queueing strategy:fifo Output queue 0/40,0 drops;input queue 0/75,0 drops 5 minute input rate 0 bits/sec,0 packets/sec 5 minute output rate 1000 bits/sec,0 packets/sec 2705 packets input,463756 bytes Received 2704 broadcasts,0 runts,0 giants,0 throttles 0 input errors,0 CRC,0 frame,0 overrun
16、,0 ignored 0 watchdog,0 multicast 0 input packets with dribble condition detected 7582 packets output,1007598 bytes,0 underruns 0 output errors,0 collisions,3 interface resets 0 babbles,0 late collision,0 deferred 0 lost carrier,0 no carrier 0 output buffer failures,0 output buffers swapped outFastE
17、thernet0/1 is down,line protocol is down /此接口尚未启用,线路合同也未启用Hardware is AmdFE,address is 00b0.6483.01c0 (bia 00b0.6483.01c0) Keepali ve set (10 sec) Full-duplex,100Mb/s,100BaseTX/FX ARP type:ARPA,ARP Timeout 04:00:00 Last input 00:00:01,output 00:00:02,output hang never Last clearing of show interface
18、 counters never Queueing strategy:fifo Output queue 0/40,0 drops;input queue 0/75,0 drops 5 minute input rate 0 bits/sec,0 packets/sec 5 minute output rate 0 bits/sec,0 packets/sec 52845 packets input,3778179 bytes Received 52845 broadcasts,0 runts,0 giants,0 throttles 0 input errors,0 CRC,0 frame,0
19、 overrun,0 ignored 0 watchdog,0 multicast 0 input packets with dribble condition detected 9785 packets output,1368297 bytes,0 underruns 0 output errors,0 collisions,6 interface resets 0 babbles,0 late collision,0 deferred 0 lost carrier,0 no carrier 0 output buffer failures,0 output buffers swapped
20、outRouter2621#copy running-config startup-config /保存运营配备文献Building configuration.OKRouter2621#show running-config /显示运营配备文献内容Building configuration.Current configuration:!version 12.0service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Router2621!interf
21、ace FastEthernet0/0ip address 11.11.11.2 255.255.255.0!interface FastEthernet0/1no ip addressshutdownno ip classless !line con 0line aux 0line vty 0 4endRouter2621#内容2 点到点接口配备(通过DCE电缆连接两个路由器WAN口,模仿DDN线路用HDLC帧格式。 模仿软件“RouterSim-CCNA2”视图中RouterA,RouterB配备。 要使两个串行接口可以通信,您必要提供时钟频率。时钟频率提供位同步,同步具备其她用途。提供这
22、种时钟频率设备是数据电路端设备(DCE),而其她设备被称为数据终端设备(DTE)。与DCE端相连路由器将需要提供时钟频率,本实验中RouterB将承担这个责任。重要命令:clock rate 数值 /可以键入clock rate ?进行查询操作环节RouterA配备RouterA Con0 is now availablePress RETURN to get started.RouterAenableRouterA#config t /进入全局配备模式Enter configuration commands,one per line. End with CNTL/Z.RouterA(conf
23、ig)#interface s0 /设立点到点接口,进入接口配备模式RouterA(config-if)#ip address 20.20.20.1 255.255.255.0 /配备ip地址RouterA(config-if)#no shut /启用该接口RouterA(config-if)#end%SYS-5-CONFIG_I:Configured from console by consoleRouterA#copy running-config startup-config /保存运营配备文献Building configuration.OKRouterA#show interface
24、 s0 /显示接口s0信息Serial0 is up,line protocol is upHardware is HD64570Internet address is 20.20.20.1/24(IP地址,24位子网掩码) MTU 1500 bytes,BW 1544 Kbit,DLY 0 usec,rely 255/255,load 1/255 Encapsulation HDLC(咱们所需要),loopback not set,keepalive set (10 sec) Last input 00:00:09,output 00:00:12,output hang never Last
25、 clearing of show interface counters never Input queue:0/75/0 (size/max/drops);Total output drops:0 Queueing strategy:weighted fair Output queue:0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 min
26、ute input rate 0 bits/sec,0 packets/sec 5 minute output rate 0 bits/sec,0 packets/sec 1721 packets input,106287 bytes,0 no buffer Received 1301 broadcasts,0 runts,0 giants,0 throttles 0 input errors,0 CRC,0 frame,0 overrun,0 ignored,0 abort 2195 packets output,100497 bytes,0 underruns 0 output error
27、s,0 collisions,221 interface resets 0 output buffer failures,0 output buffers swapped out 280 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=upRouterA#ping 20.20.20.2 /在配备好路由器B后使用ping测试Type escape sequence to abort.Sending 5,100-byte ICMP Echos to 20.20.20.2,timeout is 2 seconds:!! /!表达到功,.表达失败
28、Success rate is 100 percent (5/5),round-trip min/avg/max = 4/4/4 msRouterA#RouterA#show running-config /显示运营配备文献Current configuration:!version 12.0service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname RouterA!interface Ethernet0ip address 11.11.11.1 255.
29、255.255.0!interface Serial0ip address 20.20.20.1 255.255.255.0!interface Serial1no ip address!shutdown!interface TokenRing0no ip address!shutdown no ip classless !line con 0line aux 0line vty 0 4endRouterA#RouterB配制Router Con0 is now availablePress RETURN to get started./进入顾客EXEC模式Routerenable /进入特权
30、EXEC模式Router#config t /进入全局配备模式Enter configuration commands,one per line. End with CNTL/Z.Router(config)#hostname RouterB /设立路由器名字为RouterBRouterB(config)#interface s0 /设立接口s0RouterB(config-if)#ip address 20.20.20.2 255.255.255.0 /设立ip地址以及子网掩码RouterB(config-if)#no shut /启用%LINEPROTO-5-UPDOWN:Line pro
31、tocol on Interface Serial0,changed state to up/Ethernet 0上线路合同已启动%LINK-3-UPDOWN:Interface Serial0,changed state to up/接口自身也已启动RouterB(config-if)#clock rate ? /查询时钟频率 Speed (bits per second) 1200 2400 4800 9600 19200 38400 56000 64000 7 125000 148000 250000 500000 800000 1000000 1300000 000 4000000 C
32、hoose clockrate from list aboveRouterB(config-if)#clock rate 64000RouterB(config-if)#end%SYS-5-CONFIG_I:Configured from console by consoleRouterB#show interface s0Serial0 is up,line protocol is upHardware is HD64570Internet address is 20.20.20.2/24 MTU 1500 bytes,BW 1544 Kbit,DLY 0 usec,rely 255/255
33、,load 1/255 Encapsulation HDLC,loopback not set,keepalive set (10 sec) Last input 00:00:09,output 00:00:12,output hang never Last clearing of show interface counters never Input queue:0/75/0 (size/max/drops);Total output drops:0 Queueing strategy:weighted fair Output queue:0/1000/64/0 (size/max tota
34、l/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate 0 bits/sec,0 packets/sec 5 minute output rate 0 bits/sec,0 packets/sec 1721 packets input,106287 bytes,0 no buffer Received 1301 broadcasts,0 runts,0 giants
35、,0 throttles 0 input errors,0 CRC,0 frame,0 overrun,0 ignored,0 abort 2195 packets output,100497 bytes,0 underruns 0 output errors,0 collisions,221 interface resets 0 output buffer failures,0 output buffers swapped out 280 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=upRouterB#copy running-co
36、nfig startup-config /保存运营配备文献Building configuration.OKRouterB#show running-configBuilding configuration.Current configuration:!version 12.0service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname RouterB!interface Ethernet0no ip addressshutdown!interface Se
37、rial0ip address 20.20.20.2 255.255.255.0!clockrate 64000!interface Serial1no ip address!shutdown!no ip cl assless !line con 0line aux 0line vty 0 4endRouterB#内容3 点到点接口配备(用PPP帧格式) 模仿软件“RouterSim-CCNA2”视图中RouterA,配备。 重要命令:encap ppp操作环节RouterA配制RouterA Con0 is now availablePress RETURN to get started./
38、进入顾客EXEC模式RouterAenable /进入特权EXEC模式RouterA#config t /进入全局配备模式Enter configuration commands,one per line. End with CNTL/Z.RouterA(config)#interface s0 /设立点到点接口,进入接口配备模式RouterA(config-if)#encap ? /查看可用命令 atm-dxi ATM-DXI encapsulation bstun Block Serial tunneling (BSTUN) frame-relay Frame Relay networks
39、 hdlc Serial HDLC synchronous lapb LAPB (X.25 Level 2) ppp Point-to-Point protocol sdlc SDLC sdlc-primary SDLC (primary) sdlc-secondary SDLC (secondary) smds Switched Megabit Data Service (SMDS) stun Serial tunneling (STUN) x25 X.25RouterA(config-if)#encap ppp /使用ppp合同封装RouterA(config-if)#ip address
40、 20.20.20.1 255.255.255.0 /配备ip地址RouterA(config-if)#no shut /启用该接口RouterA(config-if)#end%SYS-5-CONFIG_I:Configured from console by consoleRouterA#show running-configCurrent configuration:!version 12.0service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname
41、RouterA!interface Ethernet0ip address 11.11.11.1 255.255.255.0!interface Serial0ip address 20.20.20.1 255.255.255.0 encapsulation PPP!interface Serial1no ip address!shutdown!interface TokenRing0no ip address!shutdown router rip network 11.11.11.0!no ip classless !line con 0line aux 0line vty 0 4endR
42、outerA#4 实验规定l 对的配备Ethernet Interfaces.l 对的配备WAN Interfacesl 使用测试命令进行验证l 记录配备操作重要环节和命令及测试成果l 记录配备文献重要内容实验三 路由配备1. 实验目l 理解路由器在网络互连中作用和工作原理;l 掌握静态路由算法特点l 掌握静态路由配备办法;2.。实验前准备l 阅读教材关于网络层和路由算法有关内容;l 阅读本实验内容及操作环节l 参照资料:CCNA实验指南;CCNA2.0中文版教材;3. 实验内容静态路由配备模仿软件“RouterSim-CCNA2”视图中RouterC,RouterA静态路由配备 配备两台路由器静态路由:ip route命令。ip r