cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2786
Views
20
Helpful
6
Replies

OSPF Router LSA(Type 1 LSA)

Ravi Pande
Level 1
Level 1

I am studying Router LSA(Type 1 LSA) I know for different neighbors Type 1 LSA will give different Information.
A) Interface with no neighbors( I have implemented with connecting R1 to a switch)

  1) When there is no neighbor, R1 will send Hello but it would not receive a response to its Hello hence it terms this link as STUB network. So my question is why it is termed as STUB network and for this STUB network it would give information as Link Id: Network(here in this scenario 192.168.3.0) and Link data:subnet mask(here in the scenario of the screenshot attached Link Data: 255.255.255.0) 
Why STUB network gives Network and subnet information?

 

B) Interface with DR

Why this  link is termed as TRANSIT? And why it gives Link Id: DR IP and Link Data:Interface, why it doesn't give network and subnet mask?

 

C) Interface without DR

Here it has 2 links one point to point and one STUB network(STUB is to know network and subnet mask as there is no DR). Why it gives totally different information and then needs STUB network, it could have included in the point to point link description directly.
Please, clarify for the above mentioned behavior for these 3 types of interface in Router LSA(Type 1 LSA). I am attaching a sample topology with the router LSA output.
Thanks In advance.

lsatype1.png

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Ravi,

why it is termed as STUB network

It is because as far as OSPF concerned, this stub network is a "dead end" - packets can enter this network, but they cannot get to any other network from there. Remember - a stub network is a network in which the OSPF router has no neighbors, so it can be reasonably assumed that there are no more routers, so there is nothing "behind" that network. The term "stub" is typically used in networking to denote a "dead end" property - you can reach the object with this property, but there is nothing behind this object - you cannot proceed from that object to any other place.

Why STUB network gives Network and subnet information?

Keep in mind that the Type-1 LSA (or LSA1) always indicates a connection, or a link, of the originating router to an object in the network. OSPF recognizes four types of such connections:

  1. point-to-point links to neighboring routers (always pointing to the OSPF RID of the other neighbor)
  2. transit links (always pointing to the IP address of the DR in the transit network)
  3. links to stub networks (carrying the subnet address/netmask information directly)
  4. virtual links (always pointing to the OSPF RID of the far-away router)

With a stub network in particular, there is no other router in it to indicate a link to, therefore, the only option to describe a stub network is to state its network and netmask right away.

Why this  link is termed as TRANSIT? And why it gives Link Id: DR IP and Link Data:Interface, why it doesn't give network and subnet mask?

Broadcast and non-broadcast networks that contain two and more routers are considered transit networks because you can enter them through one router and exit them through any other router. Packets may be just transiting these networks, being passed from one router to another, but their final destination may be elsewhere - hence the adjective "transit".

The information about the transit network's address and netmask is contained in the Network LSA (Type-2 LSA, or LSA2) which is originated by that network's DR. Member routers of a transit network use their LSA1 to point to the DR's LSA2, and the LSA2 in turn contains the addressing information for this network, and points back to individual member routers. You can consider this to be a sort of optimization, as the address/netmask information about the transit network will be contained only in the single LSA2, as opposed to being repeated in each member router's LSA1. There are also other reasons for the existence of LSA1 and LSA2 - more fundamental and more involved - but for our initial discussion, it is safe to stay at this level.

Here it has 2 links one point to point and one STUB network(STUB is to know network and subnet mask as there is no DR). Why it gives totally different information and then needs STUB network, it could have included in the point to point link description directly.

This is a specific property of OSPF that has proven to be quite confusing over time - indeed, a point-to-point connection to another OSPF router is described using two link entries in the router's LSA1: First, a point-to-point link to the neighboring router, and a stub network entry describing the IP network/netmask used on this link.

The reason for this is the need to support unnumbered point-to-point connections in OSPF. An unnumbered point-to-point connection would be described as a single point-to-point link in each router's LSA1, pointing to the OSPF RID of the other router, without any addressing information. Consequently, a numbered point-to-point connection is essentially described as two entries: A point-to-point link to the neighboring router (just like an unnumbered connection), and a stub network entry describing the IP network on the point-to-point connection.

Regarding this particular topic, you might be interested in reading through the following thread:

https://supportforums.cisco.com/t5/lan-switching-and-routing/ospf-termonilogy-stub-network/td-p/2074689

Feel welcome to ask further!

Best regards,
Peter

View solution in original post

6 Replies 6

Peter Paluch
Cisco Employee
Cisco Employee

Hi Ravi,

why it is termed as STUB network

It is because as far as OSPF concerned, this stub network is a "dead end" - packets can enter this network, but they cannot get to any other network from there. Remember - a stub network is a network in which the OSPF router has no neighbors, so it can be reasonably assumed that there are no more routers, so there is nothing "behind" that network. The term "stub" is typically used in networking to denote a "dead end" property - you can reach the object with this property, but there is nothing behind this object - you cannot proceed from that object to any other place.

Why STUB network gives Network and subnet information?

Keep in mind that the Type-1 LSA (or LSA1) always indicates a connection, or a link, of the originating router to an object in the network. OSPF recognizes four types of such connections:

  1. point-to-point links to neighboring routers (always pointing to the OSPF RID of the other neighbor)
  2. transit links (always pointing to the IP address of the DR in the transit network)
  3. links to stub networks (carrying the subnet address/netmask information directly)
  4. virtual links (always pointing to the OSPF RID of the far-away router)

With a stub network in particular, there is no other router in it to indicate a link to, therefore, the only option to describe a stub network is to state its network and netmask right away.

Why this  link is termed as TRANSIT? And why it gives Link Id: DR IP and Link Data:Interface, why it doesn't give network and subnet mask?

Broadcast and non-broadcast networks that contain two and more routers are considered transit networks because you can enter them through one router and exit them through any other router. Packets may be just transiting these networks, being passed from one router to another, but their final destination may be elsewhere - hence the adjective "transit".

The information about the transit network's address and netmask is contained in the Network LSA (Type-2 LSA, or LSA2) which is originated by that network's DR. Member routers of a transit network use their LSA1 to point to the DR's LSA2, and the LSA2 in turn contains the addressing information for this network, and points back to individual member routers. You can consider this to be a sort of optimization, as the address/netmask information about the transit network will be contained only in the single LSA2, as opposed to being repeated in each member router's LSA1. There are also other reasons for the existence of LSA1 and LSA2 - more fundamental and more involved - but for our initial discussion, it is safe to stay at this level.

Here it has 2 links one point to point and one STUB network(STUB is to know network and subnet mask as there is no DR). Why it gives totally different information and then needs STUB network, it could have included in the point to point link description directly.

This is a specific property of OSPF that has proven to be quite confusing over time - indeed, a point-to-point connection to another OSPF router is described using two link entries in the router's LSA1: First, a point-to-point link to the neighboring router, and a stub network entry describing the IP network/netmask used on this link.

The reason for this is the need to support unnumbered point-to-point connections in OSPF. An unnumbered point-to-point connection would be described as a single point-to-point link in each router's LSA1, pointing to the OSPF RID of the other router, without any addressing information. Consequently, a numbered point-to-point connection is essentially described as two entries: A point-to-point link to the neighboring router (just like an unnumbered connection), and a stub network entry describing the IP network on the point-to-point connection.

Regarding this particular topic, you might be interested in reading through the following thread:

https://supportforums.cisco.com/t5/lan-switching-and-routing/ospf-termonilogy-stub-network/td-p/2074689

Feel welcome to ask further!

Best regards,
Peter

Thanks a lot @Peter Paluch for the detailed answer to my question. 
Other question related to different topic regarding DR BDR election. Suppose I have 3 routers in same multi-access(transit) network and all of them have priority 0 which would mean all 3 would not take part in the DR BDR election. So what would happen in this scenario? They would stop at 2-Way state?If they are in 2-way how this would affect the topology and what would be the end result?

Hi Ravi,

My apologies for responding so late.

Suppose I have 3 routers in same multi-access(transit) network and all of them have priority 0 which would mean all 3 would not take part in the DR BDR election. So what would happen in this scenario?

All three routers will remain in a mutual 2-Way state. None of the neighbors will form a full adjacency to any other router on this transit network. As a result, they will not synchronize their link-state databases over this transit network, and they all will treat the network as a stub network, not leading anywhere. In other words, OSPF will behave as if the network never really interconnected the three routers together.

Feel welcome to ask further!

Best regards,
Peter

Thanks for the reply. Could you please elaborate the process of DR BDR election in detail. I don't understand the process of DR BDR election, it confuses me. For example: If there are 2 routers
R1<-->R2 if I configure OSPF first on R2 then R2 becomes DR. So what is the point of DR BDR election when it is like whichever router we configure OSPF first, that becomes DR.
Also, i was reading BDR is elected first.why is that BDR is elected first?

I was reading OSPF from Routing TCP/IP vol 1 and it says that "After two-way communication has been established with one or more neighbors, examine the Priority, DR, and BDR fields of each neighbor's Hello. List all routers eligible for election (that is, routers with priority greater than 0 and whose neighbor state is at least two-way); all routers declaring themselves to be the DR (their own interface address is in the DR field of the Hello packet); and all routers declaring themselves to be the BDR (their own interface address is in the BDR field of the Hello packet). The calculating router will include itself on this list unless it is ineligible."
So my question is before the election here we see that some routers say they are DR and BDR. What would happen if all the routers declare them as DR? Also who becomes the calculating router?

Hi Ravi,

to keep things simple and clear consider that when a router start to announce itself on a transit link (thus broadcast or non broadcast network) it initially tries to announce itself as DR.
There is a wait-timer that stands by default to 40 seconds which is used by the new announcing DR to wait and listen if more recent DR where already present on the segment. If the new router doesn't hear for any Ospf packet of a preceding DR then it elects itself as a DR.
This is also why the adjacency formation last longer on transit links than on p2p links. Therefore you may want also to account for this when you want speed up convergence on your domain.
Technically this is a security mechanism to ensure that when a new router appears on a segment, even though it has a higher priority or equal priority but higher addressing scheme, that router cannot preempt an existing DR. If this would happen you could end with two DRs on the same segment determining an inconsistency in the Ospf database.
In Ospf, preemption of the DR may occur just in isolate and builted ad hoc config cases but in generally it's not admitted by the protocol.
For other protocols like ISIS for example which is link state protocol as well preemption of the DR is possible but you may have heard it called by a different name such as DIS.

Hi @Peter Paluch Could you please elaborate more on this if possible, I would like to know more about the reasons of existence of LSA1 and LSA2 - which are more fundamental and more involved.
"There are also other reasons for the existence of LSA1 and LSA2 - more fundamental and more involved"

 

Thanks in advance.

Best Regards,

Ravi

Review Cisco Networking products for a $25 gift card