Foundation Topics

     

Required Configuration Commands for a Multiarea OSPF Network

As you saw in Chapter 7, it is necessary to start the routing process on the router in order to define how it is to operate . As part of starting the process, you must tell the process how to run. Many OSPF commands are optional, as described in the section "Optional Configuration Commands for a Multiarea OSPF Network," but the following need to be defined at the startup of the process:

  • Participating router interfaces The router might not want to have all its interfaces send or receive OSPF routing updates. A classic example is a dialup line to a remote office. If there is only one subnet at the remote office, it would be more efficient to use default and static route commands, because any updates would dial the line.

  • Identification of the area The router will define which area it is in on a per-interface basis.

  • A router ID This allows the router to be uniquely identified by a single address. The ID of the router advertising a link can be used to determine the next logical hop, for example, if that link is used in the path selection to a remote network.

The following commands, which you will learn more about in the next sections, are necessary to configure a multiarea OSPF network:

  • The OSPF router command

  • The OSPF network command

Enabling the OSPF Routing Protocol

When configuring the router for the first time, there is no IP routing protocol running on the Cisco router (unless the SETUP script is used). This is not true of other protocols, however (refer to Chapter 7).

To configure OSPF as the routing protocol, use the following command:

 Router(config)#  router ospf   process-number  

Recall that process-number is a number local to the router. It is possible to have more than one process running on a router, although this is an unusual and expensive configuration in terms of router resources. The process number does not have to be the same on every router in the area or the autonomous system. In the interest of sanity , however, many administrators assign the same number to the routers.

NOTE

A common error in configuration is to confuse the process ID with the router ID or the area ID. These are not related in any way. The process ID is simply a mechanism to allow more than one process to be configured on a router. The router ID is the mechanism by which a router is identified within the OSPF domain, and the area ID is a mechanism of grouping routers that share full knowledge of OSPF-derived routes within the OSPF area.


Enabling the network Command

The network command was explained in Chapter 7 in terms of identifying the interfaces that participated in the OSPF routing process. In this chapter, the network command is used to identify not only the interfaces that are sending and receiving OSPF updates, but also the area in which they reside. Defining the areas with the network command is used on an area border router (ABR).

The following is the syntax for the OSPF network command:

 Router(config-router)#  network   network-number wildcard-mask   area   area-number  

NOTE

The area requested in the preceding syntax is the area in which the interface or interfaces configured with the network address reside.


You must take care in the use of the wildcard mask. In a single-area configuration, all the interfaces are in the same area. The network commands just identify the network numbers in use. Therefore, they can be configured to the classful network address provided by the IANA, as they are in IGRP and RIP. The only reason to be more specific would be to exclude some interfaces from the OSPF domain.

Example 9-1 shows two interfaces, each with a subnet of the same major network where the interfaces are placed into different areas. The network number has been subnetted into the last octet so that you can truly see the power and granularity of the wildcard mask at work. Figure 9-1 illustrates this configuration.

Example 9-1. The network Command for Router A
 RouterA(config)#  router ospf 100  RouterA(config-router)#  network 172.16.20.128 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.8 0.0.0.7 area 1  
Figure 9-1. The network Command

graphics/09fig01.gif

Optional Configuration Commands for a Multiarea OSPF Network

The word optional is used here to mean not absolutely necessary, implying that OSPF will run without the optional configuration commands. This does not mean that OSPF runs well or efficiently without them, however. A few of the OSPF commands, optional or not, are necessary in the configuration of an efficient multiarea OSPF network. The following list shows those optional OSPF commands that are important to the maintenance of an efficient network:

  • The area range command configured on an ABR

  • The summary-address command for use on an autonomous system border router (ASBR)

  • The area area-id stub command to define a stub area

  • The area area-id stub no-summary command to define a totally stubby area

  • The area default-cost command for determining the cost of default routes that enter the area

  • The area virtual-link commands used to create a virtual link

The area range Command

The area range command is configured on an ABR because it dictates the networks that will be advertised out of the area.

Use the area router configuration command with the range keyword to consolidate and summarize routes at an area boundary. This reduces the size of the databases, which is particularly useful in the backbone area because it is the transit area for all the other areas. Use the no form of this command to disable this function for the specified area:

 Router(config-router)#  area   area-id   range   address mask  Router(config-router)#  no area   area-id   range   address mask  

In the preceding syntax, area-id is the identifier (ID) of the area about which routes are to be summarized. It can be specified as either a decimal value or an IP address. Here, address is the IP address, and mask is the IP mask.

Example 9-2 shows the configuration required to summarize the following five individual subnets (which can address six hosts each) into one subnet. This summarized subnet can then be propagated across the OSPF network, saving both bandwidth and CPU:

  • 172.16.20.128/29

  • 172.16.20.144/29

  • 172.16.20.160/29

  • 172.16.20.176/29

These subnets are summarized into one subnet:

  • 172.16.20.128/26

This one subnet will then be propagated into Area 1 (see Figure 9-2).

Example 9-2. The OSPF area range Command for an ABR
 RouterA(config)#  router ospf 100  RouterA(config-router)#  network 172.16.20.128 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.144 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.176 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.160 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.8 0.0.0.7 area 1  RouterA(config-router)#area 0 range 172.16.20.128 255.255.255.192 
Figure 9-2. The OSPF area range Command for an ABR

graphics/09fig02.gif

NOTE

The area ID requested is the area from which the subnets originated. It is not the destination area.


The summary-address Command

The summary-address command is used on the ASBR to summarize the networks to be advertised to the outside world. Routes received into OSPF via redistribution from another routing protocol are seen as external routes. The summary-address command allows the summarization of routes to be redistributed into OSPF from other routing protocols.

The syntax for the OSPF summary-address command for an ASBR is as follows :

 Router(config-router)#  summary-address   address mask  [  not-advertise  ][  tag   tag  ] 

In the preceding syntax, address is the summary address designated for a range of addresses, and mask is the IP subnet mask used for the summary route.

The design and implementation of the addressing scheme are crucial to the success of the OSPF network and cannot be stressed too strongly. Refer to Chapter 2, "IP Addressing," for information about summarization and Chapter 3, "Designing IP Networks," for details on IP addressing.

Example 9-3 shows the summarization of the network address 172.16.20.0, received from the ISP and propagated throughout the autonomous system. Figure 9-3 illustrates this example.

Example 9-3. The OSPF summary-address Command for an ASBR
 RouterD(config)#  router ospf 100  RouterD(config-router)#  network 172.16.20.176 0.0.0.7 area 0  RouterD(config-router)#summary-address 172.16.20.0 255.255.255.0 
Figure 9-3. The OSPF summary-address Command for an ASBR

graphics/09fig03.gif

The area area-id stub Command

After designing the addressing scheme for the network, it should be clear which areas, if any, are suitable candidates for configuration as stub, totally stubby, or not so stubby areas.

The syntax for the OSPF router command for a stub area is as follows:

 Router(config-router)#  area   area-id   stub  

Example 9-4 shows the creation of a stub area. Note that both the ABR and the internal router share the stub area configuration. Figure 9-4 illustrates this example.

Example 9-4. The Configuration of a Stub Area
 RouterC(config)#  router ospf 100  RouterC(config-router)#  network 0.0.0.0 255.255.255.255 area 1  RouterC(config-router)#  area 1 stub  RouterA(config)#  router ospf 100  RouterA(config-router)#  network 172.16.20.128 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.8 0.0.0.7 area 1  RouterA(config-router)#  area 0 range 172.16.20.128 255.255.255.192  RouterA(config-router)#  area 1 stub  
Figure 9-4. The Configuration of a Stub Area

graphics/09fig04.gif

NOTE

All OSPF routers inside a stub area must be configured as stub routers. Whenever an area is configured as a stub, all interfaces that belong to that area will start exchanging Hello packets with a flag that indicates that the interface is a stub. The flag is a bit in the Hello packet called the E bit. The E bit is set to 0. All routers that have a common segment must agree on this flag. If they do not, they will not become neighbors, and routing will not take effect.


The area area-id stub no-summary Command

The syntax for the OSPF command for a totally stubby area is as follows:

 Router(config-router)#  area   area-id   stub no-summary  

This addition of the no-summary parameter informs the ABR not to send summary updates from other areas into the area. This command needs to be configured only on the ABR because it is the only router with this responsibility. This command is configurable only on a Cisco router because it is a proprietary feature. All the other routers are configured as stub-area internal routers.

Example 9-5 shows the configuration of a totally stubby area. Figure 9-5 illustrates this example.

Example 9-5. The Configuration of a Totally Stubby Area
 RouterE(config)#  router ospf 100  RouterE(config-router)#  network 172.16.20.144 0.0.0.192 area 0  RouterE(config-router)#  network 172.16.20.16 0.0.0.7 area 2  RouterE(config-router)#  area 2 stub no-summary  RouterG(config)#  router ospf 100  RouterG(config-router)#  network 0.0.0.0 255.255.255.255 area 2  RouterG(config-router)#  area 2 stub  
Figure 9-5. The Configuration of a Totally Stubby Area

graphics/09fig05.gif

As a totally stubby area, no summary or external routes are propagated by the ABR into the area. To reach networks and hosts outside their area, a workstation must send to a default route, which the ABR advertises into the area.

The area default-cost Command

To define the cost to the default route, the following command is used. If the cost is not specified, the path will be calculated as the internal area cost plus 1:

 Router(config-router)#  area   area-id   default-cost   cost  

The ABR attached to the stub area automatically generates and advertises a default route with a destination of 0.0.0.0 into the stub area.

Example 9-6. The OSPF Command for the Default Route Propagated into the Area
 RouterC(config-router)#  router ospf 100  RouterC(config-router)#  network 0.0.0.0 255.255.255.255 area 1  RouterC(config-router)#  area 1 stub  RouterA(config-router)#  router ospf 100  RouterA(config-router)#  network 172.16.20.128 0.0.0.7 area 0  RouterA(config-router)#  network 172.16.20.8 0.0.0.7 area 1  RouterA(config-router)#  area 0 range 172.16.20.128 255.255.255.192  RouterA(config-router)#  area 1 stub  RouterA(config-router)#  area 1 default-cost 15  RouterE(config-router)#  router ospf 100  RouterE(config-router)#  network 172.16.20.144 0.0.0.7 area 0  RouterE(config-router)#  area 1 stub  RouterE(config-router)#  area 1 default-cost 30  RouterE(config-router)#area 0 range 172.16.20.128 255.255.255.192 

Example 9-6 shows how the default cost can be set in the configuration. Setting a cost on the default route is useful when the stub area has more than one ABR. The default cost allows the ABR used to exit the area. Figure 9-6 illustrates this example.

Figure 9-6. The OSPF Command for the Default Route Propagated into the Area

graphics/09fig06.gif

You need to configure the area default-cost command only on the ABR because it is the only router with this responsibility. However, Example 9-6 shows the configuration on both routers to illustrate the choice. The second ABR, Router E, will only be used if Router A fails. If there were no configuration on Router A, it would still be used by all internal routers as the ABR because the default cost is 1.

The area virtual-link Command

When it is not possible to connect an area to Area 0 directly, one solution is to create a tunnel called a virtual link . This is remarkably easy to configure. As with many things in OSPF, of course, this ease of configuration belies the complexity of the technology being used. Many things can go wrong. The most common problem is in the address of the other end of the virtual link. The command area virtual-link is configured between ABRs that share a common area; at least one of the ABRs must be in Area 0. The command, issued at both ABRs, states the transit area and the router ID of the remote destination ABR. This creates essentially a tunnel through the transit area, which, although it might involve many routers to forward the traffic, appears to the remote ABRs as next hops.

NOTE

The area area-id virtual-link command might be included in the BSCI exam and, for that reason, is worth mentioning. In practice, virtual links are a design nightmare and are best avoided. They are useful when mending a network on a temporary basis while awaiting a moment's peace to rectify the design of the network.


The syntax to configure a virtual link is as follows:

 Router(config-router)#  area   area-id   virtual-link   router-id  

Here, area-id is the ID assigned to the transit area for the virtual link. In addition, router-id is the router ID of the virtual link neighbor.

Example 9-7 shows the setting of the loopback interfaces that provide the router ID. It then shows the configuration of the virtual link through the network. Figure 9-7 illustrates this example.

Example 9-7. Configuring a Virtual Link
 RouterA(config)#  interface loopback 0  RouterA(config-if)#  ip address 10.10.10.33 255.255.255.255  RouterA(config)#  router ospf 100  RouterA(config-router)#  network 172.16.20.128 0.0.0.7 area 0  RouterA(config-router)#  network 10.10.10.33 0.0.0.0 area 0  RouterA(config-router)#  area 0 range 172.16.20.128 255.255.255.192  RouterA(config-router)#  area 1 default-cost 15  RouterA(config-router)#  area 1 virtual-link 10.10.10.30  RouterM(config)#  loopback interface 0  RouterM(config-if)#  ip address 10.10.10.30 255.255.255.255  RouterM(config)#  router ospf 100  RouterM(config-router)#  network 172.16.20.32 0.0.0.7 area 5  RouterM(config-router)#  network 10.10.10.30 0.0.0.0 area 0  RouterM(config-router)#area 1 virtual-link 10.10.10.33 
Figure 9-7. Configuring a Virtual Link

graphics/09fig07.gif

A Working Configuration of OSPF on a Multiarea Network

Example 9-8 is a working configuration tested for verification. It includes many of the commands explained earlier in this chapter. Here you see an entire working configuration rather than the relevant segment for configuring a particular networking nuance. Use the configuration in conjunction with Figure 9-8.

Example 9-8. Configuring OSPF in a Multiarea Network on Router A
 RouterA(config)#  router ospf 100  RouterA(config-router)#  network 140.100.17.128 0.0.0.15 area 3  RouterA(config-router)#  network 140.100.17.192 0.0.0.15 area 2  RouterA(config-router)#  network 140.100.32.0 0.0.0.255 area 0  RouterA(config-router)#  area 2 stub  RouterA(config-router)#  area 3 stub no-summary  RouterA(config-router)#  area 3 default-cost 15  ! RouterA(config-router)#  interface FastEthernet0  RouterA(config-if)#  ip address 140.100.17.129 255.255.255.240  RouterA(config-if)#  no ip directed-broadcast  RouterA(config-if)#  ip ospf priority 100  ! RouterA(config-if)#  interface FastEthernet1  RouterA(config-if)#  ip address 140.100.17.193 255.255.255.240  RouterA(config-if)#  no ip directed-broadcast  RouterA(config-if)#  ip ospf cost 10  ! RouterA(config-if)#  interface Fddi0  RouterA(config-if)#  ip address 140.100.32.10 255.255.255.240  RouterA(config-if)#  no ip directed-broadcast  RouterA(config-if)#  no keepalive  RouterA(config-if)#  exit  
Figure 9-8. Example 9-8 Network

graphics/09fig08.gif

CAUTION

The ip directed-broadcasts command allows broadcasts to be sent across the network as a unicast and to be released as a broadcast on the interface for which it is destined. Although this is a very useful option, it has been exploited by hackers and saboteurs. It is therefore recommended that you disable this feature unless it is specifically required.


It is imperative to check any configuration on a network device because any errors could potentially bring down the entire network. To verify the configuration, a wealth of Cisco commands are available. They are covered in the following section.

Verifying the Configuration of OSPF in a Multiarea Network

The show commands shown here are in addition to the commands described in Chapter 7 in the section "Checking the Configuration of OSPF on a Single Router." The single router commands are also extremely useful in a multiarea configuration. They are all invaluable in the configuration, troubleshooting, and maintenance of a live network. The following are additional commands that you can use in conjunction with single router commands when verifying OSPF operation on a multiarea network:

  • The show ip ospf border-routers command

  • The show ip route command

  • The show ip ospf database command

  • The show ip ospf virtual-links command

The show ip ospf border-routers Command

The following command shows the OSPF ABRs and ASBRs for which the internal router has entries in its routing table. This command is excellent for troubleshooting configuration errors and understanding how the network is communicating about its routes.

 Router#  show ip ospf border-routers  

Example 9-9 shows the output of this command.

Example 9-9. The show ip ospf border-routers Output
 Router#  show ip ospf border-routers  OSPF Process 100 internal Routing Table Destination      Next Hop         Cost      Type     Rte Type   Area       SPF No 160.89.97.53     144.144.1.53     10        ABR      INTRA      0.0.0.3         3 160.89.103.51    160.89.96.51     10        ABR      INTRA      0.0.0.3         3 160.89.103.52    160.89.96.51     20        ASBR     INTER      0.0.0.3         3 160.89.103.52    144.144.1.53     22        ASBR     INTER      0.0.0.3         3 

Table 9-2 explains the meaning of the important fields in the output of the show ip ospf border-routers command.

The show ip ospf border-routers command is useful to verify that the configuration has worked and that the OSPF network is functioning correctly. In a multiarea network, the show ip ospf border-routers command can immediately indicate why users cannot connect outside their area. This command is helpful in extracting information about the border routers from what could be a long routing table, within which this information is scattered .

Table 9-2. Explanation of the show ip ospf border-routers Command Output

Field

Explanation

OSPF Process 100 internal Routing Table

This is the OSPF routing process ID for the router.

Destination

This is the router ID of the destination router, whether an ABR or an ASBR.

Next Hop

If the ABR or ASBR is not directly connected, this is the address of the next logical hop in the chosen path to the ABR or ASBR.

Cost

This is the metric or cost of taking this path to the destination.

Type

This states whether the destination router is an ABR, an ASBR, or both.

Rte Type

This is the type of route; it is either an intra-area or interarea route.

Area

This is the area ID of the area from which this route is learned.

SPF No

This is the SPF calculation number that installed this route into the routing table.

The show ip route Command

The show ip route command is one of the most useful commands available for understanding and troubleshooting an IP network. Example 9-10 shows an example of a routing table in a multiarea network.

Example 9-10. The show ip route Output
 Router#  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     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks O E2    172.16.20.128/29 [110/20] via 172.16.20.9, 00:00:29, Serial1 O IA    172.16.20.128/26 [110/74] via 172.16.20.9, 00:01:29, Serial1 C       172.16.20.8/29 is directly connected, Serial1 O E2 192.168.0.0/24 [110/20] via 172.16.20.9, 00:01:29, Serial1 

Table 9-3 shows the link-state advertisement (LSA) codes used in the routing table, allowing you to analyze the flow of LSAs both within and between the areas.

Table 9-3. OSPF Routing Table Codes and Associated LSAs

LSA Type

Routing Table Entry

Description

1 Router Link

O

This is generated by the router, listing all the links to which it is connected, their status, and their cost. It is propagated within the area.

2 Network Link

O

This is generated by the designated router on a multiaccess network to the area.

3 or 4 Summary Link (between areas)

OIA

LSA Type 3 includes the networks or subnets within an area that might have been summarized and that are sent into the backbone and between ABRs. LSA Type 4 is information sent to the ASBR from the ABR. These routes are not sent into totally stubby areas.

5 Summary Link/External Link (between autonomous systems)

OE1 or OE2

The routes in this LSA are external to the autonomous system. They can be configured to have one of two values. E1 will include the internal cost to the ASBR added to the external cost reported by the ASBR. E2 does not compute the internal costit just reports the external cost to the remote destination.

The show ip ospf virtual-links Command

The following command shows the configured virtual links that are in existence:

 Router#  show ip ospf virtual-links  

Another command to use in conjunction with this is show ip ospf neighbors , which you learned about in Chapter 7.

Example 9-11 shows the output of the show ip ospf virtual-links command.

Example 9-11. The show ip ospf virtual-links Output
 Router#  show ip ospf virtual-links  Virtual Link to router 140.100.32.10 is up Transit area 0.0.0.1, via interface Ethernet0, Cost of using 10 Transmit Delay is 1 sec, State DROTHER Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 0:00:08 Adjacency State FULL 

Table 9-4 explains the meaning of the important fields in the output of the show ip ospf virtual-links command.

Table 9-4. Explanation of the show ip ospf virtual-links Command

Field

Explanation

Virtual Link to router 140.100.32.10 is up

This shows the router ID of the other end of the virtual link, which is seen as a neighbor.

Transit area 0.0.0.1

This is the area through which the virtual link is tunneled: Area 0.0.0.1 or Area 1 in this case.

Via interface Ethernet0

This is the outgoing interface on the router that connects the virtual link to Area 0.

Cost of using 10

This is the cost of reaching the OSPF neighbor through the virtual link.

Transmit Delay is 1 sec

This is the delay of the link, how long it will take to transmit an LSA. This value must be less than the retransmit timer setting.

State DROTHER

This gives the state of the OSPF neighbor. The neighbor is a DROTHER, which is a router other than a designated router.

Hello 10

This gives the timed update interval for the Hello protocol, in seconds. The default is 10 seconds.

Dead 40

This tells how long the router will wait without hearing a Hello from the neighbor before it declares the neighbor dead. The default is 40 seconds.

Retransmit 5

The retransmit interval is the time in seconds that the router will wait without hearing an acknowledgment for the LSA that it has sent to its neighbor. The default is 5 seconds.

Hello due in 0:00:08

This shows the amount of time before the next Hello is expected from the neighbor.

Adjacency State FULL

This specifies the state of the neighbor adjacency. The two routers have fully synchronized their topological databases.

The show ip ospf database Command

The following command shows all the entries in the OSPF link-state database and the information taken from the LSAs that have been received. It can be tailored to show specific information from the database, such as the type 2 LSAs, otherwise known as the networks. To make the output specific to the LSA that you wish to examine, specify the appropriate parameter.

 Router#  show ip ospf database [router  networksummaryasbr-summarynssa-   externalexternaldatabase-summary]  

Another command to use in conjunction with this is show ip ospf neighbors .

Example 9-12 shows the output of the show ip ospf database command.

Example 9-12. The show ip ospf database Output
 Router#  show ip ospf database  OSPF Router with ID (172.16.20.130) (Process ID 100)                 Router Link States (Area 0) Link ID         ADV Router      Age   Seq# Checksum Link count 172.16.20.129   172.16.20.129   295  0x80000003 0x419B   1 172.16.20.130   172.16.20.130   298  0x80000002 0x3E9D   1                 Net Link States (Area 0) Link ID         ADV Router      Age         Seq#      Checksum 172.16.20.130   172.16.20.130   298         0x80000001 0x19DB                 Summary Net Link States (Area 0) Link ID         ADV Router      Age         Seq#      Checksum 172.16.20.8     172.16.20.129   291         0x80000001 0x7D1 

Table 9-5 explains the meaning of the important fields in the output of the show ip ospf database command.

Table 9-5. Explanation of the show ip ospf database Command

Field

Explanation

Link ID 172.16.20.129

Router ID number

ADV Router 172.16.20.129

Advertising router ID

Age 295

Link state age

Seq# 0x80000002

Link state sequence number (detects old or duplicate LSAs)

Checksum 0x19DB

Checksum of the complete contents of the LSA

Link count 1

Number of interfaces detected for router

Troubleshooting a Multiarea OSPF Network

Troubleshooting OSPF across multiple areas is obviously more complicated than troubleshooting the configuration of a single area. Follow the basic tenets of troubleshooting to aid in unraveling problems and finding solutions in a timely manner:

  • Maintain clear topology maps of the network.

  • Keep current copies of all router configurations.

  • Document changes made to the network.

Following these guidelines is imperative in a complex network to prevent it from becoming a labyrinth from which you cannot escape. The following sections cover the command log-adjacency-changes and the most useful debug commands. One of the most common problems that you might experience is the inability of neighbors to form adjacencies. You will also learn about the most common problems that occur in forming adjacencies, the reasons for them, and how to prevent them from occurring.

The log-adjacency-changes Command

A command that has a similar function to the debug command but does not require as many network resources is the log-adjacency-changes command. The debug command provides so much information that it is possible to overrun the logging buffers of the router as well as your own buffers. The log-adjacency-changes command offers less detail, which is often easier to assimilate. Whenever a change in the state of an adjacency occurs, a message is sent to syslog. This means that immediate updates are sent to the administrator without a massive drain on resources.

 Router(config-router)#  log-adjacency-changes  

Example 9-13 shows the output of the log-adjacency-changes command. In this example, the OSPF process is reconfigured to log adjacency changes. The routing process for OSPF is started and the network command allocates all subnets to Area 0. Whether this is a reconfiguration of the area assignments or OSPF has never been run on this router before, the action is the same. The OSPF process reinitializes all interfaces, requiring the neighbors to be found and the adjacencies formed . With the adjacency changes logged, this example shows the interface Ethernet 0 finding the neighbors at 131.11.84.8 and 131.11.14.14 and all the steps to creating adjacencies being completed.

NOTE

In Cisco IOS software release 12.1, the ospf log-adjacency-changes command became log-adjacency-changes.


Example 9-13. OSPF log-adjacency-changes Output
 RouterA(config)#  router ospf 1  RouterA(config-router)#  log-adjacency-changes  RouterA(config-router)#  network 0.0.0.0 255.255.255.255 area 0  RouterA(config-router)#  end  RouterA# 10:30:15: %SYS-5-CONFIG_I: Configured from console by console RouterA# 10:30:29: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.14.14 on Ethernet0 from DOWN to INIT, Received Hello RouterA# 10:30:38: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.84.8 on Ethernet0 from DOWN to INIT, Received Hello RouterA# 10:30:39: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.14.14 on Ethernet0 from INIT to 2WAY, 2-Way Received RouterA# 10:30:48: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.84.8 on Ethernet0 from INIT to 2 WAY, 2-Way Received RouterA# 10:30:54: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.84.8 on Ethernet0 from 2WAY to EXSTART, AdjOK? RouterA# 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.84.8 on Ethernet0 from EXSTART to EXCHANGE, Negotiation Done 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.14.14 on Ethernet0 from 2WAY to EXSTART, AdjOK? 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.14.14 on Ethernet0 from EXSTART to EXCHANGE, Negotiation Done 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.14.14 on Ethernet0 from EXCHANGE to LOADING, Exchange Done 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.14.14 on Ethernet0 from LOADING to FULL, Loading Done 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.84.8 on Ethernet0 from EXCHANGE to LOADING, Exchange Done RouterA# 10:31:18: %OSPF-5-ADJCHG: Process 1, Nbr 131.11.84.8 on Ethernet0 from LOADING to FULL, Loading Done 
Useful debug Commands

The debug commands are issued from the interactive console prompt, though remember that you need to be in privileged mode to issue the commands. Any fast-switched packets do not generate messages, so while debug is on, turn off fast switching and force all packets to be process switched for the few minutes that you are using the debug tool.

Use the following debug commands with caution. The resources required by the debug process can overwhelm your system.

The debug ip packet Command

The debug ip packet command is useful for analyzing the messages traveling between the local and remote hosts. IP debugging information includes packets received, generated, and forwarded.

The debug ip ospf events Command

Use the debug ip ospf events to display information on OSPF-related events, such as adjacencies, flooding information, designated router selection, and shortest path first (SPF) calculation.

Common Problems with Adjacencies

Many OSPF problems stem from adjacency problems that propagate throughout the network. Problems are often traced back to neighbor discrepancies. The following guidelines are helpful in these situations.

If a router configured for OSPF routing is not seeing an OSPF neighbor on an attached network, do the following:

  • Make sure that both routers are configured with the same IP mask, MTU, interface Hello timer, OSPF Hello interval, and OSPF dead interval.

  • Make sure that both neighbors are part of the same area and area type.

  • Use the debug and show commands to trace the problem.



CCNP BSCI Exam Certification Guide
CCNP BSCI Exam Certification Guide (CCNP Self-Study, 642-801) (3rd Edition)
ISBN: 1587200856
EAN: 2147483647
Year: 2002
Pages: 194
Authors: Clare Gough

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