cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
483
Views
10
Helpful
5
Replies

how router calculates IP route to OSPF LSA ?

from88
Participant
Participant

hello,

 

i got theoretical question.

 

For examle i got this LSA:

 

CORE01# sho ip ospf database 37.157.20.144 detail vrf wan
OSPF Router with ID (37.157.3.192) (Process ID 2 VRF wan)

Summary Network Link States (Area 0.0.0.0)

LS age: 228
Options: 0x2 (No TOS-capability, No DC)
LS Type: Network Summary
Link State ID: 37.157.20.144 (Network address)
Advertising Router: 37.157.21.224
LS Seq Number: 0x8000b909
Checksum: 0xe4fb
Length: 28
Network Mask: /28
TOS: 0 Metric: 200

so for example, i need to know how router decides its way to: Link State ID: 37.157.20.144. ? 

 

Does it looks at advertising router id ? and calcualtes metric to it ? This particualr part of OSPF is quite hard to understand for me. Thanks

1 Accepted Solution

Accepted Solutions

Kanan Huseynli
Enthusiast
Enthusiast
Hi,
based on output we have LSA 3 (summary) received in A0 (area 0.0.0.0). Link State ID in type3 LSA refers to network ID of remote subnetwork. We get mask from "Network Mask: /28", so subnetwork is 37.157.20.144/28. Metric is 200 , but this is from ABR point of view who sent type3 lsa. We get ABR from "Advertising Router" which is RID of it and it is 37.157.21.224.
OSPF router has another table and you can see it with "show ip ospf border" command where routes (metrics) for all known ABR/ASBRs are there.
Local router adds metric (from itself to ABR) into metric (type3 LSA) and the result is metric from local router to subnetwork.

HTH,

View solution in original post

5 Replies 5

balaji.bandi
VIP Community Legend VIP Community Legend
VIP Community Legend

 OSPF will listen to neighbors and gather all link state data available to build a topology map of all available paths in its network and then save the information in its topology database, also known as its Link-State Database (LSDB). Using the information from its topology database. From the information gathered, it will calculate the best shortest path to each reachable subnet/network using an algorithm called Shortest Path First (SFP)

 

The Link State ID identifies what is being advertised by the LSA. A router LSA is describing what a router claim is directly connected to it, so the Link State ID is the Router ID of the originating router.

 

link-state-id
(Optional) Portion of the Internet environment that is being described by the advertisement. The value entered depends on the advertisement's link-state type. Specify in the form of an IP address.

 

how the process take place well explained here and documented :

 

https://www.ciscopress.com/articles/article.asp?p=2294214&seqNum=2

https://community.cisco.com/t5/networking-documents/reading-and-understanding-the-ospf-database/ta-p/3145995

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Kanan Huseynli
Enthusiast
Enthusiast
Hi,
based on output we have LSA 3 (summary) received in A0 (area 0.0.0.0). Link State ID in type3 LSA refers to network ID of remote subnetwork. We get mask from "Network Mask: /28", so subnetwork is 37.157.20.144/28. Metric is 200 , but this is from ABR point of view who sent type3 lsa. We get ABR from "Advertising Router" which is RID of it and it is 37.157.21.224.
OSPF router has another table and you can see it with "show ip ospf border" command where routes (metrics) for all known ABR/ASBRs are there.
Local router adds metric (from itself to ABR) into metric (type3 LSA) and the result is metric from local router to subnetwork.

HTH,

from88
Participant
Participant

thanks, seems im starting to sort this out:

 

show ip ospf broders showed that the cost to that border router is [16]

 

so i the final cost that to reach that router is 16 + LSA metric 200. Thats what show ip route shows.

 

btw - where that LSA metric (200) comes from ? Could that be due to auto-cost reference-bandwidth command usage ?


btw - where that LSA metric (200) comes from ? Could that be due to auto-cost reference-bandwidth command usage ?


Your local router (where you do show commands) received LSA from Area0 , so ABR (which generated this type 3 LSA) generated that LSA using type1/2 from connected area (we can't see details from local router point of view, because OSPF acts as distance vector in inter area routing).  So, ABR computed 200 metric for that route (using type1/2 LSAs), generated type3 LSA and sent over area0.

 

Autocost does not have direct influence. But if you change autocost value, interface metric changes which has affect on LSA metric.

Thanks, yes, i see that ABR gets Router lsa with Metric 100, si the ABR itself add another 100 what makes 200. Its interesting where metric 100 comes from, i guess its some kind of default metric.

 

Anyway, thanks for sharing your information. The thing i missed was border routers table :)

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: