1
、
R1
是
RIPV1 R2
的
f0/1
接口运行的是
RIPV2
,这边就可以改成
RIPV1
的接受和发送
2
、
R2f0/0
去
R4 R5
,
R4
是
V2 R5
是
V1
,所以这边是即可以发送
V1
也可以发送
V2
。(这边还用到了一个知识点就是关掉水平分隔。)可以相互说
步骤
1
R2(config)#int f0/1
R2(config-if)#ip rip send ver 1
R2(config-if)#ip rip receive ver 1
R2(config-if)#end
Debug
可以看到
RIPV1
和
RIPV2
的区别
R2#debug ip rip
RIP protocol debugging is on
R2#
*Apr 19 16:16:02.315: RIP: received v2 update from 172.25.150.194 on FastEthernet0/0
*Apr 19 16:16:02.319: 172.25.150.32/28 via 0.0.0.0 in 1 hops
R2#
*Apr 19 16:16:11.003: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.50.129)
*Apr 19 16:16:11.003: RIP: build update entries
*Apr 19 16:16:11.003: network 172.25.0.0 metric 1
R2#
*Apr 19 16:16:14.175: RIP: received v1 update from 192.168.50.130 on FastEthernet0/1
*Apr 19 16:16:14.179: 192.168.50.64 in 1 hops
R2#
*Apr 19 16:16:17.067: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (172.25.150.225)
*Apr 19 16:16:17.067: RIP: build update entries
*Apr 19 16:16:17.071: 172.25.150.32/28 via 0.0.0.0, metric 2, tag 0
*Apr 19 16:16:17.071: 172.25.150.192/28 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:16:17.071: 192.168.50.0/24 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:16:17.547: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (172.25.150.193)
*Apr 19 16:16:17.547: RIP: build update entries
*Apr 19 16:16:17.551: 172.25.150.224/28 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:16:17.551: 192.168.50.0/24 via 0.0.0.0, metric 1, tag 0
R2#
*Apr 19 16:16:29.479: RIP: received v2 update from 172.25.150.194 on FastEthernet0/0
*Apr 19 16:16:29.483: 172.25.150.32/28 via 0.0.0.0 in 1 hops
R2#
*Apr 19 16:16:37.055: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.50.129)
*Apr 19 16:16:37.055: RIP: build update entries
*Apr 19 16:16:37.059: network 172.25.0.0 metric 1
R2#
*Apr 19 16:16:42.023: RIP: received v1 update from 192.168.50.130 on FastEthernet0/1
*Apr 19 16:16:42.027: 192.168.50.64 in 1 hops
R2#
R2#un all
All possible debugging has been turned off
步骤
2
:
在没有关掉水平分隔时候的情况
R2(config)#int f0/0
R2(config-if)#ip rip send ver 1 2
R2(config-if)#end
R2#debug ip rip
RIP protocol debugging is on
R2#
*Apr 19 16:39:50.563: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.50.129)
*Apr 19 16:39:50.563: RIP: build update entries
*Apr 19 16:39:50.567: network 172.25.0.0 metric 1
R2#
*Apr 19 16:39:56.507: RIP: received v1 update from 192.168.50.130 on FastEthernet0/1
*Apr 19 16:39:56.511: 192.168.50.64 in 1 hops
R2#
*Apr 19 16:40:02.419: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (172.25.150.225)
*Apr 19 16:40:02.419: RIP: build update entries
*Apr 19 16:40:02.423: 172.25.150.32/28 via 0.0.0.0, metric 2, tag 0
*Apr 19 16:40:02.423: 172.25.150.192/28 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:40:02.423: 192.168.50.0/24 via 0.0.0.0, metric 1, tag 0
R2#
*Apr 19 16:40:05.751: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (172.25.150.193)
*Apr 19 16:40:05.751: RIP: build update entries
*Apr 19 16:40:05.755: subnet 172.25.150.224 metric 1
*Apr 19 16:40:05.755: network 192.168.50.0 metric 1
*Apr 19 16:40:05.755: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (172.25.150.193)
*Apr 19 16:40:05.759: RIP: build update entries
*Apr 19 16:40:05.759: 172.25.150.224/28 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:40:05.763: 192.168.50.0/24 via 0.0.0.0, metric 1, tag 0
R2#
*Apr 19 16:40:13.079: RIP: received v2 update from 172.25.150.194 on FastEthernet0/0
*Apr 19 16:40:13.083: 172.25.150.32/28 via 0.0.0.0 in 1 hops
R2#
*Apr 19 16:40:19.783: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.50.129)
*Apr 19 16:40:19.783: RIP: build update entries
*Apr 19 16:40:19.787: network 172.25.0.0 metric 1
R2#un all
All possible debugging has been turned off
看到这边发送的是
V1 V2 2
个版本
收到
R2#
*Apr 19 16:40:13.079: RIP: received v2 update from 172.25.150.194 on FastEthernet0/0
*Apr 19 16:40:13.083: 172.25.150.32/28 via 0.0.0.0 in 1 hops
172.25.150.32/28
但是没有转发出去。因为水平分隔
还有一个网段是直连的
172.25.150.192/28
这个段
步骤
3
:水平分隔的关闭
R2(config)#int f0/0
R2(config-if)#ip rip send ver 1 2
R2(config-if)#no ip split-horizon
R2(config-if)#end
R2#debug ip rip
RIP protocol debugging is on
R2#
*Apr 19 16:49:59.155: RIP: received v2 update from 172.25.150.194 on FastEthernet0/0
*Apr 19 16:49:59.159: 172.25.150.32/28 via 0.0.0.0 in 1 hops
R2#
*Apr 19 16:50:03.711: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.50.129)
*Apr 19 16:50:03.711: RIP: build update entries
*Apr 19 16:50:03.715: network 172.25.0.0 metric 1
R2#
*Apr 19 16:50:10.555: RIP: received v1 update from 192.168.50.130 on FastEthernet0/1
*Apr 19 16:50:10.559: 192.168.50.64 in 1 hops
R2#
*Apr 19 16:50:16.219: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0
(172.25.150.193)
*Apr 19 16:50:16.219: RIP: build update entries
*Apr 19 16:50:16.223: subnet 172.25.150.32 metric 2
*Apr 19 16:50:16.223: subnet 172.25.150.192 metric 1
*Apr 19 16:50:16.223: subnet 172.25.150.224 metric 1
*Apr 19 16:50:16.227: network 192.168.50.0 metric 1
*Apr 19 16:50:16.227: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (172.25.150.193)
*Apr 19 16:50:16.231: RIP: build update entries
*Apr 19 16:50:16.231: 172.25.150.32/28 via 172.25.150.194, metric 2, tag 0
*Apr 19 16:50:16.231: 172.25.150.192/28 via 0.0.0.0, metric 1, tag 0
R2#
*Apr 19 16:50:16.231: 172.25.150.224/28 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:50:16.231: 192.168.50.0/24 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:50:16.551: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (172.25.150.225)
*Apr 19 16:50:16.551: RIP: build update entries
*Apr 19 16:50:16.555: 172.25.150.32/28 via 0.0.0.0, metric 2, tag 0
*Apr 19 16:50:16.555: 172.25.150.192/28 via 0.0.0.0, metric 1, tag 0
*Apr 19 16:50:16.559: 192.168.50.0/24 via 0.0.0.0, metric 1, tag 0
R2#
*Apr 19 16:50:25.255: RIP: received v2 update from 172.25.150.194 on FastEthernet0/0
*Apr 19 16:50:25.255: 172.25.150.32/28 via 0.0.0.0 in 1 hops
R2#
*Apr 19 16:50:31.591: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.50.129)
*Apr 19 16:50:31.591: RIP: build update entries
*Apr 19 16:50:31.595: network 172.25.0.0 metric 1
R2#
*Apr 19 16:50:39.731: RIP: received v1 update from 192.168.50.130 on FastEthernet0/1
*Apr 19 16:50:39.735: 192.168.50.64 in 1 hops
R2#un all
这边就可以看到
32
和
194
这两个段被传送出去了
5.3.3
使用
VLSM
就是在化子网地址