重分布―双点双向

要求:先在R2上将RIP重分布到OSPF,再将R4上的RIP发布到OSPF,观察在R2和R4上学到的路由信息。
实验结果:在R4上学到R3的路由为O E2型的,在R2上学到的R3的路由为R型的。
原因:R2将R3的路由先重分布到OSPF中,在R4上从OSPF上学到的R3路由管理距离为110,而从rip上学到的管理距离为120,所以R4接收从OSPF上学到的路由,类型为O E2,由于R4是通过LSA 5学到的路由,即通过DV算法学到的,水平分割,所以R4不会再将从RIP上学到的路由路由从R4上面的接口重分发出去,所以R2上没有O E2型的。
图例:
R1
en
conf t
hos r1
int e0/0
ip add 192.168.12.1 255.255.255.0
no shu
exi
int e0/1
ip add 192.168.14.1 255.255.255.0
no shu
exi
int lo 0
ip add 1.1.1.1 255.255.255.0
exi
router ospf 1
net 192.168.12.0 0.0.0.255 ar 0
net 192.168.14.0 0.0.0.255 ar 0
net 1.1.1.0 0.0.0.255 ar 0
exi
 
 
R2
en
conf t
hos r2
int e0/0
ip add 192.168.12.2 255.255.255.0
no shu
exi
int e0/1
ip add 192.168.23.2 255.255.255.0
no shu
exi
router ospf 1
net 192.168.12.0 0.0.0.255 ar 0
redistribute rip subnets
exi
router rip
ver 2
no au
net 192.168.23.0
exi
 
 
 
R3
en
conf t
hos r3
int e0/1
ip add 192.168.23.3 255.255.255.0
no shu
exi
int e0/0
ip add 192.168.34.3 255.255.255.0
no shu
exi
int lo 0
ip add 3.3.3.3 255.255.255.0
exi
int e0/2
ip add 192.168.1.9 255.255.255.0
no shu
exi
router rip
ver 2
no au
net 192.168.23.0
net 192.168.34.0
net 3.3.3.0
net 192.168.1.0
exi
 
 
 
 
R4
en
conf t
hos r4
int e0/0
ip add 192.168.34.4 255.255.255.0
no shu
exi
int e0/1
ip add 192.168.14.4 255.255.255.0
no shu
exi
router ospf 1
net 192.168.14.0 0.0.0.255 ar 0
redistribute rip subnets
exi
router rip
ver 2
no au
net 192.168.34.0
exi
 
 
 
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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.12.0/24 is directly connected, Ethernet0/0
     1.0.0.0/24 is subnetted, 1 subnets
C        1.1.1.0 is directly connected, Loopback0
C     192.168.14.0/24 is directly connected, Ethernet0/1
     3.0.0.0/24 is subnetted, 1 subnets
O E2     3.3.3.0 [110/20] via 192.168.12.2, 00:01:54, Ethernet0/0
O E2 192.168.23.0/24 [110/20] via 192.168.12.2, 00:02:08, Ethernet0/0
O E2 192.168.34.0/24 [110/20] via 192.168.12.2, 00:01:54, Ethernet0/0
O E2 192.168.1.0/24 [110/20] via 192.168.12.2, 00:01:54, Ethernet0/0
 
r2#sho ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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.12.0/24 is directly connected, Ethernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/11] via 192.168.12.1, 00:02:28, Ethernet0/0
O     192.168.14.0/24 [110/20] via 192.168.12.1, 00:02:28, Ethernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/1] via 192.168.23.3, 00:00:22, Ethernet0/1
C     192.168.23.0/24 is directly connected, Ethernet0/1
R     192.168.34.0/24 [120/1] via 192.168.23.3, 00:00:22, Ethernet0/1
R     192.168.1.0/24 [120/1] via 192.168.23.3, 00:00:22, Ethernet0/1
 
 
 
r4#sho ip rou
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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.12.0/24 [110/20] via 192.168.14.1, 00:00:05, Ethernet0/1
     1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/11] via 192.168.14.1, 00:00:05, Ethernet0/1
C     192.168.14.0/24 is directly connected, Ethernet0/1
     3.0.0.0/24 is subnetted, 1 subnets
O E2     3.3.3.0 [110/20] via 192.168.14.1, 00:00:05, Ethernet0/1
O E2 192.168.23.0/24 [110/20] via 192.168.14.1, 00:00:05, Ethernet0/1
C     192.168.34.0/24 is directly connected, Ethernet0/0
O E2 192.168.1.0/24 [110/20] via 192.168.14.1, 00:00:05, Ethernet0/1

你可能感兴趣的:(职场,休闲,重分布―双点双向)