《2022年2022年计算机网络实验报告-静态路由配置 .pdf》由会员分享,可在线阅读,更多相关《2022年2022年计算机网络实验报告-静态路由配置 .pdf(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、同济大学计算机网络实验课程实验报告题目:静态路由器的配置组员:专业:电气工程及其自动化学生邮箱:名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 7 页 - - - - - - - - - 一、实验要求掌握静态路由方式实现网络的连通性。二、技术原理路由器属于网络层设备,能够根据IP包头的信息,选择一条最佳路径,将数据包装发出去。实现不同网段的主机之间的互相访问。路由器是根据路由表进行选路好转发的。而路由表里就是由一条条的路由信息组成。路由表的产生方式一般有3种:直接路由 -
2、给路由器接口配置一个IP地址,路由器自动产生本接口IP所在网段的路由信息。静态路由 -在拓扑结构简单的网络中,网管员通过手工的方式配置本路由器未知网段的路由信息,从而实现不同网段之间的链接。动态路由协议学习产生的路由-在大规模的网络中,或网络拓扑结构相对复杂的情况下,通过在路由器上运行动态路由协议,路由器之间互相自动学习产生路由信息。三、实现功能实现网络的互连互通,从而实现信息的共享和传递。四、实验设备R1762(两台)、 V35线缆( 1条)、 PC (两台)、直连线或者交叉线(2条)五、实验拓扑图中各端口的IP地址为:R1200-1:F1/0:172.16.1.1/24 S1/2:172.
3、16.2.1/24 R1200-2: F1/0:172.16.3.2/24 S1/2:172.16.2.2/24 六、实验步骤与实验内容1、查看路由器的相关配置情况。R1700-1#sh ip route Codes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 * - cand
4、idate default 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 7 页 - - - - - - - - - Gateway of last resort is no set R1700-1#sh int fa 1/0 FastEthernet 1/0 is DOWN , line protocol is DOWN Hardware is PQ2 FCC FAST ETHERNET CONTROLLER FastEthernet, address is 00d0
5、.f86 87c5 (bia 00d0.f86b.87c5) Interface address is: no ip address ARP type: ARPA,ARP Timeout: 3600 seconds MTU 1500 bytes, BW 100000 Kbit Encapsulation protocol is Ethernet-II, loopback not set Keepalive interval is 10 sec , set Carrier delay is 2 sec RXload is 1 ,Txload is 1 Queueing strategy: FIF
6、O Output queue 0/40, 0 drops; Input queue 0/75, 0 drops 5 minutes input rate 0 bits/sec, 0 packets/sec 5 minutes output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 res lack, 0 no buffer,0 dropped Received 0 broadcasts, 0 runts, 0 giants 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abo
7、rt 0 packets output, 0 bytes, 0 underruns,0 dropped 0 output errors, 0 collisions, 7 interface resets R1700-1#sh int s1/2 serial 1/2 is UP , line protocol is UP Hardware is PQ2 SCC HDLC CONTROLLER serial Interface address is: no ip address MTU 1500 bytes, BW 2000 Kbit Encapsulation protocol is HDLC,
8、 loopback not set Keepalive interval is 10 sec , set Carrier delay is 2 sec RXload is 1 ,Txload is 1 Queueing strategy: WFQ 5 minutes input rate 17 bits/sec, 0 packets/sec 5 minutes output rate 17 bits/sec, 0 packets/sec 430 packets input, 9460 bytes, 0 res lack, 0 no buffer,0 dropped Received 430 b
9、roadcasts, 0 runts, 0 giants 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort 430 packets output, 9460 bytes, 0 underruns,0 dropped 0 output errors, 0 collisions, 3 interface resets 1 carrier transitions V35 DCE cable DCD=up DSR=up DTR=up RTS=up CTS=up R1700-1#sh ip int br Interface IP-Address(Pri
10、) OK? Status 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 7 页 - - - - - - - - - serial 1/2 no address YES DOWN serial 1/3 no address YES DOWN FastEthernet 1/0 no address YES DOWN FastEthernet 1/1 no address YES DOWN Null 0 no address YES UP 2、在路由器 1上配置接口的IP地址
11、和串口上的时钟频率。并验证路由器接口配置、查看接口状态。R1700-1#conf Enter configuration commands, one per line. End with CNTL/Z. R1700-1(config)#int fa 1/0 R1700-1(config-if)#ip add 172.16.1.1 255.255.255.0 R1700-1(config-if)#no sh R1700-1(config-if)#int s 1/2 R1700-1(config-if)#ip add 172.16.2.1 255.255.255.0 R1700-1(config-
12、if)#clock rate 64000 R1700-1(config-if)#no sh R1700-1(config-if)#exit R1700-1(config)#sh ip int br Interface IP-Address(Pri) OK? Status serial 1/2 172.16.2.1/24 YES UP serial 1/3 no address YES DOWN FastEthernet 1/0 172.16.1.1/24 YES DOWN FastEthernet 1/1 no address YES DOWN Null 0 no address YES UP
13、 R1700-1(config)#sh int s 1/2 serial 1/2 is UP , line protocol is UP Hardware is PQ2 SCC HDLC CONTROLLER serial Interface address is: 172.16.2.1/24 MTU 1500 bytes, BW 2000 Kbit Encapsulation protocol is HDLC, loopback not set Keepalive interval is 10 sec , set Carrier delay is 2 sec RXload is 1 ,Txl
14、oad is 1 Queueing strategy: WFQ 5 minutes input rate 17 bits/sec, 0 packets/sec 5 minutes output rate 17 bits/sec, 0 packets/sec 448 packets input, 9856 bytes, 0 res lack, 0 no buffer,0 dropped Received 448 broadcasts, 0 runts, 0 giants 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort 448 packets
15、output, 9856 bytes, 0 underruns,0 dropped 0 output errors, 0 collisions, 4 interface resets 1 carrier transitions V35 DCE cable 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 7 页 - - - - - - - - - DCD=up DSR=up DTR=up RTS=up CTS=up 3、在路由器 1上配置静态路由,并验证静态路由配置。R17
16、00-1(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.2 R1700-1(config)#sh ip route Codes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 * - candidate default Gat
17、eway of last resort is no set C 172.16.2.0/24 is directly connected, serial 1/2 C 172.16.2.1/32 is local host. S 172.16.3.0/24 1/0 via 172.16.2.2 4、在路由器 2上配置接口的I 地址和串口时钟频率。验证路由器接口配置、查看接口状态。R1700-2#conf Enter configuration commands, one per line. End with CNTL/Z. R1700-2(config)#int fa 1/0 R1700-2(co
18、nfig-if)#ip add 172.16.3.2 255.255.255.0 R1700-2(config-if)#no sh R1700-2(config-if)#exit R1700-2(config)#int s 1/2 R1700-2(config-if)#ip add 172.16.2.2 255.255.255.0 R1700-2(config-if)#no sh R1700-2(config-if)#exit R1700-2(config)#sh ip int br Interface IP-Address(Pri) OK? Status serial 1/2 172.16.
19、2.2/24 YES UP serial 1/3 no address YES DOWN FastEthernet 1/0 172.16.3.2/24 YES DOWN FastEthernet 1/1 no address YES DOWN Null 0 no address YES UP R1700-2(config)#sh int s1/2 serial 1/2 is UP , line protocol is UP Hardware is PQ2 SCC HDLC CONTROLLER serial Interface address is: 172.16.2.2/24 MTU 150
20、0 bytes, BW 2000 Kbit Encapsulation protocol is HDLC, loopback not set Keepalive interval is 10 sec , set Carrier delay is 2 sec 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 7 页 - - - - - - - - - RXload is 1 ,Txload is 1 Queueing strategy: WFQ 5 minutes input
21、 rate 17 bits/sec, 0 packets/sec 5 minutes output rate 17 bits/sec, 0 packets/sec 477 packets input, 10494 bytes, 0 res lack, 0 no buffer,0 dropped Received 477 broadcasts, 0 runts, 0 giants 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort 477 packets output, 10494 bytes, 0 underruns,0 dropped 0 o
22、utput errors, 0 collisions, 3 interface resets 1 carrier transitions V35 DTE cable DCD=up DSR=up DTR=up RTS=up CTS=up 5、在路由器 2上配置静态路由,并验证静态路由配置。R1700-2(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1 R1700-2(config)#sh ip route Codes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF inter
23、 area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 * - candidate default Gateway of last resort is no set S 172.16.1.0/24 1/0 via 172.16.2.1 C 172.16.2.0/24 is directly connected, serial 1/2 C 172.16.2.2/32 is local host. 6、测试网络的
24、互连互通性。C:Documents and SettingsAdministratorping 172.16.3.22 Pinging 172.16.3.22 with 32 bytes of data: Reply from 172.16.3.22: bytes=32 time1ms TTL=128 Reply from 172.16.3.22: bytes=32 time1ms TTL=128 Reply from 172.16.3.22: bytes=32 time1ms TTL=128 Reply from 172.16.3.22: bytes=32 timeping 172.16.1
25、.11 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 7 页 - - - - - - - - - Pinging 172.16.1.11 with 32 bytes of data: Reply from 172.16.1.11: bytes=32 time=20ms TTL=126 Reply from 172.16.1.11: bytes=32 time=20ms TTL=126 Reply from 172.16.1.11: bytes=32 time=20ms
26、TTL=126 Reply from 172.16.1.11: bytes=32 time=20ms TTL=126 Ping statistics for 172.16.1.11: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 20ms, Maximum = 20ms, Average = 20ms C:Documents and SettingsAdministrator 七、注意事项如果两台路由器通过串口直接互连,必须在其中一段设置时钟频率。八、心得体会通过本次的实验, 学会了如何配置静态路由,对网络之间的相互通信有了更深一步的了解和认识。在实验中,需要格外的注意连线,因为我们做实验的过程中遇到接口接触不良的情况,在PC上显示线路未连接,而连错线的时候PC也是显示线路未连接,所以要注意区分这两种情况,找到原因,纠正连线。否则会浪费较多的时间。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 7 页 - - - - - - - - -