TBLEG
扫描微信账号

扫一扫微信二维码

CCNP路由实验---11、OSPF虚链路的配置

2020-05-16 信息
区块链白皮书代写

一、实验目:

1、掌握OSPF虚链路配置

二、实验拓扑:

 

三、实验步骤

1、如图配置OSPF网络,配置如下:

 R1:

R1(config)#int s1/1

R1(config-if)#ip add 172.16.224.1 255.255.255.0

R1(config-if)#no shut

R1(config)#int loop 0

R1(config-if)#ip add 172.16.1.3 255.255.255.0

R1(config)#int loop 1

R1(config-if)#ip add 172.16.0.3 255.255.255.0

R1(config-if)#exit

R1(config)#router ospf 1

R1(config-router)#network 172.16.224.0 0.0.0.255 area 51

R1(config-router)#network 172.16.0.0 0.0.0.255 area 0

R1(config-router)#network 172.16.1.0 0.0.0.255 area 0

R1(config-router)#

 

R2:

R2(config)#int s1/0

R2(config-if)#ip add 172.16.224.2 255.255.255.0

R2(config-if)#no shut

R2(config)#int s1/2

R2(config-if)#ip add 172.16.240.1 255.255.255.0

R2(config-if)#no shut

R2(config)#int loop 0

R2(config-if)#ip add 172.16.3.1 255.255.255.0

R2(config-if)#exit

R2(config)#router ospf 1

R2(config-router)#network 172.16.224.0 0.0.0.255 area 51

R2(config-router)#network 172.16.3.0 0.0.0.255 area 51

R2(config-router)#network 172.16.240.0 0.0.0.255 area 3  

 

R3:

R3(config)#int s1/1

R3(config-if)#ip add 172.16.240.2 255.255.255.0

R3(config-if)#no shut

R3(config)#int loop 0

R3(config-if)#ip add 172.16.252.1 255.255.255.0

R3(config)#int loop 1

R3(config-if)#ip add 172.16.248.1 255.255.255.0

R3(config)#router ospf 1

R3(config-router)#network 172.16.240.0 0.0.0.255 area 3

2、使用show ip route、show ip ospf nei查看OSPF配置结果。

R1#

R1#sh ip route

 

Gateway of last resort is not set

 

     172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks

C       172.16.224.0/24 is directly connected, Serial1/1

C       172.16.0.0/24 is directly connected, Loopback1

C       172.16.1.0/24 is directly connected, Loopback0

l      172.16.3.1/32 [110/65] via 172.16.224.2, 00:02:52, Serial1/1

R1#sh ip ospf nei detail

 Neighbor 172.16.3.1, interface address 172.16.224.2

    In the area 51 via interface Serial1/1

    Neighbor priority is 0, State is FULL, 6 state changes

    DR is 0.0.0.0 BDR is 0.0.0.0

    Options is 0x52

    LLS Options is 0x1 (LR)

    Dead timer due in 00:00:31

    Neighbor is up for 00:04:08

    Index 1/1, 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

 

R2#sh ip route

 

Gateway of last resort is not set

 

     172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

C       172.16.240.0/24 is directly connected, Serial1/2

C       172.16.224.0/24 is directly connected, Serial1/0

O IA    172.16.1.3/32 [110/65] via 172.16.224.1, 00:01:20, Serial1/0

C       172.16.3.0/24 is directly connected, Loopback0

O IA    172.16.0.3/32 [110/65] via 172.16.224.1, 00:01:20, Serial1/0

R2#sh ip ospf nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.252.1      0   FULL/  -        00:00:37    172.16.240.2    Serial1/2

172.16.1.3        0   FULL/  -        00:00:39    172.16.224.1    Serial1/0

 

R3#sh ip route

 

Gateway of last resort is not set

 

     172.16.0.0/24 is subnetted, 3 subnets

C       172.16.252.0 is directly connected, Loopback0

C       172.16.248.0 is directly connected, Loopback1

C       172.16.240.0 is directly connected, Serial1/1

R3#sh ip ospf nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.3.1        0   FULL/  -        00:00:34    172.16.240.1    Serial1/1

 

R3无法学习到OSPF路由,但是和R2又形成了邻接关系,状态是FULL,为什么?因为R3并没有连接到主干区域area 0。所以必须在Area3和Area0之间建立一条虚链路。

3、在Area3和Area0之间建立一条虚链路。其实就是在R1、R2上进行配置:

R1(config)#router ospf 1

R1(config-router)#area 51 virtual-link 172.16.3.1

 

R2(config)#router ospf 1

R2(config-router)#area 51 virtual-link 172.16.1.3

 

配置完后,用命令查看R3路由表。

R3#sh ip route

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 -

全文阅读
文章关键词
配置
network
ADD
last
IP
扫描关注微信账号

试试长按二维码加关注