Area 0配置借用之前OSPF点到多点配置拓扑这里不再写Area0配置操作。
R3:
router id 10.10.3.3
interface Serial1/0/0
link-protocol fr
undo fr inarp
fr map ip 10.10.123.1 301 broadcast
fr map ip 10.10.123.2 301 broadcast
ip address 10.10.123.3 255.255.255.0
ospf network-type p2mp
ospf dr-priority 0
interface GigabitEthernet0/0/0
ip address 192.168.34.3 255.255.255.0
interface LoopBack0
ip address 10.10.3.3 255.255.255.255
ospf 1
area 0.0.0.0
network 10.10.3.3 0.0.0.0
network 10.10.123.0 0.0.0.255
area 0.0.0.1
network 192.168.34.0 0.0.0.255
vlink-peer 10.10.5.5**//Vlink配置时vlink-peer ID必须填写邻居路由器ID**
R4:
router id 10.10.4.4
interface GigabitEthernet0/0/0
ip address 192.168.45.4 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.34.4 255.255.255.0
ospf 1
area 0.0.0.1
network 192.168.34.0 0.0.0.255
network 192.168.45.0 0.0.0.255
R5:
router id 10.10.5.5
interface GigabitEthernet0/0/0
ip address 192.168.56.5 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.45.5 255.255.255.0
ospf 1
area 0.0.0.1
network 192.168.45.0 0.0.0.255
vlink-peer 10.10.3.3**//Vlink配置时vlink-peer ID必须填写邻居路由器ID**
area 0.0.0.2
network 192.168.56.0 0.0.0.255
R6:
router id 10.10.6.6
interface GigabitEthernet0/0/1
ip address 192.168.56.6 255.255.255.0
interface LoopBack0
ip address 100.100.100.100 255.255.255.255
ospf 1
area 0.0.0.2
network 100.100.100.100 0.0.0.0
network 192.168.56.0 0.0.0.255
验证:
查看vlink信息:
< R5>display ospf vlink
OSPF Process 1 with Router ID 10.10.5.5
Virtual Links
Virtual-link Neighbor-id -> 10.10.3.3, Neighbor-State: Full
Interface: 192.168.45.5 (GigabitEthernet0/0/1)
Cost: 2 State: P-2-P Type: Virtual //虚连接类型
Transit Area: 0.0.0.1
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
GR State: Normal
查看OSPF路由表:
< R5>dis ospf routing
OSPF Process 1 with Router ID 10.10.5.5
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
192.168.45.0/24 1 Transit 192.168.45.5 10.10.5.5 0.0.0.1
192.168.56.0/24 1 Transit 192.168.56.5 10.10.5.5 0.0.0.2
10.10.1.1/32 50 Stub 192.168.45.4 10.10.3.3 0.0.0.1
10.10.2.2/32 98 Stub 192.168.45.4 10.10.3.3 0.0.0.1
10.10.3.3/32 2 Stub 192.168.45.4 10.10.3.3 0.0.0.1
10.10.123.1/32 50 Stub 192.168.45.4 10.10.3.3 0.0.0.1
10.10.123.2/32 98 Stub 192.168.45.4 10.10.3.3 0.0.0.1
10.10.123.3/32 2 Stub 192.168.45.4 10.10.3.3 0.0.0.1
100.100.100.100/32 1 Stub 192.168.56.6 10.10.6.6 0.0.0.2
192.168.34.0/24 2 Transit 192.168.45.4 10.10.3.3 0.0.0.1
Total Nets: 10
Intra Area: 10 Inter Area: 0 ASE: 0 NSSA: 0
测试结果:
< R2>tracert 100.100.100.100
traceroute to 100.100.100.100(100.100.100.100), max hops: 30 ,packet length: 4
0,press CTRL_C to break
1 10.10.123.1 30 ms 20 ms 20 ms
2 10.10.123.3 40 ms 20 ms 20 ms
3 192.168.34.4 40 ms 30 ms 40 ms
4 192.168.45.5 40 ms 40 ms 50 ms
5 192.168.56.6 50 ms 30 ms 40 ms
注意:
1、Vlink配置时vlink-peer ID必须填写邻居路由器ID “Neighbor router ID”。
2、Vlink配置时只需做边界路由器的Vlink配置就可以,如图只需在R3和R5配置就可以。
3、Vlink配置时需要确定Area0是否配置区域认证,如果配置认证,那么配置虚连接的路由器也需要按Area0的认证进行配置。