Configuring and Verifying a Multi-Area OSPF Network


A router becomes an ABR or ASBR according to the types of areas to which it is connected. The first step to configure OSPF on the router is to enable the OSPF routing protocol process and then designate the IP networks on the router that are members of the OSPF network, like so:

 RouterA(config)#  router ospf   process-id  RouterA(config-router)#  network   address wildcard-mask   area   area-id  

If your router is connected to another non-OSPF network, you need to configure it as an ASBR and properly place it on the routing protocol network to which you are distributing routes. We will explore route distribution in greater detail in Chapters 9, "Scaling BGP Networks," and 10, "Optimizing Routing Updates."

One of the first planning decisions you need to make is which areas should be configured as stub or totally stubby to optimize network performance. A stub area prevents the flooding of Type 4 and Type 5 LSAs into the area. Routers in a stub area can access both intra-area and inter-area routes by using a default route (0.0.0.0) to access networks located outside the local AS. A default route is an entry in the routing table that is added for the purpose of directing packets when an explicit entry does not appear for them in the routing table. The technique that OSPF uses to produce a default route depends on the type of area into which you are injecting the route. For stub areas and totally stubby areas, the ASB to the stub area sends a summary LSA with link-state ID 0.0.0.0 (default). For a standard (or normal) area, you can simply advertise the default route into the area with the network command or, if the router does not have the default route set, you could use the following router configuration command to have an OSPF router generate a default route:

 RouterA(config-router)# default-information originate always 

This command generates a type 2 link with a link-state ID of 0.0.0.0 and network mask of 0.0.0.0, in essence, making this router an ASBR.

Stub areas cannot contain an ASBR, and the area cannot be configured as the backbone Area 0. You will usually see stub areas in hub (headquarters) and spoke (branch office) topologies, where a spoke is configured as a stub with a single exit point from the area.

A totally stubby area is a Cisco-proprietary type that does not accept flooding of Type 3, Type 4, or Type 5 packets into the area. Therefore, a totally stubby area can access only intra-area routes (advertised with Type 1 and Type 2 LSAs). The key difference is that a stub area accepts Type 3 LSAs, so that routers inside the stub areas can access both intra-area and inter-area routes. Both stub areas and totally stubby areas use a default route to get out of the local area.

Because totally stubby areas do more to reduce update information than stub areas, it is usually a better option to use them to improve scalability and stability in a Cisco OSPF environment.


To configure your area as a stub area or totally stubby area, first configure basic OSPF processing. The command router ospf [process-id] invokes an OSPF process on the router with a process ID number. The network area command then associates the router's configured IP networks with a specific OSPF area ID. Next , define the area as stub or totally stubby. You are basically setting the stub flag in the Hello packet (refer to Chapter 4). This configuration is performed by running the area stub command in router configuration mode on the ABR, as follows :

 RouterA(config-router)#  area   area-id   stub [no-summary]  

This area stub command needs to be placed on all the stub area routers if they are to become neighbors and exchange routing information. The area-id parameter is a designator for the stub area and is represented by either a decimal or IP address value. The no-summary command is the process that actually creates the totally stubby area. It should be configured on only an ABR that is linked to a totally stubby area so that it will not send summary LSAs (Type 3) into the stub area.

Another option that you have on ABRs is to configure the cost of the default route that is being infused into your stubby area. The cost value is a 24-bit number and has a default value of 1. This is configured with the default-cost command, as shown in the following snippet:

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

Here is a sample code snippet for configuring a stub area:

 RouterA(config)# router ospf 50 RouterA(config-network)# 172.16.4.0 0.0.0.255 area 0 RouterA(config-network)# 172.16.5.0 0.0.0.255 area 2  RouterA(config-network)# area 2 stub  

Here is a snippet that displays a totally stubby configuration sample:

 RouterA(config)# router ospf 50 RouterA(config-network)# 172.16.4.0 0.0.0.255 area 0 RouterA(config-network)# 172.16.5.0 0.0.0.255 area 2  RouterA(config-network)# area 2 stub no-summary  

The only difference between the configuration for a stub area and a totally stubby area is the no-summary command.

Figure 5.6 represents a hub-and-spoke, multi-area OSPF over NBMA network in which RouterA is configured in the backbone Area 0 and the spoke routers, RouterB and RouterC, are configured as Area 1. One benefit of this configuration is the reduction of network traffic to the NBMA (Frame Relay) cloud because the stub area will not receive Type 5 external LSA messages. In addition, changes to the topology of Area 1 remain in the backbone area.

Figure 5.6. A simple OSPF-over-NBMA scenario.

If we configure Area 1 in Figure 5.6 as a stub area, the only routes that will appear on the RouterB and RouterC routing tables will be the following:

  • Intra-area routes specified as O entries

  • The default route to the ABR RouterA, specified with an *

  • Inter-area routes denoted with an IA entry

If you want to configure Area 1 as a totally stubby area, configure the no-summary command on the ABR RouterA in Figure 5.6 to prevent summary LSAs from being sent into Area 1 and further reducing the number of link-state advertisements. This forces RouterB and RouterC to have only intra-area routes.

You need to understand the benefits of configuring a totally stubby area. Primarily, the routing tables are smaller because external and summary routes are not inserted into totally stubby areas. Totally stubby areas also result in lower amounts of routing information circulation, and you can get greater scalability and stability on your OSPF internetwork.


Summary Route Costs

The cost of a summary route will be the lowest cost for a particular inter-area route that displays in the summary, added to the cost of the ABR connection to the backbone Area 0. These calculations are automatically computed for each summary route. The cost of an external route, however, is dependent upon the external type configured on the ASBR. There are two types of external origin codes: E1 and E2.

E1 routes are also called OSPF external Type 1 routes, and they take into consideration the internal cost of the path to the ASBR, added to the external cost, when determining the overall metric value of the route. External Type 2 routes, on the other hand, are distributed inside the local autonomous system by AS external link entries (Type 5 LSAs). As indicated in Table 5.2, Type 5 LSAs are originated only by ASBRs and define routes to external ASs. E2 routes use only the external cost to the next hop router outside the local AS for their routing metric. E2 is the default route type for OSPF Type 2 external routes, and a router will always prefer an E2 route over an E1 route, unless both routes share identical cost values.

Listing 5.3 Route Entry with an Origin Code of E2
 Border# 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  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         T  traffic engineered route Gateway of last resort is not set   *    172.16.0.0/24 is subnetted,  3 subnets C            172.16.1.0 is directly connected,  Serial 0  O  E2     172.16.2.0 [110/10] via 10.0.1.1,  00:21:29  C            172.16.3.0 is directly connected,  Ethernet 0 

You can see from Listing 5.3 that the selected entry will be flooded throughout the entire autonomous system and it has a cost metric that considers only the external cost of the route. Whenever you see a route entry with an origin code of E2, it indicates that an OSPF external Type 2 route was used. The technique called "redistribution" is used whenever different routing protocols need to exchange routing information. For example, you need to exchange OSPF routing information with RIP, EIGRP, or IS-IS protocols. This distribution process is covered in greater detail in Chapter 10.

A Type 7 LSA is a special form of external route announcement that is implemented with OSPF not-so-stubby areas (NSSAs). This creates a sort of hybrid stub area for some AS external routes. These special Type 7 LSAs are originated by ASBRs inside the NSSA and are flooded only within the local NSSA. An ABR, however, can convert the Type 7 LSAs to Type 5 LSAs and flood these into the backbone area. Internet service providers (ISPs) or network engineers that need to connect OSPF to remote sites using another protocol, such as RIP or EIGRP, primarily use these. For more information, refer to RFC 1587, "The OSPF NSSA Option."


Default Routes

As previously mentioned, a default route is the route to which all unknown traffic is sent. By creating a default static route to your ISP or headquarters, you have configured your ABR or ASBR to forward any traffic that it cannot resolve through its routing table. If your area or internetwork has only one point of exit, it makes sense to propagate this default route to all internal routers and ABRs in the local AS, if applicable . To create a default static route, use the global configuration command:

 RouterA(config)#  ip route  0.0.0.0 0.0.0.0  exit-interface  

The exit-interface parameter is the name of the interface to which unknown traffic is sent.

The default-information originate command is an optional command used to propagate a Type 7 default route into the NSSA, as shown in the following sample:

 RouterA(config-router)#  default-information originate  

The default-information originate [always] command can be used to distribute the default route to all routers inside the routing domain. The always keyword signifies that the route should be propagated regardless of the presence of the default route. To disable default route propagation, issue this command from the router configuration mode:

 RouterA(config-router)# no default-information originate 

show ip ospf [process-id area-id] database [keyword]

Several powerful command tools are available for verification, monitoring, and troubleshooting your multi-area OSPF environment. You learned about several fundamental commands in Chapter 4. The show ip ospf process-id command exhibits information about every area to which the router is connected for a particular process. It also designates whether the router is an ABR, ASBR, or both. Listing 5.4 is a sample of the show ip ospf command without added parameters because there is only one OSPF process running on this router.

Listing 5.4 A Sample of the show ip ospf Command
 Router# sh ip ospf  Routing Process "ospf 10" with ID 192.168.1.1  Supports only single TOS(TOS0) routes  SPF schedule delay 5 secs, Hold time between two SPFs 10 secs  Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs  Number of external LSA 0. Checksum Sum 0x0  Number of DCbitless external LSA 0  Number of DoNotAge external LSA 0  Number of areas in this router is 1. 0 normal 1 stub 0 nssa     Area 1         Number of interfaces in this area is 2         It is a stub area         Area has no authentication         SPF algorithm executed 5 times         Area ranges are         Number of LSA 5. Checksum Sum 0x25804         Number of DCbitless LSA 0         Number of indication LSA 0         Number of DoNotAge LSA 0 

The following commands offer a more granular approach to maintaining your OSPF routers. This command set is invoked to display the contents of the topology database of the router. You can use a rich set of optional keywords to generate more granular information. Table 5.3 shows the keywords and associated descriptions.

Table 5.3. show ip ospf database Keywords

Keyword

Description

network

Shows the network link-state information.

summary

Shows the router link-state summary information.

asbr-summary

Shows the ASBR link-state information.

external

Shows the AS external link-states.

database summary

Shows the database summary data and totals.

show ip ospf border-routers

The privileged EXEC -mode command show ip ospf border-routers reveals all the OSPF router's internal routes to all ABRs and ASBRs in an autonomous system. Here is a sample of this command:

 Router#show ip ospf border-routers Codes: i - Intra-area route, I-Inter-area route Type  Dest Address  Cost  NextHop      Interface  ABR  ASBR  Area  SPF i     10.10.1.1      10    192.168.1.1  Ethernet 2 TRUE FALSE 0     3 i     10.20.1.2      10    192.168.1.2  Ethernet 2 TRUE FALSE 0     3 

The output consists of the ABR or ASBR IP addresses, next-hop address to the ABR, route cost, router type, route type, area number, and the SPF calculation number.

show ip ospf virtual links

The show ip ospf virtual-links command features information concerning the status of any configured virtual link on a router. As you know, a virtual link is a logical connection between the backbone area and a non-backbone area that is not directly connected to Area 0. The following snippet shows a sample of this command output:

 Router#show ip ospf virtual-links  Interface address: 10.10.1.136 (POS 1/1/1) cost: 1, state: P To P, transit area:  1.2.3.4 hello: 10, dead: 40, retrans: 5 nbr id: 10.10.1.103, nbr address:  10.10.1.103 nbr state: Full, nbr mode: Master, last hello: 38 


Cisco BSCI Exam Cram 2 (Exam Cram 642-801)
CCNP BSCI Exam Cram 2 (Exam Cram 642-801)
ISBN: 0789730170
EAN: 2147483647
Year: 2003
Pages: 170

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