# Configuring OSPF Areas

You can divide your OSPF routing domain into OSPF areas. Dividing into areas provides the following benefits:

- Reduces resource demands placed on routers and links
- Reduces the router CPU usage by the OSPF routing calculation
- Reduces the amount of memory used for link-state databases
- Hides subnets within areas from the rest of the routing domain
- Increases routing security within the area

You must attach each area in your routing domain to an area called the backbone area (0.0.0.0).

Disadvantages of using OSPF areas include the following:

- Areas hide information, which can result in less-than-optimal data paths.
- Creating areas complicates the task of configuring OSPF routing domains.

You can optionally define an area to be a stub area, totally stubby area, or a not-so-stubby area. You can configure virtual links for areas that are not directly connected to a backbone area.

area default-cost

- Use to configure the cost for the default summary route sent into a stub area.
- Cost is a metric value in the range 1–65535; the default value is 1.
- Use only on an ABR attached to a stub area.
- Provides the metric for the summary default route that the ABR generates into the stub area.
- Example
  host1(config-router)#area 47.0.0.0 default-cost 1
- Use the no version to remove the configured default route cost.
- See area default-cost

area nssa

- Use to configure the area as an NSSA.
- You must configure each router in a stub area as belonging to the stub area.
- An NSSA is like a stub area, but it can also import external AS routes in a limited way.
- To cause NSSA border routers to generate a type 7 default LSA in the OSPF database if there is a default route in the routing table, you must specify the default-information-originate option.
- You can specify a metric cost, metric type, or a route map to be applied to the generated type 7 default LSAs.
- Use the no-summary keyword to create a “totally stubby area” and restrict type 3 summary LSAs from flowing into the area. However, type 3 default-route LSAs can continue to flow into the area and a type 3 default-route LSA is advertised into the NSSA.

  | Note: We recommend that you do not use the default-information-originate keyword with the no-summary keyword for an NSSA.

- Example
  host1(config-router)#area 35.0.0.0 nssa
- Use the no version to remove the NSSA designation from the area, to stop the generation of type 7 default LSAs, to reinitiate type 3 summary LSAs into the area (with the no-summary keyword), or to stop the application of the specified metric cost, metric type, or a route map to the type 7 default LSAs.
- See area nssa

area stub

- Use to configure a stub area. Stub areas do not get flooded with external LSAs but do carry a default route, intra-area routes, and interarea routes. The lack of flooding in stub areas reduces the size of the OSPF database for the area and decreases memory usage for external routers in the stub area.
- You must configure each router in a stub area as belonging to the stub area.
- You cannot configure virtual links across a stub area.
- Stub areas cannot contain AS boundary routers.
- Use the no-summary keyword to create a “totally stubby area” and restrict type 3 summary LSAs from entering the stub area. However, type 3 default-route LSAs can continue to flow into the area.
- Example
  host1(config-router)#area 47.0.0.0 stub
- Use the no version to disable this function.
- See area stub

area virtual-link

- Use to configure an OSPF virtual link.
- A virtual link is used for areas that do not have a direct connection to the backbone area.
- To have configured virtual links, the router itself must be an ABR.
- Virtual links are identified by the router ID of the other endpoint, which is also an ABR.
- The two endpoint routers must be attached to a common area, called the virtual link’s transit area.
- Virtual links are part of the backbone and behave as if they were unnumbered point-to-point networks between the two routers.
- A virtual link uses the intra-area routing of its transit area to forward packets.
- Example
  host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2
- Use the no version to remove an OSPF virtual link.
- See area virtual-link

area virtual-link dead-interval

- Use to set the time in seconds to wait before declaring a neighbor down after not receiving packets from that neighbor.
- Specify an interval in the range 0–2147483647 seconds; the default value is 40 seconds.
- Example
  host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2 dead-interval 10
- Use the no version to remove the virtual link’s dead interval.
- See area virtual-link dead-interval

area virtual-link hello-interval

- Use to configure the hello interval on an OSPF virtual link.
- Specify an interval in the range 1–65535 seconds; the default value is 10 seconds.
- The hello interval is the time between the transmission of hello packets.
- The hello interval must be the same for all routers attached to a common network.
- Example
  host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2 hello-interval 10
- Use the no version to remove the virtual link’s hello interval.
- See area virtual-link hello-interval

area virtual-link retransmit-interval

- Use to configure the retransmission interval on an OSPF virtual link.
- The retransmit interval is the time between retransmissions of link-state advertisements for adjacencies belonging to the interface.
- Specify an interval in the range 0–3600 seconds; the default value is 5 seconds.
- Set the value greater than the expected round-trip delay.
- Example
  host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2 retransmit-interval 6
- Use the no version to remove the interface’s retransmit interval.
- See area virtual-link retransmit-interval

area virtual-link transmit-delay

- Use to configure the estimated time it takes to transmit a link-state update packet on the virtual link.
- Specify an interval in the range 0–3600 seconds; the default value is 1 second.
- Example
  host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2 transmit-delay 1
- Use the no version to remove the interface’s transmit delay.
- See area virtual-link transmit-delay

automatic-virtual-link

- Use to enable an automatic virtual link configuration.
- If this feature is enabled, then backbone connectivity is ensured by the automatic creation of a virtual link between this backbone router that has an interface to a common nonbackbone area and other backbone routers that have interfaces to a common nonbackbone area.
- Example
  host1(config-router)#automatic-virtual-link
- Use the no version to disable an automatic virtual link.
- See automatic-virtual-link

no area

- Use to remove the specified area only if no OSPF interfaces are configured in the area.
- Example
  host1(config-router)#no area 47.0.0.0
- There is no affirmative version of this command; there is only a no version.
- See no area