Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

ip prefix list - ge le usage

I have a question about the two examples below. From what I can gather is that these two preform the exact same task, that is to deny updates for this network with mask greater than /23.

If this is correct, which is the more standard/preferred practice, ge or le?

ip prefix-list test seq 5 deny 223.223.222.0/23 le 32

ip prefix-list test seq 5 deny 223.223.222.0/23 ge 24

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: ip prefix list - ge le usage

Philip,

Correct. As long as the range you are using is the same (i.e. 16 to 32 for both ge or le), the results will be the same either you use the GE or LE form.

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
6 REPLIES
Cisco Employee

Re: ip prefix list - ge le usage

Philip,

These two commands do not have the same end result.

The first statement would match on prefix 223.223.222.0/23 and the second one would not (ge 24).

As far as your second question is concerned, I would say that there is not one form preferred over the other. It depends on what needs to be accomplished.

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

Re: ip prefix list - ge le usage

thanks for reply,

if the second statement is:

ip prefix-list test seq 5 deny 223.223.222.0/23 ge 23

would this then be an identical statement?

Phil

Cisco Employee

Re: ip prefix list - ge le usage

Phil,

Both statements would indeed match the specific prefix in this case.

Bear in mind that there are still different though.

The way the prefix-list works is that it tries to match the first portion (223.223.222.0/23) to the prefix it self. It then tries to match the second portion (ge 23 or le 32 or /23 if nothing is specified) to the prefix-length. So using ge 23 or le 32 can lead to different results.

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

Re: ip prefix list - ge le usage

I'm working hard to make this click!

This link gives me a good understanding of prefix lists

http://www.groupstudy.com/archives/ccielab/200105/msg00474.html

however it only fortifies my belief that the previous two examples produce the same results.

Another two examples below are listed with more details at which you may easily be able to show me the mistake I make.

I appreciate your replies.

ip prefix-list mylist seq 10 permit 10.64.0.0/16 le 32

This list specifies any subnet within the 10.64.0.0/16 range that has a

mask between /16 and /32, inclusive (255.255.0.0 to 255.255.255.255).

ip prefix-list mylist seq 10 permit 10.64.0.0/16 ge 16

This list specifies any subnet within the 10.64.0.0/16 range that has a

mask of /16 or greater (255.255.0.0 to 255.255.255.255).

Cisco Employee

Re: ip prefix list - ge le usage

Philip,

Correct. As long as the range you are using is the same (i.e. 16 to 32 for both ge or le), the results will be the same either you use the GE or LE form.

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

Hi

Hi

a ´bit´old but since I came across it I thought to add a comment.

regarding: ip prefix-list mylist seq 10 permit 10.64.0.0/16 ge 16

´ge´ can´t be equal to the prefix length. So the statement is not correct.

12078
Views
2
Helpful
6
Replies
CreatePlease to create content