Home

Datagrams

A datagram is a self-contained, independent packet of data that is sent over a packet-switched network. Datagrams do not require a prior agreement or a connection between sender and receiver; each datagram is routed separately through the network and may take different paths to its destination.

Datagrams carry addressing and control information in their headers and are designed for best-effort delivery. Because

In the Internet Protocol (IPv4 and IPv6), an IP datagram is the basic unit of data transfer.

At the transport layer, the User Datagram Protocol (UDP) provides a datagram service. UDP datagrams carry source

Datagram networks are contrasted with connection-oriented or virtual-circuit networks, where a route is established and maintained

Common uses of datagrams include DNS queries, streaming, and real-time communications where low latency is valued

each
datagram
is
independent,
routing
decisions
can
change
from
hop
to
hop
and
datagrams
may
arrive
out
of
order,
be
duplicated,
or
be
lost.
Datagram
size
is
limited
by
protocol
and
network
MTU.
It
contains
a
header
with
addressing,
fragmentation
flags,
TTL,
and
a
payload.
IP
datagrams
may
be
fragmented
by
routers
if
the
payload
is
larger
than
the
network
MTU,
and
they
are
reassembled
at
the
destination
when
possible.
and
destination
ports
and
a
checksum
but
do
not
guarantee
delivery,
ordering,
or
duplicate
protection.
A
UDP
datagram's
payload
may
be
up
to
65,535
bytes
total,
including
the
UDP
header,
and
in
practice
is
often
constrained
by
the
path
MTU.
for
the
duration
of
a
session.
Datagram
networks
favor
simplicity,
scalability,
and
robustness
to
routing
changes
but
sacrifice
reliability
and
ordering
without
higher-layer
protocols
such
as
TCP.
over
guaranteed
delivery;
many
applications
use
UDP
datagrams
and
implement
their
own
error
handling
if
needed.