Network and Host Portion of IPv4 Address

Each network running with TCP/IP must have a unique network number, and every machine on the network must have a unique IP address. It is very important to know the construction and structure of IP addresses.  The IPv4 address is a 32-bit number that uniquely identifies a network interface on a machine. An IPv4 address is typically written in decimal digits, as four 8-bit fields separated by periods. Each 8-bit field represents 1 byte of the IPv4 address. This form of representing the bytes of an IPv4 address is often called the dotted-decimal format.

The understanding binary notation is very important to understand IP address and its portions. The IPv4 address is a hierarchical address consisting of a network portion and a host portion. When determining the network portion vs the host portion, it is important to look at the 32-bit stream of IPv4 address. Within the 32-bit stream, a portion of the bits identify the network portion, and a portion of the bits identify the host portion.

The bits within the network portion of the address must same for all devices that exist in the same network. The bits within the host portion of the address must unique to identify a specific host within a network. If two hosts have the same bit-pattern in the specified network portion of the 32-bit stream, those two hosts will be located in the same network. We can identify the host portion and network portion of the IP address using a subnet mask.

The Subnet Mask

There are three important parameters for each host in a network which is following.

  • Host Unique IPv4 address– Unique IPv4 address of the host which identify the host number on the network.
  • Subnet mask– Used to identify the network portion and host portion of the IPv4 address.
  • Host Default gateway– Host default gateway used to Identifies the local gateway to reach other networks.

Understanding the subnet mask is very important to determine the network portion and host portion of the IP address. The network address represents all the devices on the same network.

Figure 1 displays the dotted decimal address and the 32-bit subnet mask. Important to remember host portionthat Network bets must be all 1s and host bits must be all 0s in the subnet mask. As you can see in figure 2 in the subnet mask a sequence of 1 bit followed by a sequence of 0 bits. So To identify the network and host portions of an IPv4 address; we compare the subnet mask to the IPv4 address bit, from left to right as shown in Figure portion The 1s in the subnet mask identifies the network portion while the 0s in the subnet mask identify the host portion.  The ANDing is the process which identifies the network portion and host portion. We will discuss ANDing briefly in the next lesson.