RE: IP PREFIX-LIST HELP!

From: Brian McGahan (brian@xxxxxxxxxxxxxxx)
Date: Fri Aug 16 2002 - 13:30:55 GMT-3


   
Relax guys.

        Regarding the subject of address class, remember that the class
of an address has nothing to do with the subnet mask. The first four
most significant bits determine the class of an address. As I stated
before, these values are:

Class A: 0xxxxxxx
Class B: 10xxxxxx
Class C: 110xxxxx
Class D: 1110xxxx
Class E: 1111xxxx

        Suppose we have three address prefixes:

10.0.0.0/8
16.0.0.0/4
31.0.0.0/31

        Regardless of their subnet mask, in binary terms these prefixes
are all Class A networks. Although one is an aggregate, one is a
"classful" network, and one is a subnet, they are all Class A addresses.

        Now depending on what you're asking, you can come up with
different interpretations. If you are asking "match *all* class B
addresses", the syntax would be:

Ip prefix-list ALL_CLASS_B permit 128.0.0.0/2 le 32

        This syntax is saying:
                Check the first 2 bits of the prefix 128.0.0.0
                The mask must be less than or equal to 32 (everything)

        Therefore, this is matching all prefixes for which the most
significant bits are 10, and are therefore class B.

        Now, if you're asking to match class B addresses with classful
masks (255.255.0.0), without matching any aggregates or subnets, your
syntax would be:

Ip prefix-list CLASS_B_ONLY_CLASSFUL_MASK permit 128.0.0.0/2 ge 16 le 16

This syntax is saying:
                Check the first 2 bits of the prefix 128.0.0.0
                The mask must be greater than or equal to 16
                The mask must also be less than or equal to 16 (exactly
16)

        As for reference sources on this topic, I can't help you. It's
just binary logic.

HTH

Brian McGahan, CCIE #8593
Director of Design and Implementation
brian@cyscoexpert.com

CyscoExpert Corporation
Internetwork Consulting & Training
http://www.cyscoexpert.com
Voice: 847.674.3392
Fax: 847.674.2625

> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> Graham, John
> Sent: Friday, August 16, 2002 5:08 AM
> To: 'Khalid Siddiq'; EbonyGuru@aol.com; brian@cyscoexpert.com;
> chaimgev@hotmail.com; ciscojunkie@teamhealth.com;
ccielab@groupstudy.com
> Subject: RE: IP PREFIX-LIST HELP!
>
> I think you'll find it was a joke.
>
> A concept called humour.
>
> -----Original Message-----
> From: Khalid Siddiq [mailto:khalid@sys.net.pk]
> Sent: 16 August 2002 11:03
> To: EbonyGuru@aol.com; brian@cyscoexpert.com; chaimgev@hotmail.com;
> ciscojunkie@teamhealth.com; ccielab@groupstudy.com
> Subject: RE: IP PREFIX-LIST HELP!
>
>
> Dear all,
> please don,t use these types of hard words,its look like some kind of
> professional jealousy.
> i have tested this prefix-list in my lab and its working fine.
>
>
> Class A : ip prefix-list k seq 5 permit 0.0.0.0/1 ge 8 le 8
> Class B : ip prefix-list k seq 10 permit 128.0.0.0/2 ge 16 le 16
> Class C : ip prefix-list k seq 15 permit 192.0.0.0/3 ge 24 le 24
>
>
> Please correct if i miss something.
> regards,
> khalid
> -----Original Message-----
> From: EbonyGuru@aol.com [mailto:EbonyGuru@aol.com]
> Sent: Friday, August 16, 2002 4:29 AM
> To: brian@cyscoexpert.com; chaimgev@hotmail.com;
> ciscojunkie@teamhealth.com; ccielab@groupstudy.com
> Subject: Re: IP PREFIX-LIST HELP!
>
>
> Hey Brian,
>
> Surely you know it is dangerous to play mental games with someone that
has
> been sucked into the mental vortex thatis called 2 days before your
lab.
>
> So, thanks for your help but you must finish what you started.
>
> I believe what you meant to type was the following:
>
> Ip prefix-list CLASS_A permit 0.0.0.0/0 ge 0 le 8
>
> and not:
>
> Ip prefix-list CLASS_A permit 0.0.0.0/1 ge 8 le 8 --- please comment
on
> my
> correction.
>
> You have been a great help so far so now please do one of two things,
> finish
>
> all the classes or refer me to a reliable reference.
>
> So you dont think I am lazy, this is my revised idea of class B
filter:
>
> ip prefix-list CLASS_B permit 128.0.0.0/8 ge 8 le 16 ....and so on.
>
> Class C:
>
> ip prefix-list CLASS_B permit 192.0.0.0/16 ge 16 le 24
>
> correct, or way off?
>
> Now bro, end this and quit playing---- :-)
>
> TIA,
>
> E'Guru
>
>
> In a message dated 15/08/2002 14:39:06 GMT Daylight Time,
> brian@cyscoexpert.com writes:
>
>
> > Subj:RE: IP PREFIX-LIST HELP!
> >
> >
> > Unfortunately no one has gotten it right in this thread yet. If
> > you write out the classes in binary, you can see that all class A
> > addresses start with a 0 (most significant bit), all class B with
10,
> > class C, 110, class D 1110, class E 1111. It's the first 4 most
> > significant bits that determine the class of an address.
> >
> > To match on classful networks, we not only have to match on the
> > prefix, but also the prefix-length. Therefore, to accept only
classful
> > networks, all class A's would have to have a mask of 8, B 16, C 24,
etc.
> > This can be accomplished with either a prefix-list or an extended
> > access-list. Suppose we are matching class A addresses. The first
bit
> > must be 0, and the mask must be 8.
> >
> > Ip prefix-list CLASS_A permit 0.0.0.0/1 ge 8 le 8
> > access-list 100 permit 0.0.0.0 127.0.0.0 host 255.0.0.0
> >
> > The prefix-list syntax reads:
> >
> > Check against the first bit of 0.0.0.0
> > The mask is greater than or equal to 8
> > The mask is also less than or equal to 8 (exactly 8)
> >
> > Access-list syntax reads basically the same.
> >
> > Check the first bit, it must be 0
> > The mask is exactly 8
> >
> > I don't want to spoil all the fun, so let's see if you guys can come
up
> > with the syntax for class B and class C.
> >
> > HTH
> >
> > Brian McGahan, CCIE #8593
> > Director of Design and Implementation
> > brian@cyscoexpert.com
> >
> > CyscoExpert Corporation
> > Internetwork Consulting & Training
> > http://www.cyscoexpert.com
> > Voice: 847.674.3392
> > Fax: 847.674.2625
> >
> >
> > -----Original Message-----
> > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> > Chaim Gev
> > Sent: Thursday, August 15, 2002 7:51 AM
> > To: ciscojunkie@teamhealth.com; EbonyGuru@aol.com;
> > ccielab@groupstudy.com
> > Subject: Re: IP PREFIX-LIST HELP!
> >
> > and what about subnets of the callas B networks?
> >
> >
> > >From: "CiscoJunkie" <ciscojunkie@teamhealth.com>
> > >Reply-To: "CiscoJunkie" <ciscojunkie@teamhealth.com>
> > >To: <EbonyGuru@aol.com>, <ccielab@groupstudy.com>
> > >Subject: Re: IP PREFIX-LIST HELP!
> > >Date: Thu, 15 Aug 2002 07:59:47 -0400
> > >
> > >I hate to sound TOO logical, but if you are asked to "filter all
class
> > B
> > >nets" (allow in our deny them in??), would it not simply just be:
> > >
> > >"ip refix-list zib seq 10 (permit or deny) 0.0.0.0/16"
> > >
> > >----- Original Message -----
> > >From: <EbonyGuru@aol.com>
> > >To: <ccielab@groupstudy.com>
> > >Sent: Thursday, August 15, 2002 4:57 AM
> > >Subject: IP PREFIX-LIST HELP!
> > >
> > >
> > > > Hey Guys,
> > > >
> > > > Can someone please help me check if this is correct:
> > > >
> > > >
> > > > To filter all class B nets:
> > > >
> > > > ip prefix-lis zib seq 10 permit 0.0.0.0/0 ge 16 le 24
> > > >
> > > > Please also tell me where to find a reference with configuration
> > >examples.
> > > >
> > > > TIA.
> > > >
> > > > E'Guru
> > > >



This archive was generated by hypermail 2.1.4 : Sat Sep 07 2002 - 19:48:27 GMT-3