Cisco CCNP TSHOOT Troubleshooting OSPF

cisco-ccnp-tshoot-ospf-1

 

Interface table – Compiles all interfaces that have bee configured to participate in OSPF.  The directly connected subnets associated with these interfaces are included in the type 1 router LSA that the router injects into the OSPF LSDB.  An interface configured as a passive interface is still listed in the OSPF interface table although no neighbor relationships are established on this interface. 

Neighbor table – Used to keep track of all OSPF neighbors.  Neighbors are added to the table upon receipt of hello packets whereas they are removed when the OSPF dead timer for a neighbor expires or when the associated interface goes down.

Link-State Database (LSDB) – The main data structure OSPF uses to store all its network topology information.  The LSDB contains topology information for the areas that a router participates in.  It also contains condensed information about the paths that are available to reach networks and subnets in other areas or other autonomous systems.  It is one of the most important data structures to gather information from when troubleshooting OSPF.

Routing Information Base (RIB) – The RIB includes information for the best routes to each individual prefix in the OSPF network with their associated path costs.  This information is derived after executing the SPF algorithm.  When the information in the LSDB changes, only a partial recalculation might be necessary.  Routes might be added or deleted from the RIB without the need for a full SPF recalculation.  Based on the RIB, OSPF will attempt to install its routes into the routing table.


Cisco CCNP TSHOOT OSPF Hierarchical Routing

cisco-ccnp-tshoot-ospf-2

OSPF is designed in a hierarchical fashion, which basically means that you can separate the larger internetwork into smaller internetworks called areas. All OSPF networks MUST contain Area 0 and all areas MUST directly connect to Area 0.  This is depicted in the slide where both Area 1 and Area 2 are directly connected to the Backbone Area, Area 0.  There is one exception to this rule where a virtual link can be established but it should only be used for a temporary solution (i.e. merging two different company networks).  Details of virtual links are not covered in this course.


Cisco CCNP TSHOOT OSPF in a Hierarchical Design

cisco-ccnp-tshoot-ospf-3

OSPF has special restrictions when multiple areas are involved. If more than one area is configured, one of these areas has be to be area 0. This is called the backbone. When designing networks it is good practice to start with area 0 and then expand into other areas later on.

The backbone has to be at the center of all other areas, i.e. all areas have to be physically connected to the backbone. The reasoning behind this is that OSPF expects all areas to inject routing information into the backbone and in turn the backbone will disseminate that information into other areas.

Utilizing multiple areas is typically a good design for OSPF.  Creating OSPF in a hierarchical design has numerous benefits that include:

– Decreasing routing overhead

– Speeding up convergence

– Confines network instability to single areas of the network

Note: While it makes OSPF more efficient, it does not make configuring OSPF easier.


Cisco CCNP TSHOOT Neighbor Adjacencies: The Hello Packet

cisco-ccnp-tshoot-ospf-4

Hello packets are utilized by OSPF routers to recognize each other in order to share information.  Each interface participating in OSPF sends hello packets multicast periodically to 224.0.0.5.  The entries in the figure with an “^” much match between adjacent routers or a neighbor relationship will NOT be established.  These include Hello and dead intervals, Area ID, Authentication password (if used) and Stub area flag.


Cisco CCNP TSHOOT SPF Algorithm

cisco-ccnp-tshoot-ospf-5

The SPF algorithm places each router at the root of the tree and calculates the shortest path to each node utilizing the Dijkstra’s algorithm.  It is based on the cumulative cost required to reach each node.  The cost is based on bandwidth.  The default reference bandwidth is 10 to the 8th, which is 100,000,000 or the equivalent of the fast ethernet which means a fast ethernet has a default cost of 1.  A 10Mb/s ethernet has a default cost of 10 and so on.  Due to the increased speeds of networks today (i.e. 1Gbs and 10Gbs) the reference bandwidth can be changed so that a 1Gbs link would be more desirable than a 100Mbs link.


Cisco CCNP TSHOOT OSFP Neighbors

cisco-ccnp-tshoot-ospf-6

Neighbors 

Neighbors are two or more routers that have an interface in a common network, such as two routers connected on a point-to-point serial link.

Adjacency

An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates. OSPF is really picky about sharing routing information, unlike EIGRP that directly shares routes with all of its neighbors.

Instead, OSPF directly shares routes only with neighbors that have also established adjacencies.

Link State Advertisement

A Link State Advertisement (LSA) is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers.


Cisco CCNP TSHOOT Configuring Single Area OSPF

cisco-ccnp-tshoot-ospf-7

Configuring basic OSPF isn’t as simple as RIP, IGRP and EIGRP, and it can get can really complex once the many options that are available within OSPF are factored in.

Two basic elements of OSPF configuration are:

-Enabling OSPF

This is accomplished with the “router ospf process-id” command.

-Configuring OSPF areas

This is accomplished with the “network address wildcard-mask area area-id” command.

The easiest, and also least scalable way to configure OSPF is to just use a single area. Doing this requires a minimum of two commands.

router ospf

A value in the range 0 – 65535 identifies the OSPF Process ID.

network address mask area area-id

The area-id should be 0 if only a single area is configured.


Cisco CCNP TSHOOT Verifying the OSPF Configuration

cisco-ccnp-tshoot-ospf-8

There are several ways to verify proper OSPF configuration and operation.  Some of the commands are as follows:

show ip protocols: This command is useful in debugging routing operations.  Information in the Routing Information Sources field of the show ip protocols output can help you identify a router suspected of delivering bad routing information.

show ip route or show ip route ospf: Displays the current state of the routing table

show ip ospf interface: Displays general information about Open Shortest Path First (OSPF) routing processes.

show ip ospf neighbor: Displays OSPF-neighbor information on a per-interface basis.

OSPF is great if you configure it properly.  Now let’s look at other ways to do that.


Cisco CCNP TSHOOT Verifying the OSPF Configuration

cisco-ccnp-tshoot-ospf-9

Notice from the output of the “show ip route” command, the default administrative distance (AD) of OSPF is 110.  The AD for an external (E2) OSPF route is 170 as shown in the output of the show ip route command.


Cisco CCNP TSHOOT Verifying the OSPF Configuration

cisco-ccnp-tshoot-ospf-10

The show ip ospf command is great for troubleshooting OSPF as it has a significant amount of valuable information in the output.  Things such as timer settings, Link State Advertisement (LSA) information, area information, etc.


Cisco CCNP TSHOOT Verifying the OSPF Configuration

cisco-ccnp-tshoot-ospf-11

Another good command for troubleshooting OSPF is the show ip ospf neighbor command.  As you can see from the output on the slide, fields that are displayed are as follows:

ID – Router ID of the OSPF neighbor

Priority – OSPF priority of the OSPF neighbor

State – Displays the state of the OSPF router.  Is it a DR, BDR, etc.

Dead Time – Expected time before Cisco IOS software will declare the neighbor dead.

Address – Actual address of the interface the OSPF router is assigned.

Interface – Interface the neighbor is learned on


Cisco CCNP TSHOOT OSPF debug Commands

cisco-ccnp-tshoot-ospf-12

To display information on Open Shortest Path First (OSPF)-related events, such as adjacencies, flooding information, designated router selection, and shortest path first (SPF) calculation, use the debug ip ospf events command in privileged EXEC mode.

To display general IP debugging information and IP security option (IPSO) security transactions, use the debug ip packet command in privileged EXEC mode.

By issuing the debug ip ospf adj command, you can capture the authentication process and DR/BDR entries.