02-28-2019 11:44 AM
I know the whole wildcard mask odd/even matching thing has been discussed and the info is out there for the finding. But as I was digging a little deeper, I came up with a couple of questions I could not find satisfactory answers for. This is really just a mental exercise, but I'm hoping someone out there knows:
1. Can odd/even matching be extended (at the bit level) to 'weirder' levels? For example, if for some really weird, deep-state, tin-foil hat reason you wanted to match only addresses from the 192.168.10.0/24 subnet whose last 2 (least significant) bits were 0 (e.g. every 4th useable IP address)...
In which:
The wildcard mask would be 0.0.0.252 (252 = 11111100)
Such that:
The ACL would be:
access-list 1 perit 192.168.10.0 0.0.0.252
Would this work the way I'm thinking it would?
2. When using this 'trick' to match on addresses or subnets, does it start from the address or subnet you specify and go up?
For example - if I wanted to match all EVEN addresses from the 192.168.10.0/24 network, and I created the following:
access-list 1 permit 192.168.10.0 0.0.0.254
it would match 192.168.10.2, 192.168.10.4, 192.168.10.6...and so on through .254
BUT, if I were to create:
access-list 1 permit 192.168.10.28 0.0.0.254
would it start from 192.168.10.28 and go to 192.168.10.30, 192.168.10.32...etc, up to .254?
Thanks in advance!
Solved! Go to Solution.
02-28-2019 12:27 PM - edited 02-28-2019 12:28 PM
1) Yes to what you say.
2) My first instinct was it would match every even subnet in the 192.168.10.0/24 network but wasn't sure so I did a quick lab and it does indeed match every even subnet starting at 192.168.10.2.
Jon
02-28-2019 12:27 PM - edited 02-28-2019 12:28 PM
1) Yes to what you say.
2) My first instinct was it would match every even subnet in the 192.168.10.0/24 network but wasn't sure so I did a quick lab and it does indeed match every even subnet starting at 192.168.10.2.
Jon
02-28-2019 12:49 PM
03-01-2019 10:00 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide