route each packet to its des- tination (such as the destination address) is appended to the packet, form- ing the packet header. The packet is sent to the first network node; in packet switching, network nodes are referred to as routers. Figure 2-2 illustrates a network of routers. When the router receives the packet, it examines the header and forwards the packet to the next appropriate router. This process of looking up the header of the packet is performed in every router in the path until the packet reaches its destination. After reaching the destina- tion, the destination terminal strips off the header of the packet and obtains the actual data that was originated at the source. Chapter 2 Figure 2-2 Network of routers. Header Data Header Data Header Data Header Header ROUTER ROUTER ROUTER ROUTER ROUTER ROUTER ROUTER Header Datagrams Routing in packet-switched networks can be performed with datagrams or virtual circuits. Networks using datagrams make routing decisions based solely on the header of the packet that will be routed. The header is examined and the packet is forwarded to the next proper hop. Dif- ferent packets addressed to the same destination might take different routes through the network, enabling load balancing. Packets can avoid congested points in the network by taking alternative paths. As a conse- quence, packets taking different routes will experience different delays, and it's entirely possible for packet #5, which was sent later than packet #1, to take a faster route and arrive earlier than packet #1. Out-of-sequence arrival of datagrams is remedied by the destination, which reorders them before delivering them to the user. Figure 2-3 shows how the datagram approach works in the network. Datagrams traveling from A to B are routed towards B based on the header Packet Switching, IP, and the IETF of each particular datagram. We've already recognized that a particular router might decide to route datagrams towards B using alternative paths. The result of this approach is that datagrams reach