Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Routing within a datagram network
In packet switching networks using datagrams, datagrams are data packets which contain adequate header information so that they can be individually routed by all intermediate switching devices to the destination. These networks are called datagram networks since communication occurs via datagrams.
Routing Principle
In datagram networks, each data packet is routed independently from the source to the destination even if they belong to the same message. No prior resource or channel allocation is done for the individual packets. As the datagrams are treated as independent units, no dedicated path is fixed for data transfer.
Each datagram is routed by the intermediate routers using dynamically changing routing tables. So two successive packets from the source may follow completely separate routes to reach destination. Resources are allocated on demand on a First-Come First-Serve (FCFS) basis. When a packet arrives at a router, the packet must wait if there are other packets being processed, irrespective of its source or destination.
Key Characteristics
-
Independent routing − Each packet is routed separately without knowledge of other packets
-
Dynamic routing tables − Routing decisions change based on current network conditions
-
No connection establishment − Packets are sent immediately without setting up a dedicated path
-
Variable packet delivery − Packets may arrive out of order or take different routes
Example of Routing in a Datagram Network
The diagram below shows a message being sent by host H1 to host H2. The Internet Service Provider (ISP) comprises of five routers that are numbered from 1 to 5. H1 is connected to router 1 while H2 is connected to router 5.
Suppose that the message is of such a size that it has to be broken into 4 packets. The packets are labelled as A, B, C and D.
Each of the five routers maintains a routing table that has two columns: DEST storing the destination node and NEXT storing next node. To reach the DEST node the packet is routed via the NEXT node. The routing tables are dynamic in nature and are refreshed periodically depending upon the network conditions.
Packet Routing Sequence
When packet A is transmitted, it is transferred to router 1 by host H1. The destination is router 5, since host H2 is connected to it. Router 1 consults its routing table and sends the packet to router 2. Router 2 sends it to router 3 which sends it to router 5.
So, the path of packet A is 1 ? 2 ? 3 ? 5.
When packet B is transmitted, the routing table of router 2 has changed. Consequently, the path of packet B is different from that of A. The path of packet B is 1 ? 2 ? 5.
When packet C is transmitted, the routing table of router 1 has changed. Thus, the path of packet C is 1 ? 4 ? 5.
The routing tables remain the same for the next packet, so the path doesn't change for it. Hence, the path of packet D is again 1 ? 4 ? 5.
Advantages and Disadvantages
| Advantages | Disadvantages |
|---|---|
| No connection setup delay | Packets may arrive out of order |
| Flexible routing adapts to network changes | No guaranteed delivery or bandwidth |
| Efficient resource utilization | Higher overhead due to routing headers |
| Fault tolerant − alternative paths available | Potential packet loss during congestion |
Conclusion
Datagram networks route each packet independently using dynamic routing tables, providing flexible and fault-tolerant communication without connection establishment. While packets may follow different paths and arrive out of order, this approach offers efficient resource utilization and adaptability to changing network conditions.
