The subnet mask, the network address and the broadcast address
Sign in to read this lesson
The subnet mask shows which part of an IP address is the network part and which is the host part: the 1 bits in the mask are the network part, the 0 bits the host part. For 192.168.1.0 / 255.255.255.0, 24 bits are for the network and 8 bits for hosts. The address with all host bits 0 is the network address; the one with all host bits 1 is the broadcast address. These two are not given to hosts. 8 host bits give 256 values (0–255), so the number of usable hosts is 256 − 2 = 254. The general rule: 2ⁿ − 2, where n is the number of host bits.
What you will learn
- The subnet mask marks the network and host parts of an IP address: in the mask 1 = network, 0 = host. 255.255.255.0 =
11111111.11111111.11111111.00000000= 24 network bits, 8 host bits. - Network address: all host bits 0. For 192.168.1.0 /255.255.255.0 it is 192.168.1.0.
- Broadcast address: all host bits 1. For the same network it is 192.168.1.255.
- 8 bits give 256 different values, because 0 is a value too (0–255). Start counting at "0", not "1".
- Usable hosts = 2ⁿ − 2 (n = host bits). 8 host bits: 256 − 2 = 254 hosts (192.168.1.1 – 192.168.1.254).
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.