• Aucun résultat trouvé

IGRP Metrics

Dans le document Study Guide (Page 146-150)

Metrics are the mathematics used to select a route. The higher the metric associated with a route, the less desirable it is. For IGRP, the Bellman-Ford algorithm uses the following equation and creates the overall 24-bit metric assigned to a route:

metric = [(K1 × bandwidth) + [(K2 × bandwidth) ÷ (256 – load)] + (K3 × delay)] × [K5 ÷ (reliability + K4)]

The elements in this equation are as follows:

By default, K1 = K3 = 1, K2 = K4 = K5 = 0. Therefore, by default, the metric formula reduces to:

metric = (1 × bandwidth) + (1 × delay) metric = bandwidth + delay

The show ip protocols command shows you the configured K-values for all IGRP and EIGRP autonomous systems. Notice from the following output that the default values are set for IGRP AS 100:

Router#show ip protocols Routing Protocol is "igrp 100"

Sending updates every 90 seconds, next due in 71 seconds Invalid after 270 seconds, hold down 280, flushed after 630 Outgoing update filter list for all interfaces is

Incoming update filter list for all interfaces is Default networks flagged in outgoing updates

4421c04.fm Page 105 Thursday, February 3, 2005 5:12 PM

106 Chapter 4 IGRP and EIGRP

Default networks accepted from incoming updates IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 IGRP maximum hopcount 100

IGRP maximum metric variance 1 Redistributing: igrp 100 Routing for Networks:

10.0.0.0 192.168.24.0

Routing Information Sources:

Gateway Distance Last Update 10.10.10.1 100 00:00:49 Distance: (default is 100)

Delay is computed as one-tenth the sum of all the measured delays, in microseconds, of the outbound interfaces of the links along the path, which is to say, the cumulative delay along the path in tens of microseconds.

Bandwidth = [10000000/(BW in Kbps)]. BW is the lowest bandwidth of the links along the path.

You can compute delay yourself and find the lowest bandwidth in the path by issuing the command show interface interface_type interface_number on each outbound interface along the path, adding up the DLY values and comparing bandwidths to determine the lowest. Here’s a sample of the output for the Serial 0/0 interface, with all but the first four lines of output removed:

Router#sh int s0/0

Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255

Here you can see this interface is showing an MTU of 1,500 bytes, a bandwidth of 1,544 Kbps (1.544 Mbps, or the T-1 rate), a delay of 20,000 microseconds, reliability of 100 percent, and the lowest possible transmit and receive loads (1/255). The actual metric computation, based on cumulative measured values, is demonstrated in the section “Verifying and Troubleshooting IGRP” later in this chapter.

The preceding formula is used for the non-default values of K5, when K5 does not equal 0. If K5 equals the default value of 0, then that part of the formula is not used at all. This formula is used instead: metric = [(K1 × bandwidth) + [(K2× bandwidth) ÷ (256 – load)] + (K3× delay)]. The important point is that the final term—[K5÷ (reliability + K4)]—would evaluate to 0 when K5 is set to 0, making the entire metric 0. This would be unacceptable, which is why the term is omitted when K5 equals the default value of 0.

Interior Gateway Routing Protocol 107

If necessary, you can adjust metric constants in router configuration mode. Metrics are used to change the manner in which routes are calculated. After you enable IGRP on a router, metric weights can be changed using the following command:

metric weights tos K1 K2 K3 K4 K5

Note that the no version of this command returns the constants to their default values, and that the type of service parameter (tos) must always be 0, as shown in the following router output:

Router(config)#router igrp AS_number Router(config-router)#metric weights ?

<0-8> Type Of Service (Only TOS 0 supported)

Table 4.2 shows the relationship between the constant and the metric it affects.

Each constant is used to assign a weight to a specific variable. This means that when the metric is calculated, the algorithm will assign a greater importance to the specified metric. By assigning a weight, you are able to specify what is more important. If bandwidth were of greatest concern to a network administrator, then a greater weight would be assigned to K1. If delay is unaccept-able, then the K3 value should be assigned a greater weight.

Cisco suggests leaving all K-values at their default, due to the likelihood of unexpected results that might compromise your network’s stability. Consider, for instance, the case where you might be inclined to adjust the default value of K2 in order to include load as a variable included in routing decisions.

Because load is updated every five seconds, based on a rolling five-minute average, the IGRP metric is now subject to change every five seconds. This can cause links over which a new application process is initiated to go into hold-down due to the increased load causing the metric to rise more than 110 per-cent. Conversely, a plummeting load can initiate flash updates to neighbors. As you can see, either scenario is unacceptable and leads directly to route insta-bility. Take Cisco’s advice—leave these constants at their defaults.

T A B L E 4 . 2 Metric Association of K-Values

Value Metric

K1 Bandwidth

K2 Loading of the link (effective bandwidth percentage used)

K3 Delay

K4, K5 Reliability 4421c04.fm Page 107 Thursday, February 3, 2005 5:12 PM

Note that MTU is not actually represented by any of the K-value constants. This is because MTU is never used in the calculation of the composite metric. The use of MTU is discussed more in the EIGRP section later in this chapter.

As well as tuning the actual metric weights, you can do other tuning. All routing protocols have an administrative distance associated with the protocol type. If multiple protocols are run-ning on a router, the administrative distance value helps the router decide which route was learned by the most trusted method. The route learned by the method with the lowest admin-istrative distance will be chosen. IGRP has a default adminadmin-istrative distance of 100. The tuning of this value is accomplished with the distance command, like this:

Router(config-router)#distance ? <1-255> Administrative distance

Valid values for the administrative distance range from 1 to 255; the lower the value, the better.

A route with an administrative distance of 255 will not be used.

When redistributing static routes or other protocol types within IGRP, there are two options on how you can enter the metric for the redistributed routes. The first option you have is to set the metric for each instance of redistribution; the command will be covered in Chapter 10,

“Route Optimization.” The second option is to set a default metric for all redistributed routes.

This gives you less granularity when setting metrics but is faster to configure. The following command, when entered in router configuration mode, will set the default metric:

default-metric bandwidth delay reliability loading MTU

bandwidth = a value between 0 and 4,294,967,295 (in Kbps)

delay = a value between 0 and 4,294,967,295 (in 10-microsecond units) reliability = a range from 0 to 255 (255 is the most reliable)

loading = range from 0 to 255 (255 means the link is completely loaded) MTU = a value between 0 and 4,294,967,295

The bandwidth and delay that you enter should be “ready to use.” This means no adjustment will be made before using them in the metric calculation for-mula. Bandwidth is expected to be the minimum bandwidth of all the links along the path to the destination network, and the value you enter for delay is considered to be already one-tenth the actual cumulative delay along the path to the destination.

When a router receives multiple routes for a specific network, one of the routes must be chosen as the best route from all of the advertisements. While the router is told that it’s possible to get to a given network over multiple interfaces, it forgets about all but the best and all traffic will be sent over the best route.

Interior Gateway Routing Protocol 109

Dans le document Study Guide (Page 146-150)