Configuring EIGRP Network Statements with Wildcard Masks
Learn how EIGRP network statements select local interfaces, calculate wildcard masks, limit participation to one subnet, and verify configuration.
EIGRP (Enhanced Interior Gateway Routing Protocol) is an interior dynamic routing protocol. Its network command determines which local router interfaces participate in an EIGRP process. Understanding wildcard masks lets you select exactly the interfaces you intend to use.
This lesson assumes familiarity with IPv4 addressing, subnet masks, CIDR prefix lengths, directly connected networks, basic dynamic routing, and Cisco IOS configuration modes.
What the EIGRP Network Command Does
An EIGRP network statement compares its address and optional wildcard mask with the IPv4 addresses configured on the local router's interfaces. A matching interface becomes an EIGRP interface for that routing process.
On a participating interface, EIGRP can send and receive control traffic, discover directly connected EIGRP neighbors, and advertise the connected network according to the rest of the configuration. Interface participation is also affected by settings such as passive-interface, interface state, and EIGRP compatibility with the neighboring router.
The command does not simply mean “advertise this remote route.” It selects local interfaces. Route exchange requires an operational interface and, for neighbor-based exchange, another compatible EIGRP router on the segment.
router eigrp <autonomous-system-number>
network <ip-address> <wildcard-mask>
Traditional Classful Network Behavior
The traditional form of the command specifies only an IPv4 address:
router eigrp 1
network 10.0.0.0
Without a wildcard mask, the statement is interpreted at the address's traditional classful major-network boundary. The classful major network for an address beginning with 10 is 10.0.0.0/8. Therefore, this statement can match local interfaces with addresses anywhere in the 10.0.0.0/8 range.
For example, if one router has interfaces in 10.0.0.0/24, 10.0.1.0/24, and 10.0.2.0/24, the broad statement can activate EIGRP on all three interfaces. That may be useful when every 10.x interface should participate, but it is too broad when only one subnet is intended.
Wildcard-Mask Syntax
To select interfaces more precisely, place a wildcard mask after the address:
network <ip-address> <wildcard-mask>
A wildcard mask, also called an inverse mask, is interpreted bit by bit:
- A
0bit means the corresponding bit in the interface address must match the statement address. - A
1bit means the corresponding bit is ignored and may vary.
The address and wildcard mask work together. The address alone does not describe the complete matching rule when a wildcard mask is present.
Calculating a Wildcard Mask
Calculate a wildcard mask by subtracting each subnet-mask octet from 255:
wildcard octet = 255 - subnet-mask octet
For a /24 subnet:
Subnet mask: 255.255.255.0
Subtract: 255.255.255.255
Wildcard: 0.0.0.255
The first three octets contain zero wildcard bits, so they must match exactly. The final octet contains eight one bits, so any host value in that subnet may match.
| Prefix Length | Subnet Mask | Wildcard Mask | Typical Matching Scope |
|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | One first-octet network, such as 10.0.0.0/8 |
| /16 | 255.255.0.0 | 0.0.255.255 | One /16-sized range |
| /24 | 255.255.255.0 | 0.0.0.255 | One /24 subnet |
| /30 | 255.255.255.252 | 0.0.0.3 | One four-address /30 block |
| /32 | 255.255.255.255 | 0.0.0.0 | One exact IPv4 address |
Example: Select One of Three Connected LANs
Assume one router has three directly connected LANs:
10.0.0.0/24on the target interface10.0.1.0/24on another interface10.0.2.0/24on a third interface
The goal is to enable EIGRP only on the interface whose address belongs to 10.0.0.0/24.
router eigrp 1
network 10.0.0.0 0.0.0.255
The wildcard 0.0.0.255 requires the first 24 bits to match 10.0.0 and ignores the last eight host bits. Thus, addresses such as 10.0.0.1 and 10.0.0.254 match, while addresses in 10.0.1.0/24 and 10.0.2.0/24 do not.
| Network Statement | Interface Address | Does It Match? | Reason |
|---|---|---|---|
Broad classful network 10.0.0.0 | 10.0.0.1 | Yes | The address is inside the classful 10.0.0.0/8 major network. |
Broad classful network 10.0.0.0 | 10.0.1.1 | Yes | The address is also inside the same 10.0.0.0/8 major network. |
network 10.0.0.0 0.0.0.255 | 10.0.0.1 | Yes | The first 24 bits match; the host octet is ignored. |
network 10.0.0.0 0.0.0.255 | 10.0.1.1 | No | The third octet differs, and its wildcard bits are zero. |
Verification Commands
Inspect Configured EIGRP Networks
show ip protocols
This command displays routing protocol information, including the EIGRP process, autonomous system number, configured network statements, passive interfaces, and related settings. Use it to confirm that the intended address and wildcard mask are present.
Confirm Participating Interfaces
show ip eigrp interfaces
This output lists interfaces currently participating in EIGRP. In the focused example, the interface in 10.0.0.0/24 should appear, while interfaces in the other two /24 networks should not be selected by that statement.
Check Neighbor Adjacencies
show ip eigrp neighbors
An EIGRP neighbor is a directly connected router with which EIGRP has established an adjacency. A selected interface does not guarantee a neighbor: the link, addressing, EIGRP process settings, and passive-interface status must also permit communication.
Inspect Learned EIGRP Routes
show ip route eigrp
Where applicable, this command displays routes learned through EIGRP. It does not show merely connected networks selected by a network statement; it shows routes installed as EIGRP-learned entries.
Configuration Considerations
- An interface must have an IPv4 address that matches at least one EIGRP network statement before it participates.
- Overlapping network statements can select the same interface. They are normally unnecessary and make the configuration harder to understand.
- A wildcard mask in an EIGRP network statement is not the subnet mask assigned to an interface.
passive-interfaceprevents EIGRP hello packets and neighbor formation on a selected interface while allowing the connected network to remain advertised by the EIGRP process.
router eigrp <autonomous-system-number>
passive-interface <interface-id>
EIGRP uses RTP, or Reliable Transport Protocol, to provide reliable or unreliable delivery of EIGRP packets as appropriate. RTP does not change how the network command selects local interfaces.
Troubleshooting EIGRP Network Statements
EIGRP Operates on More Than One 10.x Interface
Likely cause: A classful statement or overly broad wildcard mask matches multiple interface addresses.
- Review
show ip protocols. - Review
show ip eigrp interfaces. - Compare every interface address with the configured address and wildcard mask.
If only 10.0.0.0/24 should participate, replace the broad selection with:
network 10.0.0.0 0.0.0.255
The Intended Interface Does Not Appear
Check the interface's IPv4 address and operational status, recalculate the wildcard from the intended subnet mask, and inspect the configured EIGRP statements. Correct the address/wildcard pair and ensure the interface is up.
No Neighbor Forms on a Selected Interface
Selection by a network statement is only one requirement. Verify the link and IP addressing, confirm that the neighboring router uses compatible EIGRP settings and autonomous system information, and check whether the interface is passive.
show ip eigrp interfaces
show ip eigrp neighbors
A Network Statement Does Not Produce a Route Exchange
The network command selects local interfaces; it does not override interface state, neighbor requirements, passive-interface settings, or filtering. Confirm that a matching local interface exists and that a reachable EIGRP-speaking neighbor is present on the segment.
Key Takeaways
- The EIGRP
networkcommand selects local interfaces by matching their IPv4 addresses. - Without a wildcard mask, the traditional form can match an entire classful major network.
- A wildcard mask uses zero bits for required matches and one bits for ignored bits.
- The inverse of
255.255.255.0is0.0.0.255, which precisely selects a /24 address range. - Use
show ip protocolsfor configured statements,show ip eigrp interfacesfor participating interfaces,show ip eigrp neighborsfor adjacencies, andshow ip route eigrpfor learned routes. - Use
passive-interfacewhen a connected network should be advertised but EIGRP hellos and neighbor formation should be suppressed on that interface.
For a focused review of this configuration topic, see EIGRP and wildcard masks.