Introduction to OSPF Stub Areas

hi there,
I am learning routing at the moment but I have not gone through the dynamic routing protocols sections yet.
could someone tell me what is a stub router?
why default routes cant be configured at a stub router.

Hello Vigneshwarv

The term “stub” is most often used with the OSPF routing protocol. It is used not to refer to a router, but to a non-backbone OSPF area that has only one ABR that connects it to the backbone area. For more info about this, take a look at the following lesson:

When referring to the EIGRP routing protocol, the term stub is applied to a single router. In this case, a stub router is one that has only a single route to “the rest of the network”. You can find out more about that at the following lesson:

Default routes can be configured on a stub router, and it is best practice to do so. In both the cases of a stub area and a stub router, a single default route should be used in order to simplify the routing table. In order to more fully understand this concept, I believe it would be best if you went through the lessons for these routing protocols so that you can more clearly understand the implications of the term stub and how it is applied in each case.

I hope this has been helpful!

Laz

1 Like

How to filter the external routes inside a default OSPF area “not a stub area”? I have a default area (area 225) and I configure (filter list) in the ABR to filter other areas routes. but, the external routes from other areas still exist in area 225. I can configure (distribute list) in all the routers inside area 225 to filter the external routes, but is it possible to configure something in area 225’s ABR to filter the external routes? for example, the route-map in the ABR’s interface that facing area 225 can filter the external routes?

Thanks in advance,

Hello Mohanad

There are a few things to consider when filtering routes. There’s a difference between filtering LSAs, and filtering routes. Filtering LSAs will block the actual transmission of the LSAs, which means the prefixes they contain will not be found in the OSPF database. However, this can only take place at an ABR, and LSAs can be filtered only between areas. Alternatively, you can prevent specific prefixes from entering the routing table by using distribute lists. The prefixes remain in the OSPF database, and are advertised, but are not placed in the routing table of the specific router.

If you want to filter external routes (Type 5 LSAs) from one area to another, use LSA Type 5 filtering, more about which you can learn at the following lesson:


If you simply want to prevent a particular prefix from entering the routing table, you can use distribute lists as described below:

I hope this has been helpful!

Laz

1 Like

What’s the purpose of stub areas, what are they trying solve. I understand the fact that stub areas blocks type 3 LSA and/or type 5 LSA, but why do we block these LSA’s.

Hello Alpha

In most lab topologies, the scale of the network is quite small, and there is little or no traffic, so you can’t readily appreciate the benefits of features such as OSPF stubs. This feature is used to minimize the number of useless entries within a router that is found within a stub area. Take a look at the following topology:

Imagine that behind R1, instead of only a single prefix of 1.1.1.0/24, there are many more networks with hundreds of prefixes coming from other areas as well as from autonomous systems outside of OSPF. Without the configuration of any stub networks, R3 would have, in its routing table, hundreds of prefixes for all those networks. This means that each packet that R3 sends anywhere will need to be checked against all of these hundreds of entries, resulting in a lot of wasted CPU and memory.

If you were to take a look at R3’s routing table in such a case, you would see that the next hop IP for all of the routes would be 192.168.23.2, which is R2. This is the case because area 1 is a stub area. By definition, a stub area has only one exit from the area.

When you configure a stub area, and block various types of LSAs, what you are doing is eliminating all of these prefixes in R3, with a single default route for all traffic that is directed to 192.168.23.2. You can understand that reducing the size of a routing table from hundreds of prefixes to one single prefix is quite efficient.

This is not evident in a small lab topology, but in an enterprise network, it is quite evident.

I hope this has been helpful!

Laz

1 Like

It was quite insightful, Thanks.

1 Like

What about totally stub? This area type will block type 5 external LSAs and type 3 summary LSAs. It’s impossible to have an ASBR in the totally stub area since type 5 external LSAs are blocked.

can we see lsa type 3 from totally stub area in backbone area ?

Thanks

Hello Sims

Yes, the backbone area will receive a type 3 LSA from the ABR connected to a totally stub area.

Remember that the various types of stub areas described in this lesson will block some types of LSAs only in the direction from backbone to stub. In the opposite direction, that is towards the backbone area, the LSAs are not blocked in any way, and should not be, otherwise, prefixes in non-backbone areas will never reach the backbone area to be correctly shared and advertised with the rest of the network.

I hope this has been helpful!

Laz

1 Like

Hi,

Does an OSPF router in a stub/totally stub area will reach loopback address configured on an ASBR router in another area? If yes, how will it reach because ABRs are not relaying type 4 LSA in stub area which is needed for stub router to reach ASBR.

Thanks,
Nihar

Hello Nihar

An OSPF router in any type of stub area will not receive any Type 4 LSAs. Thus, it will never learn of the location of any ASBRs found in any other areas of the OSFP topology. However, an OSPF router in a stub area will have a default route that points to the ABR of the area as the next-hop IP.

This is the point of having a stub area, to avoid having multiple routing entries for various destinations in an OSPF topology (including ASBRs) and having all of these entries consolidated into a single route to the local ABR. For all routes outside of the stub area, including ASBRs, you will have to go through the ABR to get there anyway, so a single default route is created for this.

I hope this has been helpful!

Laz

1 Like

There are two questions related to this diagram. R1 is in Area0. R2 and R3 and acting as the ASBR and ABR for Area 0 and Area 1. R4 is acting as the ISP provider and its’ routes are being redistributed into R2 and R3 respectively. Area 1 is an NSSA. 2 Questions come from this

  1. How would R1 Reach R4(ISP) network if both R2 and R3 are acting as the ABR and ASBR?

  2. How could you force R1 to prefer the path of R3?

Hello Marc

Just to clarify, based on the diagram, R2 and R3 have interfaces in Area 1 and thus will become neighbors within Area 1, however, R4 is not participating in OSPF, but has created BGP peerings with both R3 and R4, and it redistributes its routes (4.4.4.4 for example) into the OSPF Area 1.

The 4.4.4.4 destination network on R4 would be advertised to both R2 and R3 using BGP. Assuming that redistribution has been configured in both routers, and the default values are being used, then both R2 and R3 will redistribute this into Area 0 with the same metric. And as we know, OSPF does equal-cost load balancing, so when R1 communicates with 4.4.4.4, it would load balance packets across both routers.

The fact that R3 and R4 are both ABRs and ASBRs does not affect the routing. Actually, the OSPF Area 1 plays no role in this routing at all, as both R2 and R3 function as ASBRs for the backbone area. In other words, both R2 and R3 interconnect the OSPF domain with the BGP routing domain directly, so you could even remove OSPF Area 1 altogether without any effect on routing to 4.4.4.4.

There are several ways to do this. Possibly the simplest is to change the cost of one of the interfaces on R2 or R3 so that you no longer have equal cost for both routes. You could also affect the redistribution costs from BGP to OSPF within R2 or R3. You could also use filtering to block the advertising of the route from one of the two routers. You could also use policy-based routing as well. You could search for these particular features and find the lessons that pertain to them to learn more about them.

I hope this has been helpful!

Laz

1 Like

Hi Laz,

I am little bit confused about ASBR not allowed point, is that mean we can’t configure routers as a ASBR those are within stub area and total stub area or we can’t get ASBR router information from ABR which is the first router knows about ASBR router and create type4 LSA to let other routers know in a network?

Hello Pradyumna

Stub and totally stub networks don’t allow an ASBR within the OSPF area. What this means is that if you attempt to configure an ASBR within such an area, any OSPF updates that the ASBR sends to the ABR of the stub will not be transmitted to the OSPF backbone. You must use either an NSSA or totally NSSA in order to do this.

I hope this has been helpful!

Laz

1 Like

Hi Team,

Can anyone explain me about OSPF Partitioned area.

Hello Ankush

I believe you are referring to a situation where you have a backbone area that has been split into two discontiguous parts due to a failure. Or cases where you may have OSPF areas that are not directly connected to the backbone area of the OSPF topology.

In order to deal with such situations, we use what is known as a virtual link. You can find out more about partitioned areas and the solutions that can be found for them at the following lesson:

If you have more specific questions about this or other OSPF topics, please let us know!

I hope this has been helpful!

Laz

1 Like

Can i design the network like the picture given below ??..Will it work properly, How Area 1 router will react when they will receive the rea-0 route from 2 side.

Hello Narad

The short answer is no, this will not work properly. Although Area 1 will be able to communicate with hosts within both Area 0s, the problem will be communication between the two Area 0s. OSPF RFC2328 states that any routes learned by Area X from Area Y are never readvertised into Area Y. Kind of like a split horizon rule. This means that any information received from the left Area 0 will never enter into the right Area 0. All other routing will function correctly.

The solution to such a topology is to create a virtual link between the two Area 0s. More about this can be found here:

I hope this has been helpful!

Laz

1 Like

Hello Laz,

Many thanks for your responses.
so can i conclude that in OSPF, totally NSSA are used where we can have 1 ASBR and NSSA will have only 1 ABR in their topology?

BR//
Nitin Arora