Distance Vector Protocols RIP and IGRP

Distance vector protocols advertise routing information by sending messages, called routing updates, out the interfaces on a router. These updates contain a series of entries, with each entry representing a subnet and a metric. The metric represents how good the route is from that router's perspective, with a smaller number being a better route.

Any routers that receive a copy of a distance vector routing update receive that information and possibly add some routes to their routing table. The receiving router adds the routes only if the routing update described a route to a subnet that it did not already know about or if it described a route that already was known, but the newly learned route has a better (lower) metric.

Figure 14-2 depicts the basic process. Figure 14-2 Basic Distance Vector Routing Update, with Resulting Learned Route

Routing Update

Subnet

Metric

10.1.1.0

1

B's Routing Table

IP Subnet

Mask

Next Router

Output Interface 1

10.1.1.0

255.255.255.0

10.1.2.1

Serial 0

Note that Router A advertises the route to its LAN subnet to Router B. The update includes only the subnet number and a metric. Router B then adds a route to its routing table, but the route has more information in it than did the routing update itself. When B received the update, it came in interface SerialO, so Router B considers SerialO to be the correct outgoing interface. The update came from IP address 10.1.2.1, so Router B considers that IP address to be the next-hop IP address. Also, if the distance vector update does not include the subnet mask, as in the figure, Router B assumes that Router A uses the same mask that it does. As it turns out, these routers would not support VLSM because if Router A used a different subnet mask than Router B, B would make a wrong assumption about the mask. The fact that the routing protocol in this example does not transmit mask information also makes it a classful routing protocol. For these examples, assume that all routers are using the same subnet mask in this network—specifically, 255.255.255.0.

If it seems simple, then you understand it well—distance vector protocols first were created about 20 years ago, when the processor in a routing device was probably less powerful than the processor in your cell phone today. It had to be simple so as not to overburden the router's processor, and also not to overload the network with overhead traffic.

The following list formalizes the basic distance vector logic and introduces a few important concepts that are explained over the next several pages:

■ Routers add directly connected subnets to their routing tables, even without a routing protocol.

■ Routers send routing updates out their interfaces to advertise the routes that this router already knows. These routes include directly connected routes as well as routes learned from other routers.

■ Routers listen for routing updates from their neighbors so that they can learn new routes.

■ The routing information includes the subnet number and a metric. The metric defines how good the route is; lower metric routes are considered better routes.

■ When possible, routers use broadcasts or multicasts to send routing updates. By using a broadcast or multicast packet, all neighbors on a LAN can receive the same routing information in a single update.

■ If a router learns multiple routes to the same subnet, the router chooses the best route based on the metric. (If the metrics tie, there are a variety of options, which are described in Chapter 6, "OSPF and EIGRP Concepts and Configuration," of the CCNA ICND Exam Certification Guide.)

■ Routers send periodic full updates and expect to receive periodic updates from neighboring routers.

■ Failure to receive updates from a neighbor in a timely manner results in the removal of the routes previously learned from that neighbor.

■ A router assumes that, for a route advertised by Router X, the next-hop router in that route is Router X.

Routing Information Protocol Version 1

RIP Version 1 (RIP-1) has been around for a long time—longer than 15 years for use with IP networks. It has many shortcomings compared to some of the relatively newer IP routing protocols, but it does work and is an easy tool to use for comparison with the other routing protocols.

RIP uses hop count for a metric. That means that, from an individual router's perspective, if there are two routers between itself and a subnet, its metric for that subnet is 2. Figure 14-3 outlines the concept.

Figure 14-3 RIP's Use of Hop Count as Metric

Excerpt from Routing Table

Subnet

Metric

162.11.7.0

2

162.11.8.0

1

Excerpt from Routing Table

Subnet

Metric

162.11.7.0

1

162.11.8.0

0

Excerpt from Routing Table

Excerpt from Routing Table

Subnet

Metric

162.11.7.0

0

162.11.8.0

0

Only a part of the routing table for each router is shown in the figure, but from those shown, you can see what is meant by the hop count. Router B's metrics for its locally attached subnets are both 0 because there are no routers between B and those subnets. Similarly, Router A's metric for 162.11.8.0 is 0. Because Router B separates Router A from subnet 162.11.7.0, Router A's metric for subnet 162.11.7.0 is 1. Finally, Router C's metric for subnet 162.11.7.0 is 2 because two routers separate it from that subnet.

You will learn much more about RIP and the underlying distance vector logic used by RIP as you prepare for the ICND exam. For now, this short list of RIP-1 features can help you compare RIP-1 to some of the other IP routing protocols covered in this overview:

■ Based on distance vector Logic

■ Uses hop count for the metric

■ Sends periodic full routing updates every 30 seconds

■ Converges slowly, often taking 3 to 5 minutes

■ Does not support VLSM, also making it a classful routing protocol

RIP Version 2

RIP Version 2 (RIP-2), as currently defined in RFC 2453, defines several enhancements to the original RIP protocol. RIP-2 uses distance vector logic; uses hop count for the metric; sends full, periodic updates; and still converges relatively slowly.

RIP-2 does add support for VLSM, as compared with RIP-1, making it a classless routing protocol, with RIP-2 including the subnet mask for each subnet in the routing updates. Table 14-3 outlines the improvements made to RIP with the creation of RIP-2.

Table 14-3 Improvements Made to RIP by RIP V2

Feature

Description

Transmits subnet mask with route

This feature allows VLSM by passing the mask along with each route so that the subnet is defined exactly. It allows VLSM, making RIP-2 a classless routing protocol.

Provides authentication

Both clear text (RFC-defined) and MD5 encryption (Cisco-added feature) can be used to authenticate the source of a routing update.

Includes a next-hop router IP address in its routing update

A router can advertise a route but direct any listeners to a different router on that same subnet.

Uses external route tags

RIP can pass information about routes learned from an external source and redistributed into RIP. Another router then can pass these external tags to that same routing protocol in a difference part of the network, effectively helping that other routing protocol pass information.

Uses multicast routing updates

Instead of broadcasting updates to 255.255.255.255 like RIP-1, the destination IP address is 224.0.0.9, an IP multicast address. 224.0.0.9 is reserved specifically for use by RIP-2. This reduces the amount of processing required on non-RIP-speaking hosts on a common subnet.

The most important feature comparing the two is that RIP-2 supports VLSM. Today, when choosing a routing protocol, RIP-1 would not be the best choice—in fact, the RIP-1 RFC has been designated for historic status. Both protocols work well, but RIP-2 is more functional. If you want a routing protocol that uses a public standard and you want to avoid the complexity of link-state protocols, RIP-2 is your best choice.

Interior Gateway Routing Protocol

IGRP is a Cisco-proprietary IP routing protocol created by Cisco more than 10 years ago. Cisco created IGRP to provide a better distance vector protocol to its customers, as compared with RIP-1.

The most obvious difference between RIP-1 and IGRP is the metric. IGRP advertises up to five parameters that describe the metric for each route, although, practically, only two ever are used—bandwidth and delay. The bandwidth part of this more complex metric describes the constrained link speed. For instance, if a route to a subnet contained all Fast Ethernet links, the bandwidth in the update would be 100 Mbps; however, if a single 56-kbps link were in the path, the bandwidth would be listed as 56 kbps. The delay component includes a cumulative number—for instance, a route going over ten Fast Ethernet links would have its delay part of the metric ten times bigger than a route with a single 100-Mbps link in the path.

IGRP calculates the metric based on a mathematical formula that you do not really need to know for the exam. The formula uses bandwidth and delay as input and results in an integer value, the metric, between 1 and 4,294,967,295.

Figure 14-4 shows the benefit of this better metric. Figure 14-4 RIP and IGRP Metrics Compared

RIP, Regardless of Bandwidth h 1 "

Figure 14-4 shows the benefit of this better metric. Figure 14-4 RIP and IGRP Metrics Compared

Bandwidth 1544

Bandwidth 1544

Bandwidth 1544

Routing Table Subnet

Subnet

Output Interface

10.1.1.0

Bandwidth 1544
Routing Table Subnet

Subnet

Output Interface

10.1.1.0

S1

As shown in the figure, Router B's route to 10.1.1.0 points through Router A because that route has a lower hop count (1) than the route through Router C (2). However, Router B will choose the two-hop route through Router C when using IGRP because the bandwidths of the two links in the route are much higher than that of the single-hop route. In the top trio of routers, the engineer let the bandwidth command default to 1544 on each link because RIP does not consider the bandwidth. On the bottom trio, the engineer correctly configured bandwidth to match the actual link speeds, thereby allowing IGRP to choose the faster route. (The bandwidth interface subcommand does not change the actual physical speed of the interface-it just tells the IOS what speed to assume the interface is using.)

IGRP and RIP-1 were the main options for routing protocols back in the early 1990s. RIP-2 came later, but only after two better alternatives, OSPF and EIGRP, had become better options for most networks. Table 14-4 summarizes some of the key comparison points between these three protocols.

Table 14-4 Distance Vector Protocols Compared

Feature

RIP-1

RIP-2

IGRP

Update timer for full routing updates

30 seconds

30 seconds

90 seconds

Metric

Hop count

Hop count

Function of bandwidth and delay (the default). Can include reliability, load, and MTU.

Supports VLSM

No

Yes

No

Infinite-metric value

16

16

4,294,967,295

Convergence

Slow

Slow

Slow

0 0

Post a comment