Ethan Banks On productivity.

OECG – Chapter 11


Prefix lists are, for me, the big-boy way to make lists of routes. While they don’t give you the granular ability of an ACL when it comes to layer 4 matching (port numbers), prefix lists are easier to read and offer greater flexibility than access-lists if all you’re trying to do is generate a list of routes to match or deny. I don’t know about you, but no matter how many wildcard masks I’ve looked at in my life, it still takes a few seconds to figure out what nets that wildcard entry is referring to. Prefix-lists, for the way my brain is wired, immediately register with the ol’ gray matter.

There are 2 elements that make up a prefix list:

  • The route prefix itself – in other words, the subnet. “Prefix” in the sense that it’s the first part of the network address.
  • The prefix length – in other words, the subnet mask. “Length” in the sense that you know how much of that network address belongs to the prefix.

So let’s take an example prefix list and pick it apart. Consider this:

ip prefix-list myPrefixList seq 10 permit
ip prefix-list myPrefixList seq 20 permit le 24
ip prefix-list myPrefixList seq 30 permit ge 16 le 24

Here we’ve created a prefix-list called “myPrefixList”. It is sequenced by 10’s. We could insert a new sequence number of 15 later, or delete entry 20, just like in an access list. (Although, I don’t know of a way that you can resequence a prefix-list, which is UNLIKE an access list.) In this list, the following networks would match the prefix list:

  • An exact match of
  • Any networks falling in the range of that have a /24 or shorter mask. Ergo, would match. would match. would NOT match.
  • Any network falling in the range of with a mask length between and included 16 and 24 would match. But /9’s would not match; /27’s would not match either.
By Ethan Banks
Ethan Banks On productivity.

You probably know Ethan Banks because he writes & podcasts about IT. For example, he co-authored "Computer Networks Problems & Solutions" with Russ White.

This site is Ethan on productivity--not tech so much.

Find out more on his about page.