Someone posed the question to me the other day as to whether or not inter-area traffic in OSPF had to traverse the backbone area (Area 0) from a physical perspective. They were listening to a video and heard the instructor say that traffic had to traverse from the non-backbone area, to the backbone area, to the other non-backbone area to conform to OSPF’s loop prevention mechanisms.
My initial thought, was, “Well, from a physical perspective there’s no requirement that I’m aware of…” but I choose not to lean on my own understanding anymore, so I broke out the CSRs and labbed it up to simulate a situation where the traffic traverses an ABR without physical links in Area 0. Let’s take a look at the setup:
Above, you see a typical (broken) design scenario. I have only highlighted the loopback addresses because they are really all that is necessary to show in this particular situation. Note that the physical link between R6 and R7 is in Area 67, and the physical link between R7 and R9 is in Area 79. R6’s loopback is in Area 67, and R9’s loopback is in Area 79. Currently, R7’s loopback is not assigned to an area. Let’s take a look at the broken design’s database from the different area perspectives:
As you can see, R6 is not learning any routes via OSPF. Its directly connected link to R7 will be in the RIB as a connected route, and remember that R7’s loopback is not currently advertised into OSPF. However, why do we not see R9’s loopback or connected links? Here’s a hint:
There are currently no Area Border Routers. Remember that R9’s loopback is in Area 79, and both R6 and R9 are OSPF Internal Routers (all of their links are in a single area) and both areas are NOT Area 0 (the backbone area).
R9 will show a similar output:
Without an ABR, no Type-3 LSAs will be generated for Inter-Area traffic to function properly. Remember that Type-1 and Type-2 LSAs are limited to local area scope, and Type-3 LSAs are generated by ABRs to hide topology information from the other areas while still allowing inter-area communication to occur.
Also note, that, although this is a “broken” design, R7 will actually have routes to both R6 and R9’s loopback addresses, since it has links in both areas and therefore has Type-1 and Type-2 LSA’s to build the intra-area topology information for both areas without the need for an ABR:
Note the lack of the trailing (IA) for the OSPF routes to R6 and R9’s looback addresses. These are OSPF intra-area routes. Check out the databases for Area 67 and Area 79, respectively:
So, back to our original question–can we fix this “broken” design to allow inter-area communication without the addition of any PHYSICAL links in Area 0, and, if so, will traffic flow as expected without traversing a physical Area 0 link? Let’s take a look. Note that in the below diagram/config, the only thing that has changed is that I have added R7’s loopback0 prefix to Area 0:
The first question–will this make R7 an ABR, even though it’s a logical loopback interface and it has no physical interfaces in Area 0? Let’s see:
Note that, I ran the ‘show ip ospf’ command and piped to include ‘border router’ which tells us whether or not the router is an ABR. Before placing the Loopback0 interface in Area 0, it was not an ABR. After placing the loopback in Area0 as shown above, it now reports that it is, indeed, an ABR. This makes sense from a strictly logical perspective, as a functional ABR is defined as a router with at least one link in a non-backbone area and at least one link in the backbone area (Area 0). You will sometimes see that an ABR is defined more simply as a router with links in at least two areas, which is both correct and incorrect from a functionality standpoint, considering whether or not one of the areas is the backbone area.
Let’s see if R6 and R9 agree that R7 is now an ABR:
Boom. Both do. This means that R7 should be generating Type-3 LSAs for both areas and sending them bidirectionally:
Sure enough, R6 and R9 both have Summary LSAs from R7 (22.214.171.124) who is now acting as a functional ABR. We have verified the database, and the last thing to verify is the data plane. Let’s make sure that R6 can reach R9’s loopback0 prefix and vice-versa with a Loopback0-sourced ping and traceroute from R6:
Sure enough ladies and gentlemen, traffic traverses just fine. More importantly, to answer the original question, traffic traverses two links (Gi1.67 and Gi1.79), neither of which belong to Area 0, but both of which are connected to an ABR:
So, to sum it up: the traffic doesn’t have to traverse a physical link in Area 0, but it does traverse a node connected to Area 0, an ABR (which, by its very definition, is connected to Area 0). So, even though the traffic flow from a physical perspective is (Area67->Area79), from a node overview the traffic still traverses the way you would expect it to (Internal Router->ABR->Internal Router) or (Area 67->Area0->Area79) or (R6-R7-R9).
Hopefully this helps you cement some of the finer points of OSPF.