EIGRP - Enhanced Interior Gateway Routing Protocol
Par Fred le vendredi, juin 1 2007, 15:39 - Cisco - Lien permanent
Cet article présente EIGRP:
- les concepts d'EIGRP.
- comment l'implémenter et le vérifier.
- les techniques avancées de configuration (summarization, load-balancing, authentication).
- bonnes pratiques et design options
The Concepts
Why would you choose to use EIGRP ?
- Backup Routes (Fast Convergence / DUAL) : DUAL stands for Diffusing Update ALgorithm and is the algorithm used by EIGRP to calculate and create routing tables based on certain criteria.
- Simple Configuration
- Flexibility in Summarization
- Unequal Cost Load-Balancing
- Combines Best of Distance Vector and Link State
- Supports Multiple Network Protocols
A router Running EIGRP maintains 3 tables:
- Neighbor Table
- Topology Table
- Routing Table
Les routeurs n'échangent que leur meilleur route et pas la totalité contrairement à un protocole à état de lien comme OSPF par exemple.
EIGRP tables and Terminology:
- How far away a route is ?
- Feasible Distance (FD)
- Advertised Distance (AD)
To prevent loop : To be considered a feasible successor, the AD must be less than the FD of the successor
.
- Successor (primary path)
- Feasible Successor (backup path)
- Active Route
- Passive Route
Visiting the Friendly EIGRP Neighborhood
Multicast : 224.0.0.10
- HELLO : forms relationship
- By default, hello packets are sent every 60 secondes on T1 or slower multipoint interfaces and every 5 seconds on other serial interfaces and on LANs. This value can be set with the interface configuration command:
Router(config-if)#ip hello-interval eigrp as-number seconds
- The hold-time interval is set by default to 3 times the hello interval (15 seconds on LANs and fast WAN and 180 seconds on slower WAN). The hold-time is the amount of time a router considers a neighbor up without receiving a hello or some other EIGRP packet from that neighbor. The value can be adjust with the interface configuration command:
Router(config-if)#ip hold-time eigrp as-number seconds
- UPDATE : send updates
- QUERY : asks about routes
- REPLY : response to a query
- ACK : acknowledges the update, query and reply messages
EIGRP associates five different metrics with each route:
- Total Delay (in microseconds)
- Minimum Bandwidth (in kilobits per second)
Router#show interfaces ethernet 0 Ethernet0 is administratively down, line protocol is down MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
- Reliability (number in range <1, 255>, 255 being most reliable)
- Load (number in range <1, 255>, 255 being saturated)
- Minimum MTU (though not actually used in the calculation)
The Real Metric by Default = 256 * (BW + Delay)
- BW for EIGRP = 10^7/BW
- Delay for EIGRP = Delay in microseconds / 10
Take care to have the same metric on different routers, the K value on the following command:
R1# show ip protocols ... EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
Implementations and Verification
Configuring EIGRP
Verify what routing protocols are running:
R1# show ip protocols
Activating EIGRP
R1(config)# router eigrp AS
The AS (Autonomous system) number must be the same on all the routers.
Deactivating the classfull process:
R1(config-router)#no auto-summary
Designing Active Interface
R1(config-router)#network A.B.C.D A.B.C.D R1(config-router)#network (Network Number) (wild card bits)
To activate all interfaces in the EIGRP process:
R1(config-router)#network 0.0.0.0 255.255.255.255
To active a designed interface
R1(config-router)#network 10.1.24.2 0.0.0.0
Show the neighbors
R1# show ip eigrp neighbors
IP-EIGRP Neighbors for process 77
H Address Interface Hold Uptime Q Seq SRTT RTO
(secs) (h:m:s) Count Num (ms) (ms)
1 160.89.81.28 Ethernet1 13 0:00:41 0 11 4 20
2 160.89.80.28 Ethernet0 14 0:02:01 0 10 12 24
0 160.89.80.31 Ethernet0 12 0:02:02 0 4 5 20
- La première colonne (H) désigne l'ordre de détection des voisins.
- La colonne Holdtime désigne quand le voisin sera considéré comme mort (15s = 5s * 3 = 3 envois de HELLO messages)
Show the Topology
R1# show ip eigrp topology
Advertising Default Information into EIGRP
Mauvaise méthode
Router(config)#ip default-network 172.30.0.0
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
* 172.30.0.0/24 is subnetted, 2 subnets
C* 172.30.0.0 is directly connected, Loopback0
C 172.30.1.0 is directly connected, Loopback1
Meilleur méthode
R1(config)#ip route 0.0.0.0 0.0.0.0 l0
R1#show ip route
...
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
172.30.0.0/24 is subnetted, 2 subnets
C 172.30.0.0 is directly connected, Loopback0
C 172.30.1.0 is directly connected, Loopback1
S* 0.0.0.0/0 is directly connected, Loopback0
Traffic exchanged in EIGRP
R1# show ip eigrp traffic IP-EIGRP Traffic Statistics for process 1 Hellos sent/received: 758/711 Updates sent/received: 16/23 Queries sent/received: 0/2 Replies sent/received: 2/0 Acks sent/received: 18/12 Input queue high water mark 0, 0 drops
Summarization, Authentication, and Other Advances Options
Summarization
The smaller the table routing is, the faster the router is.
R1(config)# interface s0/0.2 R1(config-subif)# ip summary-address eigrp as-number network mask
Faire attention aux ramifications.
Load Balancing
By default load balancing is active only between equal paths. After that it is possible to use load balancing between unequal paths.
R1(config)# router eigrp 1 R1(config-router)# variance ? <1-128> Metric variance multiplier
- 1 (default) will only do an equal load-balancing. Metrics must be exactly equal.
- 2 means "2 times is bad" : the second routes can have a metrics 2 times greater than the first.
We must reset the process on the router.
R1# clear ip eigrp neighbors
Example
For example I have 2 routes to the 10.1.2.0/24 network learning with EIGRP but with different metrics : 3097600 and 2195456. By default, my router uses the route with the best metric, but if I specified a variance of 2, the second routers will be used for load balancing (2195456 * 2 > 3097600).
Before
Router#show ip route ... D 10.1.2.0/24 [90/2195456] via 10.1.24.1, 00:00:06, Serial0/0.2
After
Router#show ip route ... D 10.1.2.0/24 [90/3097600] via 10.1.34.1, 00:00:06, Serial0/0.3 D 10.1.2.0/24 [90/2195456] via 10.1.24.1, 00:00:06, Serial0/0.2
Authentication
a key = a password = a lifetime (send-lifetime + accept-lifetime)
Regarder l'heure:
Router#show clock *01:02:05.658 UTC Mon Mar 1 1993
Configurer l'authentification
Il est possible de configurer plusieurs clés pour des dates différentes. Ainsi le changement de mot de passe se fera automatiquement.
R1(config)# key chain EIGRPAuth R1(config-keychain)# key 1
R1(config-keychain-key)#? Key-chain key configuration commands: accept-lifetime Set accept lifetime of key default Set a command to its defaults exit Exit from key-chain key configuration mode key-string Set key string no Negate a command or set its defaults send-lifetime Set send lifetime of key R1(config-keychain-key)# key-string myPasswd ? R1(config-keychain-key)# accept-lifetime 11:30:00 Feb 5 2008 11:30:00 March 5 2008 R1(config-keychain-key)# send-lifetime 11:30:00 Feb 5 2008 11:30:00 March 5 2008
On peut spécifier une seconde clé:
R1(config-keychain)# key 2 R1(config-keychain-key)# key-string myPasswd ? R1(config-keychain-key)# accept-lifetime 11:30:00 March 4 2008 11:30:00 April 4 2008 R1(config-keychain-key)# send-lifetime 11:30:00 March 4 2008 11:30:00 April 4 2008
Ensuite copier-coller ces lignes de commande sur tous vos routeurs.
Activer l'authentification
R1# conf t R1(config)# int s0/0.2 R1(config-subif)# ip authentication mode eigrp as-number md5 R1(config-subif)# ip authentication key-chain eigrp as-number key-chain
The key-chain was EIGRPAuth in my previous example.
Best Practices and Design Options
Eavesdropping on EIGRP Neighbors
Désactiver tous les messages de debug:
Router#undebug all All possible debugging has been turned off
Debuger quand une route vient de tomber :
Router#debug eigrp packets query reply
EIGRP Packets debugging is on
(QUERY, REPLY)
Understanding the EIGRP Query Process
Quand un routeur perd une liaison vers un réseau, il envoie un message QUERY à tous ses voisins, sauf la route initialement prévu pour cette destination. Si un voisin répond qu'il a une route vers ce réseau, le routeur doit attendre que tous ses voisins lui aient répondu avant d'utiliser cette nouvelle route. De plus lorsqu'un routeur reçoit un QUERY message et qu'il ne dispose pas de route vers le réseau demandé, alors il demande à son tour à tous ses voisins si il dispose d'une route à l'aide de messages QUERY, et attend à son tour une réponse de tous ses voisins avant de répondre lui même au demandeur initial.
Si un voisin n'a pas répondu en moins de 3 minutes (si ce voisin ne connait pas cette destination et a beaucoup de voisin par exemple - ou une mauvaise connexion), alors le routeur supprime ce voisin et recommence la détection de ce voisin à 0. Le routeur passe en mode stuck-in-active (SIA). Le réseau est alors bloqué pendant un moment. Cette valeur de 3 minutes configurée par défaut est personnalisable (la variable time-limit est en minutes):
R1(config-router)# timers active-time [time-limit|disabled]
Preventing SIA Connections
SIA-Query and SIA-Reply are 2 new additions to the Type, Length, Value (TLV) triplets in the EIGRP header.
Ces paquets sont générés automatiquement sans aucune configuration depuis l'IOS 12.1(5). Cette fonctionnalité permet à un routeur de surveiller la progression de recherche d'une route et de s'assurer que le voisin est toujours disponible. Ainsi lorsqu'un routeur cherche une route, il envoie un message QUERY à son voisin, et si au bout de la moitié de l'active timer (1 minutes 30 par défaut) il n'a toujours pas reçu de réponse de son voisin, le routeur envoie alors un message SIA-Query. Le voisin répond alors qu'il recherche toujours une réponse mais qu'il est toujours présent en envoyant un SIA-Reply.
Making EIGRP more efficient
Configure stub router
Les méthodes pour palier à ce problème sont:
- Summary Routes
- Stub Configuration: a stub router announce that it is a stub router in the hello message. Ainsi lorsqu'un routeur sait que son voisin est un stub, il ne va donc pas lui envoyer de QUERY messages.
R1(config)# router eigrp 1 R1(config-router)# eigrp stub connected summary
par défaut la commande suivante fait la même chose:
R1(config-router)# eigrp stub
Graceful shutdown
Enfin on peut conseiller d'upgrader les routeurs sur une nouvelle version d'IOS pour supporter la fonction suivante. Avant quand un routeur redemarrait son process ou si quelqu'un mettait une interface down, de façon générale si quelqu'un faisait quelque chose qui perturbait le process EIGRP, il fallait attendre que le routeur voisin attende le hold-time (15s) pour détecter la panne et demande ensuite une nouvelle route à ses voisins. Depuis l'IOS 12.3(2)T, le routeur affecté envoie un message HELLO avec toutes les valeurs K de metric à 255, ceci correspond à un graceful shutdown. Le voisin détecte alors une erreur de metric s'il n'est pas dans une version récente d'IOS, sinon il détecte bien ce GoodBye message.