In this article I want to talk about OSPF Multi-Area solution.
OSPF uses the concept of area, and the area is like a subdomain.
When a router interface is in a specific area, it maintains the topology information of that area.
An important note about OSPF is that an interface can only belong to "ONE" area. The issue with the rule is In some topologies; it can cause sub-optimal routing.
In my scenario, we are trying to demo this sub-optimal routing experience.
If the network behind R2 (220.127.116.11/24) wants to reach the network behind R5(18.104.22.168/24), what is the best path?
Clearly, the shortest path is the R2-R5 Direct link!
In our scenario, if the "R2-R5" link belongs to area "0", which link is best and shortest from the "R2" point of view?
And how about if the "R2-R5" link belongs to area "10"?
Let's find out!
We configure loopbacks into two different areas.
Loopback "0" in "R2" belongs to the area "0"; loopback "0" in "R5" belongs to the area "10", and the "R2-R5" link belongs to the area "0."
Now we are going to configure OSPF and check the result!
In this picture, we can see the topology and IP addresses of this scenario
R2-R5 link belongs to area 0
Now check out the traces:
1- from R5 (22.214.171.124) to R2(126.96.36.199):
2- now from R2(188.8.131.52) to R5(184.108.40.206)
This suboptimal routing is due to intra-area route preference over the inter area routes.
With multi-area adjacency, a single physical link (router interface) can belong to multiple OSPF areas.
Now we have multiple intra-area paths sharing the same physical link.
Important notes about multi-area solution:
You must configure OSPF on the primary interface.
Link type must be point-to-point
Now is configuration time.
change ospf network type into "point-to-point."
we have to go under interface and issue this command
# ip ospf 1 multiarea x ---> in our example x=10
After issuing the command on both sides (R2 and R5), we have a new adjacency:
I want to try traceroute again but this time after ospf multi-area configuration:
Now in both directions, we are choosing the shortest path, and we don't experience any suboptimal routing.
I hope this article is useful for you and you enjoyed it.