Eigrp Enhanced Interior Gateway Routing Protocol
Category: Routing and Switching
Type: Network Concepts
Generated on: 2025-07-10 09:02:07
For: Network Engineering, Administration & Technical Interviews
1. Quick Overview
Section titled “1. Quick Overview”What is EIGRP?
EIGRP is an advanced distance-vector routing protocol developed by Cisco. It’s a hybrid protocol combining features of distance-vector and link-state protocols. It provides fast convergence, efficient use of bandwidth, and supports VLSM (Variable Length Subnet Masking) and summarization. It operates within a single Autonomous System (AS).
Why is it important?
- Scalability: Handles larger networks efficiently compared to RIP.
- Fast Convergence: Uses DUAL (Diffusing Update Algorithm) for rapid recovery from topology changes.
- Bandwidth Efficiency: Only sends partial, bounded updates when changes occur.
- Ease of Configuration: Relatively simple to configure compared to OSPF.
- Widely Deployed: Commonly used in enterprise networks.
- Cisco Proprietary (Historically): Until recently, it was a Cisco proprietary protocol, but is now an open standard (RFC 7868). While the core algorithm is open, certain features remain Cisco-specific.
2. Key Concepts
Section titled “2. Key Concepts”- Autonomous System (AS): A collection of routers under a single administrative domain. EIGRP only routes within an AS.
- Neighbor Relationship: Routers running EIGRP establish neighbor relationships with directly connected routers within the same AS.
- DUAL (Diffusing Update Algorithm): The algorithm used by EIGRP to calculate the best path (successor) and backup path (feasible successor) and ensure loop-free paths.
- Feasible Distance (FD): The lowest calculated metric to reach a destination. The best path’s metric.
- Reported Distance (RD) / Advertised Distance (AD): The distance reported by a neighbor to a specific destination.
- Successor (S): The best path to a destination, used for forwarding traffic. The path with the lowest feasible distance.
- Feasible Successor (FS): A backup path to a destination that is guaranteed to be loop-free. To be an FS, the neighbor’s Reported Distance (RD) must be less than the local router’s Feasible Distance (FD) to the destination.
- Topology Table: Contains all routes learned from neighbors, including successors and feasible successors. This is the heart of EIGRP’s operation.
- Routing Table: Contains the best routes (successors) from the topology table, used for forwarding packets.
- K Values: Constants used in the composite metric calculation (K1-K5). By default, only K1 (bandwidth) and K3 (delay) are used. IMPORTANT: K values MUST match between neighbors for them to form an adjacency.
- Metric: A numerical value representing the cost of a route. EIGRP uses a composite metric calculated from bandwidth, delay, load, and reliability.
- Hello Packets: Used to discover and maintain neighbor relationships.
- Update Packets: Used to advertise routing information.
- Query Packets: Used to find an alternative path when a successor fails.
- Reply Packets: Used to respond to query packets.
- Acknowledgement (ACK) Packets: Used to reliably acknowledge update, query, and reply packets.
- Partial, Bounded Updates: EIGRP only sends updates when a route changes and only to the affected routers.
- Reliable Transport Protocol (RTP): EIGRP uses RTP for reliable delivery of update, query, and reply packets. Hello and ACK packets are sent unreliably.
- Stub Router: A router that only has one path out of the network.
- Summarization: The process of aggregating multiple routes into a single, summarized route. Can be configured manually or automatically.
- Variance: Used to configure unequal cost load balancing.
3. How It Works
Section titled “3. How It Works”EIGRP operates in three main phases:
-
Neighbor Discovery: Routers send Hello packets to discover neighbors. They establish adjacencies based on matching AS numbers, K values, authentication, and other parameters.
-
Topology Exchange: Routers exchange routing information with their neighbors using Update packets. Initially, they exchange their entire routing table. After that, only changes are sent.
-
Route Selection and Maintenance: Routers use DUAL to calculate the best path (successor) and backup path (feasible successor) to each destination. They maintain the topology table and routing table. When a route fails, DUAL is used to find a new path.
ASCII Diagram Example (Neighbor Discovery)
Router A (AS 100) Router B (AS 100)(10.1.1.1) (10.1.1.2)| || Hello Packet ---------> || || <--------- Hello Packet || || Adjacency Formed |DUAL Algorithm Illustration:
Imagine Router A needs to reach Network 192.168.1.0/24.
- Router B advertises a route to 192.168.1.0/24 with a Reported Distance (RD) of 1000.
- Router C advertises a route to 192.168.1.0/24 with a Reported Distance (RD) of 1500.
- Router A calculates the metric to reach Router B (e.g., 500) and Router C (e.g., 700).
- Router A’s calculated metric to 192.168.1.0/24 via Router B is 1000 (RD) + 500 = 1500.
- Router A’s calculated metric to 192.168.1.0/24 via Router C is 1500 (RD) + 700 = 2200.
- The lowest metric is 1500 (via Router B), so Router B becomes the Successor. Router A’s Feasible Distance (FD) to 192.168.1.0/24 is now 1500.
- If Router C’s RD (1500) is less than Router A’s FD (1500), Router C is NOT a Feasible Successor. (1500 is not less than 1500, it is equal to). If Router C had an RD of 1400, it would be a Feasible Successor.
Convergence Process (When a Link Fails):
- Link Failure: A link goes down, or a neighbor becomes unreachable.
- DUAL Activation: The router detects the failure and marks the route as inactive.
- Feasible Successor Check: The router checks if it has a Feasible Successor (FS) for the destination.
- If FS exists: The FS is immediately promoted to Successor, and routing continues with minimal disruption.
- If FS does not exist: The router enters the “active” state and sends Query packets to its neighbors asking for an alternative path.
- Query Propagation: Neighbors that receive the Query packet check their topology table. If they have a path (successor or feasible successor) to the destination, they send a Reply packet back to the originator. If they don’t have a path, they propagate the Query to their neighbors.
- Reply and Route Recalculation: The originating router receives Reply packets from its neighbors. It uses this information to recalculate the best path using DUAL.
- New Successor: A new Successor is found, and routing resumes.
- Route Stabilization: The network converges, and all routers have the correct routing information.
4. Protocol Details
Section titled “4. Protocol Details”EIGRP Packet Header:
+-----------------------------------------------------------------+| Version | Op Code | Flags | Sequence Number | Ack Number |+-----------------------------------------------------------------+| Autonomous System Number |+-----------------------------------------------------------------+| TLVs (Type, Length, Value) |+-----------------------------------------------------------------+- Version: EIGRP version number.
- Op Code: Type of packet (Hello, Update, Query, Reply, ACK).
- Flags: Various flags (e.g., initialization flag).
- Sequence Number: Used for reliable delivery.
- Ack Number: Used to acknowledge received packets.
- Autonomous System Number: The AS number the EIGRP process is running in.
- TLVs (Type, Length, Value): Encapsulate routing information and other data. Common TLVs include:
- IP Internal Routes: Routes within the AS.
- IP External Routes: Routes redistributed into EIGRP from other routing protocols.
- Hello Parameters: Hold time, K values, etc.
Packet Types and Functions:
- Hello: Discovers and maintains neighbor relationships. Sent periodically to 224.0.0.10 (EIGRP multicast address).
- Update: Advertises routing information (prefixes, metrics). Sent reliably to neighbors.
- Query: Requests information about a specific route when a successor is lost. Sent reliably to neighbors.
- Reply: Responds to a Query packet with information about a route. Sent reliably to the querying router.
- ACK: Acknowledges the receipt of Update, Query, and Reply packets. Sent unreliably.
EIGRP Metric Calculation:
The composite metric is calculated as follows:
Metric = [K1 * Bandwidth + (K2 * Bandwidth) / (256 - Load) + K3 * Delay] * [K5 / (Reliability + K4)]- Bandwidth: Minimum bandwidth along the path (in kbps). Inverted and scaled (10^7 / Bandwidth).
- Delay: Cumulative delay along the path (in tens of microseconds).
- Load: Represents the load on the path (1-255).
- Reliability: Represents the reliability of the path (1-255).
Default K Values:
- K1 = 1 (Bandwidth)
- K2 = 0 (Load)
- K3 = 1 (Delay)
- K4 = 0 (Reliability)
- K5 = 0 (MTU)
Therefore, with default K values, the metric simplifies to:
Metric = (10^7 / Bandwidth + Delay) * 256Practical Considerations:
- Ensure K values match between neighbors. Mismatched K values prevent neighbor relationships from forming.
- Adjusting K values is generally not recommended unless you have a very specific reason and understand the implications. It can lead to routing loops if not done carefully.
- Use the
show ip eigrp neighbors detailcommand to verify K values and other neighbor parameters.
5. Real-World Examples
Section titled “5. Real-World Examples”Scenario 1: Simple Network with EIGRP
Router A (AS 100) ----- Router B (AS 100) ----- Router C (AS 100)10.1.1.0/24 10.1.2.0/24 10.1.3.0/24- Routers A, B, and C are running EIGRP in AS 100.
- Each router advertises its directly connected networks.
- Each router learns routes to the other networks.
- The routing table on each router will contain entries for all three networks.
Scenario 2: Redundancy and Fast Convergence
Router A (AS 100) / \ / \Router B (AS 100) ----- Router C (AS 100) \ / \ / Router D (AS 100)
Network 192.168.1.0/24 is connected to Router D- Router A has two paths to Router D: via Router B and via Router C.
- EIGRP will select the best path (e.g., via Router B) as the Successor.
- If the path via Router B fails, EIGRP will quickly switch to the path via Router C (if it’s a Feasible Successor).
- If no FS exists, a query will be sent, and DUAL will find a new path.
Scenario 3: Summarization
Router A (AS 100) | |Router B (AS 100) | |192.168.1.0/24192.168.2.0/24192.168.3.0/24- Router B is connected to three networks: 192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24.
- Instead of advertising these three networks individually, Router B can summarize them into a single route: 192.168.0.0/22.
- This reduces the size of the routing table and simplifies network management.
Packet Capture Example (Wireshark):
A Wireshark capture of EIGRP traffic will show packets with destination address 224.0.0.10 (for Hello packets) or unicast addresses for update, query, reply and ACK packets. You can filter by eigrp to isolate EIGRP traffic. Examine the contents of the TLVs to see the prefixes being advertised, the metrics, and other relevant information.
6. Common Issues
Section titled “6. Common Issues”- Neighbor Adjacency Issues:
- Mismatched AS Numbers: Routers must be in the same AS to become neighbors.
- Mismatched K Values: K values must match for neighbors to form.
- Authentication Issues: If authentication is configured, it must be configured correctly on both routers. Mismatched authentication keys will prevent neighbors from forming.
- Network Layer Connectivity: Routers must be able to reach each other at Layer 3. Check IP addresses and subnet masks.
- Passive Interface: EIGRP is configured on an interface in passive mode, preventing it from sending Hello packets.
- Access Lists: Access lists blocking EIGRP traffic (protocol 88).
- Routing Loops:
- Inconsistent Routing Information: Caused by incorrect configuration or unstable links.
- Summarization Issues: Incorrectly configured summarization can lead to routing loops.
- Unequal Cost Load Balancing: If variance is configured incorrectly, it can lead to routing loops.
- Slow Convergence:
- High Delay Links: High delay can slow down the convergence process.
- Large Topology: A large topology can take longer to converge.
- Slow Processors: Slow processors can impact the speed of DUAL calculations.
- High CPU Utilization:
- Excessive Queries: A large number of queries can consume a lot of CPU resources.
- Unstable Links: Unstable links can cause frequent route recalculations.
- Incorrect Metric Calculation:
- Bandwidth and Delay Settings: Incorrect bandwidth and delay settings on interfaces can lead to incorrect metric calculations.
Troubleshooting Tips:
show ip eigrp neighbors: Verify neighbor relationships.show ip eigrp neighbors detail: Detailed information about neighbors, including K values.show ip eigrp topology: Examine the EIGRP topology table.show ip route: Examine the routing table.debug eigrp packets: Debug EIGRP packets (use with caution in production environments). Filter byhello,update,query,reply,ackto narrow down the debug output.pingandtraceroute: Verify network layer connectivity.
Example Troubleshooting Scenario:
Problem: Router A is not learning routes from Router B.
Troubleshooting Steps:
show ip eigrp neighborson Router A: Is Router B listed as a neighbor? If not, proceed to step 2.show ip eigrp neighbors detailon Router A and Router B: Verify that the AS numbers and K values match.pingRouter B from Router A: Is there network layer connectivity? If not, check IP addresses, subnet masks, and physical connectivity.- Check for access lists blocking EIGRP traffic.
- Check if EIGRP is configured on the correct interfaces.
- Check for passive interface configuration.
7. Configuration Examples
Section titled “7. Configuration Examples”Basic EIGRP Configuration:
router eigrp 100 (Enable EIGRP in AS 100) network 10.0.0.0 0.0.255.255 (Advertise networks - wildcard mask) no auto-summary (Disable auto-summarization - best practice)exitPassive Interface Configuration:
router eigrp 100 passive-interface GigabitEthernet0/0 (Prevent EIGRP from sending Hello packets on this interface)exitAuthentication Configuration:
! Key Chain Configuration (Global Configuration Mode)key chain EIGRP_AUTH key 1 key-string MY_SECRET_KEY
! Interface Configurationinterface GigabitEthernet0/1 ip authentication mode eigrp 100 md5 ip authentication key-chain eigrp 100 EIGRP_AUTHexit
router eigrp 100 network 10.0.0.0 0.0.255.255exitSummarization Configuration:
interface GigabitEthernet0/1 (Interface where you want to summarize) ip summary-address eigrp 100 192.168.0.0 255.255.252.0 (Summarize routes to 192.168.0.0/22)exit
router eigrp 100 network 192.168.0.0 0.0.255.255exitStub Router Configuration:
router eigrp 100 eigrp stub connected summary (Configure as a stub router - only advertise connected and summary routes)exitUnequal Cost Load Balancing (Variance):
router eigrp 100 variance 2 (Allow load balancing across paths up to 2 times the best metric)exitNamed EIGRP Configuration (Modern Configuration Style):
router eigrp CORE address-family ipv4 unicast autonomous-system 100 ! af-interface GigabitEthernet0/0 authentication mode md5 authentication-key-chain EIGRP_AUTH exit-af-interface ! network 10.0.0.0 0.0.255.255 no auto-summary exit-address-family!key chain EIGRP_AUTH key 1 key-string MY_SECRET_KEY!8. Interview Questions
Section titled “8. Interview Questions”Q: What is EIGRP, and how does it differ from RIP?
A: EIGRP is an advanced distance-vector routing protocol that uses DUAL for fast convergence and supports VLSM and summarization. Unlike RIP, which is a basic distance-vector protocol, EIGRP provides faster convergence, more efficient use of bandwidth, and better scalability. RIP also uses hop count as its metric, while EIGRP uses a composite metric.
Q: Explain the DUAL algorithm.
A: DUAL (Diffusing Update Algorithm) is the algorithm used by EIGRP to calculate the best path (successor) and backup path (feasible successor) to a destination. It ensures loop-free paths by using the feasibility condition, which requires that the reported distance (RD) of a neighbor must be less than the local router’s feasible distance (FD) to the destination for the neighbor to be considered a feasible successor.
Q: What is the difference between a Successor and a Feasible Successor?
A: A Successor is the best path to a destination, used for forwarding traffic. A Feasible Successor is a backup path to a destination that is guaranteed to be loop-free.
Q: What are K values in EIGRP, and why are they important?
A: K values are constants used in the composite metric calculation. They determine the weight given to bandwidth, delay, load, reliability, and MTU. It’s crucial that K values match between neighbors; otherwise, they won’t form an adjacency. By default, only bandwidth and delay are used.
Q: How does EIGRP ensure reliable delivery of routing updates?
A: EIGRP uses the Reliable Transport Protocol (RTP) for reliable delivery of update, query, and reply packets. Hello and ACK packets are sent unreliably.
Q: What is the purpose of summarization in EIGRP?
A: Summarization is the process of aggregating multiple routes into a single, summarized route. It reduces the size of the routing table, simplifies network management, and can help prevent routing loops.
Q: What is a stub router in EIGRP, and how is it configured?
A: A stub router is a router that only has one path out of the network. Configuring a router as a stub router prevents it from being queried for alternative paths, which reduces the amount of routing traffic. It is configured using the eigrp stub command.
Q: How do you troubleshoot EIGRP neighbor adjacency issues?
A: Common causes of neighbor adjacency issues include mismatched AS numbers, mismatched K values, authentication problems, network layer connectivity issues, passive interface configuration, and access lists blocking EIGRP traffic. Use the show ip eigrp neighbors and show ip eigrp neighbors detail commands to diagnose the problem.
Q: What are the different EIGRP packet types and their functions?
A: The main EIGRP packet types are: * Hello: Discover and maintain neighbor relationships. * Update: Advertise routing information. * Query: Request information about a specific route. * Reply: Respond to a Query packet. * ACK: Acknowledge the receipt of Update, Query, and Reply packets.
Q: Explain unequal cost load balancing in EIGRP.
A: EIGRP supports unequal cost load balancing using the variance command. This allows traffic to be distributed across multiple paths with different metrics, as long as the metric of the alternate path is within the variance multiplier of the best path’s metric. However, incorrect configuration can lead to routing loops, so it should be used with caution.
9. Related Concepts
Section titled “9. Related Concepts”- RIP (Routing Information Protocol): A basic distance-vector routing protocol.
- OSPF (Open Shortest Path First): A link-state routing protocol.
- BGP (Border Gateway Protocol): An exterior gateway protocol used for routing between autonomous systems.
- Distance-Vector Routing Protocols: Routing protocols that rely on neighbors to provide routing information.
- Link-State Routing Protocols: Routing protocols that maintain a complete map of the network topology.
- VLSM (Variable Length Subnet Masking): The ability to use different subnet masks within the same network.
- CIDR (Classless Inter-Domain Routing): A method of allocating IP addresses that eliminates the concept of network classes.
- IP Subnetting: Dividing a network into smaller subnetworks.
- Routing Tables: Data tables used by routers to determine the best path for forwarding packets.
- Autonomous Systems (AS): A collection of routers under a single administrative domain.
- Network Design Principles: Best practices for designing and building robust and scalable networks.
This cheat sheet provides a comprehensive overview of EIGRP, covering its key concepts, operation, configuration, troubleshooting, and related topics. Use it as a reference guide for your networking studies and practical work. Remember to practice configuring and troubleshooting EIGRP in a lab environment to solidify your understanding.