10-15-2012 01:05 PM - edited 03-04-2019 05:51 PM
Hello,
I would like to filter BGP routes using a route map and ip prefix list but am curious what is the best methid to accomplish the following:
I want the prefix list to filter out these networks:
172.39.8.0/24
172.39.8.0/25
172.39.8.0/26
172.39.8.0/27
172.39.8.0/28
172.39.8.0/29
172.39.8.0/30
Which option makes the most sense: (if either)
seq 50 permit 172.39.8.0/24
seq 51 permit 172.39.8.0/24 ge 25
or
seq 50 permit 172.39.8.0/23 ge 24
Thanks,
Bill
Solved! Go to Solution.
10-15-2012 01:09 PM
Hi Bill,
The most simple way of doing this is by having the prefix-list in the form:
seq 50 permit 172.39.8.0/24 le 30
This says that the network which will be matched must be either the 172.39.8.0/24 or any subnet thereof, and the mask at the same time must be between /24 and /30 inclusive.
Does this meet your needs?
Best regards,
Peter
10-15-2012 01:14 PM
Hello Bill,
first option would be preferred as the second one would match also for any 192.168.9.0/x x >= 24 so it less specific.
Personally I would use
seq 50 permit 192.168.8.0/24 le 32
to be sure that any prefix within 192.168.8./24 included the base block 192.168.8.0/24 is a match
Hope to help
Giuseppe
10-15-2012 01:09 PM
Hi Bill,
The most simple way of doing this is by having the prefix-list in the form:
seq 50 permit 172.39.8.0/24 le 30
This says that the network which will be matched must be either the 172.39.8.0/24 or any subnet thereof, and the mask at the same time must be between /24 and /30 inclusive.
Does this meet your needs?
Best regards,
Peter
10-15-2012 01:14 PM
Hello Bill,
first option would be preferred as the second one would match also for any 192.168.9.0/x x >= 24 so it less specific.
Personally I would use
seq 50 permit 192.168.8.0/24 le 32
to be sure that any prefix within 192.168.8./24 included the base block 192.168.8.0/24 is a match
Hope to help
Giuseppe
10-15-2012 02:04 PM
Thanks guys - didnt even occur to me to use le vice ge for this...guess I need to increase my caffeine intake today
10-15-2012 02:12 PM
Bill,
A good sleep is better than any amount of coffee Having a good deserved rest is a must. Anyway, we're glad to have helped!
Best regards,
Peter
10-15-2012 02:15 PM
Lol - I work in the financial sector - sleep is not permitted
Thanks again for the help!
Bill
10-15-2012 02:26 PM
Bill,
Lol - I work in the financial sector - sleep is not permitted
I am a teacher - how well I know what you're talking about Take care!
Best regards,
Peter
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