OSPF Demand Circuits and Backup

 <  Free Open Study  >  

The "Big show" and "Big D" for OSPF

Like 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 Command

This 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 :

  • Neighbor ID ” The neighbor ID is the router ID of the neighbor.

  • Pri ” This is the priority of the neighbor from this router's prospective .

  • State ” This field describes the neighbor state and lists whether the neighbor is a DR or BDR, or DROTHER. The only two normal states are 2-way and FULL. A router stuck in any other state indicates a problem. The state fields are defined as follows:

    - Down ” This is the first OSPF neighbor state. It means that no information has been received from this neighbor, but hello packets still can be sent to the neighbor in this state. If a router doesn't receive a hello packet from a neighbor within the RouterDeadInterval time (RouterDeadInterval = 4*HelloInterval by default), the neighbor state changes from full to down.

    - Attempt ” This state is valid only for neighbors in an NBMA environment that are defined by the neighbor statements. Attempt means that the router is sending hello packets to the neighbor but has not yet received any information.

    - Init ” This state specifies that the router has received a hello packet from its neighbor, but the receiving router's ID wasn't included in the hello packet.

    - 2-Way ” This state designates that bidirectional communication has been established between two routers. Bidirectional means that each router has seen the other's hello packet. At this state, a router decides whether to become adjacent with this neighbor. On broadcast media, a router becomes FULL only with the DR and the BDR; it stays in the 2-way state with all other neighbors.

    - Exstart ” This is the first state in forming an adjacency. It is used to elect the master and slave routers on the link.

    - Exchange and loading ” In these states, OSPF sends link-state request packets and link-state update packets.

    - Full ” Routers are fully adjacent with each other. All the router and network LSAs are exchanged, and the routers' databases are fully synchronized.

  • Dead time ” The expected time before a router receives a hello before being declared dead.

  • [IP] address and interface ” The address is the IP address of the physical interface of the neighbor. The interface column states the interface in which the neighbor's hello was received.

show ip ospf database Command

The 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:

  • ADV Router ” This is the advertising router ID.

  • Age ” This is the max age of the link state.

  • Seq# and Checksum ” These fields are used to verify link-state integrity.

  • Tag ” If an OSPF tag is added during redistribution, that will appear on a column on the right.

show ip ospf interface Command

A 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 mark
 mark#  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 Command

This command shows the IP forwarding table or route table. Six types of OSPF routes can be listed:

  • (O) ” OSPF intra-area route, or routes from the same area

  • (O IA) ” OSPF inter-area route, or routes from another area

  • (O N1) ” OSPF NSSA Type 1

  • (O N2) ” OSPF NSSA Type 2

  • (O E1) ” OSPF external Type 1

  • (O E2) ” OSPF external Type 2

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 Command

This 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 Commands

Two 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:

  • Mismatched subnet mask

  • Mismatched hello/dead interval

  • Mismatched authentication key

  • Mismatched area IDs and area types

log-adjacency-changes/show log Commands

Like 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 process

Available 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  >  


CCIE Practical Studies, Volume I
CCIE Practical Studies, Volume I
ISBN: 1587200023
EAN: 2147483647
Year: 2001
Pages: 283
Authors: Karl Solie

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net