Share |
Custom Search
IT Pathways - The IT Careers Encyclopedia
Menu filter
Comparing Network Mask and Wildcard Mask

Network masks and wildcard masks both serve the same purpose. To distinguish the portion of the IP address that represents the network number, and the portion that represents the host number.

A network mask sets the bits to 1 to represent the portion of the address that represents the network.

A wildcard mask sets the bits to 1 to represent 'don't care' bits.

Access lists and some routing protocols such as OSPF use wildcard. BGP on the other hand uses network masks.

Example 1:

Network Mask: 255.255.255.0Wildcard Mask: 0.0.0.255

Network Mask in Binary:      11111111  . 11111111   . 11111111  .00000000
Wildcard Mask in Binary:    00000000 . 00000000 . 00000000 .11111111

Example 2:

Network Mask: 255.255.255.128Wildcard Mask: 0.0.0.127

Network Mask in Binary:      11111111  . 11111111   . 11111111  .10000000
Wildcard Mask in Binary:    00000000 . 00000000 . 00000000 .01111111

Example 3:

Network Mask: 255.255.0.0Wildcard Mask: 0.0.255.255

Network Mask in Binary:      11111111  . 11111111   . 00000000  .00000000
Wildcard Mask in Binary:    00000000 . 00000000 .  11111111   .11111111

Net Masks and Wildcard Masks are not the inverse of each other

Although the two methods are closely related and will often produce inverse answers (as per the examples above). They have slightly different rules of engagement. A netmask requires a contiguous address block whereas a wildcard mask can be configured for non-contiguous address blocks.

For example, a wildcard mask can be configured to match only against even numbers where a netmask cannot.

Example:
IP: 192.168.200.0 wildcard 0.0.0.254

Cannot be reproduced using network mask.