Windows 7 / Networking

Routing and Routers

When you send a packet from one computer to another computer, it first determines whether the packet is sent locally to another computer on the same LAN or to router so that it can be routed to the destination LAN. If the packet is meant to go to a computer on another LAN, it is sent to the router (or gateway). The router then determines the best route to take and forwards the packets to that route. The packet then goes to the next router and the entire process repeats itself until it gets to the destination LAN. The destination router then forwards the packets to the destination computer.

To determine the best route, the routes use complex routing algorithms, which take into account a variety of factors, including the speed of each transmission media, the number of network segments, and the network segment that carries the least traffic. Routers then share status and routing information to other routers so that they can provide better traffic management and bypass slow connections. In addition, routers provide additional functionality, such as the capability to filter messages and forward them to different places based on various criteria. Most routers are multiprotocol routers because they can route data packets using many different protocols.

A metric is a standard of measurement, such as hop count, that is used by routing algorithms to determine the optimal path to a destination. A hop is the trip a data packet takes from one router to another router or from a router to another intermediate point to another in the network. On a large network, the number of hops a packet has taken toward its destination is called the hop count. When a computer communicates with another computer, and the computer has to go through four routers, it has a hop count of four. With no other factors taken into account, a metric of four would be assigned. If a router had a choice between a route with four metrics and a route with six metrics, it would choose the route with four metrics over the route with six metrics. Of course, if you want the router to choose the route with six metrics, you can overwrite the metric for the route with four hops in the routing table to a higher value.

To keep track of the various routes in a network, routers create and maintain routing tables. Routers communicate with one another to maintain their routing tables through a routing update message. The routing update message can consist of all or a portion of a routing table. By analyzing routing updates from all other routers, a router can build a detailed picture of network topology.

Static Versus Dynamic Routes

Static routing algorithms are hardly algorithms at all, but are table mappings established by the network administrator prior to the beginning of routing. These mappings do not change unless the network administrator alters them. Algorithms that use static routes are simple to design and work well in environments where network traffic is relatively predictable and where network design is relatively simple.

Because static routing systems cannot react to network changes, they generally are considered unsuitable for today's large, changing networks. Most of the dominant routing algorithms are dynamic routing algorithms, which adjust to changing network circumstances by analyzing incoming routing update messages. If the message indicates that a network change has occurred, the routing software recalculates routes and sends out new routing update messages. These messages flow through the network, stimulating routers to rerun their algorithms and change their routing tables accordingly.

NOTE: Dynamic routing algorithms can be supplemented with static routes where appropriate.
[Contents] [Next]