RE: Help - Prefix-list

From: Jonathan V Hays (jhays@jtan.com)
Date: Sun Oct 26 2003 - 22:38:18 GMT-3


For a class A address the leftmost bit in the IP address must equal 0,
by definition. Similarly, class B requires 10, C requires 110.

A: 0
B: 10
C: 110

HTH,

Jonathan

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Mac
Sent: Sunday, October 26, 2003 7:53 PM
To: Brian McGahan; ccielab@groupstudy.com
Subject: Re: Help - Prefix-list

Hi, Brian,
Thank you so much for such clear explanation. I have never seen such
good
interpretation before in terms of ip prefix-list . Thanks.

I just don't understand the digit 1 after 0.0.0.0/ in your example
below.
Could you please explain it a bit more? Thanks indeed,

========================================
Ip prefix-list CLASS_A permit 0.0.0.0/1 ge 8 le 8

This matches all class A addresses with classful masks. It means:
Check the first bit of the prefix, it must be a 0.
The subnet mask must be greater than or equal to 8, and less than or
equal to 8. (It is exactly 8)
=========================================

Cheers,

++++
MAC
++++

----- Original Message -----
From: "Brian McGahan" <bmcgahan@internetworkexpert.com>
To: "'Silvio Nunes'" <silvio_98@hotmail.com>; <ccielab@groupstudy.com>
Sent: Monday, October 27, 2003 10:07 AM
Subject: RE: Help - Prefix-list

> Silvio,
>
> Prefix-lists are used to match on prefix and prefix-length
> pairs. Normal prefix-list syntax is as follows:
>
> Ip prefix-list LIST permit w.x.y.z/len
>
> Where w.x.y.z is your exact prefix
> And where len is your exact prefix-length
>
> "Ip prefix-list LIST permit 1.2.3.0/24" would be an exact match for
the
> prefix 1.2.3.0 with a subnet mask of 255.255.255.0. This does not
match
> 1.2.0.0/24, nor does it match 1.2.3.4/32, nor anything in between.
>
> When you add the keywords "GE" and "LE" to the prefix-list, the "len"
> value changes its meaning. When using GE and LE, the len value
> specifies how many bits of the prefix you are checking, starting with
> the most significant bit.
>
> Ip prefix-list LIST permit 1.2.3.0/24 le 32
>
> This means:
> Check the first 24 bits of the prefix 1.2.3.0
> The subnet mask must be less than or equal to 32
>
> This equates to the access-list syntax:
> Access-list 1 permit host 1.2.3.0
>
>
> Ip prefix-list LIST permit 0.0.0.0/0 le 32
>
> This means:
> Check the first 0 bits of the prefix 0.0.0.0
> The subnet mask must be less than or equal to 32
> This equates to anything
>
>
> Ip prefix-list LIST permit 0.0.0.0/0
>
> This means:
> The exact prefix 0.0.0.0, with the exact prefix-length 0.
> This is matching a default route.
>
>
> Ip prefix-list LIST permit 10.0.0.0/8 ge 21 le 29
>
> This means:
> Check the first 8 bits of the prefix 10.0.0.0
> The subnet mask must be greater than or equal to 21, and less than or
> equal to 29.
>
>
> Ip prefix-list CLASS_A permit 0.0.0.0/1 ge 8 le 8
>
> This matches all class A addresses with classful masks. It means:
> Check the first bit of the prefix, it must be a 0.
> The subnet mask must be greater than or equal to 8, and less than or
> equal to 8. (It is exactly 8)
>
>
> When using the GE and LE values, you must satisfy the condition:
>
> Len < GE <= LE
>
> Therefore:
> Ip prefix-list LIST permit 1.2.3.0/24 ge 8
> Is not a valid list.
>
>
> What you can not do with the prefix-list is match on arbitrary bits
like
> you can in an access-list. Prefix-lists cannot be used to check if a
> number is even or odd, nor check if a number is divisible by 15,
etc...
> Bit checking in a prefix-list is sequential, starting with the most
> significant (leftmost) bit.
>
>
> HTH,
>
> Brian McGahan, CCIE #8593
> bmcgahan@internetworkexpert.com
>
> Internetwork Expert, Inc.
> http://www.InternetworkExpert.com
> Toll Free: 877-224-8987
> Direct: 708-362-1418 (Outside the US and Canada)
>
>
> > -----Original Message-----
> > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
> Of
> > Silvio Nunes
> > Sent: Sunday, October 26, 2003 4:51 PM
> > To: ccielab@groupstudy.com
> > Subject: Help - Prefix-list
> >
> > Hi all,
> >
> > I4m having some dificcults to found any kind of material regarding
> > prefix-list to undertand how it works.
> > I still didn4t understand very well the function and when to use
> ge/le.
> >
> > Do you know some interesting material or tip ?
> >
> > Regards,
> >
> > _________________________________________________________________
> > MSN Messenger: converse com os seus amigos online.
> > http://messenger.msn.com.br
> >
> >
>



This archive was generated by hypermail 2.1.4 : Mon Nov 24 2003 - 07:53:08 GMT-3