06-11-2009 08:04 AM - edited 03-04-2019 05:05 AM
Hi, I have to open 112.0.0.0/8, 113.0.0.0/8,114.0.0.0/8,115.0.0.0/8,116.0.0.0/8,117.0.0.0/8,118.0.0.0/8 & 119.0.0.0/8 in Prefix list, but in one line. Please help how can I use le & ge funda for that. I need to use only one line.
06-11-2009 09:05 AM
Rupesh,
These 8 prefixes all fit inside 112/5 as the first 5 bits are identical.
The following line should therefore do the job.
ip prefix-list test seq 5 permit 112.0.0.0/5 ge 8 le 8
Regards
06-17-2009 08:20 AM
what about if all subnet mask will 24 ?
Should prefix list like-
ip prefix-list test seq 5 permit 112.0.0.0/5 ge 24 le 24 ?
06-17-2009 12:40 PM
If they're not ever going to be longer than 24, you should be able to do:
ip prefix-list test permit 112.0.0.0/5 le 24
HTH,
John
06-17-2009 12:43 PM
Rupesh,
That is correct. Only the /24 subnets will match.
Regards
06-17-2009 12:46 PM
Harold,
I'm just getting into the prefix-lists. Would you be able to just use the le 24 to match up to 24 bits? You wouldn't need the ge 24, right? Or am I wrong on this?
Thanks,
John
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