ospf 配置案例
配置接口
[AR1]
interface GigabitEthernet0/0/0
ip address 10.1.12.1 255.255.255.0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
[AR2]
interface GigabitEthernet0/0/0
ip address 10.1.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.23.2 255.255.255.0
[AR3]
interface GigabitEthernet0/0/1
ip address 10.1.23.3 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
配置OSPF
[AR1]
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.12.0 0.0.0.255
[AR2]
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.12.0 0.0.0.255
area 0.0.0.1
network 10.1.23.0 0.0.0.255
[AR3]
ospf 1 router-id 3.3.3.3
area 0.0.0.1
network 3.3.3.3 0.0.0.0
network 10.1.23.0 0.0.0.255
结果验证
display ospf peer brief
查路由表
.1 ping通 .3