OSPF before Connected route


I inherited a mess and I am having trouble figuring it out. I got an ip configured on an interface when I do a show ip route it says is learned to ospf some of the ips show learned through connected and some of the others are learned through ospf. as well the OSPF routes learned with in this subnet are working and are legitimate hosts routed to other areas of the network.

And the connected routes are working as well. sh ip route on shows learned through connected, etc

My question is why would these networks get added to the routing table over the /24 connected route. AD is default on everything. Conected is 0 and ospf 110. Can ospf advertise smaller networks and they take presendence b/c they are smaller. I realize this is a bad design and I have overlapping networks, but I am still trying to tear this apart so I can figure out how to fix it.

Reply to
Loading thread data ...

Answering second part of youer question. Longer prefixes (smaller networks as you say) are preferred. This behavior is very good thing.

Let's assume you're small ISP, with assigned. You have a customer and assign him Your customer connects with another ISP and advertises his subnet

Now, external party connects to

1) Router will match prefix (only matching prefix) 1) Router will match prefix (more specific prefix).

(in real world it might fail as ISPs tend to cut prefixes longer than /24, when advertising/receiving via BGP from other ISP).

Anyway, this functionality enables subnet portability, and might help even within AS, when you have multiple folks assigning addresses, reusing subnets etc...


Reply to

If these are static routes or loopbacks, then yes they will show separately from the overall /24. Particularly if these are loopbacks, you want those advertised as specific IPs/routes. This is standard operation for any routing protocol, not just OSPF, but I would guess you have those interfaces turned up and 'redistribute connected' in your ospf process.

Reply to

One must remember the basics. When doing VLSM the route is the combination of prefix and mask.

are four different routes. They may well overlap, but they are different routes.

If was to be advertised from elswhere in the network, on this router connected would win.

Yup - the important bit is not smaller, but different.


Reply to
Paul Matthews

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.