路由与交换 实验三 动态路由协议配置

**

实验三 动态路由协议配置

**
一、实验目的
⑴ 掌握动态协议分类、基本工作原理;
⑵ 掌握动态协议配置方法。
二、实验条件
Cisco2621 Router、PacketTrace仿真软件、具备Windows操作系统的PC机
三、实验原理及相关知识
动态协议配置方法
四、实验步骤
1. RIP路由协议配置
网络拓扑结构和IP设置如图。
在这里插入图片描述
在这里插入图片描述

1.1 配置RIP路由协议
⑴ 配置路由器Router1路由
Router>en
Router#config
Router(config)#hostname LabA
LabA(config)#route rip
LabA(config-router)#version 2
LabA(config-router)#net 222.23.10.0
LabA(config-router)#net 222.23.20.0
LabA(config-router)#ex
LabA(config)#ex

⑵ 配置路由器Router2路由
Router>en
Router#config
Router(config)#hostname LabB
LabB(config)#router rip
LabB(config-router)#version 2
LabB(config-router)#net 222.23.20.0
LabB(config-router)#net 222.23.30.0
LabB(config-router)#net 222.23.40.0
LabB(config-router)#ex
LabB(config)#ex

⑶ 配置路由器Router3路由
Router>en
Router#config
Router(config)#hostname LabC
LabC(config)#router rip
LabC(config-router)#version 2
LabC(config-router)#net 222.23.40.0
LabC(config-router)#net 222.23.50.0
LabC(config-router)#ex
LabC(config)#ex

⑷ 配置之后路由器Router1的路由信息
LabA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 222.23.10.0/24 is directly connected, FastEthernet0/0
C 222.23.20.0/24 is directly connected, Serial0/0
R 222.23.30.0/24 [120/1] via 222.23.20.2, 00:00:18, Serial0/0
R 222.23.40.0/24 [120/1] via 222.23.20.2, 00:00:18, Serial0/0
R 222.23.50.0/24 [120/2] via 222.23.20.2, 00:00:18, Serial0/0

⑸ 配置之后路由器Router2的路由信息
LabB>en
LabB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

R 222.23.10.0/24 [120/1] via 222.23.20.1, 00:00:07, Serial0/0
C 222.23.20.0/24 is directly connected, Serial0/0
C 222.23.30.0/24 is directly connected, FastEthernet0/0
C 222.23.40.0/24 is directly connected, Serial0/1
R 222.23.50.0/24 [120/1] via 222.23.40.2, 00:00:06, Serial0/1

⑹ 配置之后路由器Router3的路由信息
LabC>en
LabC#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

R 222.23.10.0/24 [120/2] via 222.23.40.1, 00:00:08, Serial0/1
R 222.23.20.0/24 [120/1] via 222.23.40.1, 00:00:08, Serial0/1
R 222.23.30.0/24 [120/1] via 222.23.40.1, 00:00:08, Serial0/1
C 222.23.40.0/24 is directly connected, Serial0/1
C 222.23.50.0/24 is directly connected, FastEthernet0/0

1.2 测试连通性
⑴ 路由器Lab_A ping路由器Lab_C
LabA>en
LabA#ping 222.23.40.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 222.23.40.2, timeout is 2 seconds:
!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/10/12 ms

⑵ 路由器Lab_C ping路由器Lab_A
LabC>en
LabC#ping 222.23.20.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 222.23.20.1, timeout is 2 seconds:
!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/11/13 ms

⑶ 在各主机间使用ping命令,测试主机间的连通性。
1)PC0-PC1:可以ping通
2)PC1-PC2:可以ping通
3)PC2-PC3:可以ping通
4)PC3-PC4:可以ping通

2. EIGRP路由协议配置
网络拓扑结构和IP设置如图。
在这里插入图片描述

2.1 配置EIGRP路由协议
⑴ 配置路由器Router1路由
Router#en
Router#config
Router(config)#hostname R1
R1(config)#router eigrp 200
R1(config-router)#net 10.1.1.0 0.0.0.255
R1(config-router)#net 172.16.0.0 0.0.0.255
R1(config-router)#net 202.66.102.64 0.0.0.31
R1(config-router)#no auto-summary
R1(config-router)#ex
R1(config)#ex

⑵ 配置路由器Router2路由
Router>en
Router#config
Router(config)#hostname R2
R2(config)#router eigrp 200
R2(config-router)#net 172.16.0.0 0.0.0.255
R2(config-router)#net 192.168.2.0 0.0.0.255
R2(config-router)#net 202.66.102.128 0.0.0.31
R2(config-router)#no auto-summary
R2(config-router)#ex
R2(config)#ex

⑶ 配置路由器Router3路由
Router>en
Router#config
Router(config)#hostname R3
R3(config)#router eigrp 200
R3(config-router)#net 202.66.102.192 0.0.0.31
R3(config-router)#net 202.66.102.128 0.0.0.31
R3(config-router)#net 202.66.102.64 0.0.0.31
R3(config-router)#no auto-summary
R3(config-router)#ex
R3(config)#ex

⑷ 配置之后路由器Router1的路由信息
R1>en
R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

 10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, FastEthernet0/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, Serial0/1
D 192.168.2.0/24 [90/2172416] via 172.16.0.2, 00:00:10, Serial0/1
202.66.102.0/27 is subnetted, 3 subnets
C 202.66.102.64 is directly connected, Serial0/2
D 202.66.102.128 [90/2681856] via 202.66.102.66, 00:00:10, Serial0/2
[90/2681856] via 172.16.0.2, 00:00:10, Serial0/1
D 202.66.102.192 [90/2172416] via 202.66.102.66, 00:00:10, Serial0/2

⑸ 配置之后路由器Router2的路由信息
R2>en
R2#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

 10.0.0.0/24 is subnetted, 1 subnets

D 10.1.1.0 [90/2172416] via 172.16.0.1, 00:00:41, Serial0/1
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, Serial0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
202.66.102.0/27 is subnetted, 3 subnets
D 202.66.102.64 [90/2681856] via 172.16.0.1, 00:00:41, Serial0/1
C 202.66.102.128 is directly connected, Serial0/3
D 202.66.102.192 [90/2684416] via 172.16.0.1, 00:00:41, Serial0/1

⑹ 配置之后路由器Router3的路由信息
R3>en
R3#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

 10.0.0.0/24 is subnetted, 1 subnets

D 10.1.1.0 [90/2172416] via 202.66.102.65, 00:01:17, Serial0/2
172.16.0.0/24 is subnetted, 1 subnets
D 172.16.0.0 [90/2681856] via 202.66.102.65, 00:01:17, Serial0/2
D 192.168.2.0/24 [90/2684416] via 202.66.102.65, 00:01:16, Serial0/2
202.66.102.0/27 is subnetted, 3 subnets
C 202.66.102.64 is directly connected, Serial0/2
C 202.66.102.128 is directly connected, Serial0/3
C 202.66.102.192 is directly connected, FastEthernet0/0
2.2 测试连通性
⑴ 路由器Router1 ping路由器Router3
R1#ping 202.66.102.66
在这里插入图片描述

R3#ping 202.66.102.65
在这里插入图片描述

(2) 在各主机间使用ping命令,测试主机间的连通性。
1)PC1-PC2:可以ping通

2)2)PC2-PC3:可以ping通
3)PC2 ping 服务器0:可以ping通

3. OSPF路由协议配置
网络拓扑结构和IP设置如图。
在这里插入图片描述

3.1 配置OSPF路由协议
⑴ 配置路由器Router1路由
Router>en
Router#config
Router(config)#hostname R1
R1(config)#router ospf 100
R1(config)#net 192.168.10.0 0.0.0.255 area 0
R1(config-router)#net 202.66.104.0 0.0.0.255 area 0
R1(config-router)#net 202.66.101.0 0.0.0.255 area 0
R1(config-router)#ex
R1(config)#ex

⑵ 配置路由器Router2路由
Router>en
Router#config
Router(config)#hostname R2
R2(config-if)#ex
R2(config)#router ospf 200
R2(config-router)#net 202.66.101.0 0.0.0.255 area 0
R2(config-router)#net 192.168.20.0 0.0.0.255 area 0
R2(config-router)#net 202.66.123.0 0.0.0.255 area 0
R2(config-router)#net 202.66.124.0 0.0.0.255 area 0
R2(config-router)#ex
R2(config)#ex

⑶ 配置路由器Router3路由
Router>en
Router#config
Router(config)#hostname R3
R3(config)#router ospf 300
R3(config-router)#net 202.66.123.0 0.0.0.255 area 0
R3(config-router)#net 202.64.134.0 0.0.0.255 area 0
R3(config-router)#net 192.168.30.0 0.0.0.255 area 0
R3(config-router)#ex
R3(config)#ex

⑷ 配置路由器Router4路由
Router>en
Router#config
Router(config)#hostname R4
R4(config)#router ospf 400
R4(config-router)#net 202.66.124.0 0.0.0.255 area 0
R4(config-router)#net 202.66.134.0 0.0.0.255 area 0
R4(config-router)#net 192.168.40.0 0.0.0.255 area 0
R4(config-router)#net 202.66.104.0 0.0.0.255 area 0
R4(config-router)#ex
R4(config)#ex

⑸ 配置之后路由器Router1的路由信息
R1>en
R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.10.0/24 is directly connected, FastEthernet0/0
O 192.168.20.0/24 [110/65] via 202.66.101.2, 00:00:08, Serial0/2
O 192.168.40.0/24 [110/65] via 202.66.104.2, 00:00:08, Serial0/0
C 202.66.101.0/24 is directly connected, Serial0/2
C 202.66.104.0/24 is directly connected, Serial0/0
O 202.66.123.0/24 [110/128] via 202.66.101.2, 00:00:08, Serial0/2
O 202.66.124.0/24 [110/128] via 202.66.101.2, 00:00:08, Serial0/2
[110/128] via 202.66.104.2, 00:00:08, Serial0/0
O 202.66.134.0/24 [110/128] via 202.66.104.2, 00:00:08, Serial0/0

⑹ 配置之后路由器Router2的路由信息
R2>en
R2#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

O 192.168.10.0/24 [110/65] via 202.66.101.1, 00:00:32, Serial0/2
C 192.168.20.0/24 is directly connected, FastEthernet0/0
O 192.168.30.0/24 [110/65] via 202.66.123.1, 00:00:32, Serial0/3
O 192.168.40.0/24 [110/65] via 202.66.124.2, 00:00:22, Serial0/1
O 202.64.134.0/24 [110/128] via 202.66.123.1, 00:00:32, Serial0/3
C 202.66.101.0/24 is directly connected, Serial0/2
O 202.66.104.0/24 [110/128] via 202.66.101.1, 00:00:32, Serial0/2
[110/128] via 202.66.124.2, 00:00:22, Serial0/1
C 202.66.123.0/24 is directly connected, Serial0/3
C 202.66.124.0/24 is directly connected, Serial0/1
O 202.66.134.0/24 [110/128] via 202.66.124.2, 00:00:22, Serial0/1

⑺ 配置之后路由器Router3的路由信息
R3>en
R3#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

O 192.168.10.0/24 [110/129] via 202.66.123.2, 00:01:07, Serial0/3
O 192.168.20.0/24 [110/65] via 202.66.123.2, 00:01:07, Serial0/3
C 192.168.30.0/24 is directly connected, FastEthernet0/0
O 192.168.40.0/24 [110/129] via 202.66.123.2, 00:00:57, Serial0/3
C 202.64.134.0/24 is directly connected, Serial0/2
O 202.66.101.0/24 [110/128] via 202.66.123.2, 00:01:07, Serial0/3
O 202.66.104.0/24 [110/192] via 202.66.123.2, 00:01:07, Serial0/3
C 202.66.123.0/24 is directly connected, Serial0/3
O 202.66.124.0/24 [110/128] via 202.66.123.2, 00:01:07, Serial0/3
O 202.66.134.0/24 [110/192] via 202.66.123.2, 00:00:57, Serial0/3
⑻ 配置之后路由器Router4的路由信息
R4>en
R4#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

O 192.168.10.0/24 [110/65] via 202.66.104.1, 00:01:28, Serial0/0
O 192.168.20.0/24 [110/65] via 202.66.124.1, 00:01:28, Serial0/1
O 192.168.30.0/24 [110/129] via 202.66.124.1, 00:01:28, Serial0/1
C 192.168.40.0/24 is directly connected, FastEthernet0/0
O 202.64.134.0/24 [110/192] via 202.66.124.1, 00:01:28, Serial0/1
O 202.66.101.0/24 [110/128] via 202.66.104.1, 00:01:28, Serial0/0
[110/128] via 202.66.124.1, 00:01:28, Serial0/1
C 202.66.104.0/24 is directly connected, Serial0/0
O 202.66.123.0/24 [110/128] via 202.66.124.1, 00:01:28, Serial0/1
C 202.66.124.0/24 is directly connected, Serial0/1
C 202.66.134.0/24 is directly connected, Serial0/2

2.2 测试连通性
⑴ 路由器Router1 ping路由器Router3
R1#ping 202.66.123.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.66.123.1, timeout is 2 seconds:
!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 6/9/11 ms

⑵ 在各主机间使用ping命令,测试主机间的连通性。
①PC1-PC2:可以ping通
②PC2-PC3:可以ping通
③PC3-PC4:可以ping通
④PC4-PC1:可以ping通

五、思考题及其它
1)查看RIP的版本号用什么命令。

答:show ip protocol
2)EIGRP路由汇总有什么作用?
答:减轻路由器的路由压力,如果没汇总,就要为每个IP进行路由选择,汇总以后,就只要一条路由选择就够了。

3)下面那些是表示主机地址?那些是表示子网网络号?
①202.066.102.1/27 ②202.066.102.32/27
③202.066.102.97/27 ④202.066.102.160/27
⑤202.066.102.225/27

答:将ip地址转化为二进制与掩码进行相与运算,将结果再化为10进制,求得的目的地址与ip地址作比较 ,若相同为子网网络号,反之不相同为主机地址
例如①: 00000001
与 11100000
00000000
所以目的地址应该为202.66.102.0 所以①表示为主机地址
同理可得 主机地址有:①③⑤
子网网络号有:②④

  • 3
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
路由交换技术实验pdf是一份关于路由交换技术实验的电子文档。在这份pdf中,我们可以获得与路由交换技术相关的实验内容、步骤、图表和实验所需的软件、硬件等信息。 路由交换技术是计算机网络领域中的核心技术之一,它主要涉及到网络数据的引导和传输。在实验中,我们将学习如何通过路由器交换机来进行网络数据的传输和转发。 这份pdf中的实验内容包括但不限于: 1. 路由器配置实验:学习如何配置路由器,并使用路由协议来实现不同网络之间的数据传输。 2. 交换配置实验:学习如何配置交换机,并使用交换技术来实现局域网内部设备之间的数据传输。 3. Vlan配置实验:学习如何使用Vlan技术来实现虚拟局域网的划分和管理。 4. 动态路由实验:学习如何配置动态路由协议,使得网络可以自动选择最佳的路由路径进行数据传输。 5. 配置网络安全实验:学习如何配置路由器交换机的安全设置,以提高网络安全性。 通过这份pdf中的实验内容,我们可以掌握路由交换技术的基本原理和实践操作。这将对我们理解计算机网络的工作原理和提高网络管理能力有很大的帮助。 总之,路由交换技术实验pdf提供了有关路由交换技术实验的详细信息和实例,帮助我们深入理解和学习相关知识,提升计算机网络技术能力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值