# Routing protocols and architectures/IGRP and EIGRP

Interior Gateway Routing Protocol (IGRP) is an intra-domain routing protocol, proprietary by Cisco, based on the Distance Vector (DV) algorithm.
Also in IGRP the support for classless addressing (netmask) is absent, but with respect to RIP it has some additional 'marketing-oriented' features which however hide some unexpected technical mistakes:
* more sophisticated metrics: they introduce more complexity and less route stability;
* multipath routing: unequal-cost multipath routing may originate loops;
* support for heterogeneous networks: a wide range for link costs may slow down convergence to infinity;
* less traffic related to routing protocol: DV update happens every 90 seconds;
* greater stability: triggered updates are sent only if the cost has changed more than 10% to avoid frequent reconfiguration of the network;
* not more than one IP fragmentation: IGRP messages also transport information about the MTUs supported by the routers along the path → the packet can be fragmented immediately based on the minimum MTU, avoiding that at a later time it will be fragmented again by a smaller MTU.

## Metrics

Cost $C$ is obtained by the combination of 4 metrics:
    ${\begin{cases}\displaystyle C={\frac {10^{7}}{B}}\left(k_{1}+{\frac {k_{2}}{256-L}}\right)+k_{3}D&{\text{if }}k_{5}=0\\\displaystyle C=\left[{\frac {10^{7}}{B}}\left(k_{1}+{\frac {k_{2}}{256-L}}\right)+k_{3}D\right]{\frac {k_{5}}{R+k_{4}}}&{\text{if }}k_{5}\neq 0\end{cases}}$
* $B$ - bandwidth: it is directly proportional to the link bandwidth (values 1 to 2$^{24}$ with 1 = 1.2 kbit/s);
* $D$ - delay: it is inversely proportional to the link bandwidth, and it only considers transmission delay ignoring other components such as propagation delay and queuing delay (values 1 to 2$^{24}$ with 1 = 10 ms);
* $R$ - reliability: it can be quite variable in time (values 1 to 255 with 255 = 100%);
* $L$ - load: it depends on instantaneous traffic (values 1 to 255 with 255 = 100%).
With default values for coefficients $k_{1\ldots 5}$, the cost only considers delay $D$ and bandwidth $B$:
    $k_{1}=k_{3}=1,\,k_{2}=k_{4}=k_{5}=0\Rightarrow C={\frac {10^{7}}{B}}+D$
IGRP commands require the specification of a class of service (TOS), but in practice routing based on classes of service has never been implemented in this protocol, because it would require a different routing table and a different cost function for each class of service.

### Problems

Such a sophisticated metric really suffers from some problems from the technical point of view:
* it is difficult to understand the routing choices: humans look at the network topology and measure the distance in 'hop count' → it is not easy to determine which is the best path when a more sophisticated metric is adopted;
* it is difficult to understand how to tune coefficients $k_{1\ldots 5}$: what happens to the network when parameters are changed? which values have to be given to them in order to obtain the wanted behavior?
* some metrics (e.g. load), being not very stable, force the network to continuously adapt its paths because the latter often change their costs → the need to frequently update routes leads to more transients with consequent black holes and bouncing effects, more routing traffic and more CPU resources dedicated to routing protocols;
* it is difficult to define the right threshold value for infinity: IGRP defines it to 2$^{24}$, but it is required too much time when low-cost links are involved.

## Multipath routing

IGRP supports unequal-cost multipath routing: multiple routes are allowed for the same destination, even if those routes have different costs ($c_{\text{sec}}\leq V\cdot c_{\text{prim}}$), and load is distributed proportionally to the cost of the route.

### Problem

Traffic may enter a loop when different paths are chosen by two routers: one may choose the primary path (optimal route) and the other one the secondary path (sub-optimal route) → in the latest version of IGRP only equal-cost multipath routing is allowed (coefficient $V$ is set to 1) in order to prevent these issues.

## EIGRP

Enhanced IGRP introduces several enhancements to IGRP, especially from the scalability point of view:
* it supports classless addressing: networks are at last announces with their proper address-netmask pairs;
* it implements Diffusing Update Algorithm (DUAL): the network is loop-free, even during transients, and convergence is faster (no count-to-infinity phenomena);
* it decouples the neighbor discovery functionality from the route update mechanism: routers periodically exchange small Hello messages, while DVs are generated only when something has changed in the network:
** Hello messages can be sent at high frequency, making fault detection and hence convergence faster, because:
*** they consume less bandwidth → routing traffic is reduced;
*** they consume less CPU resources with respect to DV processing and computation;
** DVs must be sent through a reliable protocol: every DV must be confirmed by an acknowledgment message, and must be retransmitted if it went lost.