1.虚链路的应用场景(以实验展示)
1.实验拓扑图
2.使用虚链路的意义
2.配置实例
R1
interface GigabitEthernet 0/0
no switchport
ip address 192.168.12.1 255.255.255.0
!interface Loopback 0
ip address 1.1.1.1 255.255.255.255
!
router ospf 10
router-id 1.1.1.1
graceful-restart
network 1.1.1.1 0.0.0.0 area 0
network 192.168.12.0 0.0.0.255 area 0
!
R2
interface GigabitEthernet 0/0
no switchport
ip address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet 0/1
no switchport
ip address 192.168.23.1 255.255.255.0
!interface Loopback 0
ip address 2.2.2.2 255.255.255.255
!
router ospf 10
router-id 2.2.2.2
graceful-restart
network 2.2.2.2 0.0.0.0 area 0
network 192.168.12.0 0.0.0.3 area 0
network 192.168.23.0 0.0.0.3 area 1
area 1 virtual-link 4.4.4.4 #配置虚链路穿越!
R3
interface GigabitEthernet 0/0
no switchport
ip address 192.168.23.2 255.255.255.0
!
interface GigabitEthernet 0/1
no switchport
ip address 192.168.34.1 255.255.255.0
!interface Loopback 0
ip address 3.3.3.3 255.255.255.255
!
router ospf 10
router-id 3.3.3.3
graceful-restart
network 3.3.3.3 0.0.0.0 area 1
network 192.168.23.0 0.0.0.255 area 1
network 192.168.34.0 0.0.0.255 area 1
!
R4
interface GigabitEthernet 0/0
no switchport
ip address 192.168.34.2 255.255.255.0
!
interface GigabitEthernet 0/1
no switchport
ip address 192.168.45.1 255.255.255.0
!interface Loopback 0
ip address 4.4.4.4 255.255.255.255
!
interface VLAN 1
!
router ospf 10
router-id 4.4.4.4
graceful-restart
network 4.4.4.4 0.0.0.0 area 2
network 192.168.34.0 0.0.0.255 area 1
network 192.168.45.0 0.0.0.255 area 2
area 1 virtual-link 2.2.2.2 #配置虚链路穿越
!
R5
interface GigabitEthernet 0/0
no switchport
ip address 192.168.45.2 255.255.255.0
!interface Loopback 0
ip address 5.5.5.5 255.255.255.255
!
router ospf 10
router-id 5.5.5.5
graceful-restart
network 5.5.5.5 0.0.0.0 area 2
network 192.168.45.0 0.0.0.255 area 2
!