OSPF仮想リンク(実験の詳細は、マッチングプロセスを持っている内)

OSPF仮想リンク

仮想リンク:

これは、非バックボーンエリアリンクを介してバックボーンに接続されている領域をいいます

仮想リンクオブジェクト:

非バックボーンエリアの領域を介してバックボーンに接続されている領域

非バックボーンエリア骨格領域により接続されたセグメント

仮想リンクの設定ルールと特徴:

仮想リンクは、2つのルータABRの間に配置されなければなりません

これは、輸送領域先端領域にはできません

安定性は、仮想リンクの安定性に依存する領域を介して

論理的に冗長仮想リンクを提供するのに役立ちます

仮想リンクの設定コマンド:

ます。Router(config-ルータ)#エリアのエリアID vritualリンクルータID

OSPF仮想リンクのテスト構成:

次のように実験トポロジは次のとおりです。

image.png

テスト環境の準備: GNS3、CRT

実験:

1、4台のPCルータ、2台のPCマシン、

2、AREA0のバックボーンエリアを設定し、AREA1エリア2標準面積します。

3、R2は、ABRであります

実験手順:

図1に示すように、ルーティングとIPネットワークセグメントの宣言を設定します

R1:

R1#conf t                        进入全局模式
R1(config)#int f0/0     进入接口F0/0
R1(config-if#ip add 192.168.10.1 255.255 255.0  配置IP
R1(config-if)#no shut     开启
R1(config-if#int f0/1  进入接口F0/1
R1(config-if#ip add 192.168.20.1 255.255.255.0  配置IP地址
R1(config-if)#no shut  开启
R1(config-if#ex    
R1(config)#int lo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255   
R1(config-if#no shut
R1(config-if#ex
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1                   配置router ID
R1(config-router)#network 192. 168.10.0 0.0.0.255 area 2   宣告网段
R1(config-router)#network 192. 168.20.0 0.0.0.255 area 2

image.png

image.png

R2:

R2#conft   进入全家模式
R2(config)#int f0/0     配置接口F0/0
R2(config-if#ip add 192.168.20.2 255.255.255.0
R2(config-if)#no shut
R2(config-if#int f0/1  配置接口F0/1
R2(config-if)#ip add 192.168.30.1 255.255.255.0
R2(config-if)#no shut
R2(config-if#ex
R2(config)#int lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#no shut
R2(config-if#ex
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2             配置router id
R2(config-router)#network 192.168.20.0 0.0.0.255 area 2    宣告网段
R2(config-router)#network 192.168.30.0 0.0.0.255 area 1
R2(config-router)#ex

image.png

image.png

R3:

R3#conf t  进入全局模式
R3(config)#int f0/0   配置接口F0/0
R3(config-if)#ip add 192.168.30.2 255.255.255.0
R3(config-if)#no shut
R3(config-if#int f0/1  配置接口0/1
R3(config-if)#ip add 192.16840.1 255 255.255.0
R3(config-if)#no shut
R3(config-if)#ex
R3(config)#int lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#no shut
R3(config-if)#ex
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3    配置router id
R3(config-router)#network 192.168.30.0 0.0.0.255 area 1    宣告网段
R3(config-router)#network 192.168.40.0 0.0.0.255 area 0

image.png

image.png

R4:

R4#conft进入全局模式
R4(config)#int f0/O  配置接口F0/0
R4(config-if)#ip add 192. 16840.2 255.255.255.0
R4(config-if)#no shut
R4(config-if)#int f0/1  配置接口F0/1
R4(config-if#ip add 192.168.50.1 255.255.255.0
R4(config-if#no shut
R4(config-if#ex
R4(config)#int lo 0
R4(config-if#ip add 4.4.4.4 255.255.255.255
R4(config-if)#no shut
R4(config-if)#ex
R4(config)#router ospf 1   
R4(config-router)#router-id 4.4.4.4    配置router id
R4(config-router)#network 192.168.40.0 0.0.0.255 area 0     宣告网段
R4(config-router)#network 192.168.50.0 0.0.0.255 area 0

image.png

image.png

2、检查各个路由器之间网段的学习情况

R1:

R1(config #do show ip route     查看RI网段学习情况
...此处省略部分
        1.0.0.0/32 is subnetted, 1 subnets
C         1.1.1.1 is directly connected, Loopbacke
C       192.168.10.0/24 is directly connected, FastEthernete/0
C       192.168.20.0/24 is directly connected, FastEthernete/1

image.png

R2:

R2(config)#do show ip route            查看R2网段学习情况
.....处省略部分
           2.0.0.0/32 is subnetted, 1 subnets
C               2.2.2.2 is directly connected, Loopbacke
C         192.168.30.0/24 is directly connected, FastEthernet8/1
C         192.168.10.0/24 [110/20] via 192.168.20.1, 00:15:57, FastEthernet0/0
0 IA 192.168 40.0/24 [110/20] via 192.168.30.2, 00:08:28, FastEthernet8/1
C         192 168.20.0/24 is directly connected, FastEthernete/0
0 IA 192.168.50.0/24 [110/30] via 192.168.30.2, 00:03:29, FastEthernet0/1

image.png

R3:

R3( config)#do show ip route            查看R3网段学习情况
.... 此处省略部分
          3.0.0.0/32 is subnetted, 1 subnets
C             3.3.3.3 is directly connected, Loopbacke
C        192.168.30.0/24 is directly connected, FastEthernete/0
C        192.168. 40.0/24 is directly connected, FastEthernet0/1
0         192.168. 50.0/24 [110/20] via 192.168 40.2, 00:10:35, FastEthernete/1

image.png

R4:

R4(config )#do show ip route            查看R4网段学习情况
....处省略部分
0 IA 192.16830.0/24 [110/20] via 192.168.40.1, 00:12:42, FastEthernet0/0
        4.0.0.0/32 is subnetted, 1 subnets
C     192.168.40.0/24 is directly connected, FastEthernete/0
C     192.168.50.0/24 is directly connected, FastEthernet8/1

image.png

3、配置两台pc机的IP地址和网关,并测试两台pc机间的互联互通状态

PC1>ip 192.168.10.2 192.168.10.1    配置pc1IP地址
PC2>ip 192 168.50.2 192.168.50.1    配置pc2IP地址
PC1> ping 192.168.50.2              用pc1去ping。失败。
*192.168.10.1 icmp seq=1 tt1=255 time=19.999 ms (ICMP type:3, code:1, Destination host unreachable)

//无法ping通。这个时候就需要来做虚链路,进而达到互联互通的目的

image.png

image.png

image.png

4、配置虚链路

R2:

R2(config)#router ospf 1
R2(config-router)#area 1 vitual-link 3.3.3.3 //area1为穿越区域, 写上R3的router-id

image.png

R3:

R3(config)#router ospf 1
R3(config-router)#area 1 vitual-link 2.2.2.2 //area1为穿越区域, 写上R2的router-id

image.png

5、再次检查两台pc机间的互联互通状态,已检测虚链路的配置结果

PC1> ping 192.168.50.2
192.168.50.2 icmp_ seq=1 timeout
84 bytes from 192.168.50.2 icmp_ seq=2 tt1-60 time=82.984 ms
//显示状态连通

image.png

ping通,实验成功。

通过实验我们可以得出结论:

虚链路的设置可以让与骨干区域相隔的标准区域在非直连状态下与之达成互通


おすすめ

転載: blog.51cto.com/14475876/2439825