Try this:


Given:  172.88.99.0/32

You want to permit only even-numbered addresse and deny odd number
addresses of the subnet 

!  The following line will permit all even numbered addresses. 
access-list 1 permit 172.88.99.0 0.0.0.254    

! The following line will deny all odd numbered addresses.
access-list 1 deny 172.88.99.1 0.0.0.254

!  Finally, assuming you want to permit everything else.
access-list 1 permit any


Here's the math (I am focusing on the 4th octet only).  The key to
matching even/odd addresses is the last bit (1) of the octet.  This is
just one way to do it.

1. Matching Even numbers.
First, break it down into binary

0000 0000   = 0 (4th octet of 172.88.99.0)
1111 1110   = 254 (4th octet of the wildcard mask).


Remeber that 1 means don't care, 0 means must match.  In the example
above,  the last bit of the 4th octet must be 0, (that is, if the last
bit is turned on, it will not match the above, and will therefore not be
permitted).

2. Matching Odd numbers.

0000 0001   = 1 (4th octet of 172.88.99.1)
1111 1110   = 254 (4th octet of the wildcard mask).

The last bit (1) must be turned on.  Since 1 must be turned on, this
will be match all odd numbered addresses.


That is a quick answer for a MOnday morning.

HTH,

Charles


-----Original Message-----
From: [EMAIL PROTECTED] ("Raymond Everson (Rainman)")
[mailto:[EMAIL PROTECTED]]
Posted At: Saturday, June 24, 2000 9:20 AM
Posted To: cisco
Conversation: ACL Question
Subject: ACL Question


*Still* haven't figured this one out:

Create an IP ACL, in as few lines as possible of course, which permits
only even-numbered IP addresses.

Ideas?

Rainman

___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]
---

___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to