Open Shortest Path First (OSPF)OSPF uses the link-state technology, as does RIP. The Internet Engineering Task Force (IETF) developed OSPF in 1988. The most recent version is OSPFv2 (more information is available in RFC 1583). OSPF is an interior gateway protocol that was developed to address large, scalable internetworks that RIP was not able to address. OSPF sends its link-state information every 30 minutes (unlike RIP, which sends updates every 30 seconds). OSPF addresses a few issues that were of concern in earlier protocols. These issues include speed convergence, support for variable subnet mask, network reachability, use of bandwidth, and path selection.
Troubleshooting OSPFCompared to RIP, OSPF fares better in a large network. OSPF does not update every 30 seconds, has a lower cost, and thus preserves the bandwidth. When changes occur on the network, the CPU has to deal with processing and calculating all the routes on the network. In general, if at all possible, do not add more than 100 routers per area and not more than 700 routers throughout the network. This is not the minimum or the maximum router capacity for OSPF, but a guideline. The more links that exist in a network, the greater the number of routing updates and CPU cycles. A few commands are very helpful in troubleshooting OSPF. Knowing when and where to use these commands will help you isolate the problem and fix the problem sooner. The show commands are used to provide information on the configuration and function of OSPF on the router. Using the show ip route command displays the IP route information: DCSRTR# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks O 10.10.0.0/16 [110/74] via 172.68.16.3, 00:03:30, Serial1 [110/74] via 172.68.16.1, 00:03:30, Serial0 C 10.0.0.2/32 is directly connected, Loopback0 O 10.0.0.1/32 [110/65] via 172.68.16.3, 00:03:30, Serial1 [110/65] via 172.68.16.1, 00:03:30, Serial0 C 10.10.20.0/24 is directly connected, Ethernet0 DCSRTR# The above output shows the networks the router knows about, as well as the interface on the router to those networks. Using the show ip route ospf command shows the OSPF routes only: DCSRTR# show ip route ospf 10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks O 10.10.0.0/16 [110/74] via 172.68.16.3, 00:02:57, Serial1 [110/74] via 172.68.16.1, 00:02:57, Serial0 O 10.0.0.1/32 [110/65] via 172.68.16.3, 00:02:57, Serial1 [110/65] via 172.68.16.1, 00:02:57, Serial0 DCSRTR# Notice in the above output that only the OSPF protocol learned routes are shown. Using the show ip ospf <process id> command shows information related to the process ID: DCSRTR# DCSRTR# show ip ospf Routing Process "ospf 100" with ID 172.68.16.4 Supports only single TOS(TOS0) routes SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x0 Number of DCbitless external LSA 0 Number of DoNotAge external LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Area BACKBONE(0) Number of interfaces in this area is 4 Area has no authentication SPF algorithm executed 4 times Area ranges are Number of LSA 2. Checksum Sum 0x839B Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 DCSRTR# The above output shows the OSPF configuration statistics for the OSPF 100 process running on the router. Using the show ip ospf border-routers command shows the routes that join the network from different paths: DCSRTR# DCSRTR# show ip ospf border-routers OSPF Process 100 internal Routing Table Codes: i - Intra-area route, I - Inter-area route DCSRTR# Using the show ip ospf database command shows the database of the OSPF summaries: DCSRTR# DCSRTR# show ip ospf database OSPF Router with ID (172.68.16.4) (Process ID 100) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 172.68.16.3 172.68.16.3 379 0x80000008 0xB8F 6 172.68.16.4 172.68.16.4 362 0x80000007 0x780C 6 DCSRTR# Using the show ip ospf interface command shows the OSPF information on the specified interface: DCSRTR# DCSRTR# show ip ospf interface Ethernet0 is up, line protocol is up Internet Address 10.10.20.2/24, Area 0 Process ID 100, Router ID 172.68.16.4, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 172.68.16.4, Interface address 10.10.20.2 No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:00 Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s) Loopback0 is up, line protocol is up Internet Address 10.0.0.2/32, Area 0 Process ID 100, Router ID 172.68.16.4, Network Type LOOPBACK, Cost: 1 Loopback interface is treated as a stub Host Serial0 is up, line protocol is up Internet Address 172.68.16.2/24, Area 0 Process ID 100, Router ID 172.68.16.4, Network Type POINT_TO_POINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 172.68.16.3 Suppress hello for 0 neighbor(s) Serial1 is up, line protocol is up Internet Address 172.68.16.4/24, Area 0 Process ID 100, Router ID 172.68.16.4, Network Type POINT_TO_POINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:03 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 172.68.16.3 Suppress hello for 0 neighbor(s) DCSRTR# The above output shows the complete OSPF statistics for all the interfaces on the router. Using the show ip ospf neighbor command shows related neighbor information: DCSRTR# DCSRTR# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 172.68.16.3 1 FULL/ - 00:00:34 172.68.16.1 Serial0 172.68.16.3 1 FULL/ - 00:00:34 172.68.16.3 Serial1 DCSRTR# Using the show ip ospf summary-address command shows the summary addresses of the redistribution list: DCSRTR# DCSRTR# show ip ospf summary-address OSPF Process 100, Summary-address Summary# When properly used, the debug commands in the IOS can show you answers to the most difficult problems. When issuing a debug command, you may find that an invalid host assignment exists on the subnetwork or that some incorrect routing information is coming from an upstream router. In looking at the following code, you are able to see many options that are available with OSPF debugging. DCSRTR# DCSRTR# debug ip ospf ? adj OSPF adjacency events database-timer OSPF database timer events OSPF events flood OSPF flooding lsa-generation OSPF lsa generation packet OSPF packets retransmission OSPF retransmission events spf OSPF spf tree OSPF database tree DCSRTR# Using the debug ip ospf events command shows all the OSPF events: DCSRTR# DCSRTR# debug ip ospf events OSPF:hello with invalid timers on interface Ethernet0 hello interval received 10 configured 10 net mask received 255.255.255.0 configured 255.255.255.0 dead interval received 40 configured 30 DCSRTR#
Using the debug ip ospf packet command enables you to see the OSPF packet: DCSRTR# DCSRTR# debug ip ospf packet OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.117 aid:0.0.0.0 chk:6AB2 aut:0 auk DCSRTR# |