cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
55891
Views
49
Helpful
11
Replies

why area 0 as backbone area in OSPF?..need complete answer

vivek.sep84
Beginner
Beginner

I have been searching for the right reason why all the areas must be connected to area 0 in OSPF. I have a little idea, but not clear with the whole thing. How does OSPF's behaving as a kinked state protocolol outside an area give rise to routing loops (if we don't connect two areas through ar 0) ?

2 Accepted Solutions

Accepted Solutions

I think the confusion about a routing loop is coming because of the way OSPF is often described in books.

You are right when you say that OSPF acts as a distance vector protocol between areas. And because of this OSPF uses a central area, area 0, to exchange routes between other areas. This is part of the reason area 0 exists to stop routing loops.

But i think you are then making the assumption that without an area 0 you are in danger of a routing loop. But you would only be in danger of a routing loop in OSPF if areas that are not area 0, could actually exchange routes between themselves. But they can't and this is a specific design choice.

So when the books talk about possible routing loops they are only talking about a hypothetical situation that could occur if OSPF areas were allowed to exchange routes between themselves without the use of an area 0. You can't actually get a routing loop this way with OSPF because as Joseph points out if you have multiple areas without an area 0 they are in fact treated as separate OSPF processes and would not exchange routes anyway.

Jon

View solution in original post

Peter Paluch
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Jon and friends,

First of all - Jon, it is wonderful to see you responding. Thanks for keeping an active contact to the CSC.

I think that what Vivek (I hope that is the correct first name) is asking is exactly the principial, underlying issue that drives the OSPF's design: is it possible for a generic, nonspecific routing protocol that operates with link-state style inside an area, and with distance vector between areas, without any further limitations on the inter-area communication, to form a routing loop? With respect to OSPF, it is indeed a hypothetical question as OSPF's design already prevents such occurences, but what drove that design in the first place?

So far, I was not able to come up with an example how a set of areas connected in a circle could form a loop, although I have to say that routing loop creation has always been my weak point. What I am thinking about, however, is a scenario that roughly follows these steps:

  1. There are 3 areas cyclically interconnected, i.e. 1->2->3->1
  2. Full routing information exchange is freely allowed between these areas
  3. Area 1 contains a network X which suddenly get disconnected
  4. LSAs 1 and 2 within the area 1 do not contain the information about network X anymore, however, let's assume that the information change has not yet been fully propagated via LSA 3 throughout the network (routing loops within a single routing protocol are usually caused by outdated information which is unduly trusted).
  5. As a result, the reachability to network X will be derived from LSA 3 advertised from other areas back to area 1. Routers in area 1 may choose to send the traffic for network X to the surrounding areas, which may in turn send the traffic back.

Please consider this scenario very rough and violating many principles of OSPF routing information propagation, but that is actually the point - OSPF is well designed but we want to see the rationale behind those design traces.

Can anyone think of a working example of a true routing loop basing on the aforementioned scenario?

Best regards,

Peter

View solution in original post

11 Replies 11

johnlloyd_13
Engager
Engager

hi vivek,

it's designed by default. please see helpful link below explaining further on OSPF design.

http://www.cisco.com/warp/public/104/1.pdf

Joseph W. Doherty
Hall of Fame Master Hall of Fame Master
Hall of Fame Master

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

You can have multiple OSPF areas without an area zero, they just won't share routes.

Area zero, by design, is special in that other areas will accept and provide routes to it.  (NB: area types and special OSPF statements define and control route exchanges between an non-zero area and area zero.)

The reason for OSPF areas and area zero is to provide scalability.  This two level hiearchy limits the footprint of Dijkstra's algorithm topology (per area) and allows control of route distribution between areas.

Richard Burts
Hall of Fame Guru Hall of Fame Guru
Hall of Fame Guru

Vivek

Joseph mentioned an important aspect of the answer to your question and I would like to add a bit to it.

You could configure a router with two OSPF areas and make both not area zero. The router will allow you to configure this and does not generate any error message. The OSPF will run in both areas but the areas do not share any routes with each other.

The reason for this is that OSPF uses LSA type 1 and LSA type 2 to advertise routes within the area and uses LSA type 3 to advertise between areas. In OSPF (at least in Cisco implementation) the router will not generate any type 3 unless it is connected to area 0.

HTH

Rick

Sent from Cisco Technical Support iPhone App

HTH

Rick

vivek.sep84
Beginner
Beginner

Thanks Richard, Joseph and John

All your replies are correct, but still not complete to the level I want

Actually, I know that all areas must connect to Area 0 because  OSPF acts as a Linked-state protocol within an area &  Distance-vector outside the area. That is because OSPF sends summary LSA  3 between areas, which only advertises the ABR's Router ID as the  origin of the routes coming from its area. The area receiving the update  (summary LSA 3) from another area will see the connected ABR's RID as  the next hop for all the destinations within that area. So, if we  connect two area directly without Area 0 in between, this will give rise  to a loop.(I hope what I understood till this point is right).

But what i did not understand is that how will this give rise to a loop ??

I hope you guys or someone else out here knows the complete thing and will help me

thanks!

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Why do you believe a loop is created if two different OSPF areas are attached without an area zero?

A router with multiple OSPF areas, but without an area zero, would behave similar to a router running multiple routing protocols without any distribution between those protocols.

I think the confusion about a routing loop is coming because of the way OSPF is often described in books.

You are right when you say that OSPF acts as a distance vector protocol between areas. And because of this OSPF uses a central area, area 0, to exchange routes between other areas. This is part of the reason area 0 exists to stop routing loops.

But i think you are then making the assumption that without an area 0 you are in danger of a routing loop. But you would only be in danger of a routing loop in OSPF if areas that are not area 0, could actually exchange routes between themselves. But they can't and this is a specific design choice.

So when the books talk about possible routing loops they are only talking about a hypothetical situation that could occur if OSPF areas were allowed to exchange routes between themselves without the use of an area 0. You can't actually get a routing loop this way with OSPF because as Joseph points out if you have multiple areas without an area 0 they are in fact treated as separate OSPF processes and would not exchange routes anyway.

Jon

Peter Paluch
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Jon and friends,

First of all - Jon, it is wonderful to see you responding. Thanks for keeping an active contact to the CSC.

I think that what Vivek (I hope that is the correct first name) is asking is exactly the principial, underlying issue that drives the OSPF's design: is it possible for a generic, nonspecific routing protocol that operates with link-state style inside an area, and with distance vector between areas, without any further limitations on the inter-area communication, to form a routing loop? With respect to OSPF, it is indeed a hypothetical question as OSPF's design already prevents such occurences, but what drove that design in the first place?

So far, I was not able to come up with an example how a set of areas connected in a circle could form a loop, although I have to say that routing loop creation has always been my weak point. What I am thinking about, however, is a scenario that roughly follows these steps:

  1. There are 3 areas cyclically interconnected, i.e. 1->2->3->1
  2. Full routing information exchange is freely allowed between these areas
  3. Area 1 contains a network X which suddenly get disconnected
  4. LSAs 1 and 2 within the area 1 do not contain the information about network X anymore, however, let's assume that the information change has not yet been fully propagated via LSA 3 throughout the network (routing loops within a single routing protocol are usually caused by outdated information which is unduly trusted).
  5. As a result, the reachability to network X will be derived from LSA 3 advertised from other areas back to area 1. Routers in area 1 may choose to send the traffic for network X to the surrounding areas, which may in turn send the traffic back.

Please consider this scenario very rough and violating many principles of OSPF routing information propagation, but that is actually the point - OSPF is well designed but we want to see the rationale behind those design traces.

Can anyone think of a working example of a true routing loop basing on the aforementioned scenario?

Best regards,

Peter

  1. There are 3 areas cyclically interconnected, i.e. 1->2->3->1
  2. Full routing information exchange is freely allowed between these areas. <<< This statement is not correct.

Without Area 0, OSPF will not share routing information between non-backbone areas.

I believe he said this "Please consider this scenario very rough and violating many principles of OSPF routing information propagation"

vivek.sep84
Beginner
Beginner

Thanks all for your comments!

I agree that if we connect two different areas without Ar 0 in between, they won't exchange routes & will act as two separate ospf processes. But as Peter said, I was refering to the logic behind this protocol feature.

Peter's example is explains all that's needed here.

Although I used a different approach to get an answer before I saw Peter & Jon's comments.

For a moment, consider as if each OSPF area is a router running RIP. Now if you try to recall how RIP loops occured, you have the answer .. wasn't that simple .. & I was looping around these loops

Hello Vivek and others,

interesting thread indeed

reversing the initial question we could ask how OSPF could be modified in order to perform  inter area routing in a safer way.

The problem arises from the area scope of LSA type 3 summary route that are re-generated at each area border.

To be noted the LSA type 3 data structure provides no info on the original area id allowing for use of two different non zero areas with same area id, with no issues if there is no address overlapping.

Looking at what is done in ISIS or at iBGP route reflection rules the LSA type 3 should be modified by adding additional fields:

a flag bit to indicate if the LSA is the re-generation of an LSA receveid in another area or it is indeed original

the original area-id

the originator OSPF RID

these changes might provide a way to deal with inter area routing in a safer way.

Clearly these suggestions have no practical value as no one wants to change a protocol that has reached a wide use and distribution

the flag bit is present in ISIS to indicate leakage between ISIS levels

iBGP RR servers introduce cluster-list and originator-id attributes

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers