[c-nsp] Preferring OSPF over BGP

Eric Gauthier eric at roxanne.org
Sat Aug 14 11:19:47 EDT 2010


Grzegorz,

Usually, you'd want to do "hot potato" routing and prefer your 
eBGP route over the on in your OSPF table.  This comes from the
assumption that the entry in your OSPF table actually comes from
outside your organization, your OSPF neighbors are internal, and 
the eBGP neighbor is at your edge.

If you don't want to do hot potato for some reason or if you have 
a large network with multiple internal AS's (i'm guessing this is 
what you have), then this starts to break down.  Instead of 
playing with administrative distances, you could consider putting 
the routes into iBGP (e.g. run iBGP in addition to OSPF and, 
potentially, change which routes go into each), community tag 
everything in BGP, and create a local preferences policy based 
on those communities.

Eric :)


On Fri, Aug 13, 2010 at 10:47:18PM +0200, Grzegorz Janoszka wrote:
> 
> If a router has different sources (different routing protocols) for the 
> same route, it chooses the one with the smallest administrative distance:
> 
> http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094195.shtml
> 
> The problem in short: there is a pretty big network with many routers, 
> Cisco only. One of them has a network connected which it redistributes 
> to OSPF. All other routers see the route via OSPF and via eBGP. Because 
> of default administrative distance values, eBGP route always wins, so 
> the traffic to that network from all routers but the one connected, 
> always chooses external carriers, not the internal network.
> 
> One of the solutions is to change globally administrative distance for 
> OSPF or BGP. However it is pretty dangerous to do it for all the routes 
> on the core routers and Cisco even advices:
> 
> "a change in the administrative distance can lead to routing loops and 
> black holes. So, use caution if you change the administrative distance."
> 
> I thought about setting lower administrative distance in a 
> route-map/route-policy, but it seems impossible.
> 
> Right now we have filtered such prefixes from eBGP peers, but it leeds 
> to total unavailability when the connected route goes down.
> 
> Do you know any solutions to prefer the route (connected on another 
> router) over eBGP? The only solution that comes to my mind is to 
> redistribute connected to iBGP with higher local-preference than eBGP, 
> but maybe you know some better way to achieve the goal.
> 
> Thanks for any advices.
> 
> -- 
> Grzegorz Janoszka
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/


More information about the cisco-nsp mailing list