How to configure OSPF Stub Area

This topic is to discuss the following lesson:

Great

So on router Susan we don’t see LSA 5 (1.1.1.1) but we are still able to reach it because of the default route. So is the stub area only suppose to minimize the routing table and calculations but won’t block reachability, is that right?

Hi Alfredo,

That’s right. You won’t see any external prefixes in the stub area so it reduces the size of the routing table.

Rene

Nice lesson.

A generic doubt.

I see that we should configure both Donna and Susan that area 1 is a stub. Does this implies all the routers inside area 1 should be made mandatory as stub ?

I tried, only Donna configured as area 1 stub then both Donna and Susan where never able to form the adjacency. Does stub related configuration affect the adjacency ?

Hi Ajith,

The stub option is a field in the OSPF hello packet that has to match on both sides, otherwise there’s no neighbor adjacency. All routers in the stub area have to be configured as stub for the area.

Rene

Hi Rene

For the Stub area config, I have couple of questions on the routing table for the Susan router

O IA 192.168.12.0/24 [110/2] via 192.168.23.2, 00:00:42, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 192.168.23.2, 00:00:42, FastEthernet0/0

Q1. Why the default route is showing as an Inter-Area route? Donna is generating the route and advertising to Sussan, shouldn’t this be an inter-area route?
Q1. Cost of the default route is 2. How is this? If the default reference bandwidth is 100M, for this fast Ethernet interface, cost of reaching Donna from Susan is 1. But the default route cost is 2. Can you please explain this to me?

Thanks
Palani

Hi Palani,

Default routes are injected in a stub areas with LSA type 3, that’s how they designed it.

The ABR (Donna) is advertising the default route with a cost of 1. Router Susan is adding its own interface cost:

Susan#show ip ospf database summary 0.0.0.0 

            OSPF Router with ID (192.168.23.3) (Process ID 1)

                Summary Net Link States (Area 1)

  LS age: 658
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 0.0.0.0 (summary Network Number)
  Advertising Router: 192.168.23.2
  LS Seq Number: 80000001
  Checksum: 0xF7C3
  Length: 28
  Network Mask: /0
        MTID: 0         Metric: 1

Above you can see the metric of 1 that is advertised.

Rene

1 Like

Thanks Rene, Can you confirm by default for stub area this default routes from ABR will be advertised an Inter-Area route? I am thinking that both this routers are in the same area and why thus default route is advertised as IA?

-Palani

Hi Palani,

Yes, default routes are always inserted in a stub area with LSA type 3 which is why they show up as IA. That’s how they designed it.

Rene

Hello Rene,

If default route is a LSA type 3, then how this route is getting into a totally stubby area as we don’t accept LSA 3 there?

Could you kindly explain?

-Uday

Udaya,
A type-3 default route generated by an ABR into its directly attached totally stubby area is an exception to the no LSA type 3 rule. This is the only type-3 route allowed within an totally stubby area.

2 Likes

Hi Andrew

In the case of NSSA , we don’t see type 3 LSA being blocked but Type 5, in that case why in NSSA we need to specifically insert default route .Can you explain ?.

Thx
YElan

Hello Yamini

First of all, there are two flavours of NSSAs. There are NSSAs that block type 5 and type 4 LSAs but allow type 3 LSAs and there are NSSA totally stubby areas that allow only summary default routes and everything else is filtered.

In the first case, in order to make a stub area into an NSSA, the following commands are used:

router ospf 1
 area 1 nssa

This command must be configured on every router in Area 1. After defining area 1 as an NSSA, tye 5 and type 4 LSAs are blocked, but type 3 is allowed.

In the case of a totally stubby NSSA, you must issue the following command under the OSPF configuration:

router ospf 1
 area 1 nssa no-summary

This command is configured only on the NSSA ABR. After you define the NSSA totally stub area, Area 1 has these characteristics in addition to the NSSA characteristics:

* No type 3 or 4 summary LSAs are allowed in area 1. This means no inter-area routes are allowed in area 1.
* A default route is injected into the NSSA totally stub area as a type 3 summary LSA.

So, concerning the default route, there are two ways to have a default route in an NSSA. When you configure an area as NSSA, by default the NSSA ABR does not generate a default summary route and you require a static default route. In the case of an NSSA totally stubby area, the NSSA ABR does generate a default summary route and no static default route is necessary.

I hope this has been helpful!

Laz

1 Like

Hi Laz

Thanks .I have another question.

So when do we typically need to have stub ,totally stub , NSSA, area in a network , if you are a administrator that is responsible to assign these , how would you do and theoretically where this will be used.

Appreciate your response.

Thanks
Yamini

Hello Yamini

Rene’s lesson on types of stub areas very clearly indicates the functionality of each. You can find it here.

However, I’ll try to give you a quick summary of why you would use each case in a real life scenario.

A stub area would be configured if a network segment had only one choice for routing all traffic. An example of this would be a branch office that has only one gateway. There is no need for LSAs of type 5 to be advertised within this network since all routes will point to the local default gateway.

A totally stubby area would be configured if you have additional OSPF areas in your network which means that Type 3 LSAs would also be sent among OSPF routers. The totally stubby area would also block Type 3 LSAs since they too would be routed via the one and only gateway available to the network segment.

A Not So Stubby Area (NSSA) is defined as a stub that includes an ASBR to another routing protocol autonomous system. In this case, you do not require Type 5 LSAs since there is only one route to other OSPF areas. So you would configure an NSSA if you have an additional “way out” of the network, but via an ASBR to an AS of a different routing protocol.

I hope this has been helpful!

Laz

3 Likes

Hi Ajith,

The stub option is a field in the OSPF hello packet that has to match on both sides, otherwise there’s no neighbor adjacency. All routers in the stub area have to be configured as stub for the area.

Rene

something interesting here and I was using the c3600 model IOS in GNS3. I set one router to the dotted notation for the area 1.1.1.1 and the other to area 1
Just as Rene was talking about that they had to match it was demonstrated at a granular level with my testing as I lost my IA type 3 LSA as well. when I went back and changed both to area 1 it worked so it seems to be pretty picky on the matching. I only did this once and did not try to recreate and test to be positive but just bringing it up as I had issue when first setup and was playing around.

I also set my external up as E1 as I was playing around and practicing with the metric-type command.

the routers look to have been changed from names types like Susan to R1,R2,R3 which makes it a bit tougher to follow the forums posts lol…

I understand this basically when reading it. However, I have a feeling if I was to be tested meaning set me down ask me some questions I might struggle answering this correctly so its not embedded in my memory in a way that can be used cogitatively.

So in other words I need some more reading or I need some scenarios to practice on this so I can take the defined facts in the lessons that illustrate this and apply to working knowledge of use when applied to real world.

being able to state Laz answer to that question if asked is the entire idea behind understanding this from a usage perspective and I need something to get me there… hhmmmm for now I will stare at this answer for awhile. some questions in applying answers to for when to use each type would be helpful.
-----------------------------------------edited-------------------------------------

Ok back on this the first portion of Laz answer I would like to put a topology to it to help myself understand for sure. So R1, L3, switch and the smaller switches are all in Branchoffice-A . R1 also connects to an MPLS connection and to a BGP connection that goes to the ISP. So R1 would be our single gateway out of the BranchOffice-A network so this would apply to the first example you gave Laz? or does it not work to make the R1 and L3 Switch in area 0 a stub? I would think it would be ok to make that area a stub if we was not sharing any BGP or routes from R1.

R1 with its OSPF area 0 which connected to L3 switch would just be so that the L3 switch can get internet access for all the switches and devices connected to them. So I think this meets your first example?

It seems your next example would be applied to something like I created below. I basically added another router to my BranchOffice-A called R4 and added another OSPF area 1.

I was going to make a picture for the last one you have listed but then got confused because my first one I used does have the BGP route connected to R1 so R1 can be a ASBR and to quote from my understanding “Depending” on how its used. Meaning if we use R1 to re-distribute BGP routes to another device its an ASBR but if it is “NOT” re-distributing BGP is it not a ASBR??? or is it lol… I am on the point of perhaps getting confused so going to break from this for a bit.
------------------------edited--------------------------------------

Ok I think I got this wrong because BranchOffice-A its certainly Re-distributing OSPF from Branchoffice-A to BGP of the ISP. meaning OSPF is being distributed to ISP and vice versuses so there is a connection to the internet. It would not make any sense at all to have two different routing protocols on same router and not communicating as that’s the logic and strategy behind having them together so they can communicate and to communicate they need to redistribute if they are different routing protocols.

That means my first picture could work for a Not So Stubby Area? according to your definition as it includes an ASBR to another routing protocol AS??? Or do I also need a second area for the "Not So Stubby Area(NSSA) because even though you do not mention another area explicitly you do say “there is only one route to the other OSPF areas” so that statement seems to infer there are other areas.

-------------------EDITED---------------------

I am confused I think I need to lab this up and test it. I don’t know how to configure BGP yet as I have not started those lessons but should be able to use EIGRP instead of BGP to test. I can setup EIGRP from R1 to R2 and pretend its my ISP then try the stub configuration and the NSSA on the first picture and then I can also try the NSSA on the second picture as well. Also will wait for some feed back and I will clean up my post later.

Hi Brian,

I have to see if we can convert the router names in the forum too, it can be difficult to follow some old posts here now. If you run into anything, let me know and I’ll fix it ok?

Let me use another topology to explain where/why you could use stub areas:

bgp-ospf-rip-routing

OSPF is our “campus” network. Area 0 is the main network, area 1,2, and 3 are branch offices. BGP routes are redistributed into OSPF, RIP routes are also redistributed into OSPF.

With regular areas, all routers will learn about all prefixes out there. When you look at this picture…why would area 1, 2, or 3 need to know the prefixes from BGP? There is only one path, and that is through area 0. We can make area 1,2 and 3 stub areas…a default route is more than enough.

Also, let’s say a router in area 1 wants to go to a router in area 2. Do we need to know a specific prefix? Not really, there is only one path through area 0…in other words, why not make area 1,2, and 3 totally stub areas…get rid of all inter-area routes and just use a default route.

That does introduce one problem…a router in area 3 is doing redistribution from RIP into OSPF, that’s something we can’t do in a stub or totally stub area. That’s why you should convert area 3 into a totally NSSA…it’s a totally stub area that does allow an ASBR.

Btw, as soon as you configure a router to redistribute something into OSPF, it’s an ASBR.

Hope this helps.

3 Likes