Multi-Area Adjacency Configuration
Multiple OSPF areas for a same subnet can be configured between two routers. In the diagram below, OSPF is enabled between R2 and R3 under area 0 and area 1, though there is only one link available between these two routers. Multi-area adjacency allows establishing adjacency on multiple areas between the Area Border Routers (ABRs). The specified interface of the ABR is associated with multiple areas.
Each multi-area-adjacency internally implements point-to-point functionality, once the adjacency reaches the FULL state. This point-to-point link provides a topological path for that area. Like a virtual link, there is no restriction for multi‑area adjacency that the packets always go through the backbone.
Topology
Figure 8-74: One Subnet with Multiple OSPF Areas
Configuration
R1
#configure terminal | Enter configure mode. |
(config)#router ospf 1 | Configure an OSPF instance with an instance ID of 1. |
(config-router)#network 1.1.1.0/24 area 1 | Configure OSPF between R1 and R2 under area 1. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
(config-router)#exit | Exit Router mode, and return to Configure mode. |
R2
#configure terminal | Enter configure mode. |
(config)#router ospf 1 | Configure an OSPF instance with an instance ID of 1. |
(config-router)#network 1.1.1.0/24 area 1 | Configure OSPF between R1 and R2 under area 1. |
(config-router)#network 2.2.2.0/24 area 0 | Configure OSPF between R2 and R3 under area 0. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
(config-router)#exit | Exit Router mode, and return to Configure mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ip address 2.2.2.1/24 | Configure IP address on the interface. |
(config-if)#ip ospf 1 multi-area 0.0.0.1 neighbor 2.2.2.2 | Configure multi area adjacency. |
(config-if)#commit | Commit the candidate configuration to the running configuration. |
(config-if)#exit | Exit interface mode. |
R3
#configure terminal | Enter configure mode. |
(config)#router ospf 1 | Configure an OSPF instance with an instance ID of 1. |
(config-router)#network 2.2.2.0/24 area 0 | Configure OSPF between R2 and R3 under area 0. |
(config-router)#network 3.3.3.0/24 area 1 | Configure OSPF between R3 and R4 under area 1. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
(config-router)#exit | Exit Router mode, and return to Configure mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ip address 2.2.2.2/24 | Configure IP address on the interface. |
(config-if)#ip ospf 1 multi-area 0.0.0.1 neighbor 2.2.2.1 | Configure multi area adjacency. |
(config-if)#commit | Commit the candidate configuration to the running configuration. |
(config-if)#exit | Exit interface mode. |
R4
#configure terminal | Enter configure mode. |
(config)#router ospf 1 | Configure an OSPF instance with an instance ID of 1. |
(config-router)#network 3.3.3.0/24 area 1 | Configure OSPF between R3 and R4 under area 1. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
(config-router)#exit | Exit Router mode, and return to Configure mode. |
Validation
R2
R2#show ip ospf multi-area-adjacencies
Multi-area-adjacency link on interface eth1 to neighbor 2.2.2.2
Internet Address 2.2.2.1/24, Area 0.0.0.1, MTU 1500
Process ID 1, Router ID 10.12.26.89, Network Type POINTTOPOINT, Cost: 1
Transmit Delay is 1 sec, State Point-To-Point, TE Metric 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Neighbor Count is 1, Adjacent neighbor count is 1
Hello received 16 sent 53, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 10 sent 5
LS-Ack received 3 sent 9, Discarded 0
R2#show ip ospf neighbor
Total number of full neighbors: 3
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/DR 00:00:35 1.1.1.1 eth2 0
10.12.26.90 1 Full/Backup 00:00:33 2.2.2.2 eth1 0
10.12.26.90 1 Full/ - 00:00:35 2.2.2.2 eth1
R2#show ip ospf route
OSPF process 1:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
C 1.1.1.0/24 [1] is directly connected, eth2, Area 0.0.0.1
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
O 3.3.3.0/24 [2] via 2.2.2.2, eth1, Area 0.0.0.1
R2#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, eth2
C 2.2.2.0/24 is directly connected, eth1
O 3.3.3.0/24 [110/2] via 2.2.2.2, eth1, 00:05:44
C 10.12.26.0/24 is directly connected, eth0
C 127.0.0.0/8 is directly connected, lo
Gateway of last resort is not set
R3
R3#show ip ospf multi-area-adjacencies
Multi-area-adjacency link on interface eth1 to neighbor 2.2.2.1
Internet Address 2.2.2.2/24, Area 0.0.0.1, MTU 1500
Process ID 1, Router ID 10.12.26.90, Network Type POINTTOPOINT, Cost: 1
Transmit Delay is 1 sec, State Point-To-Point, TE Metric 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Neighbor Count is 1, Adjacent neighbor count is 1
Hello received 41 sent 41, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 5 sent 10
LS-Ack received 8 sent 3, Discarded 0
R3#sh ip ospf neighbor
Total number of full neighbors: 3
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/DR 00:00:39 2.2.2.1 eth1 0
10.12.26.92 1 Full/Backup 00:00:36 3.3.3.2 eth2 0
10.12.26.89 1 Full/ - 00:00:30 2.2.2.1 eth1
R3#sh ip ospf route
OSPF process 1:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
O 1.1.1.0/24 [2] via 2.2.2.1, eth1, Area 0.0.0.1
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
C 3.3.3.0/24 [1] is directly connected, eth2, Area 0.0.0.1
R3#sh ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
IP Route Table for VRF "default"
O 1.1.1.0/24 [110/2] via 2.2.2.1, eth1, 00:07:31
C 2.2.2.0/24 is directly connected, eth1
C 3.3.3.0/24 is directly connected, eth2
C 10.12.26.0/24 is directly connected, eth0
C 127.0.0.0/8 is directly connected, lo
Gateway of last resort is not set