PROTOCOL EXPLORERLearn how the internet works
Now learningUDP · Datagram deliveryOverview · 5 steps
Learning progress0%
0 / 14 complete · 0 in progress
Client192.168.1.10Router192.168.1.1InternetEcho Server203.0.113.20

Protocol overview

UDP

Active

User Datagram Protocol

Send independent datagrams with an eight-byte transport header. UDP adds ports and a checksum but does not add delivery, ordering or retransmission.

Layer
Transport (Layer 4)
Default port
Application dependent
Transport
IPv4 / IPv6
Data format
Independent binary datagrams
Defined in
RFC 768
Read the complete guide ↗

Packet flow

DNSTCPRequestResponse
No.TimeSourceDestinationProtocolInfoSize
10.000s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 160 B
20.020s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 260 B
30.040s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 360 B
40.060s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 460 B
50.080s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 560 B
60.083s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 160 B
70.100s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 660 B
80.103s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 260 B
90.120s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 760 B
100.140s192.168.1.10203.0.113.20UDP50000 → 5004 Len=9 · MSG 860 B
110.143s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 460 B
120.183s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 360 B
130.193s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 560 B
140.213s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 660 B
150.253s203.0.113.20192.168.1.10UDP5004 → 50000 Len=7 · REPLY 860 B

UDP Explained: Datagram Loss and Reordering

Watch UDP datagrams arrive out of order, lose one in flight and receive application echoes. Compare raw arrival order with app-side reordering.

Understanding UDP

Send independent datagrams with an eight-byte transport header. UDP adds ports and a checksum but does not add delivery, ordering or retransmission.

Default port
Application dependent
Transport / carrier
IPv4 / IPv6
Category
core

What to look for in the lab

Watch request 4 reach the server before request 3, then check why reply 7 never appears. Toggle application reordering to see the missing slot. The request numbers are application data, so the receiver needs its own rule to reorder them.

1. Send without a handshake

The client sends application messages with IDs 1–8. The echo application replies with the same ID after receiving a message; these are application replies, never UDP acknowledgements.

2. Keep independent messages in flight

Messages leave 20 ms apart without waiting for replies. Message 4 arrives before 3. The numbers belong to the application, not a UDP sequence field.

3. Lose one and keep sending

Request 7 is lost. Request 8 still leaves on schedule. Since the server never receives 7, its application cannot send reply 7.

4. Complete the application round trips

Every received request gets a same-ID echo reply. Requests and replies can be in flight together. Follow replies 1, 2, 4, 3, 5, 6 and 8 all the way back to the client.

5. Account for every message

Eight requests were sent: seven reached the server and all seven replies reached the client. Only request 7 was lost; no reply 7 exists. The final ledger accounts for every ID, with no messages left in flight.

Protocol relationships

Protocols cooperate across layers. Compare the neighboring lessons to distinguish addressing, delivery, application semantics and encryption.

Standards and editorial method

Written and implemented independently by NavSprout. Lessons summarize public protocol standards using synthetic documentation addresses and fictional credentials. Consult the standards for complete wire formats and normative behavior.

RFC 768 ↗

Check your understanding

Who decides whether to retry a lost UDP message?