cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
890
Views
5
Helpful
3
Replies

Understanding a prefix list

Andrew White
Level 2
Level 2

Hello,

 

I'm trying to remember how a prefix list works.  On a router of ours we have:

 

ip prefix-list BGP-ACCEPT-FROM-A-to-B

seq 5 permit 10.0.0.0/13 le 32
seq 10 permit 10.8.0.0/16 le 32

 

What routes does this exactly permit?

 

Thanks

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Andrew,

seq 5 permit 10.0.0.0/13 le 32

This permits every subnet of 10.0.0.0/13 = 10.0.0.0/255.248.0.0 whose own netmask is between /13 and /32 inclusive, that is, 255.248.0.0 and 255.255.255.255. In essence, this is every possible valid subnet falling into the range of 10.0.0.0 - 10.7.255.255.

seq 10 permit 10.8.0.0/16 le 32

This permits every subnet of 10.8.0.0/16 = 10.8.0.0/255.255.0.0 whose own netmask is between /16 and /32 inclusive, that is, 255.255.0.0 and 255.255.255.255. In essence, this is every possible valid subnet falling into the range 10.8.0.0 - 10.8.255.255.

Best regards,
Peter

View solution in original post

3 Replies 3

Peter Paluch
Cisco Employee
Cisco Employee

Hi Andrew,

seq 5 permit 10.0.0.0/13 le 32

This permits every subnet of 10.0.0.0/13 = 10.0.0.0/255.248.0.0 whose own netmask is between /13 and /32 inclusive, that is, 255.248.0.0 and 255.255.255.255. In essence, this is every possible valid subnet falling into the range of 10.0.0.0 - 10.7.255.255.

seq 10 permit 10.8.0.0/16 le 32

This permits every subnet of 10.8.0.0/16 = 10.8.0.0/255.255.0.0 whose own netmask is between /16 and /32 inclusive, that is, 255.255.0.0 and 255.255.255.255. In essence, this is every possible valid subnet falling into the range 10.8.0.0 - 10.8.255.255.

Best regards,
Peter

Thanks so much Peter I now fully understand how they work!

Andrew,

You are very much welcome!

Years back, I have summed up the behavior and operation of prefix-lists in the thread below - but I must admit that while the article is likely exhaustive, it's also exhausting to read :) But maybe you would still be interested in checking it out, just to get a comprehensive overview.

https://supportforums.cisco.com/t5/lan-switching-and-routing/ip-prefix-list-with-le-ge-options/m-p/1739410/highlight/true#M183312

Thanks again!

Best regards,
Peter

Review Cisco Networking for a $25 gift card