TCP & UDP
Explain and observe how TCP, UDP and QUIC deliver application data, and diagnose transport-level problems from sockets and captures.
4 objectives 6 steps about 145 min
Check what you know
The lessons are coming later. The knowledge check is ready now.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Explain ports and sockets, write a minimal client and server with the socket API, and map listening and established sockets to processes with ss.
- Trace a TCP connection's lifecycle - handshake, data transfer with sequence and acknowledgment numbers, teardown and TIME_WAIT - in a capture.
- Explain TCP flow control, retransmission and congestion control (CUBIC, BBR), and recognize retransmissions, zero windows and resets in Wireshark.
- Choose between TCP, UDP and QUIC for an application and explain the trade-offs in reliability, ordering, latency and head-of-line blocking.
Lesson plan
6 steps, about 145 min · 0 of 5 lessons available so far
- Ports, sockets and the socket API in one small client and server Worked example · 25 min · coming later
- Lab: follow a TCP connection from SYN to TIME_WAIT Lab · 25 min · coming later
- Reliability machinery: windows, retransmissions and congestion control Concept · 25 min · coming later
- Lab: add loss and delay with tc netem and read the effects in Wireshark Lab · 30 min · coming later
- UDP and QUIC: when TCP is the wrong tool Concept · 20 min · coming later
- Check: diagnose transport problems from captures Knowledge check · 8 questions
Practise it
Write a small TCP echo server and client in Python, capture a session and annotate the handshake, data and teardown with sequence numbers; then add 2% loss and 100 ms delay with tc netem and explain the throughput change using Wireshark's TCP analysis and an iperf3 run.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Chat ServerIntermediate · 8–16 h
- Build your own DNS ServerIntermediate · 8–16 h
- Build your own BitTorrent ClientIntermediate · 12–24 h
- Build your own TCP/IP StackAdvanced · 30–60 h
- Build your own VPNAdvanced · 15–30 h
- Build your own Web ServerIntermediate · 8–16 h
- Build your own RedisIntermediate · 15–30 h
References
Hard prerequisites
None.
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.