Configuring OSPF Areas
You can divide your OSPF routing domain into OSPF areas. Doing this 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 to using OSPF areas include the following:
- Areas hide information, which may 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 or a not-so-stubby area. You can configure virtual links for areas that are not directly connected to a backbone area.
area
no areahost1(config-router)#no area 47.0.0.0
- Use the no version to remove the specified area only if no OSPF interfaces are configured in the 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 1area nssa
- Use to configure the area as an NSSA.
- 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.
- 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, or to stop the application of the specified metric cost, metric type, or a route map to the type 7 default LSAs.
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. This reduces the size of the area's OSPF database 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 ASBRs.
- Example
host1(config-router)#area 47.0.0.0 stubarea 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.
- In order 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.2area 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 1-65535 seconds; the default value is 40.
- Example
host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2 dead-interval 10area 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.
- 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 10area 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 1-65535 seconds; the default value is 5.
- 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 6area 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 1-65535 seconds; the default value is 1.
- Example
host1(config-router)#area 27.0.0.0 virtual-link 27.8.4.2 transmit-delay 1automatic-virtual-link
- Use to enable an automatic virtual link configuration.
- If 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