Thursday, July 19, 2007

Routing

Routing is the process of selecting best paths in a network for moving a packet of data from source to destination. Routing is usually performed by a dedicated device called a router.

Routers don’t really care about hosts, they only care about networks and the best path to each network. The logical network address or IP address of the destination host is used to route packets to a network through a routed network, then the hardware address or MAC address of the host is used to deliver the packet from a router to the correct destination host.

Routing involves two basic activities: determining optimal routing paths and transporting packets through an internetwork. Part of this process involves analyzing a routing table to determine the best path.

Routing protocols use metrics to evaluate what path will be the best for a packet to travel. A metric is a standard of measurement, such as path bandwidth, that is used by routing algorithms to determine the optimal path to a destination. To aid the process of path determination, routing algorithms initialize and maintain routing tables, which contain route information. Route information varies depending on the routing algorithm used.

Routing algorithms fill routing tables with a variety of information. Destination/next hop associations tell a router that a particular destination can be reached optimally by sending the packet to a particular router representing the "next hop" on the way to the final destination. When a router receives an incoming packet, it checks the destination address and attempts to associate this address with a next hop.

Routing algorithms have used many different metrics to determine the best route. The following metrics can be used to determine best path

• Path length - Path length is the sum of the costs associated with each link traversed. Other routing protocols define hop count, a metric that specifies the number of passes through internetworking products, such as routers, that a packet must take en route from a source to a destination.

• Reliability - refers to the dependability (usually described in terms of the bit-error rate) of each network link.

• Delay - refers to the length of time required to move a packet from source to destination through the internetwork.

• Bandwidth - refers to the available traffic capacity of a link.

• Load - refers to the degree to which a network resource, such as a router, is busy. Load can be calculated in a variety of ways, including CPU utilization and packets processed per second.

• Communication cost

Routing tables also can contain other information, such as data about the desirability of a path. Routers compare metrics to determine optimal routes, and these metrics differ depending on the design of the routing algorithm used.

Routers communicate with one another and maintain their routing tables through the transmission of a variety of messages. The routing update message is one such message that generally consists 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.

Classes of routing protocols:

Distance Vector:
Distance Vector protocol is a simple routing protocol that uses distance or hop count as its primary metric for determining the best forwarding path. The distance-vector protocols find the best path to a remote network by judging distance. Distance vector algorithms, also known as Bellman-Ford algorithms send the entire routing table to directly connected neighbors. Distance vector algorithms know only about their neighbors. RIP and IGRP are the examples for distance vector protocols.

Link State:
Link state protocols send updates containing the state of their own links to all other routers on the network. Link-state algorithms also known as shortest path first algorithms flood routing information to all nodes in the internetwork. Each router, however, sends only the portion of the routing table that describes the state of its own links. In link-state algorithms, each router builds a picture of the entire network in its routing tables & determines the shortest path to a destination. OSPF is an example for link state protocol.