Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

OSPF backbone area rule

Hi,

Can someone explain me, why in OSPF,

  • Why every area must be connected to area 0 and why those routes in areas which are not connected to area 0 are not being redistributed across the OSPF domain. ( which led virtual link concept i suppose )
  • Why any router which is an ABR should be connected to area 0 and why a router which is not connected to area 0 but connected to multiple areas do not summarize the type 3 LSAs.

Also please explain one more doubt in the picture attached with this thread. When checked in R5, i am able to see all the routes including the route

between R1 and R2 ( this is not connected to area 0, yet i am able to see the routes and there is no Virtual link configured )

Thanks

Chid

Everyone's tags (2)
10 REPLIES
Hall of Fame Super Silver

Re: OSPF backbone area rule

Hello Chid,

the short answer is this is by protocol design, because inter-area routing in OSPF  is performed in such a way that most of details are lost:  LSA type 3 or type 4 are generated at area border by ABR but they do not trace key information like original area-id in which the IP prefix has been originated and so on.

Many authors say that OSPF inter-area routing is actually a form of distance vector routing for this reason.

The choice of OSPF protocol designers is clear: in a multi area domain the backbone area is the center and all other areas have to connect to it.

By enforcing this design rule some issues that could be caused by the way the inter area routing information is generated are solved.

The ABR between area X and area 0 takes the responsability to generate LSA type 3 and eventually type 4 to represent all IP prefixes that are in area X (and ASBR nodes if they are present)

All other ABR nodes receive the summary LSAs generated in area 0 and create corresponding summary LSAs for the SAME IP prefixes with single area Y,... area Z scope.

The backbone area is central for routing information propagation that cannot happen between two normal areas without going through area 0, and it is also a central point in the data plane: user traffic is moved from area X to area Y going via area 0.  LSAs and user traffic cannot hop from one area X directly into an area Y.

In this way some possible routing loops or suboptimal paths that would be caused allowing routes and traffic to traverse directly from an area X to an area Y are avoided.

In this way competition about an IP prefix present in multiple summary LSAs generated by two different ABR nodes happen within area 0. This provides a common ground for route propagation.

All ABR nodes need to be rooted in area 0 as their duty is to work as border between area 0 and other areas.

A router that is member of multiple areas but that has no link in area 0, is simply that: a member of multiple areas but it is not allowed to propagate routes between the different areas of which it is member of.

This is the difference between R2 and R3 in your topology as we discussed in a previous thread.

R5 is member of area 3 and it has a direct connection to R3 that is a valid ABR and injects into area 3 summary LSAs for all existing areas: 0,4,5, For this reason R5 has routes for links between R1 and R2.

You can visualize the OSPF multi-area rules as a daisy flower with area 0 that is the center of the flower and the other areas are the petals. For going from a petal to another one you have to go through the center.

Hope to help

Giuseppe

Community Member

Re: OSPF backbone area rule

Hi Giuseppe,

First up, Thank you very much for giving an indepth explanation. Also thanking Peter for pointing out the correct link. I went through the entire link. I am now getting the picture. but not entirely Here are my concerns,



     1.1.1.0/24==X-----A0------Y------Z

  ( X and A0 are in area 0, A0 and Y are in area 1, Y and Z are in area 2 ).


Now A0 ( since it is the ABR ) will summarize 1.1.1.0/24 into area 1. Y will know that to reach 1.1.1.0/24

, the next hop is A0's connected interface. Assuming that the exisiting OSPF rules are void. ( i.e every ABR should be connected to area 0 is not there , since we already assumed that areas need not be bordering with area 0 ).

Now Y will summarize 1.1.1.0/24 into Z. In Z, the next hop to reach 1.1.10/24 is Y's connected interface.

Why will Z summarize this route back into Y. The basic rule in networks is no protocol should send an update back to the interface through which it received.

With this rule, Z will definitely not summarize 1.1.1.0/24 back into Y which will avoid the route loop.

I know i am mistaking somewhere. I humbly request you to pin-point where i am going wrong.

With Peter's explanation I see that, when a route update happens, then i can understand how the loop will form. Basically assumed how routing loops would occur in RIP.

So Peter / Giuseppe / all, lets consider this topology This is a valid one, adhering to all OSPF restrictions. I am putting 1.1.1.0/24 in area 1. Now before my doubt, i will narrate how the network will reach R2. R1 ( since it is a valid ABR ) will summarize the routes into Area 0 , Area 3 and Area 1. R4 and R3 will again summarize these networks into Area 2. Assuming cumulative cost between R2 and R1 is less compared to all others. my assumption was ( before reading Giuseppe's answer ), a host in R2's LAN will ping 1.1.1.0/24 through R2. Now that i am aware of the fact that even data traffic should flow through Area 0, i am getting more doubts.

1. Why this new restriction How a loop can be formed here.

2. Now, with Peter's explanation of how routing updates can cause a loop, why wont that case be possible here. Even updates about 1.1.1.0/24 ( removal ) to R2 from R4 can reach in more time than from R3, leading to a routing loop.

Before all these, i sincerely appologise for flooding with too many doubts. I am keenly interested in getting to know things to which this forum serves as a great platform. Looking forward for replies.

Thanks

Chidambaram

Cisco Employee

Re: OSPF backbone area rule

Hello Chidambaram,

Why  will Z summarize this route back into Y. The basic rule in networks is  no protocol should send an update back to the interface through which it  received. 

Hmmm... The router Z should not summarize the route back to Y. Why should it, anyway? It is not an ABR and it will merely receive an LSA-3 from Y saying about the network 1.1.1.0/24. It should not create its own LSA-3.

With this rule, Z will definitely not summarize 1.1.1.0/24 back into Y which will avoid the route loop.

You are assuming a strict distance-vector principle here. However, that does not apply to OSPF. In OSPF, even though inter-area networks are effectively dealt with in a distance-vector style, they are nevertheless imported into an area in the form of LSA-3. An LSA-3 may reach the router through any of its interfaces in this area and this does not make a difference. Regardless of which interface did this LSA-3 enter, the routing table for this network will be using the interface towards the appropriate ABR that originated this LSA-3. Remember that in OSPF, LSAs are flooded without regards to a split-horizon rule.

Now that i am aware of the fact that

even data traffic should flow through Area 0, i am getting more doubts.

1. Why this new restriction How a loop can be formed here.

I do not quite understand your question. However, if you are asking why the traffic will always go through Area 0, the RFC 2328 Section 16.2 says:

        The inter-area routes are calculated by examining summary-LSAs.
        If the router has active attachments to multiple areas, only
        backbone summary-LSAs are examined. Routers attached to a
        single area examine that area's summary-LSAs.

This means that each internal router will direct the data towards an ABR, and this ABR will forward these data through the backbone - because its routing table will be built using only LSA-3 from the backbone, ignoring LSA-3 received from other areas. This basically prevents an ABR from making a shortcut directly to another area and bypassing the backbone. The only exception is the case when the ABR is directly connected to the destination area because in that case, the destination network is considered internal, and internal routes are preferred to inter-area routes.

2. Now, with Peter's explanation of how routing updates can cause a  loop, why wont that case be possible here. Even updates about 1.1.1.0/24  ( removal ) to R2 from R4 can reach in more time than from R3, leading  to a routing loop.

I apologize, I do not get this one. Can you describe it step by step?

Best regards,

Peter

Community Member

Re: OSPF backbone area rule

Thanks once again Peter. Before my questions, i apologize for having thrown vague questions. I ll make it crisp this time.

Can you clarify me this,

 because its routing table will be built using only LSA-3 from the backbone, ignoring LSA-3 received from other areas

Does it mean it considers only the LSA-3 originated from a valid ABR or, as per my understanding "R0---R1---R2 ( R0 and R1 are in area 0, R1 and R2 are in area 1", then R1 will summarize R2's routes into backbone as against to what is said "from the backbone" .

Regarding the data traffice through area 0 question, say R1,R2,R3,R4 are the corners of a rectangle, with R1 starting at bottom left corner and anti-clock wise respectively. i.e   R4----------R3

                                                                                 |              |

                                                                                R1----------R2

There is a diagonal between R4 and R2 and it is in area 1. Others all are in area 0. Now a host from R4 in area 0 LAN is trying to ping a host in R2 in area 1 LAN. Will the packets pass through R4-R3-R2 path?? Can i take some liberality and ask, if you can explain me this process alone. i.e data traffic choosing paths from backbone area in cases where, choosing a route from backbone is less efficient than choosing a route from other area.

Regarding my last question which you were not clear about: Take that wierd triangle shaped area in my previous reply. Say the route 1.1.1.0/24 connected to R1 has gone down. Say that update reaches  R2 from R3 a little later because some for some reasons the updated LSA about the removal of 1.1.1.0/24 has not reached R3 from R1. And assume there is a link flap between R2 and R3. Since R3 considers this route to be up, it will advertise 1.1.1.0/24 to R2 which previously had removed 1.1.1.0/24 due to an update from R4. So this network, 1.1.1.0/24 will flood again through the entire network. This was my question and it solely refers to the picture ( triangle ) in the previous post.

Thanks

Chidambaram

Cisco Employee

Re: OSPF backbone area rule

Hello Chidambaram,

because its routing table will be built using only LSA-3 from the backbone, ignoring LSA-3 received from other areas

Does it mean it considers only the LSA-3 originated from a valid ABR

No, that is not a correct description. Remember that LSAs are exchanged only between routers that have formed an adjacency. An adjacency always belongs to a single area only. Therefore, LSAs received over such adjacency are placed into the LSDB for the same area the adjacency belongs into. When we say that an ABR processes only backbone summary-LSAs, we are saying that the router will process only LSA-3 received from adjacencies in Area 0.

In your particular network, R1, R2 and R3 are ABRs, and R4 is an internal router in the Area 0. Adjacencies in Area 0 are therefore only: R1/R4, R2/R4, R3/R4. All other adjacencies (R1/R2, R2/R3, R3/R1) are in different areas. So if, say, R2 starts to compute inter-area paths, it will process only LSA-3 received from R4 to construct the routing table. Other LSA-3 received from R1 and R3 will be stored in R2's LSDB but they will be skipped during the SPF run.

Now a host from R4 in area 0 LAN is trying to ping a host in R2 in area 1 LAN.

Will the packets pass through R4-R3-R2 path??

In this case, no, the packets will pass directly through the diagonal from R4 to R2. This is because R4 is directly connected to area 1 and will therefore know the R2 LAN from area 1 as an intra-area route. Intra-area routes are always preferred to inter-area routes.

if you can explain me this process alone. i.e data traffic choosing  paths from backbone area in cases where, choosing a route from backbone  is less efficient than choosing a route from other area.

You always have to keep the following rules in mind:

  • If a router is connected to the area that physically contains the destination network, this network will be known as an intra-area (internal) route to this router. Intra-area routes are always preferred to inter-area routes in OSPF. As a result, even if this router is an ABR and is connected to the backbone area, it will not use the path through the backbone (or any other intermediary area) because that path would be an inter-area route. Instead, this router will immediately forward the traffic into the destination area.
  • If a router is an ABR but is not connected to the area that contains the destination network, it will know the network as an inter-area network. This information will be delivered to this router by means of LSA-3 that may, depending on the actual network topology, arrive from any area this ABR is connected to. However, the design of OSPF mandates that only LSA-3 received via backbone adjacencies will be processed during the SPF run. Even if LSA-3 received from non-backbone areas were describing shorter paths than LSA-3 received from backbone, this ABR is not allowed to process them. Hence, this router will always forward the traffic through the backbone.
  • If a router is an internal router (i.e. not an ABR) to an area that does not contain the destination network, it will know the network as an inter-area network. In this case, it can receive the LSA-3 describing this network only within and via its own area. Hence, in this case, this router will process any LSA-3 it has in its own database. Such a router will forward the traffic through its own area towards the ABR that provides the shortest total path to the destination.
  • In any case, the total metric of an inter-area route is given as a sum of the metric indicated in the LSA-3 plus the distance between your router and the ABR in your area that originated this LSA-3. If there are multiple LSA-3 describing the same network (most probably originated by multiple ABRs), you will choose the path with the lowest total metric.

Say the route 1.1.1.0/24 connected to R1 has gone down. Say that update  reaches  R2 from R3 a little later because some for some reasons the  updated LSA about the removal of 1.1.1.0/24 has not reached R3 from R1.  And assume there is a link flap between R2 and R3. Since R3 considers  this route to be up, it will advertise 1.1.1.0/24 to R2 which previously  had removed 1.1.1.0/24 due to an update from R4. So this network,  1.1.1.0/24 will flood again through the entire network.

Here, remember that R1, R2 and R3 may advertise LSA-3 to each other but because R1/R2, R2/R3, R1/R3 adjacencies are not put into area 0 while all these three routers are ABRs, these LSA-3 will be simply ignored during the SPF run. On these routers, only LSA-3 received via backbone adjacencies (in this case, from R4) will be processed.

In addition, RFC 2328 Section 12.4.3 mandates:

                   Note that only intra-area routes are advertised into
            the backbone, while both intra-area and inter-area routes
            are advertised into the other areas.

In other words, even if 1.1.1.0/24 is still known as an inter-area network on R2 or R3, they will never advertise this network back to R4. And even if R2 or R3 advertised the 1.1.1.0/24 via non-backbone areas to each other, the SPF would ignore these LSA-3 because they are received via non-backbone adjacencies.

Please feel welcome to ask further!

Best regards,

Peter

Community Member

Re: OSPF backbone area rule

Thanks Peter,

I got most of the points u said, except the "type 3 being advertised into/from Area 0". here it goes,

                   Note that only intra-area routes are advertised into
            the backbone, while both intra-area and inter-area routes
            are advertised into the other areas.

i.e As per my understanding, Only intra area routes ( those which can be reached through type 1 and 2 LSA ) are advertised into the backbone. But this seems to be confusing for me. Please explaing with this simple topology.

H1(2.1.1.1/24)======A0-----A012------A1==H2(1.1.1.1/24)

                                                            |

                                                            |

                                                          A2==H3(3.1.1.1/24)

The ultimate goals is H1,H2 and H3 should ping each other. OSPF is running. A012 is the ABR which has adjacency in area 0 with A0 and adjacency in area 1 with A1 and adjacency in area 2 with A2.

Therefore, LSAs received over such adjacency are placed into the LSDB for the same area the adjacency belongs into. When we say that an ABR processes only backbone summary-LSAs, we are saying that the router will process only LSA-3 received from adjacencies in Area 0.

Okay, I am going to sound trivial here. Please bear with me

A012 and A1 are adjacent in area 1. My assumption before this discussion was that any ABR( A012 ) will blindly summarize its intra area routes to other areas connected to it ( Even if there are multiple areas connected to it ).

Just three queries here.

1. In our case A012 is going to summarize the route into backbone area which seems to be not correct acc to RFC. So how will the backbone areas ever know about inter area routes

2. With the adjacency rule over type-3 LSA's, A2 will not learn H1 and H2 routes because it has been received from A012 which is adjacent in area 2. This is right or wrong. If it right, how should the design be chosen so that H3 can be reached from H1/H2.

3. LSA's which will not be considered for SPF run, why should it be kept in LSDB. They can be purged right?

Thanks

Chidambaram

Cisco Employee

Re: OSPF backbone area rule

Hello Chidambaram,

I am going to use terms "internal route" and "intra area route" interchangeably - just to avoid confusion.

Only intra area routes ( those which can be reached through type 1 and 2 LSA ) are advertised into the backbone.

This has to be properly understood. An ABR will take all internal routes from non-backbone areas it is attached to, and will advertise them into the backbone, making them appear as inter-area routes in the backbone as a result. Remember: if an internal route from an area is advertised to a different area, it automatically becomes an inter-area route in that different area.

A012 and A1 are adjacent in area 1. My assumption before this discussion was that any ABR( A012 ) will

blindly summarize its intra area routes to other areas connected to it

To be precise, A012 will do the following:

  • It will compute a routing table for Area 1 using the contents of LSDB for Area 1. It will then take internal routes from this routing table and inject them as LSA-3 into the LSDB for Area 0. Inter-area and external routes from this routing table will not be translated into LSA-3.
  • Absolutely the same will happen for Area 2.
  • It will compute an routing table for Area 0 using the contents of LSDB for Area 0. It will then take both internal and inter-area routes from this routing table and inject them as LSA-3 into the LSDBs for all other areas. External routes from this routing table will not be translated into LSA-3.

The "routing table" here does not mean the routing table you see in show ip route but a separate data structure maintained by OSPF used for its internal purposes like this one.

1. In our case A012 is going to summarize the route into backbone area which seems to be not correct acc to RFC. So how will the backbone areas ever know about inter area routes

A012 will advertise only intra area routes from areas 1 and 2 into the backbone area 0. However, that will make them automatically appear as inter area routes in the backbone.

You also indicated that you believe this process to be not according to the RFC. In what way?

2. With the adjacency rule over type-3 LSA's, A2 will not learn H1 and H2 routes because it has been received from A012 which is adjacent in area 2. This is right or wrong.

This is wrong. Because A012 is a member of all three areas, it will know both H1 and H2 as internal routes. Therefore, the H1 will be directly translated into LSA-3 from backbone area into area 2, and regarding H2, this will first be carried from area 1 to area 0 and subsequently from area 0 to area 2, per computation of the routing tables as described above. Remember: from non-backbone areas, only internal routes are advertised to backbone. From the backbone, both internal and inter area routes are advertised to non-backbone areas.

3. LSA's which will not be considered for SPF run, why should it be kept in LSDB. They can be purged right?

OSPF is not designed this way. You can not flush someone else's LSA once you have received and acknowledged it. Using an LSA may be subject to different conditions and not all received LSAs may actually be used during the computation. But you are not permitted to flush or modify the LSA in any way. Only the originator of the LSA is allowed to flush or modify it. This is aligned with the general rule in link-state protocols that LSAs originated by a router may not be modified or flushed by any other router. Doing otherwise could lead to differing link-state databases of routers in the same area.

Best regards,

Peter

Cisco Employee

Re: OSPF backbone area rule

Hello Chidambaram,

In addition to Giuseppe's awesome response, this issue has been discussed here multiple times. Perhaps this thread will also be interesting to you:

https://supportforums.cisco.com/thread/2095492

Best regards,

Peter

Silver

Re: OSPF backbone area rule

Here is a nice link to answer most of your queries:

http://www.networkworld.com/community/node/19293

Are your traceroutes going through ABRs R4 and R3?

Thanks.

Community Member

Re: OSPF backbone area rule

 

Screenshot (15).png

 

 

8330
Views
24
Helpful
10
Replies
CreatePlease to create content