Lesson 137

IP, TCP & UDP

Addressing · Reliable streams · Fast datagrams

1:00

How packets find the right machine (IP), the right app (ports), and whether delivery is reliable (TCP) or fast (UDP).

By the end, you can

  • Describe the three jobs of the transport stack: IP routes to the machine, the port picks the app, TCP/UDP governs delivery semantics.
  • Explain why IP is called best-effort and connectionless, and list the failures it does not protect against.
  • State the bit widths and approximate address counts of IPv4 and IPv6, and explain how NAT stretches IPv4.
  • Name the well-known port numbers for DNS, HTTP, and HTTPS, and define what a socket is.
  • Trace the three messages of the TCP handshake and explain what each sequence/ack field means.
  • Describe how TCP sequence numbers enable retransmission and reordering of out-of-order segments.
  • Distinguish flow control (rwnd, protects the receiver) from congestion control (cwnd, protects the network).
  • Explain what UDP discards relative to TCP and identify the application categories that benefit from UDP.
  • Choose the appropriate protocol — TCP or UDP — given a real application's tolerance for data loss vs latency.
Up next in Networking, Distributed Systems & Databases
Questions or feedback?