Configuring OSPF Multi-Area Adjacency : Example Scenario

Rashmi Bhardwaj | Blog,Config & Troubleshoot,Routing & Switching
Google ADs

Introduction to OSPF

OSPF is a we all know is a link-state routing protocol. All routers within an OSPF area maintain a complete topology information of that area. A particular interface on a router can be part of only a single area which can lead to some issues if the network isn’t designed correctly.

In this post we will have a look at a scenario where we will use the OSPF multi-area adjacency feature. OSPF Multi-area adjacency forms more than one adjacency over single link. This feature only works on the OSPF point-point links. Let us use the topology below to understand further:

Related- OSPF Neighbor States

Google ADs

OSPF Multi-area Adjacency

In the below topology we will try to reach 1.1.1.1/32 network from R5.

Requirement is to prefer the path R5 > R4 > R3 > R2 > R1 and not via path R5 > R4 > R2 > R1.

We have configured the network diagram below as follows:

R1 – R2: Static routing
R2 – R3: OSPF Neighbors in Area 0
R2 – R4: OSPF neighbors in Area 10
R3 – R4: OSPF neighbors in Area 10
R4 – R5: OSPF neighbors in Area 10

Under the normal OSPF configuration we will see that the path R5 > R4 > R2 > R1 is preferred over the path R5 > R4 > R3 > R2 > R1 which doesn’t meet our requirement.

Configurations and Output as below:

R1:

interface Loopback0

ip address 1.1.1.1 255.255.255.255

!

interface FastEthernet0/0

ip address 9.9.12.1 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 9.9.12.2

 

R2:

interface FastEthernet0/0

ip address 9.9.12.2 255.255.255.0

!

interface FastEthernet1/0

ip address 9.9.23.2 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 0

!

interface FastEthernet1/1

ip address 9.9.24.2 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 10

shutdown

!

ip route 1.1.1.1 255.255.255.255 9.9.12.1

router ospf 1

redistribute static metric-type 1 subnets

 

R3:

interface FastEthernet0/0

ip address 9.9.23.3 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 0

!

interface FastEthernet1/0

ip address 9.9.34.3 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 10

 

R4:

interface FastEthernet0/0

ip address 9.9.24.4 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 10

!

interface FastEthernet1/0

ip address 9.9.34.4 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 10

!

interface FastEthernet1/1

ip address 9.9.45.4 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 10

 

R5:

interface FastEthernet0/0

ip address 9.9.45.5 255.255.255.0

ip ospf network point-to-point

ip ospf 1 area 10

Trace to 1.1.1.1/32 network from R5 takes path via R4 > R2.

R5#traceroute 1.1.1.1

Type escape sequence to abort.

Tracing the route to 1.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

1 9.9.45.4 4 msec 20 msec 8 msec

2 9.9.24.2 8 msec 28 msec 16 msec

3 9.9.12.1 60 msec 24 msec 40 msec

R4#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32

  Known via “ospf 1”, distance 110, metric 21, type extern 1

Last update from 9.9.24.2 on FastEthernet0/0, 00:00:53 ago

Routing Descriptor Blocks:

* 9.9.24.2, from 9.9.23.2, 00:00:53 ago, via FastEthernet0/0

Route metric is 21, traffic share count is 1

We see leaving everything to default in OSPF the route towards 1.1.1.1 from R5 is preferred via R4 > R2 rather than going from R3 as we have lower cost/metric via R2 which is 21 and from R3 it will come out to be 22 due to extra-link in network.  Default metric of ASBR is 20.

Now let us try to change the OSPF cost on R4 connecting to R2 and try tracing the path again. As in output below we see R4 still installs the route to 1.1.1.1 via R2 even when the cost is higher than that from R3.

 

R4#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32

  Known via “ospf 1”, distance 110, metric 120, type extern 1

Last update from 9.9.24.2 on FastEthernet0/0, 00:00:01 ago

Routing Descriptor Blocks:

* 9.9.24.2, from 9.9.23.2, 00:00:01 ago, via FastEthernet0/0

Route metric is 120, traffic share count is 1

Trace output still is the same traversing via R4 > R2.

R5#traceroute 1.1.1.1

Type escape sequence to abort.

Tracing the route to 1.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

1 9.9.45.4 20 msec 16 msec 8 msec

2 9.9.24.2 8 msec 28 msec 16 msec

3 9.9.12.1 52 msec 8 msec 64 msec

Once we shut the link towards R2 we see the route to 1.1.1.1 is installed via R3 and trace also starts going via R3.

R2(config)# int fa1/1

R2(config-if)#sh

R4#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32

  Known via “ospf 1”, distance 110, metric 22, type extern 1

Last update from 9.9.34.3 on FastEthernet1/0, 00:00:03 ago

Routing Descriptor Blocks:

* 9.9.34.3, from 9.9.23.2, 00:00:03 ago, via FastEthernet1/0

Route metric is 22, traffic share count is 1

R5#traceroute 1.1.1.1

Type escape sequence to abort.

Tracing the route to 1.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

1 9.9.45.4 12 msec 20 msec 4 msec

  2 9.9.34.3 48 msec 12 msec 20 msec

3 9.9.23.2 48 msec 12 msec 60 msec

4 9.9.12.1 44 msec 56 msec 48 msec

The reason behind such behavior is that information needed to reach the ASBR is inter-area information however intra-area information to reach the ASBR is always preferred irrespective of the OSPF cost via two paths.One way to resolve this behavior is to use the OSPF multi-area Adjacency.

Multi-Area ADJ can be used in order to form multiple point-to-point logical adjacencies over a single link. The requirement is that there must be only two OSPF speakers on the link, and in a broadcast network, you must manually change the OSPF network type to Point-to-Point on the link. This feature allows a single physical link to be shared by multiple Areas and creates an Intra-Area path in each of the Areas that share the link.

Configuration on R2 and R3 as below to enable OSPF Multi-Area ADJ.

R2:

interface fa1/0
ip address 9.9.23.2 255.255.255.0
ip ospf network point-to-point
ip ospf multi-area 10
ip ospf 1 area 0
end

R3:

interface fa0/0
ip address 9.9.23.3 255.255.255.0
ip ospf network point-to-point
ip ospf multi-area 10
ip ospf 1 area 0
end

 

Continue Reading:

Basic OSPF Configuration of HP Switches

OSPF Cost Calculation

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart