Subnet Mask Binary Chart

Subnet Mask Binary Chart

A subnet mask is an 32-bit number that allows for the division of an IP address into two different part. A subnet mask determine which portion of the IP address is for the network ID and which portion of the IP address is for the hosts on that network. An IP address consist of 32 bits of data, just like a subnet mask.

When a router utilizes a subnet mask, a subnet mask allow for the router to determine which portion of an IP address represents the network and which portion of that address refer to the individual hosts on that network. Because the subnet mask is represented by binary code, human beings typically represent the subnet mask in decimal form for ease of reading. For instance, a subnet mask of 255.255.255.0 is actualy a series of 32 bits that contain 24 bits of 1s and 8 bits of 0s.
The binary code for a subnet mask follow a specific rule regarding the location of the 1s within that code.

What Is a Subnet Mask

All of the 1s in a subnet mask must be positioned to the left of the bits in the subnet mask. The 1s in a subnet mask represent the portion of the IP address that is used for the network portion of that IP address, whereas the 0s in a subnet mask represent the portion of the IP address that is used for the host portion of that IP address. For these reasons, a subnet mask cannot have a 1 in its code after a 0 have appeared within that code.

If a router uses such a subnet mask, the router will reject that subnet mask as invalid. Since all of the 1s in a subnet mask are to the left of the bits in that mask, the subnet mask always moves from the network portion of the IP address to the host portion of that address. The network address for a group of networks can be calculated by performing the AND operation between the IP address of a given device and the subnet mask for that network.

An AND operation evaluate each individual bit within the IP address and subnet mask. Each individual bit within the result of the AND operation will be a 1 only if the bit in the IP address is a 1 and the bit in the subnet mask is also a 1. If either the IP address bit or the subnet mask bit has a 0 in that position, the result of the AND operation will be 0 in that bit position.

By performing the AND operation between the IP address and the subnet mask, the result is the network address for that network. For instance, if you perform the AND operation between an IP address and a subnet mask of 255.255.255.0, the first three octet of the IP address will be reflected in the result of the AND operation, but the last octet will become 0 within the result of the AND operation. The number of 1s in a subnet mask will indicate the number of host address in that network.

The more 1s in the host portion of the subnet mask, the more available host address. Additionally, the more 1s in the network portion of the mask, the fewer available host addresses. For instance, a /24 prefix will provide eight bits for the host addresses, indicating that there is many addresses available for hosts in that network.

However, a /30 prefix will only have two bits for the host addresses, indicating that there is fewer addresses available for those hosts. The selected subnet mask must provide enough addresses for the devices in the network, but there should be few enough that they are not unneccessarily providing host addresses to the network. Many people use the decimal value of the octets in the subnet mask to more quick understand the subnet mask.

An octet with all 1s have a decimal value of 255, and an octet with no 1s will have a decimal value of 0. Other values will exist if the subnet mask have 1s and 0s in that octet. For instance, if there is one 1 in the octet and the rest of the bits are 0s, the decimal value of that octet will be 128.

Additionally, if there are two 1s in the octet and the rest of the bits are 0s, the decimal value will be 192. Understanding these values allow a person to determine the subnet mask of a network without calculating each bit value in the subnet mask. Finally, there is something known as a wildcard mask.

The wildcard mask is the inverse of the subnet mask. It is used in access lists to determine which part of the IP address a router will examine and which it will ignore. For example, if a network have a subnet mask of 255.255.255.0, the wildcard mask will be 0.0.0.255.

The 0s in the wildcard mask indicate which bits of the IP address the router must examine, while the 255s indicate which bits of the IP address the router will ignore. Thus, the subnet and wildcard masks work together to manage the router and how it manage the network traffic. You should of checked the subnet mask before applying it.

Its important to know how it works.

Leave a Comment