Understanding Interior Gateway Routing Protocol (IGRP)
Metrics
IGRP uses an equation to calculate its metrics. Metrics then are used by the router to favor a particular route. In IGRP, the lower the value of the metric is, the more favorable the route is. The IGRP metric equation takes into consideration the variables of bandwidth, delay, load, and reliability of the link to calculate its metric. Equation 4-1 shows the IGRP metric equation.
Equation 4-1 IGRP Metric Equation
K1, K2, K3, K4, K5 = Constants
Default values: K1 = K3 = 1, K2 = K4 = K5 = 0
BW = 10 7/(min bandwidth along paths in kilobits per second)
Delay = (Sum of delays along paths in milliseconds)/10
Load = Load of interface
Reli = Reliability of the interface
From the equation, the load variable is a value from 1 to 255, in which 255 indicates 100 percent saturation of the link and 1 indicates virtually no traffic. The reli variable is also a value from 1 to 255, in which 1 indicates an unreliable link and 255 indicates a 100 percent reliable link.
Referring to Equation 4-1, the term K5 /(Reli + K4) is used only if K5 is not equal to 0. If K5 is equal to 0 (as the default), the term K5 /(Reli + K4) is ignored in the equation.
Variables K1 through K5 are constant numbers used in the equation. The default value of the K values are: K1 = K3 = 1, K2 = K4 = K5 = 0. The IGRP metric equation then reduces to this:
Therefore, by default, IGRP considers only the bandwidth and the delay of the link to calculate its metrics. The network administrator can change the default K value to other numbers so that other components of the metric equation, such as load and reliability, can be used. For example, if the network administrator wants to consider interface reliability as one factor in routing the packet, the value of K5 would have to be a nonzero number; however, such a change is highly not recommended.
The bandwidth variable is the minimum bandwidth along the path from the local router to the destination, in kilobits per second, scaled by 107. The bandwidth associated with an interface is a static value assigned by the router or a network administrator; it is not a dynamic value that changes with throughput. The minimum bandwidth is obtained by comparing the interfaces along the paths to the destination network. For example, a network that needs to traverse a T1 link and an Ethernet link will have a minimum bandwidth of 1544 kbps. Notice that the bandwidth on a regular serial interface is assumed to be T1 with a speed of 1544 kbps.
The delay variable is the sum of all delays along the interfaces crossed in the path to the destination, in microseconds, divided by 10. Therefore, the delay variable used in IGRP metric equation has the unit of tens of microseconds. Like the bandwidth variable, the delay associated with each interface is a static value assigned by the router or a network administrator; it is not a dynamic value that changes with different traffic pattern. Table 4-1 lists router default bandwidth and delay values for some common interfaces.
IGRP metric calculation is illustrated in the following example. Consider the network in Figure 4-1.
Now calculate the IGRP metric to Network X from Router 3’s perspective. The lowest bandwidth to Network X is the T1 link with a total delay of 21,100 microseconds (100 micro-seconds + 20,000 microseconds + 1000 microseconds). Assume that all the K constant values are default values. Therefore, only the bandwidth and delay values are considered in calculating the IGRP metric. BW = 107/1544 = 6476 and Delay = 21,100/10 = 2110. This yields IGRP metric = BW + Delay = 6476 + 2110 = 8586. Therefore, from Router 3’s perspective, the IGRP metric to Network X is 8586.
Timers
Because IGRP is a distance vector protocol in which routing updates are sent periodically, the different timers are especially important because they control how fast the routes are learned and deleted. Ultimately, these timers determine the network convergence time, which is the time that it takes for all the routers in the network to realize that a certain network has been added or deleted. The IGRP timers are the same as RIP; they are discussed in this list:
- Update— IGRP sends updates over the broadcast address of 255.255.255.255, with IP protocol number 9. The update timer is the periodic timer in which routing updates are sent; it is the time between each routing update interval. This value is set to 90 seconds, by default, and is configurable. In other words, the router sends its entire routing updates every 90 seconds, by default.
- Invalid— When the router stops receiving routing updates within the invalid timer, the routes become invalid. This is set to 270 seconds, by default.
- Hold-down— This is the time used to suppress the defective routes to be installed in the routing table. The default time is 280 seconds.
- Flush— This is the time when the route is removed from the routing table. This is set to 630 seconds, by default.
The default value for the IGRP update timer is 90 seconds, compared to the default of 30 seconds for the RIP update timer. This allows IGRP to use less bandwidth for periodic updates; however, the trade-off is that IGRP has a slower convergence time than RIP. All the timers mentioned here are configurable. The command to change the timer is timers basic update invalid holddown flush. However, changing the timer on only one router in the network could result in a network convergence problem. Changing the timers is not recommended.
If the network changes, such as after deleting or adding a network, IGRP and RIP use Flash updates. In other words, IGRP and RIP send instant updates to all their neighbors as soon as a network change is detected. For example, if a router’s Ethernet interface goes down, the router immediately sends a Flash update to its neighbors that its Ethernet network is no longer available. After receiving the Flash update, the neighbors immediately put the Ethernet network into hold-down state.
Split Horizon
Split horizon is a technique used to avoid routing loops. With split horizon, the router does not advertise a route over the interface in which the route is learned from. For example, in Figure 4-1, Router 1 receives an update about Network X from Router 2 over the serial interface. If split horizon is enabled, Router 2 will not advertise the Network X route back to Router 1 over the same serial interface. If split horizon is disabled, Router 2 will advertise Network X back to Router 1. When Network X becomes unavailable in Router 2, Router 2 believes that Router 1 still has a valid route to Network X and sends the packet destined to Network X toward Router 1, which will be dropped.
Split Horizon with Poison Reverse
Another technique to avoid routing loop is split horizon with poison reverse. Using this technique, routes learned on an interface are advertised back on the same interface with an IGRP metric of infinity. This is called poison update. When the router receives the poison update, it considers the route as invalid. For example, in Figure 4-2, Router 1 receives an update for Network X from Router 2. With poison reverse, this specific route is advertised back to Router 2, but with an IGRP metric of 4,294,967,295, which indicates infinity. Because Router 2 receives the poison update from Router 1, Router 2 does not consider Router 1 as a valid path to reach Network X, thus preventing the possibility of a routing loop.
IGRP Packet Format
Figure 4-3 shows the IGRP packet format. In this figure, you can see that IGRP updates provide more information than RIP and, at the same time, are more efficient. None of the fields in an IGRP packet is left unused; after the 12-octet header, each routing entry is filled one after another. Therefore, IGRP does not pad the update packet to force a 32-bit word boundary. With this efficient design, IGRP can carry a maximum of 104 fourteen-octet entries. Therefore, with its MTU size of 1500 bytes, IGRP can carry more routes per packet than RIP can.
IGRP Behavior
Distance vector protocols are protocols that solely depend on neighbor routing advertisements to determine the best path to a destination. The advantage of the distance vector protocols is their simplicity to implement. However, because of the long convergence time, IGRP is not suitable for large networks. IGRP and RIP are both classical distance vector protocols. Although IGRP and RIP differ in metric calculation update timers, they exhibit the same behavior when it comes to sending and receiving updates.
IGRP sends its entire routing update over the broadcast address of 255.255.255.255, with the IP Protocol field set to 9. IGRP handles discontiguous network and variable-length subnet masking (VLSM) in exactly the same way that RIP does. IGRP does not support discontiguous networks; in these networks, IGRP autosummarizes over a major network boundary. Therefore, the subnet information is not advertised to the remote site, causing routing problems. Because IGRP does not send subnet mask information as part of the routing update, IGRP does not support VLSM.
Default Route and IGRP
In Cisco routers, IGRP does not recognize the 0.0.0.0/0 route as the default route. It uses its own method of propagating default route with the ip default-network command.
The ip default-network command specifies a major network address and flags it as a default network. This major network could be directly connected, defined by a static route, or discovered by a dynamic routing protocol. The network specified by the ip default-network command must be in the routing table before the command takes effect. If the route specified is not in the routing table, no default route will be propagated. Figure 4-4 demonstrates how the ip default-network command works.
In Figure 4-4, Router 1 is connected to the remote site through a DS-3 link. Router 1 now wants to send a default route to Router 2 and to all the routers in the remote site network. In IGRP, the route to 0.0.0.0 is not recognized as a default route; instead, Router 1 must configure ip default-network 192.168.1.0 to flag the route 192.168.1.0 as the default route. Router 1 will send a routing update of 192.168.1.0 and will flag it as a default route.
When the routers in the remote site network receive the update for 192.168.1.0, they will mark it as default route and will install the route to 192.168.1.0 as the gateway of last resort.
Unequal-Cost Load Balancing in IGRP
IGRP and RIP provide the capability to install up to six parallel equal-cost paths for load balancing. IGRP has an added feature that RIP does not have—the capability to do unequal-cost load balancing, the capability to load-balance traffic over multiple paths that do not have the same metric to the destination. The advantage of this feature is that it offers the flexibility of load balancing, thus making more efficient use of the link. IGRP uses the variance command to perform unequal-cost load balancing.
Before unequal-cost load balancing can take place, however, two rules must apply:
10 | The neighboring router utilized as an alternate pathway must be closer to the destination. (That is, the neighboring router’s metric to the destination must be a smaller metric than that of the local router for a given destination.) |
11 | The metric advertised by the neighboring router must be less than the variance of the local router’s metric to the destination. |
Consider the network in Figure 4-5.
When Router 1 calculates its IGRP metrics to Router 3, the metric going through the 1544 kbps link is as follows:
The metric going through the 256 kbps link is as follows:
Without unequal-cost load balancing, IGRP will simply select the 1544 kbps link to forward packets to Router 3, as shown in the output in Example 4-1.
Example 4-1 Output of Routing Table in Router 1 Without Unequal-Cost Load Balancing
Router_1#show ip route 133.33.0.0 Routing entry for 133.33.0.0/16 Known via "igrp 1", distance 100, metric 8576 Redistributing via igrp 1 Advertised by igrp 1 (self originated) Last update from 192.168.6.2 on Serial0, 00:00:20 ago Routing Descriptor Blocks: * 192.168.6.2, from 192.168.6.2, 00:00:20 ago, via Serial0 Route metric is 8576, traffic share count is 1 Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0
To use the unequal-cost load balancing feature of IGRP, you use the variance command. Variance is a multiplier in which a metric might be different from the lowest metric to a route. The variance value must be of integer value; the default variance value is 1, meaning that the metrics of multiple routes must be equal to load-balance.
In Example 4-1, the metric through the 256 kbps link is 4.8 times larger than the metric through the 1544 kbps link. Therefore, for the 256 kbps link to be considered in the routing table, a variance of 5 must be configured in Router 1. The configuration in Router 1 is simply variance 5 under the igrp command. The output from the show ip route command in Example 4-2 displays that Router 1 is installing both links in its routing table.
Example 4-2 Output of show ip route in Router 1 After Implementing Unequal-Cost Load Balancing by Adding the variance Command
Router_1#show ip route 133.33.0.0 Routing entry for 133.33.0.0/16 Known via "igrp 1", distance 100, metric 8576 Redistributing via igrp 1 Advertised by igrp 1 (self originated) Last update from 10.1.1.2 on Serial1, 00:01:02 ago Routing Descriptor Blocks: * 192.168.6.2, from 192.168.6.2, 00:01:02 ago, via Serial0 Route metric is 8576, traffic share count is 5 Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0 10.1.1.2, from 10.1.1.2, 00:01:02 ago, via Serial1 Route metric is 41162, traffic share count is 1 Total delay is 21000 microseconds, minimum bandwidth is 256Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0
Notice in Example 4-2 that the route through Serial 0 has a traffic share count of 5, compared to a traffic share count of 1 through Serial 1. This indicates that the router will send five packets over Serial 0 for every packet sent over Serial 1.