cadlag dot org

User Datagram Protocol

Next stop in my whirlwind tour of various networking protocols is UDP (RFC 768). The spec is only two pages so this post is going to be brief.

Whereas IP operates at the “network layer”, UDP sits at the “transport layer”. Really, UDP adds just one key feature on top of the basic IP datagram model: ports. A port lets you distinguish between multiple services behind a single network interface. This distinction is not important for routing across the network, but it’s a practical necessity.

The Kurose and Ross analogy is roughly this: think of hosts as households and these services as people. IP is like the postal service, delivering letters to a specific address. The port is the name of the intended recipient, but it’s up to whoever checks the mail (roughly “the operating system”) to deliver this.

That’s it for today. Next time, we’ll start looking at bigger problems that the transport layer solves.

Reply to this post by email ↪