实验拓扑:
实验需求:引入内部路由,运行多个OSPF进程,建立虚链路;所有路由器之间都能够相互ping通。
实验步骤:
配置路由器的每个端口的IP地址
R1:
enable
conf t
int f0/0
no shu
ip add 192.168.12.1 255.255.255.0
exit
int l 0
ip add 10.10.1.1 255.255.255.0
exit
R2:
enable
conf t
int f0/1
no shu
ip add 192.168.12.2 255.255.255.0
exit
int l 0
ip add 10.10.2.2 255.255.255.0
exit
int f0/0
no shu
ip add 192.168.23.2 255.255.255.0
exit
R3:
enable
conf t
int f 0/1
no shu
ip add 192.168.23.3 255.255.255.0
exit
int l 0
ip add 10.10.3.3 255.255.255.0
int f 0/0
no shu
ip add 192.168.34.3 255.255.255.0
exit
R4:
enable
conf t
int f0/1
no shu
ip add 192.168.34.4 255.255.255.0
exit
int l 0
ip add 10.10.4.4 255.255.255.0
exit
int f0/0
no shu
ip add 192.168.45.4 255.255.255.0
exit
R5:
enable
conf t
int f0/1
no shu
ip add 192.168.45.5 255.255.255.0
exit
int l 0
ip add 10.10.5.5 255.255.255.0
exit
在每个路由器开启OSPF并配置OSPF路由
R1:
router os 1
router-id 1.1.1.1
net 192.168.12.0 0.0.0.255 ar 0
net 10.10.1.0 0.0.0.255 ar 0
exit
R2:
router os 1
router-id 2.2.2.2
net 192.168.12.0 0.0.0.255 ar 0
net 10.10.2.0 0.0.0.255 ar 0
net 192.168.23.0 0.0.0.255 ar 0
exit
R3:
router os 1
router-id 3.3.3.3
net 192.168.23.0 0.0.0.255 ar 0
exit
router os 1
router-id 3.3.3.3
net 192.168.34.0 0.0.0.255 ar 12
net 10.10.3.0 0.0.0.255 ar 12
exit
R4:
router os 1
router-id 4.4.4.4
net 192.168.34.0 0.0.0.255 ar 12
net 192.168.45.0 0.0.0.255 ar 45
net 10.10.4.0 0.0.0.255 ar 45
exit
R5:
router os 45
router-id 5.5.5.5
net 192.168.45.0 0.0.0.255 ar 45
net 10.10.5.0 0.0.0.255 ar 45
exit
引入内部路由,做虚链路在R3与R4上作
R3:
router os 1
area 12 virtual-link 4.4.4.4
exit
R4:
router os 1
area 12 virtual-link 3.3.3.3
exit
本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/13505118/2052293,如需转载请自行联系原作者