Datagram Explained: How Data Travels Without a Delivery Promise
A datagram is a self-contained unit of network data, handled without a promise that it will arrive. That sounds unhelpful, yet it's part of how the internet carries everything from live conversations to reliable file downloads.
The missing promise has to come from somewhere else when an application needs it.
The same word appears at two levels
A datagram contains a header, the control information used to handle it, and a payload, the contents it carries. What goes in the header depends on the protocol—the agreed rules for that part of the communication.
Internet Protocol, or IP, moves data between networks. An IP datagram includes source and destination IP addresses, which identify network interfaces rather than email inboxes or user accounts.
The original IPv4 specification describes each datagram as independent. Routers, the devices that forward traffic between networks, choose where to send it next using routing information and its destination address.
Packets sent one after another don't have to follow different paths; they can take the same route. Independent handling means the network hasn't reserved a dedicated circuit for their conversation.
TCP or UDP: Which One Carries Your Data?
You'll also see UDP datagram. UDP stands for User Datagram Protocol, and it carries separate messages between applications on top of IP.
| Name | What it describes |
|---|---|
| IP datagram | A unit carried between networks, with IP addressing information. |
| UDP datagram | A message with a UDP header, carried inside IP. |
| Packet | A broader, commonly used name for a unit of network data. |
A UDP header adds port numbers, a length, and a checksum field. A port helps the receiving device direct traffic to the right network service; a checksum is a calculated value used to detect some transmission errors.
The UDP specification defines that header as eight bytes long. The IP header surrounding the UDP datagram adds its own information and size.
Sent doesn't mean received
Basic UDP delivery doesn't confirm arrival, resend missing messages, remove duplicates, or put messages back in order. The application or another protocol must provide those features when they're needed.
Suppose an online game sends a character's position several times a second. If an update disappears, the game might wait for the next one; if an older update arrives late, it needs a way to avoid treating that position as current.
UDP won't make that decision for it.
The internet's UDP usage guidelines explain these responsibilities, including handling loss, duplication, and reordering. They also warn that repeatedly resending lost traffic can worsen congestion—the crowding that happens when a network can't keep up.
That freedom can suit live information whose value quickly expires. It doesn't make every UDP application faster than every alternative.
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
Reliable delivery can be built above datagrams
TCP, the Transmission Control Protocol, provides an ordered stream of data with loss recovery while using IP underneath. So an IP datagram's lack of delivery guarantees doesn't mean every application using the internet must accept missing information.
QUIC is another example: this transport protocol provides reliable streams and encrypted communication while carrying its packets inside UDP datagrams. UDP's basic service doesn't describe every feature of the protocol using it.
The reverse matters too: UDP alone doesn't encrypt a message or prove who sent it. Those protections require additional security mechanisms.
When a diagram or troubleshooting tool says “datagram,” first check whether it means IP or UDP. Then look at the surrounding protocols to learn what happens when something is missing, late, duplicated, or untrusted.
UDP: Letting the Application Decide What Can Wait

Packets: The Data You Send and the Instructions That Carry It

IP Fragmentation: When a Packet Is Too Big for the Route

QUOTE:
"Amateurs hack systems, professionals hack people."
