< Free Open Study > |
The "Big show" and "Big D" for OSPFLike most routing protocols, Cisco provides a vast array of show and debug commands to aid in the verification of OSPF. In practical application, a majority of OSPF problems and information can be gained from three primary commands: show ip ospf database show ip ospf neighbors debug ip ospf adj Like EIGRP, one of the best and most overlooked commands is show ip ospf neighbors. Cisco also offers a way to examine the OSPF database, as well as providing detailed OSPF adjacency information. The following list shows the complete syntax for what we find to the most useful show, debug, and logging commands for OSPF as detailed in upcoming sections: show ip ospf neighbors [ detail interface_name ] show ip ospf [ process-id area-id ] database show ip ospf interface [ interface_type ] show ip route show ip ospf [ process_id ] debug ip ospf adj debug ip ospf events Router(config-router)# log-adjacency-changes clear ip ospf process show ip ospf neighbors CommandThis can be one of the most useful commands when verifying the operational status of OSPF. The show ip ospf neighbor command shows the status of all OSPF neighbors. The command also shows whether the neighboring router is a DR, a BDR, or a DROTHER. For a neighbor to form, the HelloInterval, RouterDeadInterval, area IDs, and authentication type and password must match. Neighbors should form automatically on broadcast type networks such as Ethernet, Tokin Ring, and FDDI. Additional configuration is required for OSPF NMBA networks to help neighbors form. The detail argument might be appended to the show ip ospf neighbor statement to provide extended information on each neighbor. The detailed information includes OSPF timer and option information, state-change counters, and specific information on what routers are DR and BDR for the link. If no information is listed, when the command is performed, it means that no hellos have been received and accepted. If neighbors are not forming, the command debug ip ospf adj more than likely lists the reason why. Example 12-13 demonstrates the command on the router john. Example 12-13 show ip ospf neighbor Command Output for Router john john# show ip ospf neighbors Neighbor ID Pri State Dead Time Address Interface 192.168.250.9 1 FULL/BDR 00:00:37 172.16.9.9 Ethernet0 172.16.250.1 1 FULL/ - 00:01:57 172.16.1.1 Serial0.1 192.168.250.6 1 FULL/ - 00:01:52 172.16.1.6 Serial0.1 192.168.250.3 1 FULL/ - 00:00:35 172.16.2.6 Serial0.2 john# The fields to notice in this output are as follows :
show ip ospf database CommandThe show ip ospf database command is used to show the entire OSPF database, each link state in the database, and the areas they are in. Instead of referring to the link state by type, as in Type 1, Type 2, and so on, the database uses the alphabetic character name of the link state. If OSPF is aware of a network, it is in the database. The database uses router IDs to identify the routers advertising the link state. Example 12-14 demonstrates the command on the router john. Example 12-14 show ip ospf database Command Output on Router john john# show ip ospf database OSPF Router with ID (192.168.250.250) (Process ID 7) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 192.168.250.9 192.168.250.9 450 0x80000033 0x1370 1 192.168.250.250 192.168.250.250 334 0x8000002A 0xD0DA 1 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 172.16.9.5 192.168.250.250 334 0x80000024 0xC14 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 172.16.1.1 192.168.250.250 1592 0x8000000B 0x9242 172.16.1.5 192.168.250.250 1850 0x8000000B 0xE729 172.16.1.6 192.168.250.250 1592 0x8000000B 0x606F 172.16.2.4 192.168.250.250 1850 0x8000000B 0x577C 172.16.3.0 192.168.250.250 845 0x8000000B 0xC20B 172.16.5.0 192.168.250.250 1592 0x8000000B 0xD4F2 172.16.10.0 192.168.250.250 1594 0x8000000B 0x7356 Router Link States (Area 10) Link ID ADV Router Age Seq# Checksum Link count 172.16.250.1 172.16.250.1 1740 0x80000052 0x6209 3 192.168.250.6 192.168.250.6 1812 0x80000025 0xE048 3 192.168.250.250 192.168.250.250 1594 0x80000053 0x72A6 3 Summary Net Link States (Area 10) Link ID ADV Router Age Seq# Checksum 172.16.2.4 192.168.250.250 1595 0x80000030 0xDA1 172.16.3.0 192.168.250.250 848 0x8000000B 0xC20B 172.16.9.0 192.168.250.250 92 0x8000002F 0xDD02 Router Link States (Area 100) Link ID ADV Router Age Seq# Checksum Link count 192.168.250.3 192.168.250.3 694 0x80000051 0x2DA0 3 192.168.250.250 192.168.250.250 848 0x80000039 0x3291 2 Summary Net Link States (Area 100) Link ID ADV Router Age Seq# Checksum 0.0.0.0 192.168.250.250 848 0x8000000B 0xD202 john# The fields to notice in this output are as follows:
show ip ospf interface CommandA common problem with OSPF is incorrect network statements and wildcard masks. The best way to verify what the precise OSPF parameters are for an interface is to use the show ip opsf interface command. The important fields are the network type, the area, the process ID, the timers, the neighbor and the adjacency count. The DR/BDR routers and priorities also are listed. Example 12-15 demonstrates the command on the router mark. Example 12-15 show ip ospf interface Command Output for Router markmark# show ip ospf interface Ethernet0 is up, line protocol is up Internet Address 172.16.5.5/24, Area 10 Process ID 7, Router ID 192.168.250.6, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 172.16.5.5, Interface address 172.16.5.5 No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:06 Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 0 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s) Serial0 is up, line protocol is up Internet Address 172.16.1.6/24, Area 10 Process ID 7, Router ID 192.168.250.6, Network Type POINT_TO_MULTIPOINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT, Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 Hello due in 00:00:05 Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 192.168.250.250 Suppress hello for 0 neighbor(s) mark# show ip route CommandThis command shows the IP forwarding table or route table. Six types of OSPF routes can be listed:
For a detailed explanation of the route types, see the previous section, "OSPF Path Types." The route in the forwarding table is followed by the administrative distance and the cost of the route. The forwarding table also lists the router reporting the network, when it was reported, and the interface that reported it. show ip ospf CommandThis command provides a comprehensive view of the OSPF areas, listing the area type, authentication, SPF counters, redistribution, as well as detailed LSA timer information. Example 12-16 demonstrates this command. Example 12-16 show ip ospf Command Output on Router john john# show ip ospf Routing Process "ospf 7" with ID 192.168.250.250 Supports only single TOS(TOS0) routes Supports opaque LSA It is an area border router 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 opaque AS LSA 0. Checksum Sum 0x0 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 3. 2 normal 1 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 1 Area has no authentication SPF algorithm executed 11 times Area ranges are Number of LSA 10. Checksum Sum 0x5A54A Number of opaque link LSA 0. Checksum Sum 0x0 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 10 Number of interfaces in this area is 1 Area has no authentication SPF algorithm executed 35 times Area ranges are Number of LSA 6. Checksum Sum 0x40CCF Number of opaque link LSA 0. Checksum Sum 0x0 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 100 Number of interfaces in this area is 1 It is a stub area, no summary LSA in this area generates stub default route with cost 1 Area has no authentication SPF algorithm executed 32 times Area ranges are Number of LSA 3. Checksum Sum 0x10A47 Number of opaque link LSA 0. Checksum Sum 0x0 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 john# Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 8 subnets, 4 masks O IA 172.16.9.0/24 [110/74] via 172.16.1.5, 09:11:03, Serial0 O 172.16.10.0/29 [110/138] via 172.16.1.5, 09:11:03, Serial0 O 172.16.1.5/32 [110/64] via 172.16.1.5, 09:11:03, Serial0 C 172.16.5.0/24 is directly connected, Ethernet0 O IA 172.16.2.4/30 [110/128] via 172.16.1.5, 09:11:03, Serial0 O 172.16.1.1/32 [110/128] via 172.16.1.5, 09:11:03, Serial0 C 172.16.1.0/24 is directly connected, Serial0 O IA 172.16.3.0/24 [110/134] via 172.16.1.5, 08:57:09, Serial0 mark# debug ip ospf adj and debug ip ospf events CommandsTwo debug commands provide the "Big D" for OSPF ” debug ip ospf adj and debug ip ospf events. For the most part, the commands are identical. The output can be fairly heavy, so turn on logging if using this command in a production environment. This debug command is so comprehensive that it will alert you to a majority of common OSPF issues, such as the following:
log-adjacency-changes/show log CommandsLike EIGRP, OSPF offers a special command to log adjacency changes. This command can help alert you to adjacency problems without having to wade through heavy debugs. The syntax to log adjacency changes is as follows: john(config)# router ospf 7 john(config-router)# log-adjacency-changes Example 12-17 lists the log after an adjacency has been dropped. Example 12-17 show log Command Output Documents a Down Neighbor john# show log Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns) Console logging: level debugging, 1228 messages logged Monitor logging: level debugging, 0 messages logged Buffer logging: level debugging, 2 messages logged Trap logging: level informational, 68 message lines logged Log Buffer (10000 bytes): 1d00h: %SYS-5-CONFIG_I: Configured from console by console 1d00h: %OSPF-5-ADJCHG: Process 7, Nbr 172.16.250.1 on Serial0.1 from FULL to DOW N, Neighbor Down john# clear ip ospf processAvailable as of Cisco IOS Software Release 12.0, this command clears all OSPF neighbors, the RID, and the SPF database. This command initializes the entire OSPF process as if the router were reloaded. |
< Free Open Study > |