The Network Layer

   Packet Routing

By using more than one type of address to identify each item of data, the Network Layer in an intermediate node can forward packets between two nodes not directly connected. To see how this works, refer to the Network Layer and Packet Routing Diagram.

Network Layer and Packet Routing

Network Layer and Packet Routing

Imagine that Node A has a packet to send to Node D. The nodes are not on the same physical link, so Node A's Data Link Layer process cannot deliver the packet directly. However, Node A's Network Layer software knows that Node B is the "next hop" on the way to Node D. Thus, it addresses the packet to the network address of Node D, then passes the packet down to its Data Link Layer with instructions to transmit it to Node B. Thus, the Data Link Layer frame that leaves Node A is addressed to Node B (using Node B's NIC address); however, the packet it carries is addressed to Node D (using Node D's network address).

Node B's Data Link Layer process recognizes that the frame is addressed to Node B. It decapsulates the packet and passes it up to its Network Layer process. However, that software recognizes that the packet is addressed to Node D. Node B's Network Layer knows it must forward the packet, but Node B and Node D are also not directly connected. Thus, Node B transmits the packet to Node C, which its Network Layer software knows is closest to Node D.

Once again, Node C's Network Layer recognizes that it must forward the packet. However, because Nodes C and D are directly connected, it transmits the packet and frame directly to the destination.