05-02-2014 05:12 AM - edited 03-03-2019 07:22 AM
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.
Solved! Go to Solution.
05-05-2014 12:37 PM
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
05-02-2014 11:39 AM
Hello surama,
Is it being override with a lower cost ?
By more specific i would ask: Is the prefix length longer?
Regards,
Pekiro
05-02-2014 03:16 PM
Thanks for your reply.
Connected route seems to have a cost of 0
OSPF prefix is /32
connected prefix is /28
Ian
05-05-2014 12:37 PM
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
05-06-2014 01:08 AM
Thanks for your reply DavidNoel,
I'm ashamed to say I didn't know such a basic rule .
All the best,
Ian
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide