09-16-2021 05:42 PM
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?
Solved! Go to Solution.
09-16-2021 06:22 PM
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
09-16-2021 06:22 PM
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
09-23-2021 04:53 PM
Thanks, that's right I must be filter with ACL STANDARD.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide