enable configure interface Ethernet3 ip ospf cost 100 exit router ospf 1 network 10.1.5.5/32 area 0.0.0.0 network 10.1.8.5/32 area 0.0.0.0 redistribute connected exit
r6
1 2 3 4 5 6 7 8 9 10 11
en config interface Ethernet3 ip ospf cost 100 interface Ethernet1 ip ospf cost 100 router ospf 1 network 10.1.5.6/32 area 0.0.0.0 network 10.1.6.6/32 area 0.0.0.0 network 10.1.9.6/32 area 0.0.0.0 redistribute connected
r7
1 2 3 4 5 6 7 8 9
enable configure interface Ethernet3 ip ospf cost 100 exit router ospf 1 network 10.1.7.7/32 area 0.0.0.0 network 10.1.6.7/32 area 0.0.0.0 redistribute connected
r8
1 2 3 4 5 6 7
en config router ospf 1 network 10.1.8.8/32 area 0.0.0.0 network 10.1.7.8/32 area 0.0.0.0 network 10.1.9.8/32 area 0.0.0.0 redistribute connected
配置好ospf后r5的route table
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Gateway of last resort is not set
C 5.5.5.0/24 is directly connected, Loopback0 O E2 6.6.6.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 7.7.7.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 8.8.8.0/24 [110/1] via 10.1.5.6, Ethernet2 C 10.1.1.0/24 is directly connected, Ethernet1 O E2 10.1.2.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 10.1.3.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 10.1.4.0/24 [110/1] via 10.1.5.6, Ethernet2 C 10.1.5.0/24 is directly connected, Ethernet2 O 10.1.6.0/24 [110/20] via 10.1.5.6, Ethernet2 O 10.1.7.0/24 [110/30] via 10.1.5.6, Ethernet2 C 10.1.8.0/24 is directly connected, Ethernet3 O 10.1.9.0/24 [110/20] via 10.1.5.6, Ethernet2
R5(config-router-bgp)#show ip route B E 1.1.1.0/24 [200/0] via 10.1.1.1, Ethernet1 <------------bgp C 5.5.5.0/24 is directly connected, Loopback0 O E2 6.6.6.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 7.7.7.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 8.8.8.0/24 [110/1] via 10.1.5.6, Ethernet2 C 10.1.1.0/24 is directly connected, Ethernet1 O E2 10.1.2.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 10.1.3.0/24 [110/1] via 10.1.5.6, Ethernet2 O E2 10.1.4.0/24 [110/1] via 10.1.5.6, Ethernet2 C 10.1.5.0/24 is directly connected, Ethernet2 O 10.1.6.0/24 [110/20] via 10.1.5.6, Ethernet2 O 10.1.7.0/24 [110/30] via 10.1.5.6, Ethernet2 C 10.1.8.0/24 is directly connected, Ethernet3 O 10.1.9.0/24 [110/20] via 10.1.5.6, Ethernet2