Datagram - Use in The Internet Protocol

Use in The Internet Protocol

The Internet Protocol defines standards for several types of datagrams.

Datagram service is a service provided by IP at the Internet layer. It is a connectionless, best effort, unreliable, message delivery service. Many higher level protocols including TCP (a connection-oriented service) depend on IP's Datagram service, laying additional functionality on top. UDP uses IP's Datagram service as well.

The term datagram is often considered synonymous to packet but there are some nuances. The term datagram is generally reserved for packets of an unreliable service that does not notify the user if delivery fails, while the term packet applies to any message formatted as a packet. For example, Internet Protocol (IP) provides an unreliable service and UDP over IP is also unreliable. That is why IP and UDP packets are generally called datagrams.

If a datagram fragments, then its fragments may be referred to as packets, but not as datagrams. TCP refers to its fragments as TCP segments, not packets, presumably to distinguish them from unreliable fragments.

Read more about this topic:  Datagram