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.