The host portion is the part of a 32-bit IPv4 address that identifies an individual host within a network. A prefix length such as /24 states that 24 bits belong to the network portion, leaving the remaining 8 bits for the host portion. section 7.3.1
Hosts on the same LAN share the same network portion but use unique host portions. The prefix length or netmask determines where the network portion ends and the host portion begins. section 7.3.1 section 7.4
Use the host portion to interpret an IPv4 network:
- Set every host bit to 0 to form the network address, which identifies the network and cannot be assigned to a host. section 7.3.3
- Set every host bit to 1 to form the broadcast address, which reaches all hosts on the local network and cannot be assigned to a host. section 7.3.3
- Calculate total addresses as 2^y and maximum assignable hosts as 2^y − 2, where y is the number of host bits. section 7.3.3
- Recognize the tradeoff: borrowing host bits creates more subnets but leaves fewer host addresses in each subnet. section 7.3.4 section 11.3.1
192.168.100.0/24
A /24 prefix leaves 8 host bits. The host portion of 192.168.100.0 is 00000000, making it the network address. The host portion of 192.168.100.255 is 11111111, making it the broadcast address. Addresses from 192.168.100.1 through 192.168.100.254 are usable host addresses, providing 254 possible hosts. section 7.3.3
Choosing host bits for a subnet
A LAN requiring 122 host addresses needs 7 host bits because 2^7 − 2 equals 126, while 6 host bits provide only 62. Borrowing one bit from 10.89.100.0/24 produces the 10.89.100.0/25 subnet. section 11.3.1
Figure 7.7 An IPv4 address written in both dotted decimal and binary. The 32-bit address is split into four octets consisting of 8 bits each. The address is divided into two parts: the network portion and the host portion. The prefix length indicates the size of the network portion in bits, and the remainder is the host portion.
Use the bit-level diagram to see how a prefix length divides an IPv4 address into network and host portions. section 7.3.1

