# How to calculate wildcard mask? [Easy Way]

July 28, 2011

Some students of Computer Networking especially those appearing in Certification exams such as Cisco Certification Exams or Juniper Certification Exams have problem in calculating wildcard mask. Some know the concept but their method is difficult that might result in wastage of time which may prove to be a problem in certification exams. Also, the wildcard mask is used in extensively in Access Control Lists (ACLs), EIGRP and OSPF, so learning how to calculate wildcard mask is important. We have decided to share a very simple method to calculate the wildcard mask efficiently and hopefully you will not have any ‘how to calculate wildcard mask?’ afterwards.

The method is: first calculate the subnet mask for the network for which you want to find the wildcard mask. Then subtract that subnet mask from 255.255.255.255

An example will explain this method more efficiently.  Consider you have a network of 172.16.1.0/24 and you want to calculate the wildcard mask for it.  We know that the subnet mask for this network is 255.255.255.0 Now we subtract this subnet mask from 255.255.255.255 as follow:

255.255.255.255

–    255.255.255.0

————————-

0.0.0.255

As you can see, 0.0.0.255 is our required wildcard mask. Using this method we can find any wildcard mask easily.

Take another example, if you have network address of 172.16.0.0/20. We know that the subnet mask for this network address is 255.255.240.0

Using the above mentioned method, wildcard mask is:

255.255.255.255

-  255.255.240.0

————————-

0.0.15.255

Wildcard mask, found nice and easy.

If you any comments or questions, put them in comments section and we would be happy to answer them.

• Pojaaa

very easy method…thanks..

• Rajiv Indore

how to find wildcard mask of 1.1.1.1/16 ?
255.255.255.255 – 255.255.0.0 = 0.0.255.255 (this ans is wrong and show value is /32 in next router) how to show /16 in next router
plz  rpy on rg1145@gmail.com

• NerdCrunch

0.0.255.255 is the correct mask for /16.

• Bilal Baig

NerdCrunch ? Then what will be the range of this wildcard mask for the concerning IPs ? Please explain…
given ip : 1.1.1.1 /16
Range: 1.1.1.1 -to- ?.?.?.?

• Randy Forsland

1.1.0.0 to 1.1.255.255

• http://www.nerdcrunch.com NerdCrunch

Thanks

Good to hear that it helped.

• K.Chenchukumar

Simple Way to Understanding  WCM

• Rg1145

how to find wildcard mask of 1.1.1.1/16 ?
plz rpy

• NerdCrunch

0.0.255.255

• jay

what is wild card mask for 10.0.0.3 …pls rply

• http://www.nerdcrunch.com NerdCrunch

Wild Card Mask will be 0.0.0.3

• milky

0.0.0.3

• MildlyInterested

• sam

thank you very much…………….

• milky

what is wild card mask for the range of 10.0.0.16 to 10.0.0.23.. and tell me how???????? thanks rely soon

Answer : 0.0.0.15 description is 10.0.0.16 to 23 uses the 10.0.0.16 Network with the /28 CIDR notation or (subnet mask) of 255.255.255.240 – Formula is 255.255.255.255 – 255.255.255.240 = 0.0.0.15

• Bilal Baig

Eddie Salgado? Can you please tell me, what if I say wildcard mask for the 10.0.0.16 to 10.0.0.23 is 0.0.0.7

• Randy Forsland

Bilal is correct. 10.0.0.16 to 23 is /29,,not /28..so inverse mask is 0.0.0.7

• mike sharma

This is Incorrect.This is network ID. 10.0.0.16 to 23 uses 0.0.0.15 wildcard mask.Eddie Salgado is right

• srivatsa

the wild card mask for 10.0.0.3 is 0.0.0.3 … How?? could u pls explain it ???

• Bilal Baig

srivatsa ? Where did you read or find that 0.0.0.3 is wildcard mask for the IP 10.0.0.3 ?
Can you please share that page with me…? Please don’t mind !

• Bilal Baig

e.g;
192.168.1.255 – 192.168.1.0 = 0.0.0.255
172.16.255.255 – 172.16.0.0 = 0.0.255.255
10.255.255.255 – 10.0.0.0 = 0.255.255.255

In the same way we can calculate wildcard mask for the sub-networks easily. Let say,
you want to calculate wildcard for the IPs in the range :
192.1.1.0 to 192.1.1.127

then your first ip is : 192.1.1.0

• Bilal Baig

Can any body help me to find out the Difference b/w the Wildcard masks using for the OSPF and ACLs ?

I have noticed that in ACL we can give all kinds of wildcard mask.
But, in OSPF we cannot give all kinds of wildcard masks …. Why?

If someone know, then please share your experience with us…Thank you !

If you also want to notice it, then try to use the 0.0.0.62 as wildcard mask in OSPF configuration and also ACL configuration. And after that must share your experience, please !

HINT: Dis-contiguous mask error while ospf configuration but not for the acl configuration

• K Ing Rawezh

what is wildcard for
255.255.254.0?

• erostand premier

Hello
Please which wildcard mask is the most efficient to use when specifying this networks in a single ACL entry?
192.168.1.0/25
192.168.0.0/25
192.168.0.128/25
192.168.1.128/26
192.168.1.192/26

• http://www.nerdcrunch.com NerdCrunch

255.255.252.0

• erostand premier

Hello

255.255.255.255

255.255.252.0
————————
0 . 0 . 3 . 255
————————-

thanks

• sstkaba

Thank you very much for this wonderful explanation. Very easy way to understand. Thanks once more time for sharing.