Routing

The routing process allows messages (or data packets) to be delivered from a node on one network to a node on another network using the most appropriate, efficient path (or route). Routing environments employ routers, which function at the network layer of the OSI model (described in Chapter 1 of this book).

Routers direct data packets to the proper network and deliver them to the appropriate node on that network. The router uses routing protocols, a set of rules governing the exchange of information between nodes, to direct packets to their destination. The sending node (referred to as source) and receiving node (referred to as destination) must use either the same protocols or a protocol converter in order to communicate. Routers also allow data packets to be transmitted over dissimilar networks, such as Ethernet, Token Ring, and FDDI, without having to be translated.

Determining the most appropriate, efficient path is protocol-specific. Some protocols determine the path by hop count, which is the number of routers between the source and the destination; other protocols determine the path by analyzing the available bandwidth and calculating which route provides the best quality of service.

In a routing environment, each physical destination must be uniquely identified. Most routing protocols are based on an addressing scheme that uses a network, and a node number that identifies each node.

When a computer on an internetwork wants to communicate with a node on another network, the network layer software creates a packet. The packet contains the data to be sent, the address of the sender (source address), and the address of the destination (destination address).

The following diagram illustrates how packets break down information, such as the sender, sender address, destination address, and data.

Figure F.1 Data Packet Structure

The packet is put inside the appropriate frame for transmission across the network.

The network layer software also determines whether the destination resides on the local network or another network. If the destination address is on another network, the data packet is sent to the router that is attached to the local network. When the router receives the data packet, it removes the frame encapsulating the data packet and examines the destination address of the network-layer packets to find on which network the node resides.

Figure F.2 Packet Routing Across Multiple Networks

The router then compares the network information to its routing table, which contains directions on how to get to various places on the internetwork. There can be a number of networks and routers between a source and destination. When the destination's network is found in the table, the router puts the network-layer packet into the appropriate frame for the next network over which the packet will be transmitted, and sends it to the next network in the direction of the destination node. Each router between the source and destination network functions in this manner.

When the router attached to the network containing the destination node receives the packet, it removes the frame encapsulating the network-layer packet and compares the destination network address to its routing table.

When the router determines that it is directly attached to the destination network, it examines the packet for the destination node number, which is compared to the router's Address Mapping Table. This table correlates the packet's network-layer address to the device's Media Access Control (MAC) address. When a match is found, the router puts the data from the packet into the appropriate frame and sends it to the destination node.