1. Introduction

In this tutorial, we’ll study what datagram networks are. First, we’ll briefly introduce the two fundamental ways of forwarding data from a source to a destination in a computer network. Then, we’ll present the concept of datagram networks and their main characteristics.

2. Switching Approaches

In computer networks, end devices send messages to each other. These messages can be application data or communication control information.

Source devices can split long messages into smaller fragments to transmit them over the network if needed. Both entire messages and fragments of messages are called network packets or datagrams, depending on the context.

There are fundamentally two approaches to forwarding data from a source to a destination in a network: connection-oriented and connectionless transmission.

In the connection-oriented approach, it’s necessary to pre-establish the path between the source and destination before sending any packets. A virtual circuit is the term for this pre-established path. So, in this approach, each packet contains a virtual circuit identifier that specifies which circuit to pass through. This is why we call this approach Circuit Switching.

On the other hand, in the connectionless approach, the network forwards packets based on the source and destination addressing information they hold. Since there’s no pre-established path, each packet can take different paths between source and destination. For this reason, we call this approach Packet Switching.

3. Datagram Networks

Networks that employ packet switching are called Datagram Networks. They receive this name because, in this context, we usually refer to packets as datagrams.

RFC 1594 defines a datagram as a self-contained, independent entity of data carrying sufficient information to be routed from the source to the destination computer. Datagrams consist of header and payload sections. Their headers include source and destination addresses, which switches use to determine how to forward each datagram to its destination.

In this context, we usually refer to switches in a generic way. It can be either routers (layer 3) or layer 2 switches.

Let’s take a look at an example. The figure below illustrates a datagram network composed of multiple switches and two end devices. Device 1 is sending data to device 2 through the datagram network:

datagram networks


In this example, device 1 splits it into four datagrams to send the data. Each datagram has its source and destination fields set to the addresses of device 1 and device 2, respectively. When the switch nodes receive the datagrams sent by device 1, they can see that these datagrams are addressed to device 2.

Each switch has a forwarding table that indicates the neighboring switch to which it should forward a datagram addressed to a given destination. Switches can periodically update their forwarding tables. Thus, in this example, switches can determine the best next switch to forward each datagram toward device 2 by consulting their forwarding tables.

Depending on network conditions, a switch can forward datagrams addressed to the same destination to different nodes every time. That’s why, in the figure above, switches forwarded the datagrams via different paths.

As datagrams with the same origin and destination can travel different paths, they can arrive in a different order from the one in which they left. In the figure above, the datagrams were ordered as 4, 3, 2, and 1, but they arrived in the order 3, 4, 2, and 1. Therefore, the end devices of datagram networks often need to reorder the packets they receive to reconstruct the data.

Thus, an important property of datagram networks is that possible switch failures don’t seriously affect communication since the network can forward the datagrams through alternative paths.

However, in datagram networks, it is more difficult to control congestion and provide quality of service. Despite this, several techniques address these issues.

4. Conclusion

In this article, we learned what datagram networks are. We can conclude that datagram networks use packet switching and can forward packets with the same source and destination along different paths.

Comments are open for 30 days after publishing a post. For any issues past this date, use the Contact form on the site.