2.RIPv1与RIPv2共存实验

更新时间:2024-06-24 17:28:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

RIPv1与RIPv2共存实验

1.拓扑图

2.配置解析

在全部路由器上面启用RIP路由协议 左边(R1\\R2\\R5)为RIPv1 右边(R3\\R4\\R5)为RIPv2

下面是各路由器的配置

==============================================

R1

Router(config-router)#do sh ip ro

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/2] via 11.0.0.1, 00:00:16, Serial1/1 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/2] via 11.0.0.1, 00:00:16, Serial1/1 5.0.0.0/24 is subnetted, 1 subnets

R 5.5.5.0 [120/1] via 11.0.0.1, 00:00:16, Serial1/1

11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets

R 12.0.0.0 [120/1] via 11.0.0.1, 00:00:16, Serial1/1 13.0.0.0/24 is subnetted, 1 subnets

R 13.0.0.0 [120/1] via 11.0.0.1, 00:00:16, Serial1/1 14.0.0.0/24 is subnetted, 1 subnets

R 14.0.0.0 [120/1] via 11.0.0.1, 00:00:16, Serial1/1

-------------------------------------------------------------------------------------------------------- Router(config-router)#do sh ip pro Routing Protocol is \

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Sending updates every 30 seconds, next due in 23 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: rip

Default version control: send version 1, receive any version

Interface Send Recv Triggered RIP Key-chain Serial1/1 1 1 2 Loopback0 1 1 2 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: 1.0.0.0 11.0.0.0

Routing Information Sources:

Gateway Distance Last Update 11.0.0.1 120 00:00:03 Distance: (default is 120)

=============================================================

R2

Router(config-router)#do sh ip ro

Gateway of last resort is not set 2.0.0.0/24 is subnetted, 1 subnets

C 2.2.2.0 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/2] via 12.0.0.1, 00:00:12, Serial1/2 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/2] via 12.0.0.1, 00:00:12, Serial1/2

5.0.0.0/24 is subnetted, 1 subnets

R 5.5.5.0 [120/1] via 12.0.0.1, 00:00:12, Serial1/2 11.0.0.0/24 is subnetted, 1 subnets

R 11.0.0.0 [120/1] via 12.0.0.1, 00:00:12, Serial1/2 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial1/2 13.0.0.0/24 is subnetted, 1 subnets

R 13.0.0.0 [120/1] via 12.0.0.1, 00:00:12, Serial1/2 14.0.0.0/24 is subnetted, 1 subnets

R 14.0.0.0 [120/1] via 12.0.0.1, 00:00:13, Serial1/2

----------------------------------------------------------------------------------------- Router(config-router)#do sh ip pro Routing Protocol is \

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Sending updates every 30 seconds, next due in 18 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: rip

Default version control: send version 1, receive any version

Interface Send Recv Triggered RIP Key-chain Serial1/2 1 1 2 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: 2.0.0.0 12.0.0.0

Routing Information Sources:

Gateway Distance Last Update 12.0.0.1 120 00:00:01 Distance: (default is 120)

===================================================

R3

Router(config-router)#do sh ip ro

Gateway of last resort is not set

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/2] via 13.0.0.1, 00:00:04, Serial1/3

5.0.0.0/24 is subnetted, 1 subnets

R 5.5.5.0 [120/1] via 13.0.0.1, 00:00:04, Serial1/3 11.0.0.0/24 is subnetted, 1 subnets

R 11.0.0.0 [120/1] via 13.0.0.1, 00:00:04, Serial1/3 12.0.0.0/24 is subnetted, 1 subnets

R 12.0.0.0 [120/1] via 13.0.0.1, 00:00:04, Serial1/3 13.0.0.0/24 is subnetted, 1 subnets C 13.0.0.0 is directly connected, Serial1/3 14.0.0.0/24 is subnetted, 1 subnets

R 14.0.0.0 [120/1] via 13.0.0.1, 00:00:04, Serial1/3

-----------------------------------------------------------------------------------------------

Router(config-router)#do sh ip pro Routing Protocol is \

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Sending updates every 30 seconds, next due in 13 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Triggered RIP Key-chain Serial1/3 2 2 Loopback0 2 2 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: 3.0.0.0 13.0.0.0

Routing Information Sources:

Gateway Distance Last Update 13.0.0.1 120 00:00:13 Distance: (default is 120)

==========================================================

R4

Router(config-router)#do sh ip ro

Gateway of last resort is not set

3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/2] via 14.0.0.1, 00:00:24, Serial1/4 4.0.0.0/24 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback0 5.0.0.0/24 is subnetted, 1 subnets

R 5.5.5.0 [120/1] via 14.0.0.1, 00:00:24, Serial1/4 11.0.0.0/24 is subnetted, 1 subnets

R 11.0.0.0 [120/1] via 14.0.0.1, 00:00:24, Serial1/4 12.0.0.0/24 is subnetted, 1 subnets

R 12.0.0.0 [120/1] via 14.0.0.1, 00:00:24, Serial1/4 13.0.0.0/24 is subnetted, 1 subnets

R 13.0.0.0 [120/1] via 14.0.0.1, 00:00:24, Serial1/4 14.0.0.0/24 is subnetted, 1 subnets C 14.0.0.0 is directly connected, Serial1/4

-----------------------------------------------------------------------------------------------------

Router(config-router)#do sh ip pro Routing Protocol is \

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Sending updates every 30 seconds, next due in 14 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Triggered RIP Key-chain Serial1/4 2 2 Loopback0 2 2 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: 4.0.0.0 14.0.0.0

Routing Information Sources:

Gateway Distance Last Update 14.0.0.1 120 00:00:19 Distance: (default is 120)

==============================================================

R5

Router(config-router)#do sh ip ro

Gateway of last resort is not set

3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/1] via 13.0.0.2, 00:00:20, Serial1/3 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/1] via 14.0.0.2, 00:00:00, Serial1/4 5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0 11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial1/2 13.0.0.0/24 is subnetted, 1 subnets C 13.0.0.0 is directly connected, Serial1/3 14.0.0.0/24 is subnetted, 1 subnets C 14.0.0.0 is directly connected, Serial1/4

----------------------------------------------------------------------------------------------------------------

Router(config-router)#do sh ip pro Routing Protocol is \

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Sending updates every 30 seconds, next due in 24 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Triggered RIP Key-chain Serial1/1 2 2 Serial1/2 2 2 Serial1/3 2 2 Serial1/4 2 2 Loopback0 2 2 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: 5.0.0.0 11.0.0.0 12.0.0.0 13.0.0.0 14.0.0.0

Routing Information Sources:

Gateway Distance Last Update Gateway Distance Last Update

14.0.0.2 120 00:00:24 13.0.0.2 120 00:00:26 Distance: (default is 120)

=============================================================

目前的设置下

左边的2台路由器能够接收到R5\\R3\\R4的路由信息 但是却没有R1的信息

右边的2台路由器只能够接收到R5\\R3\\R4的路由信息

为什么会导致这种情况呢?

下面分别看看R1\\R4\\R5上的debug ip rip的信息 发现如下信息

======================================================== R1

*Apr 16 08:16:29.107: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (11.0.0.2) *Apr 16 08:16:29.111: RIP: build update entries *Apr 16 08:16:29.111: network 1.0.0.0 metric 1 Router(config-router)#

*Apr 16 08:16:51.223: RIP: sending v1 update to 255.255.255.255 via Loopback0 (1.1.1.1) *Apr 16 08:16:51.227: RIP: build update entries *Apr 16 08:16:51.227: network 3.0.0.0 metric 3 *Apr 16 08:16:51.231: network 4.0.0.0 metric 3 *Apr 16 08:16:51.231: network 5.0.0.0 metric 2 *Apr 16 08:16:51.235: network 11.0.0.0 metric 1 *Apr 16 08:16:51.235: network 12.0.0.0 metric 2 *Apr 16 08:16:51.239: network 13.0.0.0 metric 2 *Apr 16 08:16:51.239: network 14.0.0.0 metric 2 Router(config-router)#

*Apr 16 08:16:54.123: RIP: received v2 update from 11.0.0.1 on Serial1/1 *Apr 16 08:16:54.127: 3.3.3.0/24 via 0.0.0.0 in 2 hops *Apr 16 08:16:54.131: 4.4.4.0/24 via 0.0.0.0 in 2 hops *Apr 16 08:16:54.131: 5.5.5.0/24 via 0.0.0.0 in 1 hops *Apr 16 08:16:54.135: 12.0.0.0/24 via 0.0.0.0 in 1 hops *Apr 16 08:16:54.135: 13.0.0.0/24 via 0.0.0.0 in 1 hops *Apr 16 08:16:54.139: 14.0.0.0/24 via 0.0.0.0 in 1 hops

====================================================================

R4

*Apr 16 08:44:34.123: RIP: sending v2 update to 224.0.0.9 via Serial1/4 (14.0.0.2) *Apr 16 08:44:34.127: RIP: build update entries

*Apr 16 08:44:34.127: 4.4.4.0/24 via 0.0.0.0, metric 1, tag 0 Router(config-router)#

*Apr 16 08:44:57.303: RIP: sending v2 update to 224.0.0.9 via Loopback0 (4.4.4.4) *Apr 16 08:44:57.307: RIP: build update entries

*Apr 16 08:44:57.307: 3.3.3.0/24 via 0.0.0.0, metric 3, tag 0 *Apr 16 08:44:57.311: 5.5.5.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:44:57.315: 11.0.0.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:44:57.315: 12.0.0.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:44:57.319: 13.0.0.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:44:57.323: 14.0.0.0/24 via 0.0.0.0, metric 1, tag 0

*Apr 16 08:44:57.347: RIP: ignored v2 packet from 4.4.4.4 (sourced from one of our addresses) Router(config-router)#

*Apr 16 08:44:58.707: RIP: received v2 update from 14.0.0.1 on Serial1/4 *Apr 16 08:44:58.711: 3.3.3.0/24 via 0.0.0.0 in 2 hops *Apr 16 08:44:58.715: 5.5.5.0/24 via 0.0.0.0 in 1 hops *Apr 16 08:44:58.715: 11.0.0.0/24 via 0.0.0.0 in 1 hops *Apr 16 08:44:58.719: 12.0.0.0/24 via 0.0.0.0 in 1 hops *Apr 16 08:44:58.719: 13.0.0.0/24 via 0.0.0.0 in 1 hops

======================================================== R5

*Apr 16 08:17:12.639: RIP: sending v2 update to 224.0.0.9 via Loopback0 (5.5.5.5) *Apr 16 08:17:12.643: RIP: build update entries

*Apr 16 08:17:12.647: 3.3.3.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:12.647: 4.4.4.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:12.651: 11.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:12.651: 12.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:12.655: 13.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:12.655: 14.0.0.0/24 via 0.0.0.0, metric 1, tag 0

*Apr 16 08:17:12.671: RIP: ignored v2 packet from 5.5.5.5 (sourced from one of our addresses) Router(config-router)#

*Apr 16 08:17:17.531: RIP: sending v2 update to 224.0.0.9 via Serial1/2 (12.0.0.1) *Apr 16 08:17:17.535: RIP: build update entries

*Apr 16 08:17:17.539: 3.3.3.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:17.539: 4.4.4.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:17.543: 5.5.5.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:17.543: 11.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:17.547: 13.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:17.551: 14.0.0.0/24 via 0.0.0.0, metric 1, tag 0

*Apr 16 08:17:18.735: RIP: ignored v1 packet from 12.0.0.2 (illegal version) Router(config-router)#

*Apr 16 08:17:20.359: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (11.0.0.1) *Apr 16 08:17:20.363: RIP: build update entries

*Apr 16 08:17:20.363: 3.3.3.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:20.367: 4.4.4.0/24 via 0.0.0.0, metric 2, tag 0

*Apr 16 08:17:20.371: 5.5.5.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:20.371: 12.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:20.375: 13.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:20.379: 14.0.0.0/24 via 0.0.0.0, metric 1, tag 0 Router(config-router)#

*Apr 16 08:17:21.567: RIP: ignored v1 packet from 11.0.0.2 (illegal version) *Apr 16 08:17:02.571: RIP: sending v2 update to 224.0.0.9 via Serial1/3 (13.0.0.1) *Apr 16 08:17:02.571: RIP: build update entries

*Apr 16 08:17:02.571: 4.4.4.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:02.575: 5.5.5.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:02.575: 11.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:02.575: 12.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:02.575: 14.0.0.0/24 via 0.0.0.0, metric 1, tag 0 Router(config-router)#

*Apr 16 08:17:05.591: RIP: sending v2 update to 224.0.0.9 via Serial1/4 (14.0.0.1) *Apr 16 08:17:05.595: RIP: build update entries

*Apr 16 08:17:05.595: 3.3.3.0/24 via 0.0.0.0, metric 2, tag 0 *Apr 16 08:17:05.599: 5.5.5.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:05.603: 11.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:05.603: 12.0.0.0/24 via 0.0.0.0, metric 1, tag 0 *Apr 16 08:17:05.607: 13.0.0.0/24 via 0.0.0.0, metric 1, tag 0

===================================================================

从上面可以看出

R5给R1发送的信息没有R2的路由信息 R5给R2发送的信息没有R1的路由信息 R5给R3\\R4发送的信息没有R1\\R2的路由信息 原因是因为

*Apr 16 08:17:21.567: RIP: ignored v1 packet from 11.0.0.2 (illegal version) *Apr 16 08:17:51.735: RIP: ignored v1 packet from 12.0.0.2 (illegal version)

说明RIPv1能够接受RIPv2的更新信息 但是RIPv2却不能接受RIPv1的更新信息

我们使用下面的命令在R5上面S1/1和S1/2开启接受v1和v2的RIP信息 Router(config)#int s1/1

Router(config-if)#ip rip receive version 1 2 Router(config-if)#int s1/2

Router(config-if)#ip rip receive version 1 2

下面再SHOW一下R1\\R3和R5的路由表

========================================================== R1

1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0 R 2.0.0.0/8 [120/2] via 11.0.0.1, 00:00:11, Serial1/1 3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/2] via 11.0.0.1, 00:00:11, Serial1/1 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/2] via 11.0.0.1, 00:00:11, Serial1/1 5.0.0.0/24 is subnetted, 1 subnets

R 5.5.5.0 [120/1] via 11.0.0.1, 00:00:11, Serial1/1 11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets

R 12.0.0.0 [120/1] via 11.0.0.1, 00:00:11, Serial1/1 13.0.0.0/24 is subnetted, 1 subnets

R 13.0.0.0 [120/1] via 11.0.0.1, 00:00:12, Serial1/1 14.0.0.0/24 is subnetted, 1 subnets

R 14.0.0.0 [120/1] via 11.0.0.1, 00:00:12, Serial1/1

======================================================== R3

R 1.0.0.0/8 [120/2] via 13.0.0.1, 00:00:15, Serial1/3 R 2.0.0.0/8 [120/2] via 13.0.0.1, 00:00:15, Serial1/3 3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/2] via 13.0.0.1, 00:00:15, Serial1/3 5.0.0.0/24 is subnetted, 1 subnets

R 5.5.5.0 [120/1] via 13.0.0.1, 00:00:15, Serial1/3 11.0.0.0/24 is subnetted, 1 subnets

R 11.0.0.0 [120/1] via 13.0.0.1, 00:00:15, Serial1/3 12.0.0.0/24 is subnetted, 1 subnets

R 12.0.0.0 [120/1] via 13.0.0.1, 00:00:15, Serial1/3 13.0.0.0/24 is subnetted, 1 subnets C 13.0.0.0 is directly connected, Serial1/3 14.0.0.0/24 is subnetted, 1 subnets

R 14.0.0.0 [120/1] via 13.0.0.1, 00:00:16, Serial1/3

===================================================================

R5

R 1.0.0.0/8 [120/1] via 11.0.0.2, 00:00:19, Serial1/1 R 2.0.0.0/8 [120/1] via 12.0.0.2, 00:00:09, Serial1/2 3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/1] via 13.0.0.2, 00:00:13, Serial1/3 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/1] via 14.0.0.2, 00:00:10, Serial1/4 5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0 11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial1/2 13.0.0.0/24 is subnetted, 1 subnets C 13.0.0.0 is directly connected, Serial1/3 14.0.0.0/24 is subnetted, 1 subnets C 14.0.0.0 is directly connected, Serial1/4

===================================================================

实验结果及总结:

RIPv1可以接受RIPv2的路由更新,但是RIPv2却不能接受RIPv1的更新信息,所以 RIPv1和RIPv2可以共存,但是需要让配置了RIPv2的路由器上的与启用RIPv1的 路由器相连的接口上使用

Router(config-if)#ip rip receive version 1 2 来使RIPv2的路由器接受RIPv1的信息

R 1.0.0.0/8 [120/1] via 11.0.0.2, 00:00:19, Serial1/1 R 2.0.0.0/8 [120/1] via 12.0.0.2, 00:00:09, Serial1/2 3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/1] via 13.0.0.2, 00:00:13, Serial1/3 4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/1] via 14.0.0.2, 00:00:10, Serial1/4 5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0 11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial1/2 13.0.0.0/24 is subnetted, 1 subnets C 13.0.0.0 is directly connected, Serial1/3 14.0.0.0/24 is subnetted, 1 subnets C 14.0.0.0 is directly connected, Serial1/4

===================================================================

实验结果及总结:

RIPv1可以接受RIPv2的路由更新,但是RIPv2却不能接受RIPv1的更新信息,所以 RIPv1和RIPv2可以共存,但是需要让配置了RIPv2的路由器上的与启用RIPv1的 路由器相连的接口上使用

Router(config-if)#ip rip receive version 1 2 来使RIPv2的路由器接受RIPv1的信息

本文来源:https://www.bwwdw.com/article/qi53.html

Top