Cisco prefix-list to strip default route from received BGP routes

Posted on September 20th, 2007 in General by Brandon

In playing with some routing last night, I needed to filter the default route that we received from the BGP announcements from our peers. I didn’t find exactly what I was looking for via Google, so I began experimenting. After a dozen or so unsuccessful changes, I came up with this that actually accomplishes what I was trying to do:

ip prefix-list NO_DEFAULT_ROUTE seq 1 deny 0.0.0.0/0
ip prefix-list NO_DEFAULT_ROUTE seq 2 permit 0.0.0.0/0 ge 1 le 24

Then apply that to a BGP session with something like this in your BGP configuration

 neighbor 10.20.30.40 prefix-list NO_DEFAULT_ROUTE in

Although that did accomplish that goal of filtering out the default route, it turns out it still didn’t do what I wanted. Oh well. Having a static default route is probably a bad idea anyway.

One Response to 'Cisco prefix-list to strip default route from received BGP routes'

Subscribe to comments with RSS or TrackBack to 'Cisco prefix-list to strip default route from received BGP routes'.

  1. R Wiley said,

    on October 7th, 2007 at 4:14 pm

    change the seq 2 pemit from ‘le 24′ to ‘le 31′

Post a comment

Please copy the string 5SYlzc to the field below: