实验6 配置OSPF虚链路
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验6 配置OSPF虚链路一、实验拓扑图,如图1.1所示:
图1.1 OSPF虚链路实验拓扑图
二、路由器初始配置:
1.R1上的初始配置
R1(config-line)#int s2/1
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int lo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#router os 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#net 1.1.1.1 0.0.0.0 a 0
R1(config-router)#net 12.0.0.1 0.0.0.0 a 0
2.R2上的初始配置:
R2(config-line)#int s2/1
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s2/2
R2(config-if)#ip add 23.0.0.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#router os 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#net 2.2.2.2 0.0.0.0 a 0
R2(config-router)#net 12.0.0.2 0.0.0.0 a 0
R2(config-router)#net 23.0.0.2 0.0.0.0 a 1
3.R3上的初始配置:
R3(config-line)#int s2/1
R3(config-if)#ip add 23.0.0.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int s2/2
R3(config-if)#ip add 34.0.0.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#router os 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#net 3.3.3.3 0.0.0.0 a 0
R3(config-router)#net 23.0.0.3 0.0.0.0 a 1
R3(config-router)#net 34.0.0.3 0.0.0.0 a 0
4.R4上的初始配置:
R4(config-line)#int s2/1
R4(config-if)#ip add 34.0.0.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int lo 0
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R4(config-if)#router os 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#net 4.4.4.4 0.0.0.0 a 0
R4(config-router)#net 34.0.0.4 0.0.0.0 a 0
5.在R1上查看路由表信息
R1(config-router)#do sh ip rout
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
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 12.0.0.2, 00:06:09, Serial2/1
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/128] via 12.0.0.2, 00:06:09, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
以上输出表明,R1不能获知分割开的Area 0的路由信息,需要将Area 0 连在一起。
三、实验步骤:
1.在R2上配置虚链路:
R2(config-router)#area 1 virtual-link 3.3.3.3
2.在R3上配置虚链路:
R3(config-router)#area 1 virtual-link 2.2.2.2
四、实验调试
//在R1上查看路由表:
R1(config-router)#do sh ip rout
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
34.0.0.0/24 is subnetted, 1 subnets
O 34.0.0.0 [110/192] via 12.0.0.2, 00:05:54, Serial2/1
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 12.0.0.2, 00:05:54, Serial2/1
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/129] via 12.0.0.2, 00:05:54, Serial2/1
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/193] via 12.0.0.2, 00:05:54, Serial2/1
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/128] via 12.0.0.2, 00:05:54, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
以上输出表明,可以通过虚链路讲分割开的区域连在一起。
//在R2上查看虚链路的配置
R2(config-router)#do sh ip os v
Virtual Link OSPF_VL0 to router 3.3.3.3 is up//虚链路已成功建立
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial2/2, 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:09
Adjacency State FULL (Hello suppressed)//状态已经Full
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。