按照图示分区域配置OSPF 配置虚连接认证
AR2
[Huawei]ospf router-id 2.2.2.2 [Huawei-ospf-1]area 0 [Huawei-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 [Huawei-ospf-1-area-0.0.0.0]network 20.1.1.0 0.0.0.255 [Huawei-ospf-1]area 1 [Huawei-ospf-1-area-0.0.0.1]network 30.1.1.0 0.0.0.255AR3
[Huawei]ospf router-id 3.3.3.3 [Huawei-ospf-1]area 1 [Huawei-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0 [Huawei-ospf-1-area-0.0.0.1]network 30.1.1.0 0.0.0.255 [Huawei-ospf-1]area 2 [Huawei-ospf-1-area-0.0.0.1]network 40.1.1.0 0.0.0.255AR4
[Huawei]ospf router-id 4.4.4.4 [Huawei-ospf-1]area 2 [Huawei-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.0 [Huawei-ospf-1-area-0.0.0.1]network 40.1.1.0 0.0.0.255ospf非骨干区域必须和骨干区域相连才能通信,为了不改变网络拓扑,我们可以实现虚连接来扩大区域0的面积,实现区域互通。 AR2
[Huawei-ospf-1-area-0.0.0.1]vlink-peer 3.3.3.3AR3
[Huawei-ospf-1-area-0.0.0.1]vlink-peer 2.2.2.2建成邻居后 是P2P的一个链路
[Huawei]dis ospf vlink OSPF Process 1 with Router ID 3.3.3.3 Virtual Links Virtual-link Neighbor-id -> 2.2.2.2, Neighbor-State: Full Interface: 30.1.1.2 (GigabitEthernet0/0/0) Cost: 1 State: P-2-P Type: Virtual Transit Area: 0.0.0.1 Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1 GR State: NormalAR2
[Huawei-ospf-1-area-0.0.0.1]vlink-peer 3.3.3.3 simple cipher 123AR3
[Huawei-ospf-1-area-0.0.0.1]vlink-peer 2.2.2.2 simple cipher 123测试连通性,AR4 PING AR1
<Huawei>ping 1.1.1.1 PING 1.1.1.1: 56 data bytes, press CTRL_C to break Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=253 time=40 ms Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=253 time=30 ms Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=253 time=40 ms Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=253 time=30 ms Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=253 time=50 ms --- 1.1.1.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/38/50 ms转载于:https://www.cnblogs.com/yu15/p/11290224.html
相关资源:JAVA上百实例源码以及开源项目