Title: Multiple OSPF Areas
1Multiple OSPF Areas
- Three issues can overwhelm an OSPF router in a
heavily populated OSPF network high demand for
router processing and memory resources, large
routing tables, and large topology tables. - Fortunately, OSPF allows large areas to be
separated into smaller, more manageable areas
that can exchange summaries of routing
information rather than exchange every detail.
2Multiple OSPF Areas
- Just how many routers can an OSPF area support?
Field studies have shown that a single OSPF area
should not stretch beyond 50 routers, although
there is no concrete limit. - OSPF's capability to separate a large
internetwork into multiple areas is referred to
as hierarchical routing. Hierarchical routing
enables you to separate large internetworks into
smaller internetworks that are called areas.
3Multiple OSPF Areas
- Interarea routing is the process of exchanging
routing information between OSPF areas. - The hierarchical topology possibilities of OSPF
have several important advantages - Reduced frequency of SPF calculations.
- Smaller routing tables.
- Reduced link-state update (LSU) overhead.
4Multiple OSPF Areas
- Hierarchical routing increases routing efficiency
because it allows you to control the type of
routing information that flows into and out of an
area.
5OSPF Routing Types
- Four different types of OSPF routers exist,
- Internal router- routers that have all their
interfaces within the same area are called
internal routers. Internal routers in the same
area have identical link-state databases and run
a single copy of the routing algorithm.
6OSPF Routing Types
- Backbone router- Routers that are attached to the
backbone area of the OSPF network are called
backbone routers. They have at least one
interface connected to Area 0 (the backbone
area). These routers maintain OSPF routing
information using the same procedures and
algorithms as internal routers.
7OSPF Routing Types
- Area Border Router (ABR) - ABRs are routers with
interfaces attached to multiple areas. They
maintain separate link-state databases for each
area to which they are connected, and they route
traffic destined to or arriving from other areas.
ABRs are exit points for the area, which means
that routing information destined for another
area can travel there only via the local area's
ABR.
8OSPF Routing Types
- ABRs summarize information about the attached
areas from their link-state databases and
distribute the information into the backbone. The
backbone ABRs then forward the information to all
other connected areas. An area can have one or
more ABRs.
9OSPF Routing Types
- Autonomous System Boundary Router (ASBR) - ASBRs
are routers that have at least one interface
connected to an external internetwork (another
autonomous system), such as a non-OSPF network.
These routers can import non-OSPF network
information to the OSPF network, and vice versa
(this is referred to as redistribution.
10OSPF Routing Types
- A router can be more than one router type. For
example, if a router interconnects to Area 0 and
Area 1, as well as to a non-OSPF network, it
would be both an ABR and an ASBR.
11OSPF Area Types
- Multiarea OSPF is scalable because a router's
link-state database can include multiple types of
LSAs. DRs (Designated Routers) and routers that
reside in multiple areas or autonomous systems
use special LSAs to send or summarize routing
information.The characteristics that you assign
to an area control the type of route information
that it can receive.
12OSPF Area Types
- For example, you may want to minimize the size
of routing tables in an OSPF area, in which case
you can configure the routers to operate in an
area that does not accept external routing
information (Type 5 LSAs). - Read about the 7 different LSAs.
13OSPF Area Types
- Standard area - A standard area can accept link
updates and route summaries. - Backbone area (transit area) - When
interconnecting multiple areas, the backbone area
is the central entity to which all other areas
connect. The backbone area is always Area 0. All
other areas must connect to this area to exchange
route information. The OSPF backbone has all the
properties of a standard OSPF area.
14OSPF Area Types
- Stub area - A stub area is an area that does not
accept information about routes external to the
autonomous system (the OSPF internetwork), such
as routes from non-OSPF sources. If routers need
to reach networks outside the autonomous system,
they use a default route. A default route is
noted as 0.0.0.0/0.
15OSPF Area Types
- Totally stubby area - A totally stubby area is an
area that does not accept external autonomous
system (AS) routes and summary routes from other
areas internal to the autonomous system. Instead,
if the router needs to send a packet to a network
external to the area, it sends it using a
0.0.0.0/0 default route. Totally stubby areas are
a Cisco proprietary feature.
16OSPF Area Types
- Not-so-stubby area (NSSA) - An NSSA is an area
that is similar to a stub area but allows for
importing external routes as Type 7 LSAs and
translation of specific Type 7 LSA routes into
Type 5 LSAs.Â
17OSPF Area Types
- A key difference among these OSPF area types is
the way they handle external routes. External
routes are injected into OSPF by an ASBR. The
ASBR may learn these routes from RIP or some
other routing protocol.You can configure an ASBR
to send out two types of external routes into
OSPF Type 1 (denoted in the routing table as E1)
and Type 2 (E2).
18OSPF Area Types
- Depending on the type, OSPF calculates the cost
of external routes differently, as follows - E1 - If a packet is an E1, then the metric is
calculated by adding the external cost to the
internal cost of each link that the packet
crosses. You use this packet type when you have
multiple ASBRs advertising a route to the same
autonomous system.
19OSPF Area Types
- E2 - If a packet is an E2, then the packet will
always have the external cost assigned, no matter
where in the area it crosses (this is the default
setting on ASBRs). You use this packet type if
only one router is advertising a route to the
autonomous system. Type 2 routes are preferred
over Type 1 routes unless two equal cost routes
exist to the destination.
20Configuring OSPF Across Multiple Areas
- This section summarizes how the different types
of OSPF routers flood information and how they
build their routing tables when operating within
a multiarea environment. - In Chapter 4, you saw that a packet destined for
a network within an area is merely forwarded from
one internal router to another until it reaches
the destination network.
21Configuring OSPF Across Multiple Areas
- However, what if a packet must traverse multiple
areas? - For the OSPF routers to make routing decisions,
they must build sufficient routing tables by
exchanging LSUs. The LSU exchange process within
a single OSPF area relies on just two LSA
types-Type 1 and Type 2. To distribute routing
information to multiple areas efficiently, Type 3
and Type 4 LSAs must be used by ABRs.
22Flooding LSUs to Multiple Areas
- An ABR is responsible for generating routing
information about each area to which it is
connected and flooding the information through
the backbone area to the other areas to which the
backbone is connected. The general process for
flooding follows these steps
23Flooding LSUs to Multiple Areas
- The routing processes occur within the area. The
entire area must be synchronized before the ABR
can begin sending summary LSAs to other areas.
24Flooding LSUs to Multiple Areas
- The ABR reviews the resulting link-state database
and generates summary LSAs (Type 3 or Type 4). By
default, the ABR sends summary LSAs for each
network that it knows about. To reduce the number
of summary LSA entries, you can configure route
summarization so that a single IP address can
represent multiple networks. To use route
summarization, your areas need to use contiguous
IP addressing.
25Flooding LSUs to Multiple Areas
- The summary LSAs are placed in an LSU and
distributed through all ABR interfaces, with the
following exceptions - If the interface is connected to a neighboring
router that is in a state below the exchange
state, then the summary LSA is not forwarded.
26Flooding LSUs to Multiple Areas
- If the interface is connected to a totally stubby
area, then the summary LSA is not forwarded. - If the summary LSA includes a Type 5 (external)
route and the interface is connected to a stub or
totally stubby area, then the LSA is not sent to
that area.
27Configuring OSPF Across Multiple Areas
- After an ABR or ASBR receives summary LSAs, it
adds them to its link-state databases and floods
them to the local area. The internal routers then
assimilate the information into their databases.
28Configuring OSPF Across Multiple Areas
- Remember that OSPF enables you to configure
different area types so that you can reduce the
number of route entries that internal routers
maintain. To minimize routing information, you
can define the area as a stub area, a totally
stubby area, or an NSSA.
29Updating the Routing Tables
- The order in which paths are calculated is as
follows - All routers first calculate the paths to
destinations within their area and add these
entries into the routing table. These are learned
via Type 1 and Type 2 LSAs.
30Updating the Routing Tables
- All routers then calculate the paths to the other
areas within the internetwork. These paths are
learned via interarea route entries, or Type 3
and Type 4 LSAs. If a router has an interarea
route to a destination and an intra-area route to
the same destination, the intra-area route is
kept.
31Updating the Routing Tables
- All routers, except those that are in any of the
stub area types, then calculate the paths to the
AS external (Type 5) destinations.
32Configuring OSPF Components
- Configuring an ABRThere are no special commands
to make a router an ABR or an ASBR. The router
becomes an ABR as soon as you configure two of
its interfaces to operate in different areas.
33Configuring OSPF Components
- Configuring an ASBRASBRs are created when you
configure OSPF to import, or redistribute,
external routes into OSPF. Ex. Redistribute Rip,
This command tells OSPF to import RIP routing
information.
34OSPF Route Summarization
- Recall that summarization is the consolidation of
multiple routes into one single, supernet
advertisement. - Proper summarization requires contiguous
(sequential) addressing (for example, 200.10.0.0,
200.10.1.0, 200.10.2.0, and so on). OSPF routers
can be manually configured to advertise a
supernet route, which is different from an LSA
summary route.
35OSPF Route Summarization
- OSPF supports two types of summarization
- Interarea route summarization - Interarea route
summarization is done on ABRs and applies to
routes from within each area. It does not apply
to external routes injected into OSPF via
redistribution. To take advantage of
summarization, network numbers within areas
should be contiguous.
36OSPF Route Summarization
- External route summarization - External route
summarization is specific to external routes that
are injected into OSPF via redistribution. Here
again, it is important to ensure that external
address ranges that are being summarized are
contiguous. Summarization of overlapping ranges
from two different routers could cause packets to
be sent to the wrong destination. Only ASBRs can
summarize external routes.
37OSPF Route Summarization
- To configure an ABR to summarize routes for a
specific area before injecting them into a
different area, you use the following syntax - Router(config-router) area area-id range address
mask. To perform interarea summarization
38OSPF Route Summarization
- RTB(config) router ospf 1RTB(config-router)
area 1 range 192.168.16.0 255.255.252.0. - Note that the area 1 range command in this
example specifies the area containing the range
to be summarized before being injected into Area
0.
39OSPF Route Summarization
- OSPF Route Summarization
- To configure an ASBR to summarize external routes
before injecting them into the OSPF domain, you
use the following syntax - Router(config-router) summary-address address
mask
40OSPF Route Summarization
- RTA(config) router ospf 1RTA(config-router)
summary-address 200.9.0.0 255.255.0.0
41OSPF Route Summarization
- Also, note that, depending on your network
topology, you may not want to summarize area 0
networks. If you have more than one ABR between
an area and the backbone area, for example,
sending a summary LSA with the explicit network
information will ensure that the shortest path is
selected. If you summarize the addresses, a
suboptimal path selection may occur.
42Using Stub and Totally Stubby Areas
- You can configure an OSPF router interface to
either operate in a stub area (does not accept
information about routes external to the AS) or
as a totally stubby area (does not accept
external AS routes and summary routes from other
areas internal to the AS).
43Using Stub and Totally Stubby Areas
- By configuring an area as stub, you can greatly
reduce the size of the link-state database inside
that area and, as a result, reduce the memory
requirements of area routers. Remember that stub
areas do not accept Type 5 (that is, external)
LSAs.
44Using Stub and Totally Stubby Areas
- Because OSPF routers internal to a stub area will
not learn about external networks, routing to the
outside world is based on a 0.0.0.0/0 default
route. When you configure a stub area, the stub's
ABR automatically propagates a 0.0.0.0/0 default
route within the area.
45Using Stub and Totally Stubby Areas
- Stub areas are typically created when you have a
hub-and-spoke topology, with the spokes (such as
branch offices) configured as stub areas.
46Using Stub and Totally Stubby Areas
- To further reduce the number of routes in a
table, you can create a totally stubby area,
which is a Cisco-specific feature. A totally
stubby area is a stub area that blocks external
Type 5 LSAs and summary (that is, Type 3 and Type
4) LSAs from entering the area. This way,
intra-area routes and the default of 0.0.0.0/0
are the only routes known to the stub area. ABRs
inject the default summary link 0.0.0.0/0 into
the totally stubby area.
47Using Stub and Totally Stubby Areas
- This is typically a better solution than creating
stub areas, unless the target area uses a mix of
Cisco and non-Cisco routers.
48Stub and Totally Stub Criteria
- An area can be qualified as a stub or totally
stubby when it meets the following criteria - There is a single exit point from that area.
- The area is not needed as a transit area for
virtual links. (Virtual links are discussed at
the end of this chapter.).
49Stub and Totally Stub Criteria
- No ASBR is internal to the stub area.
- The area is not the backbone area (Area 0).
- These criteria are important because a
stub/totally stubby area is configured primarily
to exclude external routes. If these criteria are
not met, external links may be injected into the
area, invalidating their stubby nature.
50Stub and Totally Stub Criteria
- To configure an area as a stub or totally stubby
area, use the following syntax on all router
interfaces that are configured to belong to that
area - Router(config-router)area area-id stub Â
51Stub and Totally Stub Criteria
- The optional no-summary keyword is used only on
ABRs. This keyword configures the ABR to block
interarea summaries (Type 3 and Type 4 LSAs). The
no-summary keyword creates a totally stubby area.
52Stub and Totally Stub Criteria
- The area stub command is configured on each
router in the stub location, which is essential
for the routers to become neighbors and exchange
routing information. When this command is
configured, the stub routers exchange hello
packets with the E bit set to 0. The E bit is in
the Options field of the hello packet. It
indicates that the area is a stub area.
53Stub and Totally Stub Criteria
- On ABRs only, you also have the option of
defining the cost of the default route that is
automatically injected in the stub/totally stubby
area. You use the following syntax to configure
the default route's cost
54Stub and Totally Stub Criteria
- Router(config-router)area area-id default-cost
cost
55Meeting the Backbone Requirements
- OSPF has certain restrictions when multiple areas
are configured. One area must be defined as Area
0, the backbone area. It is called the backbone
because all inter-area communication must go
through it.
56Meeting the Backbone Requirements
- Thus, all areas should be physically connected to
Area 0 so that the routing information injected
into this backbone can be disseminated to other
areas. The backbone area must always be
configured as Area 0. You cannot make any other
area ID function as the backbone.
57Virtual Links
- There are situations, however, when a new area is
added after the OSPF internetwork has been
designed, and it is not possible to provide that
new area with direct access to the backbone. In
these cases, a virtual link can be defined to
provide the needed connectivity to the backbone
area.
58Virtual Links
- The virtual link provides the disconnected area a
logical path to the backbone. All areas must
connect directly to the backbone area or through
a transit area. - The virtual link has the following two
requirements
59Virtual Links
- It must be established between two routers that
share a common area. - One of these two routers must be connected to the
backbone. - Virtual links serve the following purposes
- They can link an area that does not have a
physical connection to the backbone. This linking
could occur, for example, when two organizations
merge.
60Virtual Links
- They can patch the backbone if discontinuity in
Area 0 occurs. Discontinuity of the backbone
might occur, for example, if two companies merge
their two separate OSPF networks into a single
one with a common Area 0. The only alternative
for the companies is to redesign the entire OSPF
network and create a unified backbone.
61Virtual Links
- Another reason for creating a virtual link is to
add redundancy in cases when router failure might
cause the backbone to be split into two.
62Virtual Links
- To configure a virtual link, perform the
following steps - router(config-router)area area-id virtual-link
router-id - If you do not know the neighbor's Router ID, you
can Telnet to it and type the show ip ospf
command.
63Virtual Links
- Area 3 does not have a direct physical connection
to the backbone (Area 0), which is an OSPF
requirement because the backbone is a collection
point for LSAs. ABRs forward summary LSAs to the
backbone, which in turn forwards the traffic to
all areas. All interarea traffic transits the
backbone.
64Virtual Links
- To provide connectivity to the backbone, a
virtual link must be configured between R2 and
R1. Area 1 will be the transit area and R1 will
be the entry point into area 0. R2 will have a
logical connection to the backbone through the
transit area.
65Virtual Links
- Both sides of the virtual link must be
configured, as follows - R2(config-router)area 1 virtual-link 10.3.10.5
--- With this command, area 1 is defined to be
the transit area and the router ID of the other
side of the virtual link is configured
66Virtual Links
- R1(config-router)area 1 virtual-link
10.7.20.123 --- With this command, area 1 is
defined to be the transit area and the router ID
of the other side of the virtual link is
configured.