[c-nsp] static route with higher AD preferred over BGP

Peter Rathlev peter at rathlev.dk
Tue Feb 5 02:29:53 EST 2008


Hi Atif,

On Mon, 2008-02-04 at 22:52 -0500, Atif Sid wrote: 
> I have a static route configured with Higher admin distance, intially
>  BGP route does does not install int routing table. after a flap in BGP
>  table the static route starts preferring, although the BGP AD is lower
>  then Static route which is 210.
<snip>

I'm not sure I follow. Is there any time the BGP route is not preferred?

> PE3#sh ip bgp vpnv4 vrf ONE 111.111.111.111
> BGP routing table entry for 21992:533130:111.111.111.111/32, version 2711475
> Paths: (2 available, best #2, table TEST)
> Flag: 0x800
>   Advertised to update-groups:
>      8          9          1
>   65500, imported path from 21992:410129:111.111.111.111/32
>     10.10.10.129 (metric 20) from 10.10.10.254 (10.10.10.254)
>       Origin IGP, metric 0, localpref 140, valid, internal
>       Extended Community: SoO:65500:140 RT:21992:410
>       Originator: 10.10.10.129, Cluster list: 10.10.10.254
>       mpls labels in/out 85760/1179
>   Local
>     33.33.33.34 from 0.0.0.0 (10.10.10.130)
>       Origin incomplete, metric 0, localpref 100, weight 32768, valid,
> sourced, best
>       Community: 21992:1100
>       Extended Community: RT:21992:533
>       mpls labels in/out 85760/nolabel
> 
> ip route vrf TEST 111.111.111.111 255.255.255.255 33.33.33.34 *210* tag *
> 1100*

Your problem might be a "redistribute static". Looking at a "show ip
route", you should actually see the route as a BGP route, but with your
statically configured next hop. The preferred route in the example is
preferred because of it's weight; locally sourced routes have a default
weight of 32768, which makes them preferred to any routes from BGP
neighbors.

If you'd lower the static routes AD you'd get a RIB failure by the way.
The redistributed static would still be the preferred route among the
BGP paths, so you'd see a "lower admin distance" failure from the
prefix. But you'd have your static route in your routing table.

Your solution could be to not redistribute this route. Either don't
"redistribute static" and use "network" statements (good idea IMHO) or
use a "redistribute static route-map <xyz>" and let the route-map deny
this specific prefix (or tag). I'd really prefer using network
statements myself...

Regards,
Peter




More information about the cisco-nsp mailing list