How to configure OSPF Stub Area

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.


something interesting here and I was using the c3600 model IOS in GNS3. I set one router to the dotted notation for the area 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.

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.

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.


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:


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.


ah don’t do that Rene you already are very responsive and take care of the website. Save your time for important stuff it was small inconvenience only I just glossed over the names and focused on specific granular that I was having problems with but makes me feel bad if you try to do something that difficult in the time consuming meticulous area.

I think its fine. I saw in another post once where someone griped about named routers and maybe some truth but then you said you might change it then you went back and fixed it. That had repercussion of making some of the forums post be off no biggie you was just being too helpful lol! I would not worry about changing all past things unless its something that is easy and efficient just use new method going forward.

You are to important to all of us to be spending your time trying to read through things you have already worked on in the past and only a limited number of the hardcore study people will read through.

Your website is already the best out there for content, and for team that is responsive to replying and helping. I am a professional student as I love to learn I would not pull your leg or inflate your ego.

This is hands down the best networking site with content and forums. Not many people with your knowledge and ability would do what you do to the level you do it. Oh and lets give credit to those moderators as well like Las and Andrew. Great team!

Hands down the most cost efficient way to learn about Cisco Networking this site is worth double or triple what you charge but I am thankful you give the people such a great deal. I am a happy person by nature but I am also a very honest person and I am not a person that believes in being inefficient and wasting my time talking up their company because I like them or was just being nice. No that’s all truth.

I think we will all live =)

1 Like

Yes that is helpful I do understand your diagram. Thanks!

Hi Rene,
That was mind blowing. Clear concept indeed . The stub/Totally Stub concerned to how many exit point from a area .The NSSA/Totally NSSA needed when ASBR needed on a area .Thx


1 Like

Hi Rene,
I am trying to replicate the same scenario in lab, but the loopback network is not being redistributed.
on R1:

interface Loopback0
 ip address
interface FastEthernet0/0
 ip address
 duplex auto
 speed auto
router ospf 1
 redistribute connected subnets
 network area 0

Could you please guide as to what i am missing?

Hi Rajani,

Your config looks OK. You do have a working neighbor adjacency between R1 and the other router?

You can also verify that it’s in the LSDB of R1:

R1#show ip ospf database external 

            OSPF Router with ID ( (Process ID 1)

                Type-5 AS External Link States

  LS age: 1127
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: (External Network Number )
  Advertising Router:
  LS Seq Number: 80000001
  Checksum: 0xA5F3
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address:
        External Route Tag: 0


Hi Rajini,

Looks like you have wrong IP configured on your Fa0/0 ( and distributing
you can change the interface IP address of fa0/0 and you can see the Loopback being redistributed.
hope this helps

simple question :slight_smile:

area type must match on both routers to establish an adjancency ?

Hello Juan

Yes that is correct. The area type must match in order for an adjacency to occur.


please confirm this line you want to say that like:
ABR router which is in area 1 we have configured as a totally stub area so in area 1 all stub routers which is directly connected with ABR router has an exception of LSA 3 means totally stub area rule NO TYPE 3 SUMMARY LSA will not apply in stub area so that’s why we can see IA in R3 ospf routing table

Hello Harshit

Yes your explanation sounds right. You can find out more about totally stub areas at this lesson:

I hope this has been helpful!


I understood better with this example :rofl::rofl::rofl:… thank you Rene

A post was merged into an existing topic: Introduction to OSPF Stub Areas


i have a question regarding the Stub Area:

i configured in GNS3 the same topology as yours with the 3 Routers. Then i configured on R3 on Interface 0/0 the stub area like:

router ospf 1 
area 1 stub

I intentionally did not configure interface 1/0 on R2. After that i showed the routes on R3 and saw that R3 did not have any OSPF Routes anymore. Then i configured the interface 1/0 on R2 with the area 1 stub command and suddenly on R3 i was able to see the net The was not showed anymore, as if should be like your explanation in that lesson. But i did not understood why the R3 didnt list the OSPF Routes before i configured the stub on the Interface 1/0 on R2.

Best regards,


Hello Roberto

After you configured the R3 router with Area 1 as a stub, if you were to issue the show ip ospf neighbor command, you would find that R2 and R3 were no longer neighbors. This is the reason that you saw no OSPF routes in R3 after that change.

Once you made Area 1 on R2 a stub as well, the adjacency was reestablished, and that’s why you saw the networks reappear as expected in R3.

OSPF will form neighbor adjacencies with other OSPF routers only if the area type matches. This is one of the parameters found within the hello packets that must be the same before an adjacency can be formed.

More information about this can be found here:

I hope this has been helpful!


since it’s a static route, should not be the metric = 20?

show ip route show metric to = 20.

Hello Konstantinos

The metric that OSPF chooses to use for a particular destination does not depend upon how the destination was learned. A destination network may be learned from a static route redistributed into OSPF, from a directly connected network advertised by OSPF, or from networks learned via another OSPF router. This will not affect the metric of the route.

It is the sum of the cost of outgoing interfaces along the path to the destination that determines the metric. The following shows some of the metric values assigned to particular interface speeds by default:

  • 128 Kbps | OSPF cost: 781
  • 1.544 Mbps | OSPF cost: 64
  • 10 Mbps | OSPF cost: 10
  • 100 Mbps or greater | OSPF cost: 1

This, of course, can be adjusted by changing the reference bandwidth. More about this can be found in the following lesson:

So the metric will not be affected by the fact that this particular route is statically assigned on one of the routers.

Are you possibly thinking about administrative distance? Statically defined routes have an administrative distance of 1, but only on the router they have been configured on. And why should the metric be 20? Can you elaborate?

I hope this has been helpful!