I have a BGP session where the other participant is advertising the default route in addition to a number of small prefixes.

I want to filter out the default, but accept those other prefixes.

I've tried to use:

ip prefix-list no-default-route seq 5 deny

In combination with:

neighbor prefix-list no-default-route in

But that ends up filtering all of the smaller prefix routes as well.

Is there a way I can filter out the default, but accept all other prefixes?

  • 2
    Remember, prefix-lists (just like access-lists) have an implicit deny statement at the end. You're denying as well as everything else.
    – Ryan Foley
    Sep 9, 2014 at 9:14
  • Thanks for pointing that out -- it didn't dawn on me that there is an implicit deny.
    – Elliot B.
    Sep 9, 2014 at 18:34

2 Answers 2


You need to add a statement to explicitly allow those prefixes after denying the default-route, so the final prefix-list becomes:

ip prefix-list no-default-route seq 5 deny
ip prefix-list no-default-route seq 10 permit le 32

The accepted answer is correct. Another way of writing the same thing, with just one rule, would be:

ip prefix-list no-default-route seq 5 permit ge 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.