OSPF实验4:虚链路
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
OSPF实验4:虚链路
实验等级:Professional
实验拓扑:
实验分析:
上面这个网络的设计在OSPF中是比较失败的,因为OSPF建议所有的非骨干区域都和骨干区域直连。上面这个网络的设计将会导致Area2的数据和Area0无法通信。为了解决这个问题,一种方法可以在R3和R1上增加一条物理链路。还有一种过渡的方法就是使用虚链路。
实验基本配置:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 10.1.1.1 255.255.255.0
serial restart-delay 0
!
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
R2:
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
ip address 10.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 11.1.1.1 255.255.255.0
serial restart-delay 0
!
router ospf 10
router-id 2.2.2.2
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 1
R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial1/0
ip address 11.1.1.2 255.255.255.0
serial restart-delay 0
!
router ospf 10
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 2
network 11.1.1.0 0.0.0.255 area 1
我们在R1上查看路由表,发现没有R3的Loopback接口路由:
R1#sho ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial1/0
11.0.0.0/24 is subnetted, 1 subnets
O IA 11.1.1.0 [110/128] via 10.1.1.2, 00:04:50, Serial1/0
为了让R1学习到R3的路由,我们配置虚链路。
虚链路的配置:
虚链路必须配置在ABR上,在这个网络中ABR是R2和R3。
虚链路的配置使用的命令是area transit-area-id virtual-link router-id。我们现在在R2和R3上进行配置。
R2(config)#router ospf 10
R2(config-router)#area 1 virtual-link 3.3.3.3
R3(config)#router ospf 10
R3(config-router)#area 1 virtual-link 2.2.2.2
等虚链路起来后,我们查看其状态:
R2#sho ip ospf virtual-links
Virtual Link OSPF_VL0 to router 3.3.3.3 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial1/1, Cost of using 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Adjacency State FULL (Hello suppressed)
Index 2/3, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
在上面的信息中我们可以看到。虚链路在逻辑上是等同于一条物理的按需链路,既只有在两端路由器的配置有变动的时候才进行更新,并且使用的是不老化(DoNotAge)LSA,既虚链路是无须Hello包控制的。