cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
16483
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
Spotlight
Spotlight

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)