Computer Networks
IP addressing and subnetting
Masks, network and broadcast addresses, classes, and splitting a block.
In two minutes
One idea to a line
An IPv4 address has 32 bits. A /n prefix means the first n bits name the network and the rest name the host.
Network address = address AND mask (all host bits 0). Broadcast = all host bits 1. Usable hosts = 2^(32−n) − 2.
Classful ranges by first number: A 1–126, B 128–191, C 192–223, D 224–239 (multicast). 127 is loopback.
Borrowing k bits from the host part makes 2^k subnets, each with 2^(32−n−k) − 2 usable hosts.
Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. NAT lets many private hosts share one public address.
Slips people make here
Interviewers know them too
Forgetting to remove the network and broadcast addresses from the host count.
Counting subnet bits as the host bits.
Treating 172.32.x.x as private: the /12 block ends at 172.31.255.255.
Your practice here
Not started
10 written questions, and 5 kinds of calculation that change every time
No answers yet