RE: Access-list question - Allowing even and odd numbers in 3rd

From: mani poopal (mani_ccie@yahoo.com)
Date: Sun Apr 17 2005 - 09:18:59 GMT-3


Guys I know this question is already discussed but pay attention to the wild card bits in the access-list
access-list 5 permit 0.0.1.0 0.0.254.0 is wrong
it should be
access-list 5 permit 0.0.1.0 255.255.254.255 [it is 255 and not 0]
 
Mani

Anthony Liu <zodiak@hawaii.rr.com> wrote:
If you want to permit all odds in the 3rd octet, it should be :

Access-list 5 permit 0.0.1.0 0.0.254.0

I've never been good at explaining ACL's but i'll try anyways ;)

The reason being, is as long as the 8th value of the third octet is 1, the
number will be odd, indicated by the 1(00000001) in the 3rd octect of the
first number. The second number determines which values to change, and
which to remain constant(1's representing wildcard's, and 0's representing
constants)... in this case the 254 in binary is 11111110, meaning the first
7 values can change in the first number, but not the 8'th(which will keep
the number odd) allowing all possible odds.

Anthony

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
Lee Donald
Sent: Sunday, April 17, 2005 1:13 AM
To: ccielab@groupstudy.com
Subject: Access-list question - Allowing even and odd numbers in 3rd
octet -

Can anyone put some more logic to this for me, I'm having a bad brain day.

I need to allow all odd numbers in the 3rd octet in via an access-list which
I know is

Access-list 5 permit 0.0.0.0 0.0.252.0

Then I tried to let just the evens in but got confused, and couldn't get my
dough brain round it.

Can anybody remind me of this and the way it works?

Thanks in advance.

Regards

Lee.



This archive was generated by hypermail 2.1.4 : Tue May 03 2005 - 07:54:59 GMT-3