When configuring or modifying a network it may become apparent that a route
is missing from the routing table. One of the obvious things to check is to see
whether the network statement under router configuration
has been properly configured.
For IGP routing protocols, the
network statement does two things:
- Enables the routing protocol on interfaces with IP addresses that match the
IP address in the network statement, giving the interface
the capability to send and receive updates.
- Advertises that network in its own updates to other routers.
This example shows two routers running OSPF between each other.

Debugs and Verification
The output of the show ip ospf
neighbor command shows an empty list.
In a
normal working scenario, the output would display the OSPF adjacent neighbors.
Begin by looking at the running-configurations on both routers by using
the show running-config command. Figure
shows the
configuration of Router R2. The configuration shows that the network statement
exists, but a closer look reveals that the wrong wildcard mask is used. The
network statement is determined in OSPF in exactly the same way that an access
list would be defined. The main idea here is to include the range of addresses
in the area. The network statement of 131.108.0.0 with the
wildcard mask of 0.0.0.255 will not cover 131.108.1.2. It covers only the range
from 131.108.0.0 to 131.108.0.255, as indicated by the wildcard mask.

Figure
shows the output
of the show ip ospf interface command and that OSPF is not
enabled on the Ethernet 0 interface of Router R2.
Depending upon the
routing protocol, there are several other commands that can help troubleshoot
this issue. The show ip protocols command will display
which networks are originating from this router. The debug
command can be used to verify whether the routing update is being sent or
received, or if there are any mismatched timers, subnet masks, and so on:
-
debug ip rip
-
debug ip eigrp
-
debug ip ospf events
Solution
The solution is to correctly configure the
network statements to enable the routing protocol on the
appropriate interfaces. In regards to OSPF, there is a rare case where the
configuration shows the correct mask and the OSPF neighbor list still appears
empty. During network configuration under OSPF, a cut-and-paste of the OSPF
configuration might create this problem. Therefore, it is always best to look
at the output of show ip ospf interface for that specific
interface and confirm whether OSPF is enabled on that interface. This specific
problem can be corrected by reentering the network
statement.
Figure
shows the new
configuration that fixes the OSPF network problem. In this example, the
wildcard mask is 0.0.255.255, which means that it covers the range from
131.108.0.0 to 131.108.255.255
Figure
shows the output
of show ip ospf neighbor after applying the correct network
mask. Beginning with Cisco IOS 12.0, the output of show ip ospf
interface does not display anything if OSPF is not enabled on the
interface.