Theoretical OSPF question

Unanswered Question
May 6th, 2009

All,

I'm playing with ospf, and I noticed something. I have two routers that are connected into a switch.

RouterA is 192.168.1.1

RouterB is 192.168.1.2

RouterA's ospf configuration:

router ospf 1

network 192.168.1.0 0.0.0.255 area 25

network 1.1.1.1 0.0.0.0 area 0

area 25 nssa no-summary

RouterB's ospf configuration:

router ospf 1

network 192.168.1.0 0.0.0.255 area 25

network 100.100.100.100 0.0.0.0 area 25

area 25 nssa

On RouterA, I do a "sh ip ospf neighbor detail" and I see that the BDR is 192.168.1.2 (NSSA) and the DR is RouterA.

Since type 7 LSAs stay in the NSSA, if the DR (RouterA) failed, what would happen to RouterB? It wouldn't take the configuration and automatically put itself into area 0. So, I'm assuming that this is why we use priority to force a router to be the DR, but what happens if someone forgot? Would all routing be screwed up?

Thanks,

John

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (5 ratings)
Loading.
rais Wed, 05/06/2009 - 09:09

For OSPF, you don't have to have area 0. Area 0 is required only if you have more than one area. So B would simply work in area 25.

Thanks.

John Blakley Wed, 05/06/2009 - 09:12

OSPF requires area 0 to be it's backbone, and you either have to have a router with an interface in area 0, or you need to be connected to a router that has an interface in area 0.

*Edit* Rais, thanks for the post. I didn't realize that single areas didn't need area 0. I learned something today :)

John

Jon Marshall Wed, 05/06/2009 - 09:16

John

As Rais stated there is nothing in OSPF that dictates you must use area 0. If you have multiple areas then you need an area 0 as the backbone area but as B only has interfaces on area 25 if A failed B would simply run in area 25.

Jon

John Blakley Wed, 05/06/2009 - 09:20

Well,

I just tested this, and against everything I've read, it works without area 0. EVERYTHING I've read states that you need area 0 for OSPF to work correctly.

John

Edison Ortiz Wed, 05/06/2009 - 09:16

But you can run OSPF in a network with a single non-0 backbone area.

You need an area 0 backbone area when you plan to have multiple areas. Going from one area to another needs the existence of the area 0 whereas on single area design, you can use any number.

Best practice is to always have an area 0 but it's not mandatory on single area design.

__

Edison.

John Blakley Wed, 05/06/2009 - 09:22

Good post Edison. I tested, and found this to be true (non-0 single area). I get routes like I should be.

Thanks,

John

Edison Ortiz Wed, 05/06/2009 - 09:14

A DR/BDR assignment does not make the router become part of area 0 (backbone area).

The area placement is done on the network command under the OSPF process.

Per your example, RouterA is the only router holding area 0 and RouterB won't dynamically become part of area 0 without you adding a link into this area with the network command under OSPF.

HTH,

__

Edison.

John Blakley Wed, 05/06/2009 - 09:19

Edison,

I'm wondering (maybe because it's on a broadcast domain) why the NSSA was chosen as the BDR. I can even force it as the DR.

Thinking along those lines, since all DROthers associate to the DR, why would OSPF allow for an NSSA to be the DR in the first place?

John

Edison Ortiz Wed, 05/06/2009 - 09:24

The DR/BDR assignment is chosen based on the router-id (highest win), or the router with the highest ospf priority, also you must understand the first router that boots becomes the DR and OSPF does not have any DR preemption, so if you have a fast router in a broadcast domain segment, that router must likely will be the DR.

You can avoid this by having ospf priority 0 in all routers that you don't want to participate in the DR election.

John Blakley Wed, 05/06/2009 - 09:26

Right. I guess I'm not getting this question across correctly.

What happens if the DR dies in one area, and the BDR happens to be in another area? The BDR becomes the new DR, right? Now how would the "new" DR work if the new DR was in a stub area.

Again, this is all theoretical.

Thanks,

John

thotsaphon Wed, 05/06/2009 - 09:30

John,

There are 2 things:

DR/BDR will come into play when you are in Broadcast or NBMA network. It has its own method to elect who is going to be DR or BDR.

NSSA,This means that you don't want to see any LSA type5 in this area. Including summary keyword. It means you don't want to see LSA type3 and type4 as well.

Yes in case of Broadcast/NBMA. When you lost DR then the BDR should take this role instead. If there are other routers there, Well someone will be elected to be (new)BDR.

Toshi

Edison Ortiz Wed, 05/06/2009 - 09:37

If the DR dies in one area (broadcast segment) and you have other OSPF speaking routers in the same area (broadcast segment), you will have a BDR on that area.

You won't have a DR in one area and a BDR in another area.

A router can be a DR in one area and a BDR in another area at the same time.

You are mixing OSPF Network Types with OSPF Area Types.

John Blakley Wed, 05/06/2009 - 09:48

"A router can be a DR in one area and a BDR in another area at the same time."

I'm assuming that's what I was seeing. The DR was in area 25, and the BDR was in areas 0 and 25.

"You are mixing OSPF Network Types with OSPF Area Types."

I didn't think I was. I wanted to know how a stub network would act if it was the DR for a segment like the scenario I had. (Maybe that's mixing it, and the DR/BDR scenario doesn't care about how the areas are configured.)

I think my main question was how the lsas that come from a DR that was in a nssa would be affected.

John

Edison Ortiz Wed, 05/06/2009 - 09:56

It uses the NSSA standards rules as any external route (LSA Type 5) will be translated (LSA Type 7).

A DR will not necessarily be the ASBR for the NSSA area.

Remember, NSSA Area can be spread around multiple broadcast domains. Each broadcast domain will have a DR/BDR.

That's the reason I keep telling you, you are mixing two concepts.

__

Edison.

John Blakley Wed, 05/06/2009 - 10:00

Okay :) I think we're crossing posts now because I just asked you questions that you've answered here.

Thanks,

John

Edison Ortiz Wed, 05/06/2009 - 09:50

Ok, let me expand further with a diagram (see attached).

Router A and Router B are the ABR routers.

Router A is the DR on its connection to Router B while Router B is the BDR for that segment.

Now, Router A also has a connection to Router C but on this connection Router A is the BDR for that segment.

If you noticed on the right side, there is also area 1 but there is a separate DR/BDR election because is another broadcast segment, but they are on the same area.

Hope this help you understand a bit better.

Attachment: 
John Blakley Wed, 05/06/2009 - 09:58

That helps with the concept of DR/BDR for me.

Questions:

Does the DR send LSAs when there is a change in the network?

If yes, LSAs in an NSSA are sent as type-7s, right?

If that's correct, if the DR in an NSSA (again, not sure if it cares) sends LSAs out because of a change in the network, does it:

send to all areas, or at least into its own area, and to area 0 to propagate out to other areas?

does it get translated when it hits area 0 as a type-5 by the ABR

does it even care?

Thanks,

John

Edison Ortiz Wed, 05/06/2009 - 10:10

Does the DR send LSAs when there is a change in the network?

All OSPF routers do, it's a link state protocol.

If yes, LSAs in an NSSA are sent as type-7s, right?

Only external LSAs.

If that's correct, if the DR in an NSSA (again, not sure if it cares) sends LSAs out because of a change in the network, does it:

send to all areas, or at least into its own area, and to area 0 to propagate out to other areas?

A DR is only in charge of sending updates to other routers participating in the same broadcast domain area. If there is another router in that area and this router is not a DR but it has multiple areas in it, this router may be the one propagating the information. Again, apples and oranges..

Giuseppe Larosa Wed, 05/06/2009 - 11:49

Hello John,

as Edison has noted the DR election is local to a network segment in an OSPF area.

Notice also that having a DR router that is not an ABR is allowed by OSPF and in some cases it can be recommended to have some load sharing:

the ABR has already the duties of inter-area routing, double LSDB and so on.

Having the ABR to be also the OSPF DR in one or multiple segments can make the ABR heavy loaded with OSPF tasks with other routers sitting idle.

so the position of the router in the network is not considered.

From the point of view of another area it is the ABR that builds the LSA type 3 for the ip subnet of the LAN segment.

the DR is responsible of creating and mantaining the network LSA type 2 that it is only flooded in the original area.

For this reason the ABR don't need to be also the DR: ospf data structures allow for this.

Hope to help

Giuseppe

Actions

This Discussion