
111
192.168.1.1 Broadcast DR 1 100 192.168.1.1 192.168.1.3
[RouterB] display ospf interface
OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
192.168.1.2 Broadcast DROther 1 0 192.168.1.1 192.168.1.3
The interface state
DROther
means the interface is not the DR or BDR.
OSPF virtual link configuration example
Network requirements
Configure a virtual link between Router B and Router C to connect Area 2 to the backbone area. After
configuration, Router B can learn routes to Area 2.
Figure 28
Network diagram
Configuration procedure
1.
Configure IP addresses for interfaces. (Details not shown.)
2.
Enable OSPF:
# Configure Router A.
<RouterA> system-view
[RouterA] ospf 1 router-id 1.1.1.1
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
# Configure Router B.
<RouterB> system-view
[RouterB] ospf 1 router-id 2.2.2.2
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] area 1
[RouterB–ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
[RouterB–ospf-1-area-0.0.0.1] quit
[RouterB-ospf-1] quit
Area 0
Router A
Eth1/1
10.1.1.1/24
Router B
Area 2
Eth1/1
10.1.1.2/24
Eth1/2
10.3.1.2/24
Eth1/1
10.3.1.1/24
Vir
tua
l li
nk
Eth1/2
10.2.1.1/24
Eth1/1
10.2.1.2/24
Area 1
Router C
Router D