Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

Using Standard ACL's to Block Even and Pass Odd Ip Addresses

I would like to know if anyone has encountered a problem of setting up a Standard ACL on a range of subnets to deny even numbered IP addresses while allowing odd numbered IP addresses to be contacted.

3 REPLIES

Re: Using Standard ACL's to Block Even and Pass Odd Ip Addresses

Hi,

do you mean something like

access-list 1 permit 0.0.0.1 255.255.255.254 ?

This ACL checks only the last bit in the source IP address and permits the packets having this bit equal to 1 (odd numbers).

Or if you want to permit odd addresses from a.b.c.0/24, use

access-list 1 permit a.b.c.1 0.0.0.254

General rule: ACL checks only that bits in IP address which are 0 in the wildcard used.

If you need to check the destination address use similar form of extended ACL.

Regards,

Milan

Community Member

Re: Using Standard ACL's to Block Even and Pass Odd Ip Addresses

Thanks Milan; I see what you are saying. I appreciate your help on this. So the 255.255.255.254 will check any ip address with the last bit 1 and the other form; 0.0.0.254 will check a specific range of addresses and allow only the odd numbers in the range to go thru. Very nice. Thanks again.

Mark

Community Member

Re: Using Standard ACL's to Block Even and Pass Odd Ip Addresses

Here's another example:

http://ertw.com/faq/cache/45.html

Joe

2658
Views
5
Helpful
3
Replies
CreatePlease to create content