NetFlow Lab/Protocol Labs/UDP
Simulated
Mission

Send four datagrams to 203.0.113.20:5060 with no handshake, no acknowledgement, and no waiting.

stream · four datagrams, clean wire live
PC-1 · sender192.168.1.10:52310send queue — no waiting#1 172 bytes#2 172 bytes#3 172 bytes#4 172 bytesip · proto 17 · best effortRouterqueue 12%Server · receiver203.0.113.20:5060delivered to the appno handshake · no acknowledgement · no sequence numbers · no retransmission
same four messages over TCPthe trade-off
UDP — what you just watched
—Sends immediately — first datagram leaves before TCP would have finished saying hello.
—Eight bytes of header. No state to keep on either side.
—No acknowledgements came back, because none were ever expected.
—Order and completeness are the application’s job if it wants them.
TCP — what it would have done
—Three-way handshake first — nothing sends until both ends agree.
—Twenty bytes of header, plus a connection to remember.
—Would ACK every segment and hold the stream in order.
—Guarantees order and delivery — by making everyone wait for it.
open the TCP lab →
udp_header · eight bytes, that is all
source port
52310

The sender’s ephemeral port — where a reply would go, if one came.

destination port
5060

The only addressing UDP adds on top of IP: which socket on that host.

length
8 bytes (header only)

Header plus payload. The header itself is a fixed 8 bytes.

checksum
0x8f31

Detects corruption — and then discards the datagram. Detection is not repair.

sequence / ack
— absent —

These fields do not exist in UDP. Without them, a gap is invisible.

network_conditions
The wire
IDLE
Socket opened — no handshake at all
Datagram 1 sent and forgotten
Datagram 2 sent and forgotten
Datagram 3 sent and forgotten
Datagram 4 sent and forgotten
Think first · step 1 of 5

UDP has no handshake. What does the app need before the first datagram can leave?

what the app hears
waiting for the first datagram…
what just happened

UDP is the transport that promises nothing. It adds two ports and a length to IP and gets out of the way. For voice, video and games, arriving late is worse than not arriving — so nobody waits.

clean wire · all four should arrive