cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
756
Views
0
Helpful
2
Replies

IP Prefix List

nostosalgos
Level 1
Level 1

Hi every body
I have a question, please how do wirite a prefix list with network 10.x.84.0/22?, in ACL is 10.0.84.0 0.255.0.0 but prefix-list?

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

Short answer - it's not possible with a prefix list, at least not with a single entry in the prefix list. Every entry in a prefix list requires that a certain contiguous prefix of an address is fixed at a constant value. But in your example of 10.x.84.0/22, you don't have such a contiguous prefix with a constant value - the second octet is variable, yet you want to match across the first, second, and 6 bits of the third octet. That can't be done with a single prefix list entry.

You could expand it into 256 lines of the style

ip prefix-list PL permit 10.0.84.0/22
ip prefix-list PL permit 10.1.84.0/22
ip prefix-list PL permit 10.2.84.0/22
...
ip prefix-list PL permit 10.254.84.0/22
ip prefix-list PL permit 10.255.84.0/22

but this is admittedly awkward.

Best regards,
Peter

 

View solution in original post

2 Replies 2

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

Short answer - it's not possible with a prefix list, at least not with a single entry in the prefix list. Every entry in a prefix list requires that a certain contiguous prefix of an address is fixed at a constant value. But in your example of 10.x.84.0/22, you don't have such a contiguous prefix with a constant value - the second octet is variable, yet you want to match across the first, second, and 6 bits of the third octet. That can't be done with a single prefix list entry.

You could expand it into 256 lines of the style

ip prefix-list PL permit 10.0.84.0/22
ip prefix-list PL permit 10.1.84.0/22
ip prefix-list PL permit 10.2.84.0/22
...
ip prefix-list PL permit 10.254.84.0/22
ip prefix-list PL permit 10.255.84.0/22

but this is admittedly awkward.

Best regards,
Peter

 

Thanks, that's right I must be filter with ACL STANDARD.

Review Cisco Networking for a $25 gift card