cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
31706
Views
12
Helpful
4
Replies

can you display routes advertised and/or received in OSPF, similar to BGP command sh ip bgp neighbors x.x.x.x advertised-routes?

demiller
Level 1
Level 1

TOC-BP-SWa#sh ip bgp neighbors 10.14.0.3 advertised-routes
BGP table version is 1674320, local router ID is 10.14.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.14.0.1/32     0.0.0.0                  0         32768 i
*> 147.249.37.0/24  172.20.18.1                   120      0 2001 65015 65016 64823 7381 64681 i
*> 147.249.38.0/24  172.20.18.1                   120      0 2001 65015 65016 64823 7381 64681 i
*> 147.249.46.0/24  172.20.18.1                   120      0 2001 65015 65016 64823 7381 12159 12159 i
*> 147.249.196.0/24 172.20.18.1                   120      0 2001 65015 65016 64823 64870 65124 i
*> 147.249.237.0/24 172.20.18.1                   120      0 2001 65015 65016 64823 7381 64681 i

TOC-BP-SWa#sh ip bgp neighbors 10.14.0.3 received-r       

Total number of prefixes 0 
TOC-BP-SWa#sh ip bgp neighbors 10.14.0.2 received-r
BGP table version is 1674320, local router ID is 10.14.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.14.0.2/32     10.14.0.2                0    100      0 i
* i147.249.37.0/24  10.14.0.2                0    120      0 2001 65015 65016 64823 7381 64681 i
* i147.249.38.0/24  10.14.0.2                0    120      0 2001 65015 65016 64823 7381 64681 i
* i147.249.46.0/24  10.14.0.2                0    120      0 2001 65015 65016 64823 7381 12159 12159 i
* i147.249.196.0/24 10.14.0.2                0    120      0 2001 65015 65016 64823 64870 65124 i
* i147.249.237.0/24 10.14.0.2                0    120      0 2001 65015 65016 64823 7381 64681 i

 

Can this output be duplicated with an OSPF command? 

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

Not really because OSPF does not advertise routes it sends LSAs to it's peers.

So you need to look at the OSPF database ie. -

"sh ip ospf database"

which will show you all the LSAs the router is aware of.

In terms of all the LSAs the router has received it will show all of those but it will also show you LSAs that were generated by the router itself although the advertising router IP will point to that being the case.

In terms of all the LSAs the router advertises again it depends on the area and how that has been configured.

So for example an ABR might well have external LSAs (which aren't tied to any area in the OSPF database) but that doesn't necessarily mean it is advertising them to peers within an area as it could have been configured not to.

So it gives you a good idea but you need to also work out a few things for yourself as well.

Jon

swj
Cisco Employee
Cisco Employee

Hi, 

 

OSPF is Node based routing, not like BGP where it can send particular routes. 

OSPF need full detail of Topology in single Area, and it send LSA to the peer, and there is no way you can check advertised routes. You can use 

 

"sh ip ospf database router" (for LSA1) 

"sh ip ospf database network" (For LSA2)

sh ip ospf database summary (For LSA3) and so on.... 

 

Hope this helps :) 

 

Regards

Swj

Gerad Parent
Level 1
Level 1

Hello

I know this thread is a bit old but I believe what you were just concerned with were the routes that originate from a particular router.  This command should do the trick.

 

show ip ospf database self-originate

 

 

akerez
Cisco Employee
Cisco Employee

Hi 

show ip protocols

this should show both advertised and learned

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:

Review Cisco Networking products for a $25 gift card