Windows 7 / Networking

Distance-Vector Versus Link-State Algorithm

Routers use distance-vector-based routing protocols to periodically advertise or broadcast the routes in their routing tables, but they send it to only their neighboring routers. Routing information exchanged between typical distance-vector-based routers is unsynchronized and unacknowledged. Distance-vector-based routing protocols are simple and easy to understand and easy to configure. The disadvantage is that multiple routes to a given network can reflect multiple entries in the routing table, which leads to a large routing table. In addition, if you have a large routing table, network traffic increases as it periodically advertises the routing table to the other routers, even after the network has converged. Last, distance-vector protocol convergence of large internetworks can take several minutes.

Link-state algorithms are also known as shortest path first algorithms. Instead of using broadcast, link-state routers send updates directly (or by using multicast traffic) to all routers within the network. Each router, however, sends only the portion of the routing table that describes the state of its own links. In essence, link-state algorithms send small updates everywhere. Because they converge more quickly, link-state algorithms are somewhat less prone to routing loops than distance-vector algorithms. In addition, link-state algorithms do not exchange any routing information when the internetwork has converged. They have small routing tables because they store a single optimal route for each network ID. On the other hand, link-state algorithms require more CPU power and memory than distance-vector algorithms. Link-state algorithms, therefore, can be more expensive to implement and support and are considered harder to understand.

Routing Information Protocol

A popular routing protocol is the Routing Information Protocol (RIP), which is a distance-vector protocol designed for exchanging routing information within a small- to medium-size network. The biggest advantage of RIP is that it is extremely simple to configure and deploy.

RIP uses a single routing metric of hop counts (number of routers) to measure the distance between the source and a destination network. Each hop in a path from source to destination is assigned a hop-count value, which is typically 1. When a router receives a routing update that contains a new or changed destination network entry, the router adds one to the metric value indicated in the update and enters the network in the routing table. The sender's IP address is used as the next hop.

Because RIP uses only hop count to determine the best path to an internetwork. If RIP finds more than one link to the same remote network with the same hop count, it automatically performs a round-robin load balance. RIP can perform load balancing for up to six equal-cost links.

However, a problem with using hops as the only metric is when two links to a remote network have different bandwidths. For example, if you have one link that is a 56KB switched link and a T1 running at 1.544Mbps, there would be some inefficiency when sending equal data through both pathways. This is known as pinhole congestion. To overcome pinhole congestion, you have to design a network with equal bandwidth links or use a routing protocol that takes bandwidth into account.

RIP prevents routing loops from continuing indefinitely by implementing a limit on the number of hops allowed in a path from the source to a destination. The maximum number of hops in a path is 15. If a router receives a routing update that contains a new or changed entry, and if increasing the metric value by one causes the metric to be infinity (in this case, 16), the network destination is considered unreachable. Of course, this makes it impossible for RIP to scale to large or very large internetworks. Note: The count-to-infinity problem is the reason why the maximum hop count of RIP for IP internetworks is set to 15 (16 for unreachable). Higher maximum hop count values would make the convergence time longer when count-to-infinity occurs.

Initially, the routing table for each router includes only the networks that are physically connected to it. A RIP router periodically (every 30 seconds) sends announcements that contain its routing table entries so that the other routers can update their routing tables. RIP version 1 uses IP broadcast packets for its announcements. RIP version 2 uses multicast or broadcast packets for its announcements. All RIP messages are sent over UDP port 520.

RIP routers can also communicate routing information through triggered updates, which are triggered when the network topology changes. Different from the scheduled announcements, the triggered updates are sent immediately rather than held for the next periodic announcement. For example, when a router detects a link or router failure, it updates its own routing table and sends the updated routes. Each router that receives the triggered update modifies its own routing table and propagates the change to the other routers.

You can configure each RIP router with a list of routers (by IP address) that accepts RIP announcements. By configuring a list of RIP peers, RIP announcements from unauthorized RIP routers are discarded. In addition, to prevent RIP traffic from being received by any node except neighboring RIP routers, you can set up some routers to use unicast RIP announcements to neighboring RIP routers. Because the RIP is a distance-vector protocol, as internetworks grow larger in size, the periodic announcements by each RIP router can cause excessive traffic. Another disadvantage of RIP is its high convergence time. When the network topology changes, it may take several minutes before the RIP routers reconfigure themselves to the new network topology. As the network reconfigures itself, routing loops may form that result in lost or undeliverable data. To help prevent routing loops, RIP implements split-horizon.

To overcome some of RIP shortcomings, RIP Version 2 (RIP II) was introduced. RIP v2 provides the following features:

  • You can use a password for authentication by specifying a key that is used to authenticate routing information to the router. Simple password authentication was defined in RFC 1723, but newer authentication mechanisms, such as Message Digest 5 (MD5), are available.
  • RIP v2 includes the subnet mask in the routing information and supports variable-length subnets. Variable-length subnet masks can be associated with each destination, allowing an increase in the number of hosts or subnets that are possible on your network.
  • The routing table can contain information about the IP address of the router that should be used to reach each destination. This helps prevent packets from being forwarded through extra routers on the system.
  • Multicast packets speak only to RIP v2 routers and are used to reduce the load on hosts not listening to RIP v2 packets. The IP multicast address for RIP v2 packets is 224.0.0.9. Note: Silent RIP nodes must also be listening for multicast traffic sent to 224.0.0.9. If you are using Silent RIP, verify that your Silent RIP nodes can listen for multicasted RIP v2 announcements before deploying multicasted RIP v2.
RIPv2 supports multicasting for updating the routing tables. RIPv1 does not support this feature. RIPv1 routers cannot communicate with RIPv2 routers that use multicasting for updates.

Open Shortest Path First (OSPF)

For small or medium networks, distributing data throughout the network and maintaining a route table at each router is not a problem. When the network grows to a size that includes hundreds of routers, the routing table can be quite large (several megabytes) and calculating routes requires significant time as the number of router interfaces goes up or down.

Some protocols, such as Open Shortest Path First (OSPF), allow areas (grouping of contiguous networks) to be grouped together into an autonomous system (AS). Areas that make up the autonomous areas usually correspond to an administrative domain, such as a department, a building, or a geographic site. An AS can be a single network or a group of networks, which is owned and administered by a common network administrator or group of administrators.

OSPF is a link-state routing protocol used in medium-sized and large networks that calculates routing table entries by constructing a shortest-path tree. OSPF is designed for large internetworks (especially those spanning more than 15 router hops). The disadvantage of OSPF is that it's generally more complex to set up and requires a certain amount of planning.

The Open Shortest Path First (OSPF) routing protocol component in Routing and Remote Access has been removed from Windows Server 2008.
[Previous] [Contents] [Next]