R1————R2————R3-192.168.2.0/24
ospf rip -192.168.3.0/24~192.168.8.0/24
192.168.2.0/24 192.168.0000 0010.0/24
192.168.3.0/24 192.168.0000 0011.0/24
192.168.4.0/24 192.168.0000 0100.0/24
192.168.5.0/24 192.168.0000 0101.0/24
192.168.6.0/24 192.168.0000 0110.0/24
192.168.7.0/24 192.168.0000 0111.0/24
192.168.8.0/24 192.168.0000 1000.0/24
192.168.0000 0000.0
000.000.1111 1110.0
用于奇数位的网络号:access-list 2 permit 192.168.1.0 0.0.254.0
192.168.0000 0001.0
000.000.1111 1110.0
步骤二:配置RIP和OSPF的协议,同时network正确的网络接口,并且注意passive-interface的使用
步骤三:在R2上配置重发布,确认网络是可以通过重发布学习到所有的网络.
access-list 1 permit 192.168.0.0 0.0.254.0
!
route-map parity-acl permit 10
match ip address 1
!
router ospf 1
redistribute rip subnets route-map parity-acl
O E2 192.168.8.0/24 [110/20] via 172.16.1.2, 00:00:38, Serial1/1
O E2 192.168.4.0/24 [110/20] via 172.16.1.2, 00:00:38, Serial1/1
O E2 192.168.6.0/24 [110/20] via 172.16.1.2, 00:00:38, Serial1/1
O E2 192.168.2.0/24 [110/20] via 172.16.1.2, 00:00:38, Serial1/1
access-list 2 permit 192.168.1.0 0.0.254.0
!
route-map parity-acl permit 10
match ip address 2
!
router ospf 1
redistribute rip subnets route-map parity-acl
O E2 192.168.5.0/24 [110/20] via 172.16.1.2, 00:00:27, Serial1/1
O E2 192.168.7.0/24 [110/20] via 172.16.1.2, 00:00:27, Serial1/1
O E2 192.168.1.0/24 [110/20] via 172.16.1.2, 00:00:27, Serial1/1
O E2 192.168.3.0/24 [110/20] via 172.16.1.2, 00:00:27, Serial1/1