OSI Layers
- 7. Application — user-facing protocols like HTTP, DNS, FTP
- 6. Presentation — data formatting, encryption, compression
- 5. Session — establishing, managing, and tearing down sessions
- 4. Transport — end-to-end delivery, TCP and UDP
- 3. Network — logical addressing and routing, IP
- 2. Data Link — MAC addressing and framing on a local link
- 1. Physical — raw bit transmission over cable, fiber, or radio
Common Ports
- 20/21 — FTP (data / control)
- 22 — SSH
- 23 — Telnet
- 25 — SMTP
- 53 — DNS
- 67/68 — DHCP (server / client)
- 80 — HTTP
- 110 — POP3
- 143 — IMAP
- 161 — SNMP
- 443 — HTTPS
- 3389 — RDP
Subnet Cheat Sheet
- /24 = 256 addresses total = 254 usable hosts
- /25 = 128 addresses total = 126 usable hosts
- /26 = 64 addresses total = 62 usable hosts
- /27 = 32 addresses total = 30 usable hosts
- /28 = 16 addresses total = 14 usable hosts
- /29 = 8 addresses total = 6 usable hosts
- /30 = 4 addresses total = 2 usable hosts
TCP vs UDP
- TCP: connection-oriented, requires a three-way handshake before data transfer
- TCP: reliable, ordered delivery with acknowledgments and retransmission
- TCP: flow and congestion control adjust sending rate dynamically
- UDP: connectionless, no handshake, minimal header overhead
- UDP: no delivery or ordering guarantees, no built-in congestion control
- UDP: preferred for DNS queries, streaming media, VoIP, and online gaming
DNS Record Types
- A — maps a hostname to an IPv4 address
- AAAA — maps a hostname to an IPv6 address
- CNAME — aliases one hostname to another hostname
- MX — specifies the mail server responsible for a domain
- TXT — holds arbitrary text, often used for domain verification and SPF/DKIM
- NS — delegates a domain or subdomain to authoritative name servers
- SOA — holds administrative information about a DNS zone
- PTR — maps an IP address back to a hostname for reverse DNS lookups
Key Takeaways
- Know the OSI layers in order, both top-down and bottom-up
- Memorize the handful of ports that appear constantly: 22, 53, 80, 443
- Practice subnet host-count math instead of memorizing the table blindly
- Be able to state TCP vs UDP trade-offs in one sentence each
- Recognize the common DNS record types and what each one resolves to
Practice what you learned
1. Which OSI layer is responsible for MAC addressing and framing?
2. Which port is the well-known port for HTTPS?
3. How many usable host addresses are in a /27 subnet?
4. Which DNS record type maps a hostname to an IPv6 address?
5. Which transport protocol includes built-in congestion control?
Was this page helpful?
You May Also Like
IP Addressing and Subnetting
Master IPv4 addressing and CIDR subnetting with a fully worked, hand-verified example.
The OSI Model
Understand the 7 layers of the OSI reference model, their responsibilities, and example protocols at each layer.
TCP vs UDP
Compare TCP and UDP across reliability, ordering, connection state, overhead, and typical use cases.
DNS: The Domain Name System
How DNS translates human-friendly domain names into IP addresses through a distributed hierarchy of resolvers and servers.
Ports and Sockets
Understand port number ranges and how a socket, the pairing of an IP address and port, identifies a network endpoint.