Oct 01

Difference Between Subnet Mask and Wildcard Mask

Difference Between Subnet Mask and Wildcard Mask

Subnet mask and wildcard mask are two important components of computer network addressing, and must be configured correctly to transfer data to intended nodes of the network. Both are 32 bits long masks and help in identifying networks by giving information about the different parts of an IP address. But they are different from each other in every sense, in their concept, in their format, and their usage.

A subdivided network is implemented to avoid wastage of IP addresses over a network and a subnet mask helps to determine the host part and network part of an address by using 1’s for the network part and 0’s for the host part. IP addresses on the same subnet are not separated by a router, whereas, IP addresses on different subnets must be separated by one router. One major point to keep in mind for the subnet mask is that the 1’s and 0’s must be contagious. For example, the subnet mask for a classful Class A IP address is, which can also be written as 11111111.00000000.00000000.00000000 in binary form, and also as /8. In this subnet mask, the 1’s identify the network part of the address and the 0’s identify the host part. As long as the number in the first octet, or say, the number corresponding the 1’s, matches, the IP addresses are considered to be on the same network. For subnet mask, all the bits of an IP address must match, and for subnet mask, none of the bits should match.

A wildcard mask is generally said to be an inverted subnet mask, but in this, the 0’s correspond to the bits which must match the same position bits in an IP address. A wildcard mask cares about the number corresponding to the 0’s and does not care about the number corresponding to 1’s. For example, for a subnet mask, the corresponding wildcard mask would be, which can also be written as 00000000.00000000.00000000.11111111. In this, in order to implement a given command, the IP address part corresponding to 0’s must match. Moreover, the 1’s and 0’s should not necessarily be contagious in a wildcard mask. For instance, (00000000.00000011.00000000.00001111) is a valid wildcard mask but there is no corresponding subnet mask for this. A wildcard mask generally specifies a range of IP addresses. For wildcard mask, the entire IP address must match, and for wildcard mask, no bits have to match. Wildcard mask has found a special functionality in the access control lists (ACLs) and routing protocol OSPF.

Click here for MCSE Certification

Looking for an IT Job?

Please call us on 1800 159 151, or complete the form below.

  • This field is for validation purposes and should be left unchanged.

Recent Posts

About The Author

Delivering Classroom and Live Instructor-led Training. Attend at our premises or from anywhere on any device.

COVID discounts on Job Programs end soon, register today.

Open chat