cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
421
Views
0
Helpful
5
Replies

Prefix-List

Rupesh Kashyap
Level 1
Level 1

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.

5 Replies 5

Harold Ritter
Cisco Employee
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

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

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 ?

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

HTH, John *** Please rate all useful posts ***

Rupesh,

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

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

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

HTH, John *** Please rate all useful posts ***
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card