A Datagram is a self-contained, independent entity of data carrying sufficient information to be routed from the source to the destination computer without relying on earlier exchanges between a source computer and the destination computer as well as the transporting network. It does this over the ‘User Datagram Protocol’ (UDP), one of the core members of the Internet protocol.
Datagram service is often compared to a mail delivery service. The user will provide both the departing and destination address, however the sender has no way of knowing whether the letter was successfully delivered. There is no confirmation upon a successful delivery, there is no notification if the delivery fails and therefore Datagram service is considered unreliable.
Datagram service routes datagrams without first creating a delivery path. Datagram service is therefore considered connectionless. There is also no consideration given to the order in which it and other datagrams are sent or received. In fact, many datagrams in the same group can travel along different paths before reaching the same destination.
Each datagram is made up of two separate components, a header and a data payload.
The header contains all the information required in order to route from the originating equipment to the destination without relying on previous exchanges between the equipment and the network. Headers will usually include the source and destination addresses as well as a type field. If you were sending a postal letter the header would be the envelope. Included would be the addressee, the addresser, post code and possibly a subject.
The payload is the data to be transported. This process of nesting data payloads in a tagged header is called encapsulation. Referring back to the previous analogy, this of course would be the information within the envelope.
Although both the terms ‘datagram’ and ‘datagram packet’ can be used interchangeably to describe the way data is encapsulated to be sent over a network. Where datagrams use the (UDP), a connectionless communication protocol. Datagram packets in comparison use the Transition Control Protocol (TCP) another core member of the Internet protocol. Within the TCP, Packets must first form what is known as a handshake in order to transmit data. This makes the use of packets over a TCP far more reliable and secure.
‘What Is A Datagram ? – How Datagrams Work’ is licensed under a Creative Commons Attribution 4.0 International License. You have permission to republish this article with attribution to the author and Blog.trustico.com.