When IPv4 addressing was first designed, there needed to be a way for devices and people to recognize whether an address referred to a specific device or to a group of devices. Some rules were created to help determine the difference between a network address and a node (or host) address:
In an IP address:
- A host portion of all binary 0s refers to the network itself.
- A host portion with a combination of binary 0s and 1s refers to a specific host.
- A host portion of all binary 1s refers to the broadcast address of the network.
So what is the difference between these three?
- A network address defines the entire network and all of the hosts inside it. This address cannot be assigned to a specific device.
- A host address defines one specific device inside of that network. This address can be assigned to a single device.
- A broadcast address represents all of the hosts within a specific network. All devices within the network are programmed to accept messages sent to this address.
Going back to our original example of
192.168.1.1/24, what information can we determine now about this address? We already know that based on the mask of /24, the network portion is
192.168.1 and the host portion is
.1. We know that the last 8 bits are host bits. Knowing what we now know about network, host, and broadcast addresses:
- All 0s in the host portion of the address is
00000000and that equals
0in decimal, so the network address of this specific network is
- The host portion in binary is
00000001, which equals
1in decimal, so this host is the first host in the network.
- The range of hosts in this network runs from
11111110in binary, or from
254in decimal. There are
254unique addresses in this network for devices.
- The broadcast address of this network is
11111111, or all 1s in the host portion. This means that the broadcast address for this network is
In chart form this network would look like:
Range of Valid Hosts
| || || |