Path Metric Calculation
Metric calculation is a critical component for any routing protocol. EIGRP uses multiple factors to calculate the metric for a path. Metric calculation uses bandwidth and delay by default but can include interface load and reliability, too. Figure 2-6 shows the EIGRP classic metric formula.
Figure 2-6 EIGRP Metric Formula
EIGRP uses K values to define which factors the formula uses and the impact associated with a factor when calculating the metric. A common misconception is that the K values directly apply to bandwidth, load, delay, or reliability; this is not accurate. For example, K1 and K2 both reference bandwidth (BW).
BW represents the slowest link in the path, scaled to a 10 Gbps link (107). Link speed correlates to the configured interface bandwidth on an interface and is measured in kilobits per second (Kbps). Delay is the total measure of delay in the path, measured in tens of microseconds (μs).
Taking these definitions into consideration, look at the formula for classic EIGRP metrics in Figure 2-7.
Figure 2-7 EIGRP Classic Metric Formula with Definitions
By default, K1 and K3 each has a value of 1, and K2, K4, and K5 are all set to 0. Figure 2-8 places default K values into the formula and shows a streamlined version of the formula.
The EIGRP update packet includes path attributes associated with each prefix. The EIGRP path attributes can include hop count, cumulative delay, minimum bandwidth link speed, and RD. The attributes are updated each hop along the way, allowing each router to independently identify the shortest path.
Figure 2-8 EIGRP Classic Metric Formula with Default K Values
Figure 2-9 shows the information in the EIGRP update packets for the 10.1.1.0/24 network propagating through the autonomous system. Notice that the hop count increments, minimum bandwidth decreases, total delay increases, and the RD changes with each EIGRP update.
Figure 2-9 EIGRP Attribute Propagation
Table 2-7 shows for some common network types the link speed, delay, and EIGRP metric, based on the streamlined formula in Figure 2-8.
Table 2-7 Default EIGRP Interface Metrics for Classic Metrics
Interface Type |
Link Speed (Kbps) |
Delay |
Metric |
---|---|---|---|
Serial |
64 |
20,000 μs |
40,512,000 |
T1 |
1544 |
20,000 μs |
2,170,031 |
Ethernet |
10,000 |
1000 μs |
281,600 |
FastEthernet |
100,000 |
100 μs |
28,160 |
GigabitEthernet |
1,000,000 |
10 μs |
2816 |
TenGigabitEthernet |
10,000,000 |
10 μs |
512 |
Using the topology from Figure 2-2, the metrics from R1 and R2 for the 10.4.4.0/24 network are calculated using the formula in Figure 2-10. The link speed for both routers is 1 Gbps, and the total delay is 30 μs (10 μs for the 10.4.4.0/24 link, 10 μs for the 10.34.1.0/24 link, and 10 μs for the 10.13.1.0/24 link).
Figure 2-10 Calculating EIGRP Metrics with Default K Values
If you are unsure of the EIGRP metrics, you can query the parameters for the formula directly from EIGRP’s topology table by using the command show ip eigrp topology network/prefix-length.
Example 2-17 shows R1’s topology table output for the 10.4.4.0/24 network. Notice that the output includes the successor route, any feasible successor paths, and the EIGRP state for the prefix. Each path contains the EIGRP attributes minimum bandwidth, total delay, interface reliability, load, and hop count.
Example 2-17 EIGRP Topology for a Specific Prefix
Wide Metrics
The original EIGRP specifications measured delay in 10-microsecond (μs) units and bandwidth in kilobits per second, which did not scale well with higher-speed interfaces. In Table 2-7, notice that the delay is the same for the GigabitEthernet and TenGigabitEthernet interfaces.
Example 2-18 provides some metric calculations for common LAN interface speeds. Notice that there is not a differentiation between an 11 Gbps interface and a 20 Gbps interface. The composite metric stays at 256, despite the different bandwidth rates.
Example 2-18 Metric Calculation for Common LAN Interface Speeds
EIGRP includes support for a second set of metrics, known as wide metrics, that addresses the issue of scalability with higher-capacity interfaces. Just as EIGRP scaled by 256 to accommodate IGRP, EIGRP wide metrics scale by 65,536 to accommodate higher-speed links. This provides support for interface speeds up to 655 Tbps (65,536 × 107) without any scalability issues.
Figure 2-11 shows the explicit EIGRP wide metrics formula. Notice that an additional K value (K6) is included that adds an extended attribute to measure jitter, energy, or other future attributes.
Figure 2-11 EIGRP Wide Metrics Formula
Latency is the total interface delay measured in picoseconds (1012) instead of in microseconds (106). Figure 2-12 shows an updated formula that takes into account the conversions in latency and scalability.
Figure 2-12 EIGRP Wide Metrics Formula with Definitions
The interface delay varies from router to router, depending on the following logic:
If the interface’s delay was specifically set, the value is converted to picoseconds. Interface delay is always configured in tens of microseconds and is multiplied by 107 for picosecond conversion.
If the interface’s bandwidth was specifically set, the interface delay is configured using the classic default delay, converted to picoseconds. The configured bandwidth is not considered when determining the interface delay. If delay was configured, this step is ignored.
If the interface supports speeds of 1 Gbps or less and does not contain bandwidth or delay configuration, the delay is the classic default delay, converted to picoseconds.
If the interface supports speeds over 1 Gbps and does not contain bandwidth or delay configuration, the interface delay is calculated by 1013/interface bandwidth.
The EIGRP classic metrics exist only with EIGRP classic configuration, and EIGRP wide metrics exist only in EIGRP named mode. The metric style used by a router is identified with the command show ip protocols. If a K6 metric is present, the router is using wide-style metrics.
Example 2-19 shows the commands to verify the operational mode of EIGRP on R1 and R2. It shows that R1 does not have a K6 metric and is using EIGRP classic metrics. R2 has a K6 metric and is using EIGRP wide metrics.
Example 2-19 Verifying EIGRP Metric Style
Metric Backward Compatibility
EIGRP wide metrics were designed with backward compatibility in mind. EIGRP wide metrics set K1 and K3 to a value of 1 and set K2, K4, K5, and K6 to 0, which allows backward compatibility because the K value metrics match with classic metrics. As long as K1 through K5 are the same and K6 is not set, the two metric styles allow adjacency between routers.
EIGRP is able to detect when peering with a router is using classic metrics, and it unscales the metric by using the formula in Figure 2-13.
Figure 2-13 Formula for Calculating Unscaled EIGRP Metrics
This conversion results in loss of clarity if routes pass through a mixture of classic metric and wide metric devices. An end result of this intended behavior is that paths learned from wide metric peers always look better than paths learned from classic peers. Using a mixture of classic metric and wide metric devices could lead to suboptimal routing, so it is best to keep all devices operating with the same metric style.
Interface Delay Settings
If you do not remember the delay values from Table 2-7, you can query the values dynamically by using the command show interface interface-id. The output displays the EIGRP interface delay, in microseconds, after the DLY field. Example 2-20 provides sample output of the command on R1 and R2. The output shows that both interfaces have a delay of 10 μs.
Example 2-20 Verifying EIGRP Interface Delay
EIGRP delay is set on an interface-by-interface basis, allowing for manipulation of traffic patterns flowing through a specific interface on a router. Delay is configured with the interface parameter command delay tens-of-microseconds under the interface.
Example 2-21 demonstrates the modification of the delay on R1 to 100, increasing the delay to 1000 μs on the link between R1 and R2. To ensure consistent routing, modify the delay on R2’s Gi0/1 interface as well. Afterward, you can verify the change.
Example 2-21 Configuring Interface Delay
Custom K Values
If the default metric calculations are insufficient, you can change them to modify the path metric formula. K values for the path metric formula are set with the command metric weights TOS K1 K2 K3 K4 K5 [K6] under the EIGRP process. TOS always has a value of 0, and K6 is used for named mode configurations.
To ensure consistent routing logic in an EIGRP autonomous system, the K values must match between EIGRP neighbors to form an adjacency and exchange routes. The K values are included as part of the EIGRP hello packet. The K values are displayed with the show ip protocols command, as demonstrated with the sample topology in Example 2-13. Notice that both routers are using the default K values, with R1 using classic metrics and R2 using wide metrics.
Load Balancing
EIGRP allows multiple successor routes (with the same metric) to be installed into the RIB. Installing multiple paths into the RIB for the same prefix is called equal-cost multipathing (ECMP). At the time of this writing, the default maximum ECMP setting is four routes. You change the default ECMP setting with the command maximum-paths maximum-paths under the EIGRP process in classic mode and under the topology base submode in named mode.
Example 2-22 shows the configuration for changing the maximum paths on R1 and R2 so that classic and named mode configurations are visible.
Example 2-22 Changing the EIGRP Maximum Paths
EIGRP supports unequal-cost load balancing, which allows installation of both successor routes and feasible successors into the EIGRP RIB. To use unequal-cost load balancing with EIGRP, change EIGRP’s variance multiplier. The EIGRP variance value is the feasible distance (FD) for a route multiplied by the EIGRP variance multiplier. Any feasible successor’s FD with a metric below the EIGRP variance value is installed into the RIB. EIGRP installs multiple routes where the FD for the routes is less than the EIGRP variance value up to the maximum number of ECMP routes, as discussed earlier.
Dividing the feasible successor metric by the successor route metric provides the variance multiplier. The variance multiplier is a whole number, and any remainders should always round up.
Using the topology shown in Figure 2-2 and output from the EIGRP topology table in Figure 2-3, the minimum EIGRP variance multiplier can be calculated so that the direct path from R1 to R4 can be installed into the RIB. The FD for the successor route is 3328, and the FD for the feasible successor is 5376. The formula provides a value of about 1.6 and is always rounded up to the nearest whole number to provide an EIGRP variance multiplier of 2. Figure 2-14 shows the calculation.
Figure 2-14 EIGRP Variance Multiplier Formula
The command variance multiplier configures the variance multiplier under the EIGRP process for classic configuration and under the topology base submode in named mode. Example 2-23 provides a sample configuration for each configuration mode.
Example 2-23 Configuring EIGRP Variance
Example 2-24 shows how to verify that both paths were installed into the RIB. Notice that the metrics for the paths are different. One path metric is 3328, and the other path metric is 5376. To see the traffic load-balancing ratios, you use the command show ip route network, as demonstrated in the second output. The load-balancing traffic share is highlighted.