cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11443
Views
26
Helpful
4
Replies

IP prefix-list ge 16 vs le 32

Enri_1
Level 1
Level 1

Hi everybody,

 

Sorry if this seems a little easy to you. My question,

are these the same?

ip prefix-list 172.16.0.0/16 ge 16

ip prefix-list 172.16.0.0/16 le 32

 

Thank you in advance

4 Replies 4

pieterh
VIP
VIP

ip prefix-list 172.16.0.0/16 ge 16
ip prefix-list 172.16.0.0/16 le 32

I see a difference don't you?  

maybe you overlook the "ge 16" or "le 32" this is an additional condition that refers to the subnet mask of the origin

so 172.16.0.0/16 le 32 are all single ip addresses like 172.16.0.1/32 172.16.0.2/32 172.16.0.3/32 ......… 172.16.10.1/32 etc.

172.16.0.0/16 ge 16 are subnets which include 172.16.0.0/16 172.16.0.0/14 172.16.0.0/10 and many others

 

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

le (less than or equal to)

ip prefix-list 172.16.0.0/16 le 32 matches 172.16.0.0/16 and all prefixes length up to 32. (17, 18, 19, 20.....32)

 

ip prefix-list 172.16.0.0/16 ge 16 is just that network and it is the same as 172.16.0.0/16

 

HTH

 

>ip prefix-list 172.16.0.0/16 ge 16 is just that network and it is the same as 172.16.0.0/16

 

ge being greater than, should that not match 172.16.0.0/16 and all prefixes length up to 32. (17, 18, 19, 20.....32)

Harold Ritter
Cisco Employee
Cisco Employee

Hi @Enri_1 ,

 

Technically, these two prefix lists are indeed equivalent. They will both accept prefixes 172.16.0.0/16 through 172.16.0.0/32. 

 

One thing to note though is that the first one would be rejected by IOS with the following error message:

 

R1(config)#ip prefix-list pl1 permit 172.16.0.0/16 ge 16
% Invalid prefix range for 172.16.0.0/16, make sure: len < ge-value <= le-value

 

So you would need to configure it as follow:

 

ip prefix-list pl1 permit 172.16.0.0/16 ge 17

in which case it would match prefixes 172.16.0.0/17 through 32

 

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
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