Cisco Systems OSPF before Connected route

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
OSPF before Connected route jcle 06-03-08
Posted by jcle on June 3, 2008, 4:16 pm
Please log in for more thread options
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.

Posted by Wwieslaw on June 3, 2008, 4:37 pm
Please log in for more thread options
jcle wrote:
> Hello,
> 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.

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

Posted by Trendkill on June 3, 2008, 6:42 pm
Please log in for more thread options
> Hello,
>
> I inherited a mess and I am having trouble figuring it out. =A0I 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. =A0AD is default on everything. =A0Conected
> is 0 and ospf 110. =A0Can ospf advertise smaller networks and they take
> presendence b/c they are smaller. =A0 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.

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.

Posted by Paul Matthews on June 4, 2008, 8:41 am
Please log in for more thread options
jcle wrote:

>My question is why would these networks get added to the routing table
>over the /24 connected route.

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.

> 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.

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

> I realize this is a bad design and
>I have overlapping networks,

Indeed.
--
Paul Matthews CCIE #4063
Please post questions to the NG, NOT by e-mail.

Similar ThreadsPosted
OSPF before Connected route June 3, 2008, 4:16 pm
What is the default precedence: local-route, static-route, OSPF-route? August 4, 2008, 3:00 am
OSPF O routes vs. redist connected (E2) October 2, 2006, 12:01 pm
Re: Why doesn't OSPF redistribute secondary address unless "redistribute connected"? June 5, 2007, 5:44 pm
Need Site to Site VPN Help. How to route to a network not directly connected through VPN April 11, 2006, 11:39 am
OSPF E1/E2 route calculation August 18, 2006, 4:31 pm
route Maps with OSPF for set ip next-hop July 16, 2007, 9:30 am
modifying route metric with ospf September 28, 2005, 1:22 pm
Static Route Redistribution over OSPF. March 14, 2006, 3:52 pm
route preference - ospf or static. October 12, 2006, 4:07 pm
BGP static route from ISP and redistribute into OSPF March 18, 2008, 10:40 pm
Announcing to BGP an OSPF route from area 0 August 15, 2008, 5:24 pm
Redistributing a single static route in OSPF September 6, 2006, 2:37 pm
ASA to Router VPN - Reverse Route Injection (OSPF) February 12, 2007, 3:54 pm
2 OSPF Processes - Prevent route contamination / LSAs between them August 19, 2007, 9:19 pm