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

Demystifying OSPF area map - Who can help?

jaighobahi
Level 1
Level 1

Greetings everyone,
Here I am again, wondering about an aspect of OSPF.  Please, open the attached file. The image was snipped from Implementing Cisco IP Routing (ROUTE) Foundation Learning Guide. The following two paragraphs were also excerpted from the book.

"Router X has four neighbor routers: A, B, C, and D. From these routers, it receives the LSAs from all other routers in the network. From these LSAs, it can also deduce the links between all routers and draw the web of routers shown in the Figure...
.
.
.
Each LSA entry header includes information about the link-state type, the address of the advertising router, the link’s cost, and the sequence number..."

My questions are: Where in the LSA header does a router get the information with which to draw the web of routers in an area?  For example, in the attached diagram, where in an LSA would router X get the information with which to map the paths from router X to say, router H?

You would have helped a great deal in lightening somebody's burden if you could answer the questions in plain language.

Thanks for your contributions.

5 Replies 5

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Jaighobahi,

within a single OSPF area every router is able to draw the complete network topology using the information in the LS database.

The local node does not use only the LSA header, but actually the content of each LSA that is in the database.

For a single area OSPF domain the complete topology can be built by examining all the LSA type 1 and LSA type 2.

LSA type 1 are the Router LSA. Each router that has at least one interface in the area builds its own Router LSA and floods it in the area (area scope). The Router LSA has Link-id = OSPF router-id of advertising router and has entries describing all the links in the area.

Actually the links can be of different type : stub ( no OSPF neighbors) , point to point ( single OSPF neighbor), transit ( a LAN interface with potentially multiple neighbors).

The format of the link information changes for each link type. However, the key information is the following:

for point to point links the OSPF router-id of the neighbor is listed allowing to point to the neighbor's Router LSA.

for transit link a pointer to OSPF DR IP address is placed, this allows to point to a Network LSA generated by the OSPF DR in the LAN segment.

The Network LSA type 2 describes a network segment using a Link-id of the DR interface IP address. The Network LSA is a list of OSPF Router-ids of all routers connected to the segment including the OSPF DR itself.

When executing the SPF the local node starts from its own router LSA as the root of the SPF and then starts to search for the Router LSAs of its own neighbors.

Combining the information of Router LSAs and Network LSAs the local node learns all about inter router links and is able to say what routers are connected to a remote LAN segment in the same OSPF area.

Edit:

the picture you have linked is a graphical representation of the SPF algorithm and you can see it as the result of linking the Router LSA objects together with the help of the Network LSAs.  The OSPF cost is that of the outgoing interface to reach the neighbor. So from a maths point of view the graph is oriented, different choices can be done in different directions as the cost might be different on the two ends of a link.

For LAN segment the cost is calculated as the cost to enter the LAN.

Then for each IPv4 prefix within the area the SPF finds the shortest path = lowest total cost from the point of view of the local node.

As you see the link state nature of OSPF allows for this.

In OSPF multi area other types of OSPF LSAs are used, but the link state nature is limited to a single area. The information coming from other areas does not contain topological information.

Hope to help

Giuseppe

Thanks a lot Mr. Giuseppe.  After viewing the ouput of show ip ospf database router and show ip ospf database network, I could understand what you meant by saying "Combining the information of Router LSAs and Network LSAs the local node learns all about inter router links and is able to say what routers are connected to a remote LAN segment in the same OSPF area."

I am still not clear about something.  The output of show ip ospf database seems to be partly show ip ospf database router and partly show ip ospf database network; with some details missing.  Please, tell me, is the output of show ip ospf database an abridged Router LSA plus an abridged Network LSA? 

Hello jaighobahi,

use the detail option also you can filter based on LSA type

show ip ospf database router detail

show ip ospf database network detail

Hope to help

Giuseppe

RTD#show ip ospf database network detail

                                                      ^

% Invalid input detected at '^' marker.

RTD#show ip ospf database router ?
  A.B.C.D         Link state ID (as an IP address)
  adv-router      Advertising Router link states
  internal        Internal LSA information
  self-originate  Self-originated link states
  |               Output modifiers


RTD#show ip ospf database network ?
  A.B.C.D         Link state ID (as an IP address)
  adv-router      Advertising Router link states
  internal        Internal LSA information
  self-originate  Self-originated link states
  |               Output modifiers

The Cisco IOS that I am using is c2691-adventerprisek9-mz.124-5a.  Is it the case that this IOS does not support the recommended commands?

***************************************************************************************************************************************

RTD#show ip ospf database

            OSPF Router with ID (222.123.224.60) (Process ID 1)

                Router Link States (Area 1)

Link ID         ADV Router           Age         Seq#           Checksum  Link count
41.41.41.41     41.41.41.41         988         0x80000004 0x008236   3
100.10.21.2     100.10.21.2         992         0x80000003 0x004BEC  3
200.200.84.71   200.200.84.71    987         0x80000004 0x00730E   3
222.123.224.60  222.123.224.60  992         0x80000003 0x00F961   4

                Net Link States (Area 1)

Link ID         ADV Router        Age         Seq#              Checksum
10.1.1.1        222.123.224.60  992         0x80000001     0x0017FC
63.15.7.5       222.123.224.60  992        0x80000001     0x000F5F
172.16.1.2      100.10.21.2      993         0x80000001     0x005C71
192.168.1.2     200.200.84.71  988         0x80000001     0x00FAD6


Is this what is being referred to as the summary of the LSDB?

@ Giuseppe
very clear explanation thanks for sharing

res
Paul


Sent from Cisco Technical Support Android App


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul