How to create Complex Wildcard Masks

Hi Bruce,

I used the .10 in the third octet since that’s the first network we try to match. With the 0.0.48.255 wildcard bits we only match on those 4 networks. Let’s zoom in on those 4 networks and the wildcard:

10 = 0000 1010
26 = 0001 1010
42 = 0010 1010
56 = 0011 1010

wc = 0011 0000

by setting all bits to “0” we lock them, only the 3th and 4th bit is allowed to change:

00
01
10
11

Those are the only 4 combinations you can make, resulting in network 192.168.10.0, 192.168.26.0, 192.168.42.0 and 192.168.56.0…nothing else is matched.

Now look at your wildcard (0.0.248.255) :

10 = 0000 1010
26 = 0001 1010
42 = 0010 1010
56 = 0011 1010

wc = 1111 0000

Now only the last 4 bits are “locked” and we are allowed to change the first 4 bits. This wildcard will match the above networks but it also matches a lot of other networks, everything that starts with:

0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1100
1101
1110
1111

So if this was a CCIE lab, you’d have to read the task closely…see if they say “match these 4 networks” or “match ONLY these 4 networks” :slight_smile:

Hope this helps…

Rene

1 Like