Troubleshooting OSPFv2
Troubleshooting OSPFv2
OSPFv2
Instructor Materials
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Troubleshooting OSPFv2 Neighbor
Adjacencies
• This section focuses on the reasons an OSPF neighbor relationship might not form
and how to identify them during the troubleshooting process.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
Troubleshooting OSPFv2
OSPF Establishes Neighbor Relationships
OSPF establishes neighbor relationships by sending hello packets out interfaces participating in
the OSPF process. You can enable the OSPF process on an interface and place it in an OSPF
area using two methods:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Troubleshooting OSPFv2
Show IP OSPF Neighbor
To verify OSPFv2 neighbors, you use the show ip ospf neighbor command.
Example 8-1 shows sample output of the show ip ospf neighbor command. It lists:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
Troubleshooting OSPFv2
Troubleshooting OSPFv2 Neighbor Relationships
The following are some of the reasons an OSPFv2 neighbor relationship might not form:
• Interface not running the OSPF process - If the interface is not enabled for OSPF, it does not send
hello packets or form adjacencies.
• Mismatched timers - Hello and dead timers must match between neighbors.
• Mismatched area numbers - The two ends of a link must be in the same OSPF area.
• Mismatched area type - In addition to a normal OSPF area type, an area type could be a stub area
or a not-so-stubby area (NSSA). The routers must agree on the type of area they are in.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
Troubleshooting OSPFv2
Troubleshooting OSPFv2 Neighbor Relationships (Cont.)
• Passive interface - The passive interface feature suppresses the sending and receiving of hello
packets while still allowing the interface’s network to be advertised.
• Mismatched authentication information - Both OSPF interfaces must be configured for matching
authentication
• ACLs - An ACL may be denying packets to the OSPF multicast address 224.0.0.5.
• MTU mismatch - The maximum transmission unit of neighboring interfaces must match.
• Mismatched network types - neighbors configured with a different OSPF network type might not
form an adjacency.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
Troubleshooting OSPFv2
Adjacency States
Adjacencies are not
established upon the
immediate receipt of
hello messages.
Rather, an adjacency
transitions through the
various states.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
Troubleshooting OSPFv2
OSPF Basic Configuration Errors
When an OSPF neighbor relationship does not form you need the assistance of an accurate physical and
logical network diagram and the show cdp neighbors command to verify who should be the neighbors.
When troubleshooting OSPF adjacencies, you need to verify router OSPF configurations and status with
various show commands like show ip interface brief and show ip protocols
• Router interfaces must be up/up if you plan on forming an OSPF neighbor adjacency.
• OSPF passive-interface interface command targeting the wrong interface will prevent hello packets from
being sent and neighbor adjacency from forming.
• Router OSPF network ip_address wildcard_mask area area_id command or ip ospf process_id area
area_id interface command configured on the wrong interfaces or in the wrong area IDs can also prevent
neighbor relationships from forming.
• If an interface is enabled for OSPF with both the network ip_address wildcard_mask area area_id
command and the ip ospf process_id area area_id command, the ip ospf process_id area area_id
command takes precedence.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
Troubleshooting OSPFv2
Mismatched Timers
OSPF timers must match for neighbor adjacencies to form (with EIGRP they do not). The hello timer defaults to
10 seconds for broadcast and point-to-point network types and 30 seconds for nonbroadcast and point-to-
multipoint network types. The dead timer defaults to 40 seconds for broadcast and point-to-point network types
and 120 seconds for nonbroadcast and point-to-multipoint network types.
Verify current timers on an OSPF interface, with the show ip ospf interface interface_type
interface_number command
You can use the debug ip ospf hello command when troubleshooting adjacencies to reveal mismatched
timers, as shown in Example 8-5. In this example, the packet received (R) has a dead timer of 44 and a hello
timer of 11. The local device (C) has a dead timer of 40 and a hello timer of 10.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
Troubleshooting OSPFv2
Mismatched Area Numbers
For OSPF routers to form neighbor adjacencies, their neighboring interfaces must be in the same area. You
can verify the area an OSPF interface by using either one of the following show commands:
You can use a debug command when troubleshooting adjacencies to find mismatched area numbers:
In Example 8-8. In this example, the packet received has an area ID of 1, and the local interface is participating
in Area 2.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
Troubleshooting OSPFv2
Mismatched Area Type
For routers within an area to form adjacencies, they must
agree on the area type. Within the hello packet, a stub area
flag is designed to indicate the type of area the neighbor is in.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
Troubleshooting OSPFv2
Subnets and Passive Interfaces
Different Subnets - To form an OSPF neighbor adjacency, the router interfaces must be on the same subnet.
Passive Interface - Ensures that rogue routers will not be able to form adjacencies with a legitimate router on
an interface since it is not sending or receiving OSPF packets on that interface. However, if you configure the
wrong interface as passive, a legitimate OSPF neighbor relationship is not formed.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
Troubleshooting OSPFv2
Mismatched Authentication Information
Both routers must agree on the settings for a neighbor relationship to form. To verify whether authentication has
been enabled for the entire area on a router, you use the show ip ospf command.
To verify the key ID being used on an interface-
by-interface basis use the show ip ospf
interface interface_type interface_number
command.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
Troubleshooting OSPFv2
ACL and MTU Mismatch
ACL (Access List) - If an ACL is applied to an interface, and the ACL is not permitting OSPF packets, a
neighbor relationship does not form. Notice that ACL 100 is applied inbound on interface GigabitEthernet1/0.
Note that outbound ACLs do not affect OSPF packets. Therefore, if there is an outbound ACL configured on an
interface and a neighbor adjacency is not forming, the ACL is not the problem because the outbound ACL does
not apply to OSPF packets generated on the local router.
MTU Mismatch - For OSPF routers to become neighbors
and achieve full adjacency, the interface of each router
forming the adjacency must have the same MTU. If they
don’t, the routers can see each other but get stuck in the
ExStart/Exchange states. In Example 8-18, the output of
show ip ospf neighbor indicates that R1 is stuck in the
Exchange state, and that R2 is stuck in the ExStart state.
To solve this issue, you can manually modify the MTU
values of the interfaces so that they match, or you can use
the ip ospf mtu-ignore interface configuration command,
which stops OSPF from comparing the MTU when trying
to form an adjacency.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
Troubleshooting OSPFv2
Duplicate Router ID
OSPF neighbor relationships do not form between
routers if they have the same RID. When a
duplicate RID exists, you receive a syslog message
similar to the following:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
Troubleshooting OSPFv2
Mismatched Network Types
OSPF supports multiple network types. Different
network types have different default values.
Therefore, if two OSPF routers that are trying to
form a neighbor adjacency are configured with
noncompatible network types, a neighbor
relationship does not form.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
Troubleshooting OSPFv2 Routes
• This section examines the reasons OSPF routes might be missing and how to
determine the reason a route is missing.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
Troubleshooting OSPFv2 Routes
Common Reasons for Missing OSPFv2 Routes
OSPF routers receive LSAs from every router within the same area. Every router in an area must have exactly
the same link-state database (LSDB) for that area. If you have no neighbors, you will not learn any routes.
Following is a list of common reasons OSPF routes might be missing either from the LSDB or the routing table:
• Interface not running the OSPF process - If the interface is not participating in the OSPF process, the
network the interface is part of is not injected into the OSPF process and is therefore not advertised to
neighbors.
• Better source of information - If exactly the same network is learned from a more reliable source, it is
used instead of the OSPF-learned information.
• Route filtering - A filter might be preventing a route from being installed in the routing table.
• Stub area configuration - If the wrong type of stub area is chosen, you might be receiving a default route
instead of the actual route.
• Interface is shut down - The OSPF-enabled interface must be up/up for the network associated with the
interface to be advertised.
• Wrong designated router elected - In a hub-and-spoke environment, if the wrong router is the DR, routes
are not exchanged properly.
• Duplicate RIDs - If there are two or more routers with the same RID, routes are missing in the topology.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
Troubleshooting OSPFv2 Routes
Route Filtering
A distribute list applied to an OSPF process controls which routes are installed into the routing table from the
LSDB. Note that this differs from EIGRP, where the distribute list controls routes sent and received between
neighbors. The reason this difference exists is that all OSPF routers in an area must have the same LSDB.
To apply a route filter to OSPF, the distribute list is applied in OSPF configuration mode inbound (meaning into
the routing table), and the routes installed are controlled by ACLs, prefix lists, or route maps.
When troubleshooting route filtering for OSPF, consider
the following:
• Is the distribute list applied in the correct direction?
• If the distribute list is using an ACL, is the ACL
correct?
• If the distribute list is using a prefix list, is the prefix
list correct?
• If the distribute list is using a route map, is the route
map correct?
• The show ip protocols command identifies
whether a distribute list is applied to the OSPF
process.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
Troubleshooting OSPFv2 Routes
Route Filtering (Cont.)
To verify the entries in the prefix list, you issue the show ip prefix-
list TEST command, as shown in Example 8-30. If an ACL is
applied, you issue the show access-list command. If a route map
is applied, you issue the show route-map command. As shown in
Example 8-30, you can verify the command that was used to apply
the distribute list in the running configuration.
Notice in Example 8-31 that the LSDB still has the 10.1.23.0/24
network listed, but it is not installed in the routing table because of
the distribute list that is denying 10.1.23.0/24 from being installed.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
Troubleshooting OSPFv2 Routes
Stub Area Configuration
Stub areas or NSSAs, suppress Type 5 External LSAs
from entering an area at the ABR. Totally stubby areas
and totally NSSAs, suppress Type 5 External and Type
3 Summary LSAs from entering an area at the ABR.
The routes that would have been learned from the Type
5 and Type 3 LSAs are now replaced by a default route.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
Troubleshooting OSPFv2 Routes
Wrong DR Elected
In a subnet with multiple routers it does not
matter which router is elected as the DR
(multi-access Ethernet topology or a full-mesh
Frame Relay topology) because every router is
able to reach the DR.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
Troubleshooting OSPFv2 Routes
Wrong DR Elected (Cont.)
Figure 8-4 shows the wrong DR placement.
If there are duplicate RIDs, the network issues can vary. Having duplicate RIDs in different areas
would cause the physical OSPF topology to be different from the way the SPF algorithm sees it. This
can cause routing issues because some routes may not be passed between areas, causing the LSDB
and the routing tables to be incomplete.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
Troubleshooting Miscellaneous OSPFv2
Issues
• This section looks at tracking LSAs through the network, route summarization,
discontiguous areas, load balancing, and default routes.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Troubleshooting Miscellaneous OSPFv2 Issues
Tracking OSPF Advertisements Through a Network
The following steps describe how network
192.168.1.0/24, connected to R1, is learned by the
LSDBs of routers R2, R3, R4, and R5:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
Troubleshooting Miscellaneous OSPFv2 Issues
Route Summarization
With OSPF, manual route summarization is enabled on an area-by-area basis on an ABR and on an ASBR to
summarize external routes being injected into an area.
When troubleshooting route summarization, you need to keep in mind the following:
• Did you enable route summarization on the correct router?
• Did you enable route summarization for the correct area?
• Did you create the appropriate summary route?
Remember that interarea summaries are created on ABRs with the area area-id range ip-prefix command
and that external summaries are created on ASBRs with the summary-address ip-prefix/length command.
This route to Null0 is created and installed in the routing table to prevent routing loops. It is imperative that this
route be in the table to ensure that if a packet received by this router and destined to a network that falls within
the summary, but for which the router does not know how to reach (longer match), it is dropped.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31
Troubleshooting Miscellaneous OSPFv2 Issues
Discontiguous Areas and Virtual Links
In a multiarea OSPF network, the backbone area (Area 0) must exist, and all other areas must connect to
Area 0. If an area is not physically adjacent to Area 0, routes are not successfully learned by all routers in the
OSPF domain. To solve this issue, a virtual link can be configured to logically connect the nonadjacent area
with Area 0.
A virtual link is created between the routers connected to the transit area (Area 1) by using their RIDs and the
transit area number. The router OSPF configuration mode command on R2 is area 1 virtual-link 4.4.4.4, and
the command on R4 is area 1 virtual-link 2.2.2.2. Common virtual link mistakes are, not configuring the area
with the transit area or incorrectly configuring the router-ids
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
Troubleshooting Miscellaneous OSPFv2 Issues
Verifying Virtual Links
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
Troubleshooting Miscellaneous OSPFv2 Issues
Load Balancing
OSPF supports only equal-cost load balancing.
Therefore, when troubleshooting load balancing
for OSPF, your two primary points of concern are
the overall end-to-end cost and the maximum
number of paths permitted for load balancing. To
verify the maximum number of equal-cost paths
an OSPF router is currently configured to
support, use the show ip protocols command,
as shown in Example 8-42.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34
OSPFv2 Trouble Tickets
• This section presents three trouble tickets related to troubleshooting OSPF related
issues
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35
OSPFv2 Trouble Tickets
Trouble Ticket 8-1
All trouble tickets in this section are based on the topology
shown in Figure 8-12.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37
OSPFv2 Trouble Tickets
Trouble Ticket 8-3
All trouble tickets in this section are based on
the topology shown in Figure 8-12.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38
Prepare for the Exam
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 39
Prepare for the Exam
Key Topics for Chapter 8
Description
Term
OSPF interface table OSPFv3
OSPF neighbor table address families
OSPF link-state database (LSDB) designated router
link-state advertisement (LSA) backup designated router
Dijkstra’s shortest path first (SPF) algorithm stub area
OSPF area totally stubby area
virtual link NSSA
OSPF area border router (ABR) totally NSSA
OSPF autonomous system boundary router
(ASBR)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 42
Prepare for the Exam
Command Reference for Chapter 8
Task Command Syntax
Display the IPv4 routing protocols enabled on the device; for OSPFv2, show ip protocols
display whether any route filters are applied, the RID, the number of
areas the router is participating in, the types of areas, the maximum
paths for load balancing, the network area command, the interfaces
explicitly participating in the routing process, passive interfaces, routing
information sources, and the AD show ip protocols
Display general OSPF parameters, including the PID, the RID, the show ip ospf
reference bandwidth, the areas configured on the router, the types of
areas (stub, totally stubby, NSSA, and totally NSSA), and area
authentication
Display the interfaces that are participating in the OSPF process show ip ospf interface brief
Display detailed information about the interfaces participating in the show ip ospf interface
OSPF process, including interface IPv4 address and mask, area ID, PID,
RID, network type, cost, DR/BDR, priority, and timers
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 43
Prepare for the Exam
Command Reference for Chapter 8 (Cont.)
Task Command Syntax
Display the OSPF devices that have formed a neighbor adjacency show ip ospf neighbor
with the local router
Display the OSPF routes that have been installed in the IPv4 routing show ip route ospf
table
Display the OSPF link-state database show ip ospf database
Provide information about the status of OSPF virtual links that are show ip ospf virtual-links
required for areas not physically adjacent to the backbone area (that
is, Area 0)
Display real-time information related to the exchange of OSPF hello debug ip ospf hello
packets; useful for identifying mismatched OSPF timers and
mismatched OSPF area types
Display the transmission and reception of OSPF packets in real time debug ip ospf packet
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 44
Prepare for the Exam
Command Reference for Chapter 8 (Cont.)
Task Command Syntax
Display real-time updates about the formation of an OSPF debug ip ospf adj
adjacency; useful for identifying mismatched area IDs and
authentication information
Display real-time information about OSPF events, including debug ip ospf events
the transmission and reception of hello messages and LSAs;
might be useful on a router that appears to be ignoring hello
messages received from a neighboring router
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 45