cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
56378
Views
0
Helpful
7
Replies

OSPF advertised routes

paulkilcoyne
Level 1
Level 1

Hi there,

I'm wondering if there are commands in OSPF, other than looking at the ospf config, to;

A) view what networks/ subnets/ prefixes My Router is advertising out

and

B) view what networks/ subnets/ prefixes are being advertised into My Router.

I basically want to see if a static route is being sent from my router and if it's being received by it's neighbour.

Thanks,

Paul

1 Accepted Solution

Accepted Solutions

Hi Paul,

I'm an idiot... This is such an obvious configuration mistake for OSPF I should have spotted it immediately!

The redistribute command in OSPF is special in that by default, it redistributes only classful networks and supernetworks but not subnetworks (it tries not to clutter the OSPF database). In order for the command to redistribute the subnets as well, you need to add the subnets keyword at the command's end, i.e.

router ospf 1

  redistribute static subnets

Please try it out!

Best regards,

Peter

View solution in original post

7 Replies 7

Peter Paluch
Cisco Employee
Cisco Employee

Hello Paul,

In general, seeing such information is not directly possible because OSPF advertises topological elements (the LSAs), not prefixes. The individual prefixes are extracted out from these topological elements as a part of the SPF run.

However, if you want to see if your router advertises a static route then I assume that you have performed a redistribution from static routes into OSPF. That causes the network to be advertised to other OSPF routers as LSA5. You can check whether this LSA5 exists using the command

show ip ospf database external X.X.X.X

where X.X.X.X is the network IP address of the static route. If an output appears with the details about this route, then this LSA5 has been correctly originated (if performing the command on the router that should advertise the route) and received by other router (if performing the command on other routers).

Best regards,

Peter

Hi Peter,

thanks so much for your speedy reply. So more info on my problem;

I have a lan extension from Router A to remote Router B, running ospf in area 0.

On switch B, I have a static route to a VoIP switch/ subnet 10.20.30.0/24

I want to advertise this network 10.20.30.0/24 into ospf so I thought I'd use the command:

****

router ospf 1

redistribute static

****

But on Router A I cannot see this subnet in the "show ip route", so I've had to use a static route back to Router B form 10.20.30.0/24

Do you know the reason why OSPF is not advertising this static route?

Thanks,

Paul

Hi Paul,

Can you please post the output of the

show ip ospf database external 10.20.30.40

from both router B and router A? Also, I assume that the OSPF configuration snippet you have quoted is not the complete OSPF configuration on router B. And also, I assume that on router B, the route to the network 10.20.30.40/0 is indeed static and not directly connected, right?

Best regards,

Peter

Hi Peter,

here is more info:

Topology:

Router1------RouterA--------OSPF via fibre------RouterB------fibre------VoIP Switch

Router Configs:

Router A:

router-id 10.23.192.253

log-adjacency-changes

redistribute connected subnets

network 10.2x.193.0 0.0.0.7 area 0

network 10.2x.194.0 0.0.0.255 area 0

ip route 10.20.30.0 255.255.255.0 10.2x.193.2

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

Remote Router B:

router ospf 1

router-id 10.2x.193.2

redistribute connected subnets

redistribute static

network 10.2x.193.2 0.0.0.0 area 0

ip route 10.20.30.0 255.255.255.0 10.26.195.241

int gi 0/0

ip address 10.26.195.246 255.255.255.248

Is that enough info?

Thanks again,

Paul

Router A:

show ip ospf database external 10.20.30.0

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

Router B:

show ip ospf database external 10.20.30.0

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

So it looks like it's not being redistributed into OSPF?

Paul

Hi Paul,

I'm an idiot... This is such an obvious configuration mistake for OSPF I should have spotted it immediately!

The redistribute command in OSPF is special in that by default, it redistributes only classful networks and supernetworks but not subnetworks (it tries not to clutter the OSPF database). In order for the command to redistribute the subnets as well, you need to add the subnets keyword at the command's end, i.e.

router ospf 1

  redistribute static subnets

Please try it out!

Best regards,

Peter

Hi Peter,

you're far from an idiot, you hadn't all the info. Thanks for pointing this out to me, I understand completely now and will edit my ospf statement.

Regards,

Paul

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco