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
00000000
and that equals0
in decimal, so the network address of this specific network is192.168.1.0
. - The host portion in binary is
00000001
, which equals1
in decimal, so this host is the first host in the network. - The range of hosts in this network runs from
00000001
to11111110
in binary, or from1
to254
in decimal. There are254
unique 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.255.
In chart form this network would look like:
Network Address | Range of Valid Hosts | Broadcast Address |
|
|
|