How to read the OSPF Database

This topic is to discuss the following lesson:

Great explanation, especially definitive descriptions how P2MP works, thanks !

Best explanation ever! Thank you Rene. I am signing up to your BLOG posts, forever!

Understood much of it. Yet one point is not cleared. You have mentioned that R1 is DR. How? In database it is not, so how it may legally generate LSA-2?

Hello Rene,

Great Blog(s). A question pertaining to this one;

For a Point to Point link how does OSPF figure out subnet mask as no LSA contained this information. Does OSPF process gets that bit of information from the network command? To add to this if the network command was then how would OSPF get subnet mask for point to point links. Thanks for your time.


Hi Sahil,

When you use the network command, it activates OSPF on all interfaces that fall within the range of your network command. When you use network then it will activate OSPF on all interfaces. For example, when you use on the point-to-point link then that’s what will be advertised. It checks the interface for the subnet.


1 Like

Hey Rene Thanks for getting back. Sorry I did not frame my question correctly. I will try again ^_^.

So I was trying to make topology diagram using the OSPF LSDB. I was not able to get the subnet mask for link R1 <–> R5. Then I went through the blog again and found this

“R1 also has two stub networks, one to represent each of the point-to-point links shown above. Without these entries, other routers would not have routing information for the and subnets.”

That’s what I was missing. I misunderstood the following LSA information with STUB as different loopback interface…

 Link connected to: a Stub Network
(Link ID) Network/subnet number:
(Link Data) Network Mask:

But your blog clearly says that it is for sharing routing information. I should have read that before.
Thanks for your efforts!

1 Like

Holy Smokes! I just read your story and you are the Guy behind GNS3Vault :smiley: Awesome! I have really enjoyed your GNS3vault videos and am also enjoying your blogs. Keep rocking. Cheers.

Good to hear you found it! And yes…that’s me (feeling like a celebrity now :wink:

on which basis do you select the dr

It’s based on the priority or router ID:

OSPF DR/BDR Election

How do you select the DR based on the RID when we are not given the priority?

OSPF selects the highest IP address on any loopback interface as its RID.

When there is no loopback interface, it will select the highest IP address on any active physical interface.

Could you please help me out to draw the network topology

Hi Vineeth,

That’s what we did in this lesson?


Hello Rene,

I have three questions:

  1. Can you please explain what vertex means? maybe an example will help me understand the concept.

  2. When you start analyzing R2 and it LSDB, how you determine that R2 has two networks with the same subnet. I can see R1-R2 subnet is and LAN R2 is 10.12.0/24, as well.

I got confused in this part:

Link connected to: a Stub Network
(Link ID) Network/subnet number:
(Link Data) Network Mask:
Number of TOS metrics: 0
TOS 0 Metrics: 10

I think the above entry in is referring to the R1-R2 edge.

  1. Same thing, when you are describing the LSDB Optimizations:

Under R3#show ip ospf database router self-originate, why you count 6 links, when is the P2P between R3 - R5, but in the diagram you show as another link?




I understand the LSDB Topology is a logical diagram, but if we remove the DR routers from the topology, will this turn into the physical diagram representing how the actual routers are physically connected?

AM I right in thinking the T2 LSA is the one that generates the O Routes in the Routing Table?

Since LSA Type-2s are only associated with DRs, your statement is correct for networks where a DR has been elected (network type Broadcast, for example). In other network types (Point-to-Point, for example), it would be LSA Type 1.

1 Like

Hi Rene,
Another Great artlice, I got a question in regards to R5.
R1#show ip ospf database router

Link connected to: another Router (point-to-point)
 (Link ID) Neighboring Router ID:
 (Link Data) Router Interface address:
  Number of TOS metrics: 0
   TOS 0 Metrics: 17

Link connected to: a Stub Network
 (Link ID) Network/subnet number:
 (Link Data) Network Mask:
  Number of TOS metrics: 0
   TOS 0 Metrics: 17

on the diagram, R5 connecting DR on on cost 17. Could you please explain how a stub network connect to DR.
One more question, In regards to R3/R4 (34.3,34.3) how you come to conclusion DR with /24 network mask?