How subnetting works
The prefix length says how many leading bits are the network. A /26 leaves 6 bits for hosts: 64 addresses. The first is the network address and the last is the broadcast address, so 62 can be given to devices.
A /31 is the exception (RFC 3021): point-to-point links use both addresses. A /32 is one address.
Wildcard masks
The wildcard mask is the netmask inverted. Cisco access lists and OSPF use it: 0.0.0.63 matches any address in a /26.
Questions
- How many hosts fit in a /24?
- 256 addresses, 254 usable.