OSPF before Connected route

Hello,

I inherited a mess and I am having trouble figuring it out. I got an ip configured on an interface

192.168.200.0/24 when I do a show ip route 192.168.200.1 it says 192.168.200.1/32 is learned to ospf some of the ips show learned through connected and some of the others are learned through ospf. as well 192.168.200.221/32 192.168.200.224/30 192.168.200.249/32 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 192.168.200.2 shows learned through connected

192.168.200.0/24, 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
jcle
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 100.0.0.0/24 assigned. You have a customer and assign him 100.0.0.0/29. Your customer connects with another ISP and advertises his subnet 100.0.0.0/29.

Now, external party connects to

1) 100.0.0.200 Router will match 100.0.0.0/24 prefix (only matching prefix) 1) 100.0.0.1 Router will match 100.0.0.0/29 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...

Wieslaw

Reply to
Wwieslaw

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
Trendkill

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

192.168.200.221/32 192.168.200.224/30 192.168.200.249/32 192.168.200.0/24

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

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

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

Indeed.

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.