Cheat Sheet & Glossary
Common port numbers
| Port | Protocol | Description |
|---|---|---|
| 20, 21 | TCP | FTP data and control |
| 22 | TCP | SSH (Secure Shell) |
| 23 | TCP | Telnet (insecure, avoid) |
| 25 | TCP | SMTP (mail server to server) |
| 53 | UDP/TCP | DNS |
| 67, 68 | UDP | DHCP (server, client) |
| 80 | TCP | HTTP |
| 110 | TCP | POP3 (mail retrieval) |
| 143 | TCP | IMAP (mail retrieval) |
| 161, 162 | UDP | SNMP (monitoring) |
| 443 | TCP | HTTPS |
| 465, 587 | TCP | SMTPS / SMTP submission |
| 993, 995 | TCP | IMAPS / POP3S |
| 3306 | TCP | MySQL |
| 5432 | TCP | PostgreSQL |
| 6379 | TCP | Redis |
| 8080, 8443 | TCP | HTTP/HTTPS alt (dev/proxies) |
IPv4 subnet quick reference
| Prefix | Mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point) |
| /32 | 255.255.255.255 | 1 | 1 (host route) |
Glossary
- ACK
- Acknowledgement flag in TCP; confirms receipt of data.
- ARP
- Address Resolution Protocol — maps IP addresses to MAC addresses on a LAN.
- AS
- Autonomous System — a network under one administrative control, identified by an ASN.
- BGP
- Border Gateway Protocol — inter-AS routing protocol of the internet.
- CIDR
- Classless Inter-Domain Routing — IP addressing using prefix lengths (e.g. /24).
- DHCP
- Dynamic Host Configuration Protocol — automatically assigns IP config to hosts.
- DNS
- Domain Name System — hierarchical distributed database mapping names to IPs.
- ECDHE
- Elliptic Curve Diffie-Hellman Ephemeral — key exchange with forward secrecy.
- FIN
- TCP flag indicating the sender has finished sending data (begins teardown).
- FCS
- Frame Check Sequence — CRC-32 trailer in Ethernet frames for error detection.
- ICMP
- Internet Control Message Protocol — diagnostic/error protocol used by ping and traceroute.
- ISN
- Initial Sequence Number — random starting point for a TCP connection's byte numbering.
- MAC
- Media Access Control address — 48-bit hardware identifier for a network interface.
- MTU
- Maximum Transmission Unit — largest frame/packet a link can carry (Ethernet: 1500 bytes).
- NAT
- Network Address Translation — maps private IP addresses to one or more public IPs.
- OSPF
- Open Shortest Path First — link-state intra-domain routing protocol.
- PDU
- Protocol Data Unit — the name for a unit of data at each layer (segment, packet, frame).
- QUIC
- Quick UDP Internet Connections — modern transport protocol underpinning HTTP/3.
- RFC
- Request for Comments — IETF standards document that defines internet protocols.
- RTT
- Round-Trip Time — time for a packet to travel to a destination and back.
- SACK
- Selective ACKnowledgement — TCP option letting the receiver report non-contiguous data.
- SYN
- Synchronise flag in TCP — used to initiate a connection.
- TLS
- Transport Layer Security — cryptographic protocol providing encryption over TCP.
- TTL
- Time To Live — IP field decremented at each hop; prevents routing loops.
- UDP
- User Datagram Protocol — connectionless, unreliable, low-overhead transport protocol.
- VLAN
- Virtual LAN — logical segmentation of a switch into multiple broadcast domains.
- VPC
- Virtual Private Cloud — isolated virtual network in a cloud provider's infrastructure.
- VPN
- Virtual Private Network — encrypted tunnel connecting two network endpoints.
Core Exam Formulas Quick Reference
The key mathematical formulas, bounds, and protocol timer rules frequently tested on computer networking exams:
| Topic | Formula / Rule | Variable Definitions & Key Units | Exam Context & Notes |
|---|---|---|---|
| 1. Transmission Delay | d_trans = L / R |
L = packet size (bits)R = link bandwidth (bps) |
Time required to push all packet bits onto the physical medium. Independent of distance. |
| 2. Propagation Delay | d_prop = d / s |
d = distance (metres)s ≈ 2 × 10⁸ m/s (speed of light in copper/fibre) |
Time for a bit to physically travel from source to destination. Independent of packet size and link rate. |
| 3. Total Nodal Delay | d_nodal = d_proc + d_queue + d_trans + d_prop |
Additive delay components at a single router hop | d_proc is typically µs; d_queue is dynamic and depends on traffic intensity. |
| 4. Traffic Intensity | I = (L × a) / R |
L = bits/packeta = arrival rate (packets/s)R = link rate (bps) |
If I → 1, queuing delay increases exponentially. If I > 1, buffer overflows and packets drop. |
| 5. Multi-Packet Pipelining (Store-and-Forward) | d_total = (N + P − 1) × (L / R) |
P = number of packetsN = number of identical links in seriesL / R = transmission delay per link |
Accounts for overlapping packet transmissions across consecutive hops (ignoring propagation/queuing delay). |
| 6. Usable IPv4 Subnet Hosts | Usable Hosts = 2^(32 − n) − 2 |
n = prefix length (e.g. /24 → 32 − 24 = 8 host bits) |
Subtract 2 for the all-zeros network address and all-ones directed broadcast address. (Exception: /31 per RFC 3021). |
| 7. IPv4 Fragment Offset | Offset = Byte Offset ÷ 8 |
Fragment offset field in IPv4 header is measured in 8-byte blocks | Every fragment's payload (except the last) must be an integer multiple of 8 bytes. More Fragments (MF = 1) for all but last. |
| 8. TCP Effective Sending Window | EffectiveWindow = min(cwnd, rwnd)rwnd = RcvBuffer − (LastByteRcvd − LastByteRead) |
cwnd = congestion window (sender estimated)rwnd = flow control window (receiver advertised) |
At any moment, in-flight unacknowledged bytes cannot exceed min(cwnd, rwnd). |
| 9. TCP Window-Limited Throughput | Throughput ≤ Window / RTT |
Window in bitsRTT in seconds |
Upper bound on throughput for a single TCP connection regardless of link bandwidth. |
| 10. TCP AIMD Average Throughput | Throughput_avg ≈ 0.75 × (W_max × MSS) / RTT |
W_max = peak congestion window (in packets)MSS = maximum segment size |
Congestion window oscillates between W/2 and W under periodic packet loss; average window is 0.75 W. |
| 11. HTTP Page Load Latency (1 HTML + M Images) | • Non-persistent sequential: 2(M + 1) RTT• Non-persistent parallel (K conns): 2 + 2 × ceil(M / K) RTT• Persistent (no pipelining): (M + 2) RTT• Persistent pipelined: 3 RTT |
M = number of embedded images/objectsK = number of concurrent parallel TCP sockets |
Assumes negligible transmission delay and identical server origin for all resources. |
| 12. DHCP Lease Timers (RFC 2131) | • Renewal (T1): 50% × LeaseTime• Rebinding (T2): 87.5% × LeaseTime |
Client state machine timer defaults | At T1, client unicasts DHCPREQUEST to leasing server. At T2, client broadcasts DHCPREQUEST to any server. |
Further reading
- RFCs: RFC 791 (IPv4), RFC 793 (original TCP), RFC 9293 (updated TCP), RFC 8200 (IPv6), RFC 1035 (DNS), RFC 2131 (DHCP), RFC 8446 (TLS 1.3), RFC 9000 (QUIC), RFC 9114 (HTTP/3)
- Kurose & Ross — Computer Networking: A Top-Down Approach. The standard university textbook.
- Beej's Guide to Network Programming — Excellent practical guide to socket programming in C. Free at beej.us/guide/bgnet/
- Wireshark — wireshark.org — free packet analyser, invaluable for learning by capturing real traffic.
- IANA — iana.org — protocol numbers, port assignments, address registries.