AR3配置
interface GigabitEthernet0/0/0 ip address 13.1.1.3 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 192.168.10.254 255.255.255.0 interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 13.1.1.0 0.0.0.255 network 192.168.10.0 0.0.0.255
AR2配置
interface GigabitEthernet0/0/0 ip address 192.168.20.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 12.1.1.2 255.255.255.0 interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # ospf 2 router-id 2.2.2.2 area 0.0.0.0 network 12.1.1.0 0.0.0.255 network 192.168.20.0 0.0.0.255 #
AR1配置
interface GigabitEthernet0/0/0 ip address 13.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 12.1.1.1 255.255.255.0 interface LoopBack0 ip address 1.1.1.1 255.255.255.255 #
ospf 1 router-id 1.1.1.1
import-route ospf 2
area 0.0.0.0
network 13.1.1.0 0.0.0.255
#
ospf 2 router-id 1.1.1.1
import-route ospf 1
area 0.0.0.0
network 12.1.1.0 0.0.0.255
测试
原文:https://www.cnblogs.com/liujunjun/p/13027633.html