Lesson 20: IP, TCP, UDP — The Protocol Stack
All network communication — between a model serving server and clients, between distributed training nodes, and between NVLink endpoints — is built on IP, TCP, and UDP. TCP provides guaranteed ordered delivery with a 3-way handshake. UDP provides fast datagrams without guarantees. At NVIDIA, InfiniB
IP is the house address. TCP is an organized phone call — connect, talk, hang up. UDP is a postcard — you send it and don't know if it arrived. Ports are apartment numbers in the same building.
- TCP
- Transmission Control Protocol — a connection-oriented protocol that guarantees ordered and reliable data delivery. Uses a 3-way handshake to establish a connection. Provides flow control and congestion control.
- UDP
- User Datagram Protocol — a connectionless protocol that sends datagrams without guarantees of delivery, order, or integrity. Faster than TCP. Suitable for DNS, video streaming, and RDMA over Converged Ethernet.
- IP address
- A unique identifier for a network interface. IPv4: 32 bits (e.g. 192.168.1.1). IPv6: 128 bits. The IP layer is responsible for routing packets between networks.
- port
- A 16-bit number (1–65535) that identifies a specific service within a machine. HTTP=80, HTTPS=443, SSH=22. A socket = IP + port. Well-known ports are 1–1023 and require root privileges.
- three-way handshake
- TCP connection establishment: (1) Client sends SYN, (2) Server replies SYN-ACK, (3) Client sends ACK. After this the connection is active. Each step adds ~1 RTT (Round-Trip Time).