Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

ospf overrides connected route

Why does an e2 ospf route to a host override a route to a subnet containing that host that is locally connected?

 

So I have a host connected locally and the subnet appears in the routing table out of the local interface.

OSPF is learning a route to that host out of another interface.

I found it suprising but OSPF overrides the connected subnet, possibly because the route is more specific, ie to a host instead of a subnet.

Any thoughts on this would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Hello surama123, There you go

Hello surama123,

 

There you go. OSPF prefix is longer than connected.

 

Longer prefixes are always preferred over shorter ones when forwarding a packet.

 

 

Best regards,

 

DavidNoel

4 REPLIES
Silver

Hello surama, Is it being

Hello surama,

 

Is it being override with a lower cost ?

By more specific i would ask: Is the prefix length longer?

 

Regards,

Pekiro

New Member

Thanks for your reply.

Thanks for your reply.

 

Connected route seems to have a cost of 0

OSPF prefix is /32

connected prefix is /28

 

Ian

Silver

Hello surama123, There you go

Hello surama123,

 

There you go. OSPF prefix is longer than connected.

 

Longer prefixes are always preferred over shorter ones when forwarding a packet.

 

 

Best regards,

 

DavidNoel

New Member

Thanks for your reply

Thanks for your reply DavidNoel,

I'm ashamed to say I didn't know such a basic rule blush.

All the best,

 

Ian

190
Views
0
Helpful
4
Replies
CreatePlease login to create content