# Introduction to OSPF Stub Areas

Hi Rene/Laz,
I am going through the RFC2328 , unable to understand the topology or exact meaning stub networks , can you please relate to this definition on section 2.1 .

``````2.1. Representation of routers and networks:
#############################################
**FROM**
+---+            							*
|RT7|            							*    |RT7| N3|
+---+            							T   ------------
|                							O RT7|   |   |
+----------------------+							*  N3| X |   |
N3
Stub networks

The middle of Figure 1a shows a network with only one attached
router (i.e., a stub network). In this case, the network appears
on the end of a stub connection in the link-state database’s
graph.
#############################################
``````

RFC 2328 - OSPF Version 2.pdf (568.9 KB)

Hello Sameer

What is being described in these diagrams is the physical topology on the left and the graph that represents the link state database on the right. The use of ASCII text to create these may affect the clarity, so I will try to clarify.

The diagram on the left shows a topology with a router RT7 that is a stub network connected to the “rest of the network” represented by N3. The diagram may look like this:

The diagram on the right is a representation of the link state database in the form of a graph or table. These tables have verticies that consist of routers and networks. The specific graph can be represented like so, where RT7 is a router and N3 is a network. Note that in the RFC, each of RT7 and N3 are referred to as vertices of the graph.

As stated in the RFC

Note that networks and routers are represented by vertices. An edge connects two vertices if the intersection of one vertex and another is marked with an X.

Now notice what it says in section 2.1:

The Autonomous System’s link-state database describes a directed graph. The vertices of the graph consist of routers and networks. A graph edge connects two routers when they are attached via a physical point-to-point network. An edge connecting a router to a network indicates that the router has an interface on the network. Networks can be either transit or stub networks. Transit networks are those capable of carrying data traffic that is neither locally originated nor locally destined. A transit network is represented by a graph vertex having both incoming and outgoing edges. A stub network’s vertex has only incoming edges.

So in the above table, we see that the X, also referred to as an “edge” in the RFC, indicates that the “network appears on the end of a stub connection in the link-state database’s graph”. In other words, the graph indicates that the network is a stub network since only the FROM RT7 TO N3 intersection is marked while not the opposite. If the opposite was marked as well (i.e. FROM N3 TO RT7) then the network would be considered a transient network.

These are constructs that are created to more fully understand how a router interprets and understands the link state database, and consequently acts upon the type of network being created. These tables/graphs differ depending on whether the network in question is a stub, a point to point network, or a broadcast NBMA network.

I hope this has been helpful!

Laz

1 Like

Hii Rene,

Can u explain me is there any difference between Backbone area and Standard area in OSPF Areas.??

Regards,
Chandra

Hello Chandra,
by “Standard area” you probably mean Normal area.
There are main stub area types:

• Normal
• Stub (+Totally Stubby)
• NSSA (+Stub, +Totally Stubby)

When you configure an area and you dont specify it as Stub or NSSA then it is Normal area by default.

Backbone area is just a Normal area, it cannot be Stub or NSSA (otherwise you may filter routes, thus lose connectivity).

Backbone area is always area 0.

Every area has to connect to Backbone (Normal) area, because routes always have to pass
Backbone area to go from one area to other area.

If you are interconnecting two areas, one of them has to be Backbone area (0).

If you have two Backbone areas that are discontinuous, or if you need to extend Backbone area over non-Backbone area, you can use Virtual-Link or Tunnel. But VIrtual-Link is special feature made for this.

Hello Chandra

What @fugazz says is correct. Just a note here that the what Cisco refers to as a Normal area, many other vendors/professionals refer to as a standard area, so these terms can be used interchangeably.

Also, many will state that the backbone area is not the same as a normal/standard area. A backbone area is defined as area 0, while a normal/standard area is a non-backbone area that does not fall into any other category (stub, totally stubby, NSSA etc).

The thing is that the terms normal/standard are not actually defined in the OSPF RFC so there is some flexibility.

I hope this has been helpful!

Laz

1 Like

Ahaa, so thats the thing here. People are refering to non-backbone area, that is not a stub or nssa as Standard area, good to know. I was learning OSPF from materials that did not used “standard” in terminology at all. Thanks for pointing this out.

1 Like

Thanks Laz. this question is asked in interview.

Regards,
Chandra

Hello Chandra

OSPF uses two multicast addresses, specifically, 224.0.0.5 for all OSPF routers, and 224.0.0.6 for all Designated routers. These addresses are used to exchange hello packets and LSAs. Which address is used for which purpose depends on the network topology and the implementation of OSPF. Take a look at this post for more info.

I hope this has been helpful!

Laz

Hello

During cisco test I’ve had a question below.
" Which OSPF areas prevent LSA type 4, LSA type 5? ( choose two)"

• NSSA
• Total Stubby area
• Stubby area
• NSSA Totally Stub

I think the answers are Total Stubby and Stubby because in these areas no ASBR allowed.
But according the Cisco guide the 2nd answer should be NSSA Totally Stub.
I’m confusing a bit. Anybody clatify me?

Thanks

Hello Boris,
your mentor is trying to be very sneaky with this question. All the answers are blocking LSA Type 4+5, but the area types with “Totally” in name are blocking LSA Type 3 on top of LSA Type 4+5. Thus right answer from my point of view is:

• NSSA area
• Stubby area
2 Likes

Hello Boris

The question is not completely clear, as it does not clarify what it means by “prevent type 4 and type 5”. Does it mean that those LSA types should not exist within the stub area? If so, then all of them should be correct. Take a look at the following table:

However, if we take the question to mean “prevent ONLY type 4 and type 5 LSAs and not Types 1, 2 and 3”, then the answer would be NSSA area and Stubby area as @fugazz suggested. The important thing here is to understand the functionality of the LSAs and apply that to any question that may arise in the exam.

I hope this has been helpful!

Laz

2 Likes

Hello Michal,
Thank you very much!

Hello Laz,
Thanks a lot for clear explanation. The table is very helpful for me.

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

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?

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

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

It was quite insightful, Thanks.

1 Like