Nov 05

Comparison Between Subnet and Wildcard Mask

Subnet VS Wildcard Mask

Subnet Mask

It’s a 32bit combination address used to describe portion of an address referring to subnet/network and a second portion of it referring to the host. And it’s mainly used along with the IP address as a combination.

To explain bit more in detail, Subnet mask is made by setting up network bits to all 1’s and host bits as all 0’s and these serve only to express the length of bits, matching the network portion of an IPV4 address from left to right.

As an example, considering a subnet mask for a sample IP address, subnet mask IP address is equal to, in this scenario number 1’s is equal to 28. so, we can say number of network bits in IP address are 28 and rest four bits are host bits.

Wildcard Mask

Wildcard Mask is a mask of bits indicating part of an IP address available for examination

A wildcard mask sometimes referred to as an inverted mask that means 1 is referred as a host and 0 referred as a subnet/network, meaning opposite of what it means in a subnet (network) mask bit but not necessarily always.

Wildcard masks are considered to be much more flexible than subnet masks, as there is no requirement continuity. In spite of this functionality, one can achieve all sorts of strange matches.

Below is an example given here in IOS ACL syntax:

Match all 192.178.x.1 addresses:


Match only even 192.178.x.0/24 subnets:


In the above example neither of the wildcard masks are contiguous, rather than matching a length from one side of the address to the other, each bit is matched (0) or ignored (1) independently.

Let us consider one more example to illustrate wildcard mask for a sample IP address (taking into account same example as considered in subnet mask above). Wildcard mask will be explanation on how to calculate wildcard mask from the subnet mask from the example considered is first ocet (255-255), second ocet(255-255), third ocet(255-255), fourth ocet(255-240) – this will result to a wildcard mask –

With the flexibility that Wildcard mask provides, many of the routing protocols uses wildcard mask in their network protocols. Some of those protocols include eigrp, ospf, dgp. These protocols use wild card mask in their network command to enable these protocols on specific interfaces instead on a complete router.

Click here for CCNA 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