May 21, 2011

What is Datagram?

A datagram is a basic transfer unit associated with a packet-switched network in which the delivery arrival time and order are not guaranteed. A datagram consists of header and data areas, where the header contains information sufficient for routing from the originating equipment to the destination without relying on prior exchanges between the equipment and the network. The source and destination addresses as well as a type field are found in the header of a datagram.
The term datagram is often considered synonymous to "packet", but there are some nuances. First, the term packet applies to any message formatted as a packet, while the term datagram is generally reserved for packets of an "unreliable" service. An "unreliable" service does not notify the user if delivery fails. For example, IP itself provides an unreliable service and UDP over IP also provides an unreliable one. That is why UDP packets are generally called datagrams. Second, if a datagram fragments, then its fragments may be referred as packets, but not as datagrams. However, TCP refers to its fragments as TCP segments, not packets, presumably to assert that its fragments are reliable.

No comments:

Related Posts Plugin for WordPress, Blogger...