EIGRP Network Statements and Wildcard Masks
Learn how EIGRP network statements and wildcard masks select Cisco IOS interfaces, form neighbors, advertise routes, and support safe classless routing.
EIGRP, or Enhanced Interior Gateway Routing Protocol, is a Cisco dynamic interior routing protocol. Routers running EIGRP exchange reachability information so that they can learn paths to remote IPv4 networks.
An EIGRP autonomous system number identifies the EIGRP routing process or domain. It is not an IP network number. In classic EIGRP, routers that should become neighbors must use compatible settings, including the same EIGRP autonomous system number. The number 100 in router eigrp 100 is an EIGRP process identifier, not the network 100.0.0.0.
This lesson assumes familiarity with IPv4 networking fundamentals, subnet masks, CIDR notation, and Cisco IOS command modes.
What the EIGRP Network Command Does
The EIGRP network command matches local interface IPv4 addresses and activates EIGRP on matching interfaces. It does not simply add a route to the routing table.
When an interface matches a network statement, EIGRP normally:
- Runs on the interface.
- Sends and receives EIGRP hello packets unless the interface is passive.
- Attempts to form a neighbor adjacency with a compatible EIGRP router on the link.
- Can advertise the connected network associated with the interface.
Multiple network statements may be required when EIGRP should operate on several unrelated interfaces or subnets.
Classic EIGRP Configuration Hierarchy
Router# configure terminal
Router(config)# router eigrp 100
Router(config-router)# network 192.168.12.0 0.0.0.3
Router(config-router)# network 172.16.10.0 0.0.0.255
Router(config-router)# no auto-summary
Router(config-router)# end
The commands enter global configuration mode, select the classic EIGRP process, match participating interfaces, and disable legacy automatic classful summarization. The no auto-summary command is important in many classless designs.
Wildcard Masks
A wildcard mask is the inverse of a subnet mask. It is also called an inverse mask. A subnet mask describes which bits belong to the network portion of an address; a wildcard mask describes which bits must match when IOS evaluates a pattern.
- A wildcard bit of
0requires the corresponding bit to match. - A wildcard bit of
1means the corresponding bit is ignored.
Wildcard masks are not subnet masks and do not define a prefix length by themselves. In an EIGRP network statement, they select interface addresses. To calculate one, subtract each subnet-mask octet from 255.
Subnet mask: 255.255.255.252
Subtract from: 255.255.255.255
Wildcard mask: 0.0.0.3
| CIDR Prefix | Subnet Mask | Wildcard Mask | Typical Use |
|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | Large major network |
| /16 | 255.255.0.0 | 0.0.255.255 | Class B-sized network |
| /24 | 255.255.255.0 | 0.0.0.255 | Typical LAN |
| /25 | 255.255.255.128 | 0.0.0.127 | Half of a /24 |
| /26 | 255.255.255.192 | 0.0.0.63 | Quarter of a /24 |
| /27 | 255.255.255.224 | 0.0.0.31 | Small subnet |
| /28 | 255.255.255.240 | 0.0.0.15 | Small subnet |
| /29 | 255.255.255.248 | 0.0.0.7 | Very small subnet |
| /30 | 255.255.255.252 | 0.0.0.3 | Point-to-point IPv4 link |
How IOS Matches an Interface Address
IOS compares each local interface IP address with the address in the network statement and the wildcard mask. Bits corresponding to zeroes must match; bits corresponding to ones can differ.
Exact Host Matching
The statement network 10.1.1.1 0.0.0.0 requires every bit to match. Therefore, it activates EIGRP only on an interface whose address is exactly 10.1.1.1.
Router(config-router)# network 10.1.1.1 0.0.0.0
Exact matching is useful when multiple interfaces use addresses from the same larger range but only one interface should run EIGRP.
Matching a /24 Subnet
Router(config-router)# network 172.16.10.0 0.0.0.255
The subnet mask 255.255.255.0 becomes wildcard mask 0.0.0.255. Any local interface address from 172.16.10.0 through 172.16.10.255 matches the pattern.
Matching a /30 WAN Link
For an interface configured as 192.168.12.1/30, the /30 subnet mask is 255.255.255.252, so the wildcard mask is 0.0.0.3.
Router(config-router)# network 192.168.12.0 0.0.0.3
This statement matches interface addresses from 192.168.12.0 through 192.168.12.3. In normal host addressing, the router interfaces would typically use usable addresses such as 192.168.12.1 and 192.168.12.2.
Broad Matching
Router(config-router)# network 10.0.0.0 0.255.255.255
This pattern requires only the first octet to match. It can activate EIGRP on every local interface whose address begins with 10. Broad matching is convenient in a controlled lab, but it may unintentionally enable EIGRP on management, user-facing, Internet-facing, or otherwise unintended routed interfaces.
| Interface Address | EIGRP Network Statement | Does It Match? | Reason |
|---|---|---|---|
| 192.168.12.1/30 | network 192.168.12.0 0.0.0.3 | Yes | The address is within the four-address pattern. |
| 192.168.12.5/30 | network 192.168.12.0 0.0.0.3 | No | The address is outside the 192.168.12.0/30 range. |
| 10.1.1.1/24 | network 10.1.1.1 0.0.0.0 | Yes | Every bit matches exactly. |
| 10.1.1.2/24 | network 10.1.1.1 0.0.0.0 | No | At least one host bit differs. |
| 10.20.30.1/24 | network 10.0.0.0 0.255.255.255 | Yes | The first octet matches and the remaining octets are ignored. |
Network Statements With and Without Wildcards
A classic classful-style statement such as network 172.16.0.0 is interpreted using historic class boundaries. An explicit statement such as network 172.16.10.0 0.0.0.255 clearly selects a /24 range.
Explicit wildcard masks are safer when interfaces use subnetted or variable-length addressing. They make the intended interface selection visible and reduce accidental activation.
Subnetted and Discontiguous Networks
Classless routing preserves prefix-length information. This matters when several subnets from one major network are separated by another major network, such as different 172.16.0.0/16 subnets separated by a different major network. Such a design is called discontiguous because portions of the same major network are not connected through one continuous region.
In these environments, use explicit wildcard masks to select the intended interfaces and disable legacy automatic classful summarization:
Router(config)# router eigrp 100
Router(config-router)# network 172.16.10.0 0.0.0.255
Router(config-router)# network 172.16.20.0 0.0.0.255
Router(config-router)# no auto-summary
no auto-summary preserves subnet information in EIGRP advertisements instead of automatically summarizing at classful boundaries.
Safe Deployment Patterns
Use precise subnet or host-address matches when only selected links should run EIGRP. A typical router might enable EIGRP on a WAN transit link and advertise a LAN, while preventing neighbor formation on the LAN.
Router# configure terminal
Router(config)# router eigrp 100
Router(config-router)# network 192.168.50.0 0.0.0.255
Router(config-router)# network 192.168.12.0 0.0.0.3
Router(config-router)# passive-interface GigabitEthernet0/0
Router(config-router)# no auto-summary
Router(config-router)# end
Here, the LAN prefix can be advertised, but the passive LAN interface does not send EIGRP hello packets or form EIGRP neighbors. The WAN interface remains active and can form an adjacency with the neighboring router.
Before expecting an adjacency, verify that the interface is up/up, has an IPv4 address, is eligible for the configured address family, and is not passive. Also confirm that both routers use the same classic EIGRP autonomous system number and have compatible link and IP settings.
Verification Commands
| Command | What to Check | Expected Evidence |
|---|---|---|
show ip eigrp interfaces | Which interfaces are running EIGRP | The expected interfaces appear; unintended interfaces reveal an overly broad match. |
show ip eigrp neighbors | Established neighbor adjacencies | The remote router appears with a valid interface and hold time. |
show ip eigrp topology | EIGRP topology information | Successor and learned network entries are present. |
show ip protocols | Process number, network statements, passive interfaces, and protocol settings | The configured EIGRP process and matching rules are displayed. |
show ip route eigrp | Routes learned through EIGRP | Routes marked with D appear in the IPv4 routing table. |
show running-config | section router eigrp | Saved configuration under the EIGRP process | Network statements, no auto-summary, and passive-interface settings are visible. |
A matched interface does not guarantee that a neighbor will form. Matching only enables EIGRP locally; the remote router must also run compatible EIGRP on the link, and the link must function correctly.
Troubleshooting EIGRP Network Statements
Expected Interface Is Missing
- Compare the interface IP address with every configured network and wildcard pair.
- Recalculate the wildcard mask by subtracting each subnet-mask octet from 255.
- Use
show ip interface briefto confirm that the interface is up/up and has the expected address.
An Unintended Interface Is Active
- Use
show ip eigrp interfacesto identify participating interfaces. - Look for a broad statement such as
network 10.0.0.0 0.255.255.255. - Replace broad patterns with precise subnet or host-address matches.
- Use
passive-interfacewhen a connected network should be advertised but should not form adjacencies.
Routers Do Not Become Neighbors
- Confirm EIGRP is active on the transit interface of both routers.
- Confirm that both classic EIGRP processes use the same autonomous system number.
- Check for passive-interface configuration.
- Verify Layer 1 and Layer 2 operation, IPv4 addressing, subnet masks, and interface status.
Routes Are Summarized Unexpectedly
- Check whether automatic classful summarization is enabled.
- Configure
no auto-summarywhen the design requires classless subnet advertisements. - Use
show ip route eigrpandshow ip eigrp topologyto inspect learned prefixes. - Use
show ip eigrp interfacesto confirm that the intended interfaces are selected.
Exam-Relevant Notes
- The EIGRP autonomous system number is not an IP network number.
- The
networkcommand activates EIGRP on matching local interfaces; it does not directly create a static route. - Wildcard mask zero bits must match; one bits are ignored.
- A /30 subnet mask of
255.255.255.252converts to0.0.0.3. network 10.0.0.0 0.255.255.255can match every local interface in the 10.0.0.0/8 address range.- A passive interface can advertise its connected network without sending EIGRP hellos or forming neighbors there.
- Wildcard matching and route summarization solve different problems.
no auto-summaryis commonly required for classless and discontiguous EIGRP designs.
Related Configuration Topics
- Configure OSPF for comparison with another interior routing protocol.
- Configure Router on a Stick for VLAN subinterfaces and routed LAN designs.