EIGRP Configuration: Network Statements and Neighbor Verification - 夜莺博客

EIGRP Configuration: Network Statements and Neighbor Verification

EIGRP is Cisco's advanced distance-vector IGP: faster to bring up than OSPF, no area design, and it pre-computes backup paths with the DUAL algorithm so convergence is near-instant. Configuration boils down to three moves — start the process with a matching autonomous-system number, advertise networks with wildcard masks, and disable classful auto-summary. This guide shows the exact IOS commands and the verification output that proves neighbors formed.

How EIGRP Works: DUAL, Metrics and the Feasibility Condition

EIGRP is built on DUAL (Diffusing Update Algorithm), which is best understood as "pre-compute the backup path before you need it". Every router keeps a topology table of all paths it has heard about, not just the best one. For each destination:

  • The successor is the best path - computed metric lowest - and it is the one installed in the routing table and advertised to neighbours.
  • The feasible distance (FD) is the metric of that best path, measured from this router.
  • The reported distance (RD), sometimes called the advertised distance, is the metric a neighbour says it can reach the destination with.
  • A neighbour qualifies as a feasible successor only if its reported distance is strictly less than this router's feasible distance. That is the feasibility condition, and it is the loop-prevention guarantee that lets EIGRP trust a backup path without recalculating.

If the successor fails and a feasible successor exists, the switchover is essentially instant - the topology table already contains the answer. If no feasible successor exists, the route goes active, the router sends queries to its neighbours, and the network enters a diffusing computation that only ends when every query is answered. Routes stuck in active (SIA) are the EIGRP equivalent of an OSPF flooding storm, and they are almost always caused by a router that cannot answer a query - a distant stub, a flapping link, or a filter that hides the query.

The classic composite metric uses bandwidth and delay by default. With the default K values (K1 = 1, K2 = 0, K3 = 1, K4 = 0, K5 = 0), the metric is 256 × (10,000,000 / minimum bandwidth in kbps + sum of delays in tens of microseconds). Notice what that means in practice: bandwidth is taken from the slowest link on the path, delay is added up along the whole path, and load and reliability are ignored unless you deliberately enable K2 and K5 - which you should not do, because mismatched K values are a silent adjacency killer.

Step 1: Start the EIGRP Process

Unlike an OSPF process ID, the EIGRP AS number is not locally significant — it must match exactly on every router that should peer, or the neighbor relationship never forms. Pick one AS number for the whole domain:

R1(config)# router eigrp 100
R2(config)# router eigrp 100

Two habits are worth building at this step. First, set a stable router ID explicitly - EIGRP will derive one from the highest loopback or interface address otherwise, and a router ID that changes after a link flap causes routes to be re-advertised for no reason:

R1(config)# router eigrp 100
R1(config-router)# eigrp router-id 1.1.1.1

Second, add logging so that neighbour events leave a trace. Without it, a neighbour that comes up and immediately goes down is invisible unless you happen to be watching the console:

R1(config-router)# eigrp log-neighbor-changes
R1(config-router)# eigrp log-neighbor-warnings 60

Keep the AS number consistent across the whole domain and record it in the design documentation. Nothing in the configuration itself warns you when one router is configured with AS 100 and the rest with AS 10 - the routers simply ignore each other, and the only evidence is a missing adjacency.

Step 2: Network Statements and Wildcard Masks

A network statement does two things: it enables EIGRP on any local interface whose IP falls inside the range, and it advertises that interface's subnet to neighbors. The wildcard mask is the inverse of the subnet mask — 0.0.0.3 for a /30, 0.0.0.255 for a /24 — and it must actually cover the interface IP, or that interface silently never joins EIGRP:

R1(config)# router eigrp 100
R1(config-router)# network 10.0.12.0 0.0.0.3
R1(config-router)# network 192.168.1.0 0.0.0.255
R1(config-router)# no auto-summary

no auto-summary matters: older IOS summarizes at classful boundaries by default, which breaks reachability the moment your subnets are discontiguous. Optionally pin a stable router ID:

The wildcard mask trips people up more than any other single command. It is the bitwise inverse of the subnet mask, and a mismatch means an interface is silently excluded from the process. Keep this table to hand:

Prefix Subnet mask EIGRP wildcard
/30 255.255.255.252 0.0.0.3
/29 255.255.255.248 0.0.0.7
/28 255.255.255.240 0.0.0.15
/26 255.255.255.192 0.0.0.63
/24 255.255.255.0 0.0.0.255
/16 255.255.0.0 0.0.255.255
/8 255.0.0.0 0.255.255.255

Other useful forms of the statement, all of which are still in everyday use:

R1(config-router)# network 10.0.12.0 0.0.0.3      ! a single /30 WAN link
R1(config-router)# network 192.168.1.0 0.0.0.255  ! one LAN subnet
R1(config-router)# network 172.16.0.0 0.0.255.255 ! a whole /16 block
R1(config-router)# network 0.0.0.0 255.255.255.255 ! every interface: convenient, dangerous on WAN edges

The catch-all network 0.0.0.0 255.255.255.255 enables EIGRP on every interface that has an address in the range, including links toward the Internet or a partner network. That is the fastest way to leak internal routes. The better pattern is no auto-summary plus an explicit network list, with passive-interface default and a targeted no passive-interface for the links that should form adjacencies:

R1(config-router)# passive-interface default
R1(config-router)# no passive-interface GigabitEthernet0/0
R1(config-router)# no passive-interface Serial0/0/0

A passive interface still advertises its own connected subnet, but it never sends or processes hello packets - which is exactly the behaviour you want on a LAN or loopback.

R1(config-router)# eigrp router-id 1.1.1.1

Step 3: Verify Neighbors and Routes

No adjacency means no routes, no matter how correct the network statements look. Check the peer table first, then confirm routes and the running parameters:

R1# show ip eigrp neighbors
R1# show ip route eigrp
R1# show ip protocols

show ip eigrp neighbors lists the peer address, the interface it was learned on and an uptime that should be counting up. In show ip route eigrp, routes learned via EIGRP are marked with a D (DUAL).

Three more commands turn that first check into a real verification. show ip eigrp topology lists every destination the router knows about, with the successor and every feasible successor and their metrics - the state field shows P for passive (stable) and A for active (the router is querying). Any route stuck in A is a live problem. show ip eigrp interfaces confirms which interfaces are actually running EIGRP and how many peers each one has, and show ip eigrp traffic gives hello, update, query and reply counters that make it obvious whether two routers are exchanging anything at all:

R1# show ip eigrp topology
R1# show ip eigrp topology all-links
R1# show ip eigrp interfaces
R1# show ip eigrp traffic
R1# show ip protocols

show ip protocols is the compact summary of everything you configured: the AS number, the K values in use, each network statement, the passive interfaces, maximum paths, variance, authentication and redistribution sources. It also states in plain English whether automatic network summarization is in effect - the quickest way to confirm that no auto-summary took.

Timers, Hello Intervals and Bandwidth-Percent

EIGRP's default hello and hold timers depend on the interface. On LAN and other media with bandwidth greater than 1.544 Mbps, hello is every 5 seconds and the hold timer is 15 seconds; on multipoint interfaces and links at or below 1.544 Mbps (including serial links configured as low-bandwidth), hello is 60 seconds and hold is 180 seconds. The hold time is the period a router waits without hearing a hello before declaring the neighbour dead, and it must match on both ends in most designs:

R1(config-if)# ip hello-interval eigrp 100 5
R1(config-if)# ip hold-time eigrp 100 15

Shorter timers give faster failure detection at the cost of more hello traffic; for sub-second detection, use BFD (ip hello-interval is not a substitute for a dedicated liveness protocol). The second tunable is how much of the interface bandwidth EIGRP may consume, which matters on slow WAN links:

R1(config-if)# ip bandwidth-percent eigrp 100 50

The default is 50 percent of the interface bandwidth value, and on a low-speed link with an inflated bandwidth statement you will see protocol traffic starve user data. Lowering the percentage is the correct fix - not raising the bandwidth statement to change the metric, which distorts path selection for every router in the domain.

EIGRP Authentication: MD5 and SHA-256

EIGRP has no authentication by default, so any device that can send IP packets to a multicast address on your segment can attempt to form an adjacency. Configure authentication on every link that should peer. The key chain holds the secret; the interface references it:

R1(config)# key chain EIGRP-KC
R1(config-keychain)# key 1
R1(config-keychain-key)# key-string Str0ngKeyHere
R1(config-keychain-key)# exit
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip authentication mode eigrp 100 md5
R1(config-if)# ip authentication key-chain eigrp 100 EIGRP-KC

On IOS 15.2(4)M and later, replace md5 with hmac-sha-256 for a stronger hash. Both routers on a link must agree on the mode and the key, and a mismatched key produces an adjacency that never comes up with no obvious error beyond debug output. Test a key change in a maintenance window: unlike the graceful hitless switchover some IGPs offer, a wrong EIGRP key drops the adjacency. To confirm the configuration, look for the authentication mode in show ip eigrp interfaces detail and use debug eigrp packets - with care, on a production router.

Unequal-Cost Load Balancing with Variance

One of EIGRP's genuine advantages over OSPF is that it can use backup paths that are slower but still valid. variance sets a multiplier applied to the successor's metric: any feasible successor whose metric is within that multiple is also installed in the routing table and shares traffic.

R1(config-router)# maximum-paths 4
R1(config-router)# variance 2
R1(config-router)# traffic-share balanced

With variance 2, a path up to twice the successor's metric is eligible. Two conditions still apply: the alternative must be a feasible successor (its reported distance must be lower than the current feasible distance), and the total number of installed paths is capped by maximum-paths. By default IOS distributes traffic proportionally by metric; traffic-share balanced makes it split more evenly. Never raise variance to force a path in - if the backup is not a feasible successor, variance will not and should not use it, because doing so would risk a loop.

Stub Routing and Route Filtering

In a hub-and-spoke topology, spokes should never be asked to reach anything beyond their own neighbours, but by default EIGRP will query them during a diffusing computation and can leave the hub stuck in active waiting for a reply. Stub routing fixes that by declaring a router as an edge device:

R1(config-router)# eigrp stub connected summary

The default stub form advertises connected and summary routes only, and - importantly - a stub router does not receive queries from its neighbours, which removes the SIA risk entirely. Other options are receive-only (advertises nothing), static, redistributed and leak-map for controlled exceptions. Pair stub routing with filtering where routes must not propagate:

R1(config-router)# distribute-list prefix BLOCK-INTERNET out GigabitEthernet0/0

EIGRP vs OSPF: Which IGP to Choose

Characteristic EIGRP OSPF
Algorithm DUAL, advanced distance vector Dijkstra SPF, link state
Convergence Instant when a feasible successor exists Full SPF recalculation, typically 1-5 seconds
Design constraints Flat AS, no areas required, any router can summarise Hierarchical areas with a backbone; summarisation at ABRs and ASBRs
Backup paths Unequal cost with variance Equal cost only
Interoperability Cisco-origin, now standardised as informational RFC 7868 Open standard, universal support
Typical fit All-Cisco campus, branch and MPLS CPE Multivendor networks, very large hierarchical designs

In practice the choice is driven by vendor mix and by the scale of the design, not by raw protocol quality. A single-vendor campus with shallow hierarchy is a good EIGRP candidate; a network with equipment from three vendors is not.

Classic vs Named Mode

Modern IOS also supports named mode, which scopes the process per address family:

R1(config)# router eigrp CAMPUS
R1(config-router)# address-family ipv4 unicast autonomous-system 100
R1(config-router-af)# network 10.0.12.0 0.0.0.3
R1(config-router-af)# network 192.168.1.0 0.0.0.255
R1(config-router-af)# exit-address-family

Named mode makes IPv6 (address-family ipv6) trivial and keeps all EIGRP knobs in one place.

Common Failure Points

  • AS mismatch — neighbors never appear; both sides must use the same AS number.
  • Wildcard mask too narrow — the statement must cover the interface IP.
  • Auto-summary left on — discontiguous subnets are summarized away.
  • Passive-interface misuse — a passive interface cannot form adjacencies (intentional on LANs facing only hosts).

Troubleshooting Checklist

Work these steps in order when an EIGRP adjacency will not come up or routes are missing after it does:

  1. Same AS? show ip protocols on both routers. Different AS numbers is the single most common cause of "no neighbours".
  2. Common subnet and interface up? show ip interface brief. EIGRP needs IP connectivity, not just link state, and both routers must be in the same IP subnet to form an adjacency over a broadcast medium.
  3. Network statement actually covering the interface? show ip eigrp interfaces lists only interfaces running EIGRP - if the WAN link is absent from that list, the wildcard mask is wrong.
  4. Passive interface? A passive interface never forms adjacencies. Check show ip protocols for the passive list.
  5. Authentication matching? Mode (md5 or hmac-sha-256), key chain name and key string must all match. debug eigrp packets shows the mismatch immediately - run it briefly and with the router's CPU load in mind.
  6. Timers matching? A hello/hold mismatch on one end causes a neighbour that forms and then dies every couple of minutes.
  7. K values matching? metric weights on one router and not the other makes the two sides compute different metrics and ignore each other's updates.
  8. Route present but not installed? show ip eigrp topology shows the entry with its metric; if there is no feasible successor and the route is active, look for a query storm or a partition.

EIGRP Configuration FAQ

Does the AS number have to match everywhere? Yes. Unlike an OSPF process ID, which is locally significant, the EIGRP AS number is the routing domain identifier. In named mode the equivalent value is set per address family with autonomous-system.

Is no auto-summary still required? On most modern IOS and IOS-XE images auto-summary is already disabled by default for EIGRP, but issuing the command is harmless and makes the intent explicit. Always verify with show ip protocols.

Can EIGRP and OSPF run at the same time? Yes, and often do during a migration. They do not exchange routes unless you redistribute, and redistribution should always specify a seed metric for EIGRP: redistribute ospf 1 metric 100000 10 255 1 1500.

How do I advertise a default route from the edge? Create it locally and redistribute it - ip route 0.0.0.0 0.0.0.0 <next-hop> plus redistribute static - or summarise with ip summary-address eigrp 100 0.0.0.0 0.0.0.0 on the outbound interface.

What about IPv6? EIGRPv6 is configured through ipv6 router eigrp 100 with ipv6 eigrp 100 on each interface, or much more simply inside named mode under address-family ipv6 unicast.

Once EIGRP is up, understand how it picks paths compared with OSPF by reading our OSPF area types guide and the packet-level view in OSPF LSA types 1 to 11; for troubleshooting neighbors generally see BGP neighbor flapping root causes (the Layer 1/2 checks apply to any protocol), and when EIGRP advertises over a tunnel, the hub-and-spoke configuration in DMVPN phase 3 with NHRP shortcut covers the split-horizon details that break stub spokes.

原文链接:https://goldfishnetworks.com/guides/how-to-configure-eigrp