> The way i would approach this is to see what is in common. > > GETTING TO THE SOLUTION > -First octet of the loopbacks on R1 all start with 10 > -who cares about the 2nd Octet > -3rd Octet should be odd > -4th octet needs to be zero > > SOLUTION: > access-list 1 permit 10.0.1.0 0.255.254.0 > > EXPLANATION > > > 1st Octet: 0 wildcard will force octet to match exactly (10) > 2nd Octet: all binary 1's in wild card meaning that they could be anything > 0-255 are acceptable decimal values > 3rd Octet: > > Given Octet: 0000 0001 (1) > Wild Card Mask 1111 1110 (254) > > All 1 bits are don't cares where 0 bits have to match. This says that > first bit of this octet must be 1 which is true for all odd numbers > > 4th Octet: 0 wildcard will force octet to match eactly (0) > > > Aaron > > > > > > > On Wed, Aug 11, 2010 at 10:50 AM, Aryan <[email protected]>wrote: > >> Can Someone please share how to calculate complex wild card for ACLs >> from binary prospective. >> >> I tried doing AND and XOR method but somehow didn't get it rightly. >> >> here is quick requirement those I tested. >> >> R1 - >> >> R1#sh prot | e un|do >> Global values: >> Internet Protocol routing is enabled >> FastEthernet0/0 is up, line protocol is up >> Internet address is 11.11.11.1/24 >> Serial0/0 is up, line protocol is up >> Internet address is 12.12.12.1/24 >> Loopback0 is up, line protocol is up >> Internet address is 10.10.100.1/24 >> Loopback1 is up, line protocol is up >> Internet address is 10.10.101.1/24 >> Loopback2 is up, line protocol is up >> Internet address is 10.10.102.1/24 >> Loopback3 is up, line protocol is up >> Internet address is 10.10.103.1/24 >> Loopback4 is up, line protocol is up >> Internet address is 10.10.104.1/24 >> Loopback5 is up, line protocol is up >> Internet address is 10.10.105.1/24 >> Loopback6 is up, line protocol is up >> Internet address is 10.10.106.1/24 >> >> >> >> R2 - >> >> R2#sh prot | e un|do >> Global values: >> Internet Protocol routing is enabled >> Serial0/0 is up, line protocol is up >> Internet address is 12.12.12.2/24 >> Loopback0 is up, line protocol is up >> Internet address is 22.22.22.22/24 >> >> >> Challenge - Filter all ODD subnets of R1 (loopback ranges) to reach R2's >> Loopback >> >> >> How I tried to solve it is >> >> First convert ODD blocks into binary: >> >> >> 10.10.101.0/24 >> 10.10.103.0/24 >> 10.10.105.0/24 >> >> = >> >> 00001010 00001010 01100101 00000000 >> 00001010 00001010 01100111 00000000 >> 00001010 00001010 01101001 00000000 >> >> >> next step - performed AND operation >> >> AND: >> >> 00001010 00001010 01100101 00000000 >> 00001010 00001010 01100111 00000000 >> 00001010 00001010 01101001 00000000 >> ------------------------------------------------------------- >> 00001010 00001010 01100001 00000000 >> ------------------------------------------------------------- >> >> back in binary - 10.10.97.0 >> >> Next step - Performed XOR operation >> >> XOR: >> >> 00001010 00001010 01100101 00000000 >> 00001010 00001010 01100111 00000000 >> 00001010 00001010 01101001 00000000 >> --------------------------------------------------------------- >> 00000000 00000000 00001110 00000000 >> ---------------------------------------------------------------- >> >> >> back in binary - 0.0.14.0 >> >> >> final net id and wildcard pair comes as - 10.10.97.0 0.0.14.0 >> >> but obviously I am making some mistake some where. >> >> >> Document I referred: - http://www.ine.com/resources/01700370.htm >> >> >> kindly help and suggest the right way with few examples >> >> Thanks! >> Aryan >> >> >> >> >> _______________________________________________ >> For more information regarding industry leading CCIE Lab training, please >> visit www.ipexpert.com >> >> >
_______________________________________________ For more information regarding industry leading CCIE Lab training, please visit www.ipexpert.com
