This section explains OSPF multiple-area networks and the single area network issues they solve. Multiple areas in OSPF provide one of the distinguishing features between the distance vector protocols and link-state OSPF.
As you learned, an OSPF area is a logical grouping of routers that are running OSPF with identical topological databases. An area is a subdivision of the greater OSPF domain. Multiple areas prevent a large network from outgrowing its capacity to communicate the details of the network to the routing devices charged with maintaining control and connectivity throughout the network.
The division into areas allows routers in each area to maintain their own topological databases. This limits the size of the topological databases, and summary and external links ensure connectivity between areas and networks outside the autonomous system.
Routers in an area maintain a consistent topological database and any changes within the area have to be communicated to all devices. As the network grows, problems develop because the database is using too much memory or because changes are causing the processor to be overworked.
As the various databases increase in size and the calculations become increasingly frequent, the CPU utilization increases while the available memory decreases. This has the effect of increasing the network response time, as well as increasing congestion on the link. These effects may result in loss of connectivity, packet loss, or system hangs.
To check the CPU utilization on the router, use the show processes cpu sorted command. To check the memory utilization, issue the show memory free command.
Breaking the network into smaller pieces allows each area to run a reasonably sized topology and for updates to be contained within an area. The number of routers per area should be limited by the network designer to a number commensurate with the number of active links.
Now that you understand why you need to control the size of the areas, you should consider the design issues for the different areas, including the technology that underpins them and their communication (both within and between the areas).
In the OSPF hierarchical network there are routers within an area, connecting areas, and connecting to the outside world. Each of these routers has different responsibilities in the OSPF design.
Internal router— Responsible for maintaining a current and accurate database of every LSA within the area. It is also responsible for forwarding data to other networks by the shortest path. Flooding of LSAs is confined to the area. All interfaces on this router are within the same area.
Backbone router— The design rules for OSPF require all areas be connected through a single area, known as the backbone area, or Area 0. A router within this area is referred to as a backbone router.
Area border router (ABR)— An ABR is responsible for connecting two or more areas. It holds a full topological database for each area to which it is connected and sends LSA updates between the areas. These LSA updates are summary updates of the subnets within an area, but are sent as Type 3 LSAs only if summarization is configured on the ABR.
Autonomous system boundary router (ASBR)— An ASBR connects to other routing domains. ASBRs are typically located in the backbone area.
Figure 7-1 shows how the different router types are related.
Link-state advertisements are used to list available routes. The six most common LSA types are described here:
Router link LSA (Type 1)— Each router generates a Type 1 LSA that lists its neighbors and the cost to each. Types 1 and 2 are flooded throughout an area and are the basis of SPF path selection.
Network link LSA (Type 2)— A Type 2 LSA is sent out by the designated router and lists all the routers on the segment it is adjacent to. Types 1 and 2 are flooded throughout an area and are the basis of SPF path selection.
Network summary link LSA (Type 3)— ABRs generate this LSA to send between areas. The LSA lists prefixes available in a given area. If summarization happens within OSPF, summarized routes are propagated using Type 3 LSAs.
AS external ASBR summary link LSA (Type 4)— ASBRs produce this LSA to advertise their presence. Types 3 and 4 are called inter-area LSAs because they are passed between areas.
External link LSA (Type 5)— This LSA is originated by ASBRs and flooded throughout the AS. Each external advertisement describes a route external to OSPF. Type 5 LSAs can also describe default routes out of the AS.
NSSA external LSA (Type 7)— Type 7 LSAs are created by an ASBR residing in a not-so-stubby area (NSSA). Stubby areas do not allow type 5 LSAs, so a Type 7 is a Type 5 tunneled through the NSSA. It is converted into a Type 5 LSA at the ABR.
It is possible to create an OSPF network with only one area—the backbone area or Area 0. In addition to the backbone area, OSPF networks use several other types of areas:
Ordinary or standard area— This area is seen as an SPF domain unto itself. Every router knows about every prefix in the area, and each router has the same topological database.
Stub area— This is an area that will not accept external summary routes (Type 5s). Type 5 LSAs are replaced by the ABR with a default route, and internal routers send external traffic to the closest ABR. Stub areas are useful because they protect slower or less powerful routers from being overwhelmed with routes from outside.
Totally stubby area— This area does not accept summary LSAs from other areas (Types 3 or 4) or external summary LSAs (Type 5). Types 3, 4, and 5 LSAs are replaced by the ABR with a default route. Totally stubby areas protect internal routers by minimizing the routing table and summarizing everything outside the area with a default route. This is a proprietary Cisco solution. Cisco recommends this solution because it keeps the topological databases and routing tables as small as possible.
Not so stubby area (NSSA)— NSSAs are stubby areas that can have ASBRs. Since stubby areas do not support Type 5 LSAs, NSSA uses Type 7 LSAs to disguise external information and the ABR converts the Type 7 LSA to Type 5 when it is sent to Area 0.
On modern routers, the greatest advantage of special area types is decreased convergence time.
Figure 7-2 shows the connectivity and functionality of the different areas. The routers send out routing updates and other network information through LSAs. The function or type of router determines the LSAs that are sent.
This section describes how OSPF operates across the various areas to maintain a coherent and accurate understanding of the autonomous system.
When a router is configured as an ABR, it generates summary LSAs and floods them into the backbone area. Adjacencies within an area are advertised using Type 1 or Type 2 LSAs, and these prefixes are passed to the backbone using Type 3 summaries. These summaries are then injected by other ABRs into their own areas (except for totally stubby areas).
External routes and summaries from other areas are received by the ABR and passed back into the local area.
The flow and propagation of LSAs within and between areas is illustrated in Figure 7-3.
The local routing table on a router depends on its position in the network and the type of area it is in. If there are routes with different routing information sources to the same destination, the router chooses the path with the lowest administrative distance. If both are OSPF, OSPF will select lower type advertisements first and choose lower costs to break ties. OSPF, like all IP routing protocols on Cisco IOS, is capable of load-balancing and will automatically distribute the load over four equal-cost paths.
Remember the sequence of events:
The router receives LSAs.
The router builds the topological database.
The router runs the Dijkstra algorithm, from which the shortest path is chosen and entered into the routing table.
Thus, the routing table is the conclusion of the decision-making process. The routing table displays information on how that decision was made by including the metric for each route. This enables you to view the operation of the network.
Different LSAs are weighted differently in the decision-making process. It is preferable to take an internal route (within the area) to a remote network rather than to traverse multiple areas just to arrive at the same place. Not only does multiple-area traveling create unnecessary traffic, but it can also create a loop within the network.
The routing table reflects the network topology information and indicates where the remote network sits in relation to the local router.
OSPF calculates the costs of paths to other areas differently than it calculates paths to other routing domains. The path to another area is calculated as the smallest cost to the ABR, added to the smallest cost across the backbone. Thus, if there were two paths from the ABR into the backbone, the shortest (lowest-cost) path would be added to the cost of the path to the ABR.
External routes are routes from another routing domain. External routes discovered by OSPF can have their cost calculated in one of two ways:
E1— The cost of the path to the ASBR is added to the external cost to reach the next-hop router outside the AS.
E2 (default)— The external cost of the path from the ASBR is all that is considered in the calculation.
E2 is the default external metric, but E1 is preferred over E2 if two equal-cost paths exist. E2 is useful if you do not want internal routing to determine the path. E1 is useful when internal routing should be included in path selection.
When you look at the routing table by using the show ip route command, the first column indicates the source of the information. Typically, this is just the routing protocol the route was learned from. With OSPF, however, it includes the LSA type that provided the path.
Table 7-2 shows the codes used in the routing table.
|LSA Type||Routing Table Entry||Description|
|1 Router||O (short for OSPF)||Generated by a router, listing neighbors and costs. It is propagated within an area.|
|2 Network||O||Generated by the designated router on a multiaccess network to the area. It is propagated within an area.|
|3 Summary (between areas)||O IA (short for OSPF interarea)||Type 3 is used to advertise summaries from one area to another.|
|4 Summary (between areas)||O IA||Type 4 is used to advertise the location of an ASBR.|
|5 External (between autonomous systems)||O E1 or O E2||External to the autonomous system. E1 includes the internal cost to the ASBR added to the external cost. E2 does not compute the internal cost; it reports only the external cost.|
Now that you understand the components and operation of multi-area OSPF, you should focus on some of the design implications of creating multiple areas, as described in the next section.
The major design consideration in OSPF is how to divide the areas. This is of interest because it impacts the addressing scheme for IP within the network.
In designing a network, consider the resources available and make sure that none of these resources are overwhelmed, either initially or in the future. In the creation of areas, OSPF has tried to provide the means by which the network can grow without exceeding the available resources.
In an OSPF network, summarization takes place at ABRs. You must make summarization part of the initial network design and devise an addressing scheme that supports the use of summarization. With all the interarea traffic disseminated through the backbone, any reduction is beneficial. The entire network benefits when fewer summary LSAs need to be forwarded into the backbone area. When network overhead is minimized, the network grows more easily.
It is also important in a design to allow for transitions or breaks in the network. OSPF provides a device called the virtual link that allows areas disconnected from the backbone area to appear directly connected to the backbone as required.
Finally, in any network design, you must consider the WAN topology, in particular the nonbroadcast multiaccess (NBMA) connections.
The following sections consider these topics as they pertain to multi-area OSPF design.
Although it is possible to have a router attach to more than three areas, the Cisco Technical Assistance Center (TAC) recommends that a greater number of areas be created only after careful consideration. The results of having more areas will vary depending on the router (memory and CPU), as well as network topology and how many LSAs are generated. Various sources recommend that the number of routers per area not exceed 40 to 80; however, this is a rough guideline and not a strict rule. Remember that OSPF is very CPU-intensive in its maintenance of the SPF database and in the flooding of LSAs. Additionally, OSPF is very CPU-intensive when it calculates the routing table—a process based on LSAs. Each ABR maintains a complete picture of the topology map for each area it connects.
Therefore, it is not strictly the number of routers or areas that is important, but also the number of routes and the stability of the network. You must consider these issues because the number of LSAs in your network is proportional to the amount of router resources required.
Major considerations pertinent to capacity planning with OSPF are
Type of area (stub, totally stub, or backbone)— This determines the number of LSAs and how often and how much CPU and memory each SPF computation requires. The area type also affects convergence time.
CPU resources of member routers— Smaller routers are not designed to manage large databases or to continuously run the SPF algorithm.
Link speed— The higher the link speed, the less congestion within the router as it queues the packets for transmission.
Stability— The frequency of LSAs propagation because of topology changes determines the need for bandwidth, CPU, and memory resources.
NBMA— If the area intersects an NBMA network, is the cloud fully meshed? To overcome the resources required to maintain a fully meshed network, Cisco suggests that a well-designed partial mesh over low-bandwidth links reduces the number of links and thus the amount of traffic and resources required.
External links— If the area has external connections, is there a large number of external LSAs? If the external routes are summarized to a default route, far less memory and CPU are required.
Summarization— Do you have a hierarchical design with summarization? The greater the summarization, the smaller and fewer the LSA packets that need to be propagated.
Further information is available on Cisco.com in the OSPF Design Guide.
The following sections describe how to determine the appropriate number of neighbors to which a router should be connected, or the number of areas to which an ABR should be connected.
Increasing the number of neighbors increases the resources on the router that are allocated to managing those links. More importantly if there is a designated router (DR), the router that performs the DR function might become overloaded if there are a lot of routers on the link. It's advisable to select the DR through manual configuration to be the router with the most available CPU and memory on the segment. Also, be sure that the router is not selected to be the DR for more than one link.
An ABR maintains a full topology table for every area to which it is connected. This not only uses a lot of memory, it also forces the router to recalculate SPF that much more often. The number of areas a router can support depends on the caliber of the router and size of the areas. A good hierarchical design—where the maintenance of the areas is spread over a few routers—not only shares the burden, but also builds in redundancy.
OSPF is valuable because it scales—scalability in a routing protocol comes from summarization. Multiple areas are a great way to limit computation and propagation of routing updates; the hierarchical approach imposed by using multiple areas allows for intelligent summarization on ABRs and ASBRs. This section applies summarization to the design and implementation of multi-area OSPF.
In OSPF, two types of summarization exist:
Interarea summarization— Performed at the ABR, creates Type 3 LSAs. Type 4 LSAs advertise the router IDs of ASBRs.
External summarization— Performed at the ASBR, creates Type 5 LSAs.
OSPF benefits from the hierarchical design created by using multiple areas connected to the backbone area. It is important to design the hierarchy to carefully take advantage of interarea and external summarization.
The main dictate in OSPF is that other areas must connect directly to the backbone area through an ABR. The ABR is resident in both areas and holds a full topological database for each area.
Networks must bend to organizational policies, however. OSPF has provided a solution called a virtual link for the unhappy occasion when a direct connection to the backbone is not possible. If the new area cannot connect directly to the backbone area, two ABRs are set up to "bridge" the gap and recreate the connectivity.
The configuration commands pass area information between ABRs in the intermediary area. From the viewpoint of OSPF, each ABR has a direct connection to three areas (Area 0, the outlying area, and the area traversed).
This scenario may emerge in a variety of cases:
Merger or failure isolates an area from Area 0.
Two Area 0s exist because of merger.
The area is critical to the company, and an extra link has been configured for redundancy.
Although the virtual link feature is extremely powerful, virtual links are not recommended as part of the design strategy for your network. They should be a temporary solution to a connectivity problem. You must ensure that you observe the following when creating a virtual link:
Both routers must share a common area.
The transit area cannot be a stub area.
One of the routers must be connected to Area 0.
Figure 7-4 illustrates the use of a virtual link to provide a router in Area 10 connectivity to the backbone in Area 0.
Another design consideration is the design of the NBMA network as part of the OSPF domain. There are two main ways to approach the inclusion of an NBMA network:
Define the NBMA network as Area 0. The logic is that if the remote sites are made satellite areas, all traffic will have to traverse the NBMA, so it makes sense to make it the backbone area. This works well in a full-mesh environment, although it results in a large number of LSAs being flooded into the WAN and puts demands on the routers connecting to the NBMA network.
Define a hub network as Area 0 with remote sites and associated links as spoke areas. This is a good design if the satellite areas are stub areas because it means that the routing information—and network overhead—is kept to a minimum over the NBMA cloud. Depending on the design, the rest of the network might constitute one other area or multiple areas. This will depend on the size and growth expectations of the OSPF domain.
The first configuration step is to start OSPF. Many OSPF commands allow "tuning" but the following need to be defined at the startup of the process:
Participating router interfaces— Identify which interfaces should take part in the OSPF process.
Identification of the area— Identify which interfaces are in which areas.
Router ID— Specify the parameter used to uniquely identify the router by a single address.
The next sections review basic OSPF configuration.
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).
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.
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.
The network command was explained in Chapter 5 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 connected by an ABR is carried out with the network command.
The following is the syntax for the OSPF network command:
Router(config-router)# network network-number wildcard-mask area area-number
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 identify only the network numbers in use. Therefore, they can be configured to the classful network address provided by the IANA. The only reason to be more specific would be to exclude some interfaces from the OSPF domain.
Figure 7-5 illustrates the configuration of an ABR. Example 7-1 shows two interfaces on Router A in distinct areas, where each interface lies within subnets of the same major network. The network number has been subnetted into the last octet, where you can see the granularity of the wildcard mask at work. Figure 7-5 illustrates this configuration.
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
The word optional is used here to mean not absolutely necessary, implying that OSPF will run without the optional configuration commands. However, this does not mean that OSPF runs well or efficiently without them. A few of the OSPF commands, optional or not, are necessary in the configuration of an efficient multi-area 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, used to summarize at ASBRs.
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 to create a virtual link.
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. Use the no form of this command to disable 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 7-2 shows the configuration required to summarize the following five individual subnets (which can address six hosts each) into one subnet.
RouterA(config)# router ospf 100 RouterA(config-router)# network 172.16.20.128 0.0.0.15 area 0 RouterA(config-router)# network 172.16.20.144 0.0.0.15 area 0 RouterA(config-router)# network 172.16.20.160 0.0.0.15 area 0 RouterA(config-router)# network 172.16.20.176 0.0.0.15 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
The subnets 172.16.20.128/28, 172.16.20.144/28, 172.16.20/160/28, and 172.16.20/28 are summarized to 172.16.20.128/26, saving both bandwidth and CPU.
This one subnet will then be propagated into Area 1 (see Figure 7-6).
The area ID requested is the area from which the subnets originated. It is not the destination area.
The summary-address command is used on the ASBR to summarize routes received into OSPF via redistribution. The syntax applied to an ASBR for the summary-address command is
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.
Figure 7-7 illustrates a scenario where the summary-address command is useful.
Example 7-3 shows the summarization of the network address 172.16.20.0, received from the ISP and redistributed into OSPF. The redistribution is not illustrated in this example. (See Chapter 11, "Implementing Redistribution and Controlling Routing Updates.")
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
Any area that has a single ABR, or an area where the choice of exit ABR is not important (because they are co-located, for instance) is a good candidate for a stub area. Areas that shelter underpowered routers demand to be stub areas. Many stub areas could benefit even more by being created as totally stubby. Once areas that could benefit from the stub logic are identified, the syntax to create a stub is
Router(config-router)# area area-id stub
Figure 7-8 illustrates a scenario with a stub area.
Example 7-4 shows the creation of a stub area. Note that both the ABR and the internal router share the stub area configuration.
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
All routers inside a stub or totally stub area must be configured as stub routers. When an area is configured as a stub, interfaces that belong to that area will exchange Hello packets with the stub flag. The flag is a bit in the Hello packet that neighbors must agree on to be neighbors.
The syntax for the OSPF command for a totally stubby area is as follows:
Router(config-router)# area area-id stub no-summary
The addition of the no-summary parameter informs the ABR not to pass summary updates (Type 3 LSAs) or external routers (Type 5s) from other areas. This command can be configured only on the ABR. All other routers are configured as stub so that their stub-flag will agree.
Figure 7-9 illustrates a totally stubby area scenario.
The stub no-summary feature is proprietary to Cisco.
Example 7-5 shows the proper configuration for Router E and Router G.
RouterE(config)# router ospf 100 RouterE(config-router)# network 172.16.20.144 0.0.0.7 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
As a totally stubby area, no interarea/summary or external LSAs are propagated by the ABR into the area. To reach networks and hosts outside their area, routers use a default route, which the ABR advertises into the area.
An ABR for a stub area replaces external routes with a default cost. The cost of this default route can be set by the area default-cost command. If the cost is not specified, the cost will be calculated as the cost to the ABR plus one:
Router(config-router)# area area-id default-cost cost
Figure 7-10 illustrates the propagation of default cost with OSPF.
Example 7-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; this allows the administrator to prefer a specific exit.
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
Configure area default-cost only on the ABR. Example 7-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.
When it is not possible to connect an area to Area 0 directly, one solution is to create a virtual link. Although the command is straightforward, many problems can arise. 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 states the transit area and the router ID of the remote destination ABR. This creates a connection through the transit area, which, although it might transit many routers along the way, appears to OSPF on the remote ABRs as a next hop.
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. Otherwise, they are useful when mending a network on a temporary basis.
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 transit area and router-id is the RID of the other ABR.
Figure 7-11 illustrates an example with an OSPF virtual link.
Example 7-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.
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 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 7-12 illustrates a multi-area OSPF network.
Example 7-8 shows a working configuration of the multi-area OSPF network. It includes many of the commands explained earlier in this chapter. Here you see an entire working configuration rather than just a relevant segment.
RouterA(config)# router ospf 100 RouterA(config-router)# network 18.104.22.168 0.0.0.15 area 3 RouterA(config-router)# network 22.214.171.124 0.0.0.15 area 2 RouterA(config-router)# network 126.96.36.199 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/0 RouterA(config-if)# ip address 188.8.131.52 255.255.255.240 RouterA(config-if)# ip ospf priority 100 ! RouterA(config-if)# interface FastEthernet0/1 RouterA(config-if)# ip address 184.108.40.206 255.255.255.240 RouterA(config-if)# ip ospf cost 10 ! RouterA(config-if)# interface FastEthernet1/0 RouterA(config-if)# ip address 220.127.116.11 255.255.255.240 RouterA(config-if)# no keepalive RouterA(config-if)# exit
The following section covers commands to verify the configuration and monitor the network.
The show commands described in this section are invaluable in the configuration, troubleshooting, and maintenance of a live network. You can use the following commands in conjunction with the single area commands described in Chapter 5 when verifying OSPF on a multi-area network:
The show ip ospf border-routers command
The show ip route command
The show ip ospf virtual-links command
The show ip ospf database command
The show ip ospf border-routers command shows the ABRs and ASBRs that the internal router has in its routing table. This command is excellent for troubleshooting configuration errors and understanding how the network is communicating. In a multi-area network, the show ip ospf border-routers command can immediately indicate why users cannot connect outside their area:
Router# show ip ospf border-routers
Example 7-9 shows the output of this command.