Glossary#
| Term | Plain meaning | Chapter |
|---|---|---|
| packet / header / payload | one labelled chunk of data / its label / its contents | 1 |
| packet switching | sending packets independently over shared links | 1 |
| best-effort delivery | no guarantee packets arrive, arrive once, or arrive in order | 1 |
| MTU | largest packet a link carries (1,500 bytes on Ethernet) | 1 |
| layers / encapsulation | each layer wraps data in its own header | 2 |
| OSI model / TCP/IP model | 7-layer vocabulary / 4-layer model the internet runs | 2 |
| LAN | devices that reach each other directly, without a router | 3 |
| MAC address | 48-bit hardware address for the local network | 3 |
| Ethernet / Wi-Fi | wired / wireless LAN standards | 3 |
| frame | a packet at the link layer | 3 |
| switch | connects devices in a LAN; forwards frames by MAC address | 3 |
| broadcast | message to everyone on the LAN | 3, 6 |
| IP address / IPv4 | internet-wide address / the 32-bit version | 4 |
| public / private IP | unique worldwide / unique only inside one network | 4, 6 |
| network part / host part | which network / which device in it | 5 |
| subnet | a range of addresses sharing a network part | 5 |
CIDR (/24) | how many leading bits are the network part | 5 |
| subnet mask | the same split written as 255.255.255.0 | 5 |
| network / broadcast address | first (all host bits 0) / last (all 1) address in a subnet | 5 |
| RFC 1918 | the standard that defined the private ranges | 6 |
| loopback / localhost | 127.0.0.1 — this same machine | 6 |
| link-local | 169.254.x.x, self-assigned when DHCP fails | 6 |
| router | forwards packets between networks | 7 |
| routing table | "for this range, send to that next hop" rules | 7 |
| hop | one router-to-router step | 7 |
| default route / default gateway | 0.0.0.0/0 / the router used for non-local traffic | 7 |
| longest prefix match | use the most specific matching route | 7 |
| TTL | hop counter that stops endless loops | 7 |
| traceroute | tool that reveals each hop using TTL | 7 |
| ARP / ARP cache | find a neighbour's MAC from its IP / remembered answers | 8 |
| DHCP / lease | automatic address assignment / how long it's valid | 9 |
| IPv6 | 128-bit addresses written in hex groups | 10 |
| dual-stack | running IPv4 and IPv6 together | 10 |
| ISP | internet service provider | 11 |
| autonomous system / BGP | one independently run network / how they share routes | 11 |
| VPC | your private network range inside a cloud | 11 |
| public / private subnet | has / doesn't have a route to the internet gateway | 11 |
Cheat Sheet#
Subnet maths
host bits = 32 − prefix total = 2^host bits usable = total − 2 (AWS: total − 5)
/24 = 256 /25 = 128 /26 = 64 /27 = 32 /28 = 16 /16 = 65,536
block size in the last byte (prefix 24–32) = 2^(32 − prefix); subnets start at multiples of it
"same subnet?" → compare only the first <prefix> bitsAddresses to know
private 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
loopback 127.0.0.1 (IPv6 ::1) link-local 169.254.0.0/16 (IPv6 fe80::)
cloud metadata 169.254.169.254 default route 0.0.0.0/0 broadcast ff:ff:ff:ff:ff:ffCommands (macOS · Linux)
my IP ipconfig getifaddr en0 · ip addr
my MAC ifconfig en0 | grep ether · ip link
routing table netstat -rn · ip route
default gateway route -n get default · ip route | grep default
ARP cache arp -a · ip neigh
reachable? ping 8.8.8.8
path & hops traceroute google.comDebug order for "no internet"
1. real IP? (169.254 = DHCP failed) 2. ping gateway 3. ping 8.8.8.8 4. DNS (nslookup) 5. tracerouteTry This Yourself#
Map your own network. Run
ipconfig getifaddr en0,netstat -rn | grep defaultandarp -a. Write down: your IP, your subnet (checkifconfig en0for thenetmask— it's shown in hex, e.g.0xffffff00=255.255.255.0=/24), your gateway, and your gateway's MAC address.Trace a path. Run
traceroute google.comandtraceroute 8.8.8.8. Count the hops. Which hop is your home router? Where does the time jump the most?Subnet drill (on paper). For each, give network address, broadcast address and usable count:
10.10.10.200/27,172.20.4.9/22,192.168.0.130/30. (Answers:10.10.10.192,.223, 30 ·172.20.4.0,172.20.7.255, 1,022 ·192.168.0.128,.131, 2.)