Cheat Sheet & Glossary

Common port numbers

PortProtocolDescription
20, 21TCPFTP data and control
22TCPSSH (Secure Shell)
23TCPTelnet (insecure, avoid)
25TCPSMTP (mail server to server)
53UDP/TCPDNS
67, 68UDPDHCP (server, client)
80TCPHTTP
110TCPPOP3 (mail retrieval)
143TCPIMAP (mail retrieval)
161, 162UDPSNMP (monitoring)
443TCPHTTPS
465, 587TCPSMTPS / SMTP submission
993, 995TCPIMAPS / POP3S
3306TCPMySQL
5432TCPPostgreSQL
6379TCPRedis
8080, 8443TCPHTTP/HTTPS alt (dev/proxies)

IPv4 subnet quick reference

PrefixMaskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (point-to-point)
/32255.255.255.25511 (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/packet
a = 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 packets
N = number of identical links in series
L / 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 bits
RTT 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/objects
K = 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.