amb1s1 wrote: » If I do that I only match these routes: D 192.168.1.0/24 [90/130816] via 173.35.33.100, 00:00:47, Vlan999 D 192.168.2.0/24 [90/130816] via 173.35.33.100, 01:52:54, Vlan999 Which, I'm more confused.
amb1s1 wrote: » But why this access-list(access-list 1 permit 192.168.2.0 0.0.4.255) is not catching the 192.168.5.0 network? if it is catching the 192.168.6.0 network
theodoxa wrote: » The Wildcard Mask. Normally, a Wilcard mask would be all 1s from some point to the end with no interleaved zeroes. But, in this case there are zeroes interleaved between ones. The correct mask would be: 00000000.00000000.00000011.11111111 Notice that there are no zeroes in between any of the ones. The result is that all matches will be consecutive. But, your mask is: 00000000.00000000.00000100.11111111 Because there are zeroes interleaved between ones, the matches won't necessarily be consecutive. 11000000.10101000.00000010.00000000 (192.168.2.0) 11111111.11111111.11111011.00000000 (255.255.251.0 - Subnet Mask matching the WC Mask of 0.0.4.255) 11000000.10101000.00000010.00000000 (192.168.2.0) The first problem is that the incorrect subnet address + incorrect mask results in an incorrect result when ANDED together. So, it is incorrectly starting at 192.168.2.0 instead of 192.168.0.0. Then, the interleaved zeroes cause the ACL to match non-consecutive subnets. Apparently, this is something they actually want you to be able to do [intentionally] on the CCIE. But, at the CCNA/CCNP level, we never use masks with interleaved zeroes.Steven’s Technical Blog » ACL MathsBinary Math - Part IBinary Math, Part IICCIE Practical Studies, Volume I | Access Lists, Wildcard Masks, and Binary Math | InformIT It took a little digging to find the actual algorithm used to test ACLs, but here goes: (Test_IP_Address|| Wildcard_Mask) == (Prefix || Wildcard_Mask) For 192.168.2.0, the Prefix and Test Address are the same, so they will always match. 11000000.10101000.00000010.00000000 (192.168.2.0) 00000000.00000000.00000100.11111111 (0.0.4.255) 11000000.10101000.00000110.11111111 (192.168.6.255) Let's try 192.168.5.0 11000000.10101000.00000101.00000000 (192.168.5.0) 00000000.00000000.00000100.11111111 (0.0.4.255) 11000000.10101000.00000101.11111111 (192.168.5.255) NOT A MATCH Let's move on to 192.168.6.0: 11000000.10101000.00000110.00000000 (192.168.6.0) 00000000.00000000.00000100.11111111 (0.0.4.255) 11000000.10101000.00000110.11111111 (192.168.6.255) MATCH!!!
W Stewart wrote: » Weird, I'm used to working with ASAs at work and all of our access lists use the subnet mask rather than a wild card mask.