TCP/IP Course Outline: From Ethernet Frames to TCP, DNS, TLS and QUIC
A complete TCP/IP networking course for students and working engineers: addressing and subnetting, Ethernet and ARP, IP, DHCP, NAT, ICMP, UDP, DNS, TCP connections, retransmission and congestion control, TLS, IPsec, QUIC and troubleshooting.
kvi5hnuCode Sprout team member11 min readOn this page
This course explains how the Internet's protocols actually work, from a frame on an Ethernet cable to a TCP connection recovering from loss, a DNS lookup, and a TLS 1.3 handshake. It's written for two kinds of reader:
- Students and beginners who want to understand networking properly. Part 1 starts from what a packet is, and every article builds only on the ones before it.
- Working engineers, such as developers, system administrators and SREs, who need to explain why a connection is slow, why a packet was dropped, or what a capture is telling them, and who are preparing for interviews. Each article has a "Common questions" section for the doubts people really have, and the delicate details are tested in the quizzes.
How the course works
- Current protocols. Everything is checked against the current RFCs and real implementations: TCP as defined in RFC 9293, TLS 1.3 in RFC 9846, DHCPv6 in RFC 9915, CUBIC, RACK-TLP, encrypted DNS, QUIC and HTTP/3, and Linux 7.x behavior. Older mechanisms you'll still meet are explained alongside, with what replaced them.
- Real captures and real output. Every packet capture, command output and graph comes from a real Linux lab, not invented. The lab uses the address ranges reserved for documentation (
192.0.2.0/24,198.51.100.0/24,203.0.113.0/24and2001:db8::/32) and names underexample.com. When you run the same commands, your addresses, ports, sequence numbers and timings will be different; each example says which parts will change and what to look for instead. - Visual explanations. Header layouts are drawn bit by bit, connections are shown as timelines, and behaviors such as slow start, retransmission backoff and window changes are plotted from measured data.
- Practice at every step. Every article ends with practice questions and answers, Parts 1 to 14 each end with a review quiz, Part 15 is a set of graded exercises, and three final quizzes test the whole course.
You only need a computer with a terminal to follow along. Article 6 introduces the tools used throughout the course, how to read their output, and their macOS and Windows equivalents.
What you'll learn
| Part | Topic | What it covers | Articles |
|---|---|---|---|
| 1 | Foundations | What TCP/IP is and the ideas behind it: packets and connections, the end-to-end principle, layering and encapsulation, ports and names, the standards process, and the tools used throughout the course. | 1–6 |
| 2 | IP addressing | IPv4 and IPv6 addresses from first principles: notation, subnetting, CIDR and aggregation, special-use ranges, multicast and anycast, and how addresses are allocated. | 7–13 |
| 3 | The link layer | How packets cross a single link: Ethernet, VLANs, switches and spanning tree, Wi-Fi, PPP, MTU and tunnels, and ARP. | 14–22 |
| 4 | The Internet Protocol | The IPv4 and IPv6 headers, the Internet checksum, packet marking for priority and congestion, extension headers, forwarding, and source address selection. | 23–28 |
| 5 | Automatic configuration | How hosts configure themselves: DHCP, DHCPv6, stateless autoconfiguration, how configuration ties into DNS, and the attacks on autoconfiguration and their defenses. | 29–33 |
| 6 | Firewalls and NAT | Filtering and translating traffic: firewalls, NAT and its behaviors, NAT traversal, nftables rules, and running IPv4 and IPv6 side by side. | 34–38 |
| 7 | ICMP, broadcast and multicast | The Internet's control messages, ping and traceroute, IPv6 Neighbor Discovery, broadcasting, multicasting, and group membership with IGMP and MLD. | 39–44 |
| 8 | UDP and fragmentation | The simplest transport, how IP fragments and reassembles packets, path MTU discovery, and designing applications on UDP. | 45–48 |
| 9 | DNS | How names become addresses: the name space and zones, resolution and caching, the message format, record types, updates and zone transfers, encrypted DNS, and troubleshooting. | 49–56 |
| 10 | TCP connections | How TCP sets up and tears down connections: reliable transport basics, the header, the handshake, options, the state machine and TIME_WAIT, resets, and server queues. | 57–63 |
| 11 | TCP reliability and flow control | How TCP recovers from loss and paces data: RTT and timeouts, retransmission, SACK and RACK-TLP, Nagle and delayed ACKs, windows, buffers, and keepalives. | 64–71 |
| 12 | TCP congestion control | How TCP shares the network: slow start and congestion avoidance, loss recovery, a real trace read step by step, CUBIC, BBR, bufferbloat, AQM and L4S. | 72–77 |
| 13 | Network security | Protecting traffic: security principles, the cryptography networking relies on, certificates and PKI, 802.1X, IPsec and WireGuard, TLS 1.3, DNSSEC, and email authentication. | 78–85 |
| 14 | Modern transports and practice | What runs beside TCP today, QUIC and HTTP/3, Multipath TCP and SCTP, and a method for troubleshooting real network problems. | 86–88 |
| 15 | Exercises | Graded exercise sets with explained solutions: addressing and subnetting, reading packet captures, and analyzing TCP connections. | 89–91 |
Part 1: Foundations
What TCP/IP is and the ideas behind it: packets and connections, the end-to-end principle, layering and encapsulation, ports and names, the standards process, and the tools used throughout the course.
- What TCP/IP Is: Packets, Datagrams, Connections and Packet Switching
- The Design Principles of the Internet: End-to-End, Fate Sharing, Error and Flow Control
- Layering and Encapsulation: OSI, the TCP/IP Model and How Headers Nest
- Ports, Names and Applications: Client/Server, Peer-to-Peer and the Sockets API
- Who Defines the Internet: RFCs, the IETF, IEEE and Real Implementations
- Tools of the Trade: ip, ss, ping, dig, tcpdump and Reading a Packet Capture
Part 2: IP addressing
IPv4 and IPv6 addresses from first principles: notation, subnetting, CIDR and aggregation, special-use ranges, multicast and anycast, and how addresses are allocated.
- IPv4 Addresses: Dotted Quads, Binary and the Old Address Classes
- Subnetting: Masks, Prefix Lengths, VLSM and Broadcast Addresses
- CIDR and Route Aggregation: Prefixes and Longest Match
- IPv6 Addresses: Notation, Prefixes, Interface Identifiers and Privacy Addresses
- Special-Use Addresses: Private, Loopback, Link-Local, Documentation and Shared Ranges
- Multicast and Anycast Addresses in IPv4 and IPv6
- Who Gets Addresses: Registries, IPv4 Exhaustion, Provider Assignments and Multihoming
Part 3: The link layer
How packets cross a single link: Ethernet, VLANs, switches and spanning tree, Wi-Fi, PPP, MTU and tunnels, and ARP.
- Ethernet: Frames, MAC Addresses, EtherTypes and Today's Speeds
- VLANs, Priority Tagging and Link Aggregation
- Duplex, Autonegotiation, Wake-on-LAN, Energy Saving and Link Flow Control
- Bridges and Switches: MAC Learning, Spanning Tree and Its Successors
- Wi-Fi: 802.11 Frames, Media Access, Channels, Wi-Fi 6 and 7, and WPA3
- PPP and PPPoE: Point-to-Point Links and Broadband Sessions
- Loopback, MTU and Tunnels: GRE, VXLAN and WireGuard
- ARP: How IPv4 Finds the MAC Address, the ARP Cache and the Frame Format
- Proxy ARP, Gratuitous ARP, Address Conflict Detection and ARP Attacks
Part 4: The Internet Protocol
The IPv4 and IPv6 headers, the Internet checksum, packet marking for priority and congestion, extension headers, forwarding, and source address selection.
- The IPv4 and IPv6 Headers, Field by Field
- The Internet Checksum: How It's Computed and What It Catches
- Differentiated Services and ECN: Marking Packets for Priority and Congestion
- IPv4 Options and IPv6 Extension Headers: Hop-by-Hop, Routing and Fragment Headers
- IP Forwarding: Routing Tables, Longest Prefix Match and Following a Packet
- Host Models, Source Address Selection and Mobile IP
Part 5: Automatic configuration
How hosts configure themselves: DHCP, DHCPv6, stateless autoconfiguration, how configuration ties into DNS, and the attacks on autoconfiguration and their defenses.
- DHCP Basics: Leases, Address Pools, the Message Format and Options
- How DHCP Works: Discover, Offer, Request, Renewals, Relays and Snooping
- DHCPv6: Stateful and Stateless Configuration and Prefix Delegation
- Stateless Autoconfiguration: IPv4 Link-Local, IPv6 SLAAC and Duplicate Address Detection
- Configuration and DNS Together: Dynamic DNS Updates and Attacks on Configuration
Part 6: Firewalls and NAT
Filtering and translating traffic: firewalls, NAT and its behaviors, NAT traversal, nftables rules, and running IPv4 and IPv6 side by side.
- Firewalls: Packet Filters, Stateful Inspection and Proxies
- Network Address Translation: NAPT, Mapping and Filtering Behavior, Hairpinning and Carrier-Grade NAT
- Getting Through NAT: Hole Punching, STUN, TURN, ICE, UPnP and PCP
- Writing Firewall and NAT Rules on Linux With nftables
- IPv4/IPv6 Coexistence: Dual Stack, DS-Lite, NAT64, DNS64, 464XLAT and Teredo
Part 7: ICMP, broadcast and multicast
The Internet's control messages, ping and traceroute, IPv6 Neighbor Discovery, broadcasting, multicasting, and group membership with IGMP and MLD.
- ICMP: Message Types, Encapsulation and the Rules for Sending Errors
- ICMP Error Messages: Unreachable, Packet Too Big, Redirect, Time Exceeded and Parameter Problem
- ping and traceroute: How They Work and How to Read Them
- IPv6 Neighbor Discovery: Router and Neighbor Messages, NUD and ND Options
- Broadcasting and Multicasting: Mapping to MAC Addresses, Sending and Receiving
- IGMP and MLD: Joining Multicast Groups, Queriers and Snooping
Part 8: UDP and fragmentation
The simplest transport, how IP fragments and reassembles packets, path MTU discovery, and designing applications on UDP.
- UDP: The Header, the Checksum and the Pseudo-Header
- IP Fragmentation and Reassembly: How It Works and Why It's Avoided
- Path MTU Discovery: Classic PMTUD, PLPMTUD and MTU Black Holes
- Building on UDP: Datagram Sizes, Server Design, UDP-Lite and UDP in Today's Internet
Part 9: DNS
How names become addresses: the name space and zones, resolution and caching, the message format, record types, updates and zone transfers, encrypted DNS, and troubleshooting.
- The DNS Name Space: Names, Labels, Zones and Delegation
- How a Name Is Resolved: Stub, Recursive and Authoritative Servers and Caching
- Inside a DNS Message: Header, Sections, EDNS(0) and UDP Versus TCP
- DNS Record Types: A, AAAA, CNAME, MX, NS, SOA, PTR, TXT, SRV, CAA, SVCB and HTTPS
- Changing DNS: Dynamic Updates, Zone Transfers and NOTIFY
- DNS in Practice: Round Robin, Split DNS, Open Resolvers, mDNS, LLMNR and DNS Attacks
- Encrypted DNS: DNS over TLS, HTTPS and QUIC
- Troubleshooting DNS With dig: Following a Resolution Step by Step
Part 10: TCP connections
How TCP sets up and tears down connections: reliable transport basics, the header, the handshake, options, the state machine and TIME_WAIT, resets, and server queues.
- How Reliable Transport Works: ARQ, Sliding Windows, Flow Control and Timeouts
- TCP's Service Model and Header: Segments, Sequence Numbers and Flags
- Opening and Closing TCP Connections: The Three-Way Handshake, FIN and Half-Close
- TCP Options: MSS, Window Scale, SACK, Timestamps, User Timeout, TCP-AO and Fast Open
- The TCP State Machine and TIME_WAIT
- TCP Resets: Closed Ports, Aborts, Half-Open Connections and TIME-WAIT Assassination
- TCP Servers: Listening Sockets, Binding, the Accept Queue, SYN Cookies and SYN Floods
Part 11: TCP reliability and flow control
How TCP recovers from loss and paces data: RTT and timeouts, retransmission, SACK and RACK-TLP, Nagle and delayed ACKs, windows, buffers, and keepalives.
- Measuring RTT and Setting the Retransmission Timeout
- Timeout-Based Retransmission and Exponential Backoff
- Fast Retransmit, SACK Recovery and RACK-TLP
- Spurious Retransmissions, Reordering and Duplication: DSACK, Eifel and F-RTO
- Interactive Traffic: Delayed ACKs, the Nagle Algorithm and TCP_NODELAY
- TCP Flow Control: The Sliding Window, Zero Windows and Silly Window Syndrome
- Large Windows and Buffers: Bandwidth-Delay Product, Auto-Tuning and Urgent Data
- TCP Keepalive: Detecting Dead Peers and Keeping NAT Mappings Alive
Part 12: TCP congestion control
How TCP shares the network: slow start and congestion avoidance, loss recovery, a real trace read step by step, CUBIC, BBR, bufferbloat, AQM and L4S.
- Congestion Control: Slow Start, Congestion Avoidance and Fast Recovery
- Better Loss Recovery: NewReno, SACK-Based Recovery, PRR and Limited Transmit
- Congestion Control in a Real Trace: Reading cwnd, Losses and Recovery
- High-Speed TCP: CUBIC, Fairness and Sharing Congestion State
- Delay-Based and Model-Based Congestion Control: Vegas, Compound and BBR
- Bufferbloat, Active Queue Management, ECN and L4S
Part 13: Network security
Protecting traffic: security principles, the cryptography networking relies on, certificates and PKI, 802.1X, IPsec and WireGuard, TLS 1.3, DNSSEC, and email authentication.
- Network Security Principles and the Threats to Network Communication
- Cryptography for Networking: Ciphers, Key Exchange, Hashes, MACs and Post-Quantum Keys
- Certificates and PKI: X.509, Certificate Authorities, Validation, Revocation and Transparency
- Network Access Control: 802.1X, EAP and MACsec
- IPsec and IKEv2: AH, ESP, NAT Traversal, and WireGuard
- TLS 1.3: The Handshake, Record Protocol, 0-RTT, ECH and DTLS
- DNSSEC: Signed Zones, the Chain of Trust and TSIG
- Email Authentication: DKIM, SPF and DMARC
Part 14: Modern transports and practice
What runs beside TCP today, QUIC and HTTP/3, Multipath TCP and SCTP, and a method for troubleshooting real network problems.
- QUIC and HTTP/3: Transport Over UDP With Built-In TLS
- Other Transports: Multipath TCP and SCTP
- Troubleshooting Networks: A Layer-by-Layer Method With Real Captures
Part 15: Exercises
Graded exercise sets with explained solutions: addressing and subnetting, reading packet captures, and analyzing TCP connections.
- TCP/IP Exercises: Addressing, Subnetting and Forwarding
- TCP/IP Exercises: Reading Packet Captures From ARP to DNS
- TCP/IP Exercises: Analyzing TCP Connections, Losses and Performance
After the course: final quizzes
- Quiz: TCP/IP Course Final Exam (All Parts)
- Quiz: TCP/IP Interview Questions
- Quiz: TCP/IP Delicate Details
Start here: What TCP/IP Is: Packets, Datagrams, Connections and Packet Switching

More in TCP/IP Course
Quiz: TCP/IP Delicate Details
Twenty-five questions on the details that catch out experienced engineers: sequence numbers for SYN and FIN, TIME_WAIT versus tcp_fin_timeout, Karn's algorithm, socket buffer doubling, even and odd ephemeral ports, IPv6 checksums and fragmentation, negative DNS caching, and capture filter traps.
Quiz: TCP/IP Interview Questions
Thirty-three networking questions of the kind asked in developer, SRE and network engineering interviews: what happens when you load a URL, TCP versus UDP, handshakes, closing and TIME_WAIT, subnetting, NAT, DNS, MTU problems, congestion, TLS and QUIC, and debugging slow or failing connections.
Quiz: TCP/IP Course Final Exam (All Parts)
The final exam for the TCP/IP course: thirty questions across all fourteen parts, from packets and addressing through Ethernet, ARP, IP, DHCP, NAT, ICMP, UDP, DNS, TCP connections, reliability, congestion control, security, QUIC and troubleshooting.
Quiz: Modern Transports and Troubleshooting (TCP/IP Part 14)
Review modern transports and troubleshooting: QUIC packets, handshakes, 0-RTT, streams and connection migration, HTTP/3, Multipath TCP, SCTP multihoming, and a layered method for diagnosing real network faults.
Discussion
Sign in to ask a question or share what you learned.