cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1495
Views
0
Helpful
4
Replies

ospf overrides connected route

surama123
Level 1
Level 1

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

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

View solution in original post

4 Replies 4

davrojas
Level 3
Level 3

Hello surama,

 

Is it being override with a lower cost ?

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

 

Regards,

Pekiro

surama123
Level 1
Level 1

Thanks for your reply.

 

Connected route seems to have a cost of 0

OSPF prefix is /32

connected prefix is /28

 

Ian

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

Thanks for your reply DavidNoel,

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

All the best,

 

Ian

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: