From: Fahad Khan (fahad.khan@gmail.com)
Date: Sun Aug 31 2008 - 07:01:55 ART
Let say we have 1.1.1.0/24 as u mentioned,
The game will be played over last octet, in fact the least significant bit
of last octet,
If it is 0, the IP address will be Even
If it is 1, the IP address will be Odd
For example,
1.1.1.00000001 = 1.1.1.1 - odd
1.1.1.00000011 = 1.1.1.3 - odd
1.1.1.00000010 = 1.1.1.2 even
1.1.1.00000100 = 1.1.1.4 even
Etc
Here the wild card bits must be used trickily
*For all Even*,
The IP address will be 1.1.1.0
With the wild card mask as 0.0.0.254
254 = 11111110
Here, 0 means DO CARE of the last bit in IP address (must be ZERO)
Eventually, ACL will be "permit 1.1.1.0 0.0.0.254"
*For all odd*,
The IP address will be 1.1.1.1
With the wild card mask as 0.0.0.25
254 = 11111110
Here, 0 means DO CARE of the last bit in IP address (must be ONE)
Eventually, ACL will be "permit 1.1.1.1 0.0.0.254"
On 8/31/08, Ashish . <invent.xr@gmail.com> wrote:
>
>
> Hi Farhad,
>
> I understood the logic u used in this particular prob....however i'm not
> able to figure out the way to use the same logic in the age old questions
>
> a: permit all odd ip
> b: permit all even ip
>
> can you help me understand the above two in say 1.1.1.0/24 .
>
> thanks in advance,
> Ashish
>
>
>
>
>
>
> On 8/30/08, Fahad Khan <fahad.khan@gmail.com> wrote:
>>
>> The actual game is of 3rd octat in this case.
>>
>> starting IP = x.x.4.0
>> ending IP = x.x.15.0
>>
>> Four most significant bits are common in the 3rd octat i.e 0000
>>
>> so we have 0100 (4) and 1111(15) for our play
>>
>> now for calculating IP in accesslist,
>>
>> perform AND operation in between, 0100 and 1111
>>
>> 0100
>> 1111
>> -------
>> 0100 = 4
>> -------
>> Hence, the IP is decided now as x.x.4.0
>>
>> Now for calculation of wildcard mask, perform XOR operation
>>
>> 0100
>> 1111
>> -------
>> 1011 = 11
>> -------
>>
>> Rules for XOR:
>>
>> - For same number of inputs output is 0 otherwise 1
>> - For even number of 1s output is 0 while for odd number of 1s output is
>> 1.
>>
>> hense you get the ACL as:
>>
>> permit x.x.4.0 0.0.11.0
>>
>>
>> HTH
>> On 8/30/08, ashhy <mail4hafiz@gmail.com> wrote:
>> >
>> > Hi all
>> > i want to know how to get this right acl for the below mentioned
>> question
>> >
>> > i can use only one acl to do this ,i am getting 16 routes of class c
>> > from xxx.xxx.1.0 to xxx.xxx.16.0
>> > from backbone out of which i should allow only
>> >
>> > xxx.xxx.4.0
>> > xxx.xxx.5.0
>> > xxx.xxx.6.0
>> > xxx.xxx.7.0
>> > xxx.xxx.12.0
>> > xxx.xxx.13.0
>> > xxx.xxx.14.0
>> > xxx.xxx.15.0
>> >
>> > please guide me or else suggest if this is already disscussed.
>> >
>> > Thanks
>> > Asshy
>> >
>> >
>> > Blogs and organic groups at http://www.ccie.net
>> >
>> > _______________________________________________________________________
>> > Subscription information may be found at:
>> > http://www.groupstudy.com/list/CCIELab.html
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>> --
>> Fahad Khan
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>
>>
>>
>>
>>
>>
>
-- Fahad KhanBlogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Mon Sep 01 2008 - 08:15:33 ART