03-05-2010 07:16 AM - edited 03-04-2019 07:43 AM
Hi,
If we have many routers in OSPF area 0 and dont have access to all of them. We know the router ID, is it possible to know which subnets that particular router is publishing from ospf databse.
Those subnets are available in the routing table- traceroute also shows from where those are coming from.
May be very basic but still I am not able to find.
Thanks
Subodh
Solved! Go to Solution.
03-05-2010 08:50 AM
Hello Subodh,
there are several options in sh ip ospf database
sh ip ospf database ?
adv-router Advertising Router link states
asbr-summary ASBR summary link states
database-summary Summary of database
external External link states
network Network link states
nssa-external NSSA External link states
opaque-area Opaque Area link states
opaque-as Opaque AS link states
opaque-link Opaque Link-Local link states
router Router link states
self-originate Self-originated link states
summary Network summary link states
| Output modifiers
you can use sh ip ospf database router 1.1.1.1
to see the router LSA generated by advertising router 1.1.1.1
if you do sh ip route 10.2.1.0 and you look at the from field you should see the OSPF router-id of the router that injected the LSA in the OSPF domain.
Hope to help
Giuseppe
03-05-2010 07:31 AM
Hi,
Yes. This is possible.
router#sh ip ospf database adv-router
Regards
Karuppu
03-05-2010 08:37 AM
Hi
I created small topology in test lab R1 and R2
R1 - Serial link ( 10.1.1.0 /30 ) ---- R2
and R1 : has fa0/0 - 10.2.1.0 /24
R1 - RID = 1.1.1.1
R2 -RID = 2.2.2.2
here is the output :
R2#sh ip os neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:30 10.1.1.1 Serial1/0
R2#
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.2.1.0/24 [110/65] via 10.1.1.1, 00:04:16, Serial1/0 ( It has learned 10.2.1.0 / 24 subnet )
C 10.1.1.0/30 is directly connected, Serial1/0
R2#
Now how can I find the advertised subnets from R1 ( RID = 1.1.1.1 ) from ospf database
Here is the output :
R2#sh ip os database adv-router 1.1.1.1
OSPF Router with ID (2.2.2.2) (Process ID 10)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 339 0x80000003 0x00C598 3 ( no subnets seen here )
R2#
R2#sh ip os database
OSPF Router with ID (2.2.2.2) (Process ID 10)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 589 0x80000003 0x00C598 3
2.2.2.2 2.2.2.2 596 0x80000002 0x000B6D 2
R2#
This doesnt show any subnet that is advertised by 1.1.1.1. How to find out that RID 1.1.1.1. router is publishing the subnet 10.2.1.0 / 24 ( in our case ) from ospf database?
Thanks
Subodh
03-05-2010 08:50 AM
Hello Subodh,
there are several options in sh ip ospf database
sh ip ospf database ?
adv-router Advertising Router link states
asbr-summary ASBR summary link states
database-summary Summary of database
external External link states
network Network link states
nssa-external NSSA External link states
opaque-area Opaque Area link states
opaque-as Opaque AS link states
opaque-link Opaque Link-Local link states
router Router link states
self-originate Self-originated link states
summary Network summary link states
| Output modifiers
you can use sh ip ospf database router 1.1.1.1
to see the router LSA generated by advertising router 1.1.1.1
if you do sh ip route 10.2.1.0 and you look at the from field you should see the OSPF router-id of the router that injected the LSA in the OSPF domain.
Hope to help
Giuseppe
03-05-2010 09:37 AM
Hi,
Thanks a lot I connected third router in cahin.
R1 ---> R2 -----> R3
R1 has 10.2.1.0 /24 network.
On R3
R3#sh ip route 10.2.1.0
Routing entry for 10.2.1.0/24
Known via "ospf 10", distance 110, metric 129, type intra area
Last update from 10.1.1.5 on Serial1/0, 00:00:41 ago
Routing Descriptor Blocks:
* 10.1.1.5, from 1.1.1.1, 00:00:41 ago, via Serial1/0 ( this router is injected by R1 RID 1.1.1.1 )
Route metric is 129, traffic share count is 1
R3#
Thanks again.
Subodh
03-05-2010 09:43 AM
Hello Subodh,
>> * 10.1.1.5, from 1.1.1.1, 00:00:41 ago, via Serial1/0 (
I was referring exactly to this part of sh ip route
Hope to help
Giuseppe
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: