Anatomy
An IPv4 address is divided into two major portions using a subnet mask:
- Network Portion
- Host Portion
By ANDing an IPv4 address with its subnet mask, the network portion and the host portion can be distinguished.
Network Portion
Network Portion
Host Portion
Host Portion
Subnetting
Subnetting is the process of dividing an IPv4 base address into smaller segments, called “subnets”.
Benefits: By subnetting an IPv4 space, the broadcast domain is divided into smaller segments, which results in less likely network congestions.
Also, security rules, such as access lists, can be configured for more fine-grained security measurements.
Cumulated Network Bits
The cumulated network bits is the number of bits at the higher end of the octet in which the prefix is located. It is defined as:
Block Size
The block size determines the address space size of a subnet.
Network Address
The network address is the first address in a subnet’s address space. When all host bits are zeros, an IPv4 address is considered a network address.
Broadcast Address
The broadcast address is the last address in a subnet’s address space. When all host bits are ones, an IPv4 address is considered a broadcast address.
Available Hosts
The available hosts are determine by the block size:
All hosts in the address space are available, except the network and broadcast address. Therefore, 2 is subtracted from the block size.