一、概念
- OSPF非0区域必须要挂靠到区域0上才可以通信,而通过打虚链路,可以使远端非0区域与区域0连接
- 中转区域(虚链路穿过的区域)不能是末节区域
- 两端都要配置
- 查看虚链路:
show ip ospf virtual-links
二、配置
R1: router ospf 1
R1: area 1 virtual-link 2.2.2.2
R2: router ospf 1
R2: area 1 virtual-link 1.1.1.1
三、配置虚链路明文认证
R1: router ospf 1
R1: area 1 virtual-link 2.2.2.2 authentication
R1: area 1 virtual-link 2.2.2.2 authentication-key cisco
R2: router ospf 1
R2: area 1 virtual-link 1.1.1.1 authentication
R2: area 1 virtual-link 1.1.1.1 authentication-key cisco
四、配置虚链路MD5认证
R1: router ospf 1
R1: area 1 virtual-link 2.2.2.2 authentication message-digest
R1: area 1 virtual-link 2.2.2.2 message-digest-key 1 md5 cisco
R2: router ospf 1
R2: area 1 virtual-link 1.1.1.1 authentication message-digest
R2: area 1 virtual-link 1.1.1.1 message-digest-key 1 md5 cisco
五、在不连续骨干区域0下,配置隧道模式虚链路
R1: int tunnel 0
R1: ip addr 10.1.1.1 255.255.255.0
R1: tunnel source s1/1
R1: tunnel destination 12.1.1.2
R2: int tunnel 1
R2: ip addr 10.1.1.2 255.255.255.0
R2: tunnel source s1/0
R2: tunnel destination 12.1.1.1