Prefix-List

Unanswered Question
Jun 11th, 2009
User Badges:

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Harold Ritter Thu, 06/11/2009 - 09:05
User Badges:
  • Cisco Employee,

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

Rupesh Kashyap Wed, 06/17/2009 - 08:20
User Badges:

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 ?

John Blakley Wed, 06/17/2009 - 12:40
User Badges:
  • Purple, 4500 points or more

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

Harold Ritter Wed, 06/17/2009 - 12:43
User Badges:
  • Cisco Employee,

Rupesh,


That is correct. Only the /24 subnets will match.


Regards

John Blakley Wed, 06/17/2009 - 12:46
User Badges:
  • Purple, 4500 points or more

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

Actions

This Discussion