Multi Area OSPF
Multi Area OSPF
6 – OSPF
Part 2 of 2: Multi-Area OSPF
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
Topics
• Areas
• LSAs
• show ip ospf database (summary of link state database)
• show ip route
• Stub Areas
• Totally Stubby Areas
• E1 and E2 routes
• Default Routes
• Route Summarization
• NSSA (Not So Stubby Areas)
• Multiple ABR Scenario
• Multiple ASBR Scenario
• Virtual Links
• Load Balancing
• show commands
Issues with large OSPF nets
• Large link-state table
– Each router maintains a LSDB for all links in the area
– The LSDB requires the use of memory
• Frequent SPF calculations
– A topology change in an area causes each router to re-run SPF to
rebuild the SPF tree and the routing table.
– A flapping link will affect an entire area.
– SPF re-calculations are done only for changes within that area.
• Large routing table
– Typically, the larger the area the larger the routing table.
– A larger routing table requires more memory and takes more time
to perform the route look-ups.
• Answer: Good question! OSPF areas are designed to keep issues like flapping
links within an area. SPF is not recalculated if the topology change is in
another area. The interesting thing is that OSPF distributes inter-area (between
areas) topology information using a distance-vector method. OSPF uses link-
state principles only within an area. ABRs do not announce topological
information between areas, instead, only routing information is injected into
other areas. ABRs relay routing information between areas via distance vector
technique similar to RIP or IGRP. This is why show ip ospf does not show a
change in the number of times SPF has been executed when the topology
change is in another area.
• Note: It is still a good idea to perform route summarization between areas,
announcing multiple routes as a single inter-area route. This will hide any
changes in one area from affecting routing tables in other areas.
OSPF uses “Areas”
OSPF Router Types
OSPF Router Types
Internal:
Internal Routers with all their interfaces within the same area
Backbone:
Backbone Routers with at least one interface connected to area 0
ASBR:
ASBR (Autonomous System Boundary Router): Routers that have at least
one interface connected to an external internetwork (another
autonomous system)
ABR:
ABR (Area Border Router): Routers with interfaces attached to multiple
areas.
OSPF Packet Types
• Last week we discussed various OSPF packets, used for:
– Means for dynamic neighbor discovery
– Detect unreachable neighbors within a finite period of time
– Ensure two-way communications between neighbors
– Ensure correctness of basic interace parameters between neighbors
– Provide necessary information for the election of the Designated and
Backup Designated routers on a LAN segement
– Request link state information from another router
– Sharing data base summary and detailed information
– Acknowledge the receipt of an OSPF packet
LSAs used for discovering routes and reaching Full State, along with
Maintain Routes
LSA Types
• Stub
– Stub Area
– Totally Stubby Area (TSA)
– Not-so-stubby-area (NSSA)
Area Types
Part I - LSAs using all normal areas
11.0.0.0/8
12.0.0.0/8 Multi Area OSPF
13.0.0.0/8
10.1.0.0/24
Normal Areas
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
Part I - LSAs using all normal areas
Routes Received on all OSPF Routers
Receives all routes from External A.S.’s (External AS means routes not from this
OSPF routing domain):
• From external AS’s – LSA 5
• As long as routes are being redistributed by the ASBR (more later)
Default Routes
• Received only if default-information-originate command was used (later)
• If default-information-originate command is not used, then the default
route is not received
Part I - LSAs using all normal areas
LSA Header
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | LS type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
LSA 1 - Router Link States
• Tells the other routers in the area about itself and its links to adjacent OSPF
routers, and “leaf networks.”
• Flooded only within the area. On multi-access networks, sent to the DR.
• Denoted by just an “O” in the routing table or “C” if the network is directly
connected.
• ABR will include a set of LSA 1’s for each area it belongs to.
LSA 1 - Router Link States
• When a new LSA 1 is received and installed in the LSDB, the router
forwards that LSA, using hop-by-hop or asynchronous flooding.
• The LSA is sent out all OSPF interfaces that are in the Exchange State
or a higher state.
• For interfaces in Exstart or lesser state, the router will wait until it is out
of Exstart.
LSA 1 - Router Link States
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 |V|E|B| 0 | # links |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | # TOS | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | 0 | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
LSA 1 - Router Link States
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 1 - Router Link States
LSA 1 Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5 LSA 1
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 LSA 1 .6
LSA 1
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 1 - Router Link States
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5 LSA 1
172.16.1.0/24
Originated
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
LSA 1
flooded
Area 1
LSA 1 - Router Link States
For Router Links:
• The Link State ID is always the same as the Advertising Router
• Advertising Router is the Router ID of the router that created this LSA
1
• Bottom line: Router Link States (LSA1’s) should display all the
RouterIDs of routers in that area, including its own.
• Rick’s reminder: LSA 1 -> “my one area”
LSA 1 - Router Link States
• Bottom line: Router Link States (LSA1’s) should display all the
RouterIDs of routers in that area, including its own.
• Rick’s reminder: LSA 1 -> “my one area”
LSA 1 - Router Link States
172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks
O IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:11:44, FastEthernet0
O 172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0
C 172.16.10.4/30 is directly connected, Serial0
C 172.16.1.0/24 is directly connected, FastEthernet0
O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
O E2 12.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
O E2 13.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
192.168.3.0/32 is subnetted, 1 subnets
C 192.168.3.1 is directly connected, Loopback1
Area 1
LSA 2 - Network Link States
ASBR#show ip ospf data
Net Link States (Area 0)
(LSA 2 - Generated by the DR)
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 3 or 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
LSA 3 – Summary Net Link States
LSA 3 – Summary Net Link States
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 3 – Summary Net Link States
172.16.20.0/24
Area 1
11.0.0.0/8
12.0.0.0/8
Multi Area OSPF
LSA 1’s are sent as LSA 3’s 13.0.0.0/8
172.16.20.0/24 Area 1
• Routers only see the topology of the area they belong to.
• When a link in one area changes, the adjacent routers originate
Area 1 in LSA 1’s and
flood them within the area, causing intra-area (internal) routers to re-run the
SPF and recalculating the routing table.
• ABRs do not announce topological information between areas.
• ABRs only inject routing information into other areas, which is basically a
distance-vector technique.
11.0.0.0/8
LSA 1’s are sent as LSA 12.0.0.0/8
13.0.0.0/8
Multi Area OSPF
3’s into other areas by the
ABRs. 10.1.0.0/24 Normal Areas
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1 LSA 3
LSA 3 LSA 3
Lo - RouterID
LSA 1 .2 .3
192.168.3.1/32
.1 ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
LSA 3 LSA 1
LSA 3
Area 0 172.16.10.4/30
172.16.51.0/24 LSA 1 .6
LSA 1
Lo - RouterID
Area 51
172.16.0.0/16 LSA 3 Internal .1 192.168.4.1/32
172.16.20.0/24 Area 1
• ABRs calculate intra-area routes for directly attached areas and announce
them to all other areas as inter-area routes, using LSA 3’s.
Area 1
• OSPF ABRs will only announce inter-area routes that were learned from the
backbone area, area 0.
• The backbone area serves as a repository for inter-area routes.
• This keeps OSPF safe from routing loops.
LSA 3 – Summary Net Link States
Area 1
Area 0
Backbone Area
Normal Areas
LSA 1’s
RTA RTB
LSA 3 LSA 3
Area 1 Area 51
RTC
Not ABR
• ABRs calculate intra-area routes for directly attached areas and
announce them to all other areas as inter-area routes, using LSA 3’s.
• In normal operation, OSPF ABRs will only announce inter-area
routes that were learned from the backbone area, area 0.
• RTC does not forward LSA 3’s from Area 1 to Area 51, and does not
forward LSA 3’s from Area 51 to Area 1.
• The backbone area serves as a repository for inter-area routes.
• This keeps OSPF safe from routing loops.
Normal Areas
Area 0
Backbone Area
LSA 3
RTA RTB
Not ABR
• Example of an LSA 1 originated in Area 1, sent to Area 0 as an LSA 3,
and the sent to Area 51 as an LSA 3.
• RTC does not forward the LSA 3’s back into Area 1, or routing
loops may develop.
• Again, in normal operations, OSPF ABRs will only announce inter-area
routes that were learned from the backbone area, area 0.
• Note: RTC will create LSA 1’s and flood them within the appropriate
area.
Normal Areas
Area 0
Backbone Area
LSA 3 LSA 3
RTA RTB
LSA 3 LSA 3
LSA 1’s Area 1 Area 51 LSA 1’s
RTC
Not ABR
• RTC does not forward LSA 1’s from Area 1 as LSA 3’s into Area 51.
• RTC does not forward LSA 1’s from Area 51 as LSA 3’s into Area 1.
• Any LSA 3’s from RTC are not forwarded into Area 0 by RTA or RTB.
• OSPF specification states that ABRs are restricted to considering LSA
3’s only from the backbone area to avoid routing information loops.
Update is sent to Area 0 and Area Normal Areas
51 routers using a “distance
vector update technique.” SPF Area 0
Backbone Area
not re-run, but routers update
LSA 3
routing table.
RTA RTB
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 3 – Summary Net Link States
ASBR
ASBR# show ip ospf database
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
ASBR
ASBR# show ip route
172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks
O IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:02:54, FastEthernet0/0
O IA 172.16.20.0/24 [110/783] via 172.16.1.3, 00:02:54, FastEthernet0/0
O IA 172.16.10.4/30 [110/782] via 172.16.1.3, 00:02:54, FastEthernet0/0
C 172.16.1.0/24 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, FastEthernet0/1
S 11.0.0.0/8 is directly connected, Null0
S 12.0.0.0/8 is directly connected, Null0
192.168.1.0/32 is subnetted, 1 subnets
C 192.168.1.1 is directly connected, Loopback0
S 13.0.0.0/8 is directly connected, Null0
Exceptions
• Not flooded to Stub and Totally Stubby networks.
• More on this later
LSA 4 – ASBR Summary Link States
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 3 or 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8 Normal Areas
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 5’s flooded
LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4 .5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
LSA 4
Lo - RouterID
172.16.0.0/16 LSA 4 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24 Area 1
• How do the ABRs know about the ASBR? I am still researching this,
but I believe when routers receive an LSA 5 (AS External LSA) with
external route information, the routers denote the Router ID being the
ASBR.
LSA 4 – ASBR Summary Link States
ABR-2
ABR-2# show ip ospf database
Summary ASB Link States (Area 1)
LSA 4 - Reachability to ASBR.
Not flooded to Stub and Totally Stubby networks.
Internal
• Why do some routers have more than one set of Summary ASB
Links States and others may not (like RouterA and ASBR)?
• Which Area 0 routers have LSA 4’s in their LSDB?
• Why don’t some Area 0 routers have LSA 4’s in their LSDB?
LSA 5 - AS External Link States
• LSA 5 – AS External LSA
• Originated by the ASBR.
• Describes destination networks external to the Autonomous
System (This OSPF Routing Domain)
• Flooded throughout the OSPF AS except to stub and totally stubby
areas
• Denoted in routing table as E1 or E2 (default) route (soon)
• We will discuss default routes later.
• ASBR – Router which “redistributes” routes into the OSPF domain.
Exceptions
• Not flooded to Stub and Totally Stubby networks.
• More on this later
LSA 5 - AS External Link States
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 5 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
Normal Areas
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
ASBR
router ospf 1
redistribute static Area 1
network 172.16.1.0 0.0.0.255 area 0
ip route 11.0.0.0 255.0.0.0 Null0
ip route 12.0.0.0 255.0.0.0 Null0
ip route 13.0.0.0 255.0.0.0 Null0
ASBR
11.0.0.0/8
router ospf 1 12.0.0.0/8
redistribute static
network 172.16.1.0 0.0.0.255 area 0
13.0.0.0/8
Normal Areas
ip route 11.0.0.0 255.0.0.0 Null0 10.1.0.0/24
ip route 12.0.0.0 255.0.0.0 Null0
ip route 13.0.0.0 255.0.0.0 Null0 Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1 LSA 5’s flooded
LSA 5
LSA 5 .2 .3
Lo - RouterID
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
LSA 5
Area 0 172.16.10.4/30
172.16.51.0/24 .6
LSA 5
Lo - RouterID
172.16.0.0/16 LSA 5 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
ABR-2
ABR-2# show ip route
172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks
O IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:11:44, FastEthernet0
O 172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0
C 172.16.10.4/30 is directly connected, Serial0
C 172.16.1.0/24 is directly connected, FastEthernet0
O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
O E2 12.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
O E2 13.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
192.168.3.0/32 is subnetted, 1 subnets
C 192.168.3.1 is directly connected, Loopback1
• Designated by “E2”
• Notice that the cost is 20 for all three routes, we will see why later.
• It has to do with E2 routes and where the default cost is 20.
– Redistribute command (Route Optimization chapter): If a value is not
specified for the metric option, and no value is specified using the default-
metric command, the default metric value is 0, except for OSPF where
the default cost is 20.
LSA 5 - AS External Link States
Internal# show ip ospf database
Type-5 AS External Link States
LSA 5 - External Networks originated by the ASBR,
Flooded throughout A.S. except to Stub and Totally Stubby
Link ID ADV Router Age Seq# Checksum Tag
11.0.0.0 192.168.1.1 1191 0x80000001 0x3FEA 0
12.0.0.0 192.168.1.1 1191 0x80000001 0x32F6 0
13.0.0.0 192.168.1.1 1191 0x80000001 0x2503 0
• How many sets of LSA 5s does the ABRs have in their link state
summary database? Notice the ASBRs entries.
Stub Areas
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Stub Area
Area 1
Stub Areas
Receives all routes from within A.S.:
• Within the local area - LSA 1s and LSA 2s (if appropriate)
• From other areas (Inter-Area) - LSA 3s
ABR:
• ABR blocks all LSA 4s and LSA 5s.
• ‘If LSA 5s are not known inside an area, LSA 4s are not necessary.’
• LSA 3s are propagated by the ABR.
Configuration:
• All routers in the area must be configured as “stub”
Stub Areas
ABR-2
router ospf 1
network 172.16.1.0 0.0.0.255 area 0
network 172.16.10.4 0.0.0.3 area 1
area 1 stub << Command: area area stub
Internal
router ospf 1
network 172.16.0.0 0.0.255.255 area 1
area 1 stub << Command: area area stub
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X Blocked
172.16.10.4/30
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Stub Area 172.16.20.0/24
injected Area 1
• LSA 3s (Inter-Area routes) are propagated by the ABR.
• ABR blocks all LSA 4s (reachabilitly to ASBR) and Area
LSA 5s1 (External routes)
• The ABR injects a default route into the stub area, pointing to the ABR. (This
does not mean the ABR has a default route of its own.)
• Essentially, internal routers in a Stub Area only see Inter-Area OSPF routes
and the default route to the ABR – No External routes.
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X Blocked
172.16.10.4/30
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Stub Area 172.16.20.0/24
injected
Area 1
• Changes in External routes no longer affect Stub Area routing tables.
Stub Areas
Internal
Internal# show ip ospf database
Summary Net Link States (Area 1)
LSA 3 - Generated by the ABR.
Describes links between ABR and Internal Routers of the Local Area
• Notice that there are no LSA 4s or LSA 5s for stub area routers.
• Default Route injected by ABR (LSA 3)
Stub Areas
Internal
Internal# show ip route
Gateway of last resort is 172.16.10.5 to network 0.0.0.0
ABR-2
ABR-2# show ip route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks
O IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:01:59,FastEthernet0
O 172.16.20.0/24 [110/782] via 172.16.10.6, 00:01:59, Serial0
C 172.16.10.4/30 is directly connected, Serial0
C 172.16.1.0/24 is directly connected, FastEthernet0
O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:01:59, FastEthernet0
O E2 12.0.0.0/8 [110/20] via 172.16.1.1, 00:01:59, FastEthernet0
O E2 13.0.0.0/8 [110/20] via 172.16.1.1, 00:01:59, FastEthernet0
192.168.3.0/32 is subnetted, 1 subnets
C 192.168.3.1 is directly connected, Loopback1
• Notice, there is no automatic default route on ABR, as there are with the
internal stub routers.
Your Turn -Discuss in groups (Stub)
Note: A Stub area may have more than one ABR, but because of
the default route, the internal routers will not be able to
determine which router is the optimal gateway outside the AS
and end up load balancing between the multiple ABRs.
Totally Stubby Areas
“Cisco proprietary”, however the RFC does make some provisions for this
as an optional feature..
Same considerations as with Stub areas:
• An area could be qualified a stub when there is a single exit point (a
single ABR) from that area or if routing to outside of the area does not
have to take an optimal path.
• The area is not needed as a transit area for virtual links (later).
• The ASBR is not within the stub area
• The area is not the backbone area (area 0)
• Stub areas will result in memory and processing savings depending
upon the size of the network. - This is even more true with Totally
Stubby areas
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
ABR:
• ABR blocks all LSA 4s and LSA 5s.
• ABR blocks all LSA 3s, except propagating a default route.
• Default route is injected into totally stubby area by ABR.
Configuring:
• All routers must be configured as “stub”
• ABR must be configured as “stub no-summary”
Totally Stubby Areas
ABR-2
router ospf 1
network 172.16.1.0 0.0.0.255 area 0
network 172.16.10.4 0.0.0.3 area 1
area 1 stub no-summary
^^ Command: area area stub no-summary
Internal
router ospf 1
network 172.16.0.0 0.0.255.255 area 1
area 1 stub
^^ Command: area area stub
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X 172.16.10.4/30
X Blocked
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Totally Stubby Area injected Area 1
172.16.20.0/24
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X 172.16.10.4/30
X Blocked
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Totally Stubby Area injected Area 1
172.16.20.0/24
Area 1
• Changes in any networks outside the Totally Stubby Area no longer
affects the Totally Stubby routing tables.
Totally Stubby Areas
Internal
Internal# show ip ospf database
Summary Net Link States (Area 1)
LSA 3 - Generated by the ABR.
Describes links between ABR and Internal Routers of the Local Area
• Default route is injected into totally stubby area by ABR for all other networks
(inter-area and external routes)
• Does not receive routes from other areas (Inter-Area)
• Does not receive routes from External A.S. (External Routes)
Totally Stubby Areas
Internal
Internal# show ip route
Gateway of last resort is 172.16.10.5 to network 0.0.0.0
• Default route is injected into totally stubby area by ABR for all other networks
(inter-area and external routes)
• Does not receive routes from other areas (Inter-Area)
• Does not receive routes from External A.S. (External Routes)
Totally Stubby Areas
ABR-2
ABR-2# show ip route
Gateway of last resort is not set
• ABR will forward Intra-Area routes (to other areas within AS)
• Notice, there is not an automatic default route in the ABR’s routing
table like there is with the internal Totally Stubby routers.
OSPF design considerations
• Areas
• LSAs
• Stub Area
• Totally Stubby Area
LSA-1 - Router LSA
LSA 1 - Router Link States
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 1 - Router Link States
LSA 1 Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5 LSA 1
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 LSA 1 .6
LSA 1
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 1 - Router Link States
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5 LSA 1
172.16.1.0/24
Originated
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
LSA 1
flooded
Area 1
LSA-2 - Network LSA
LSA 2 - Network Link States
Area 1
LSA-3 - Summary LSA
LSA 3 – Summary Net Link States
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
Area 1
LSA 3 – Summary Net Link States
172.16.20.0/24
Area 1
LSA 3 – Summary Net Link States
Area 1
LSA-4 – ASBR Summary LSA
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8 Normal Areas
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 5’s flooded
LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4 .5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
LSA 4
Lo - RouterID
172.16.0.0/16 LSA 4 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24 Area 1
Lo - RouterID
.2 .3
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/16 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
ASBR
router ospf 1
redistribute static Area 1
network 172.16.1.0 0.0.0.255 area 0
ip route 11.0.0.0 255.0.0.0 Null0
ip route 12.0.0.0 255.0.0.0 Null0
ip route 13.0.0.0 255.0.0.0 Null0
ASBR
11.0.0.0/8
router ospf 1 12.0.0.0/8
redistribute static
network 172.16.1.0 0.0.0.255 area 0
13.0.0.0/8
Normal Areas
ip route 11.0.0.0 255.0.0.0 Null0 10.1.0.0/24
ip route 12.0.0.0 255.0.0.0 Null0
ip route 13.0.0.0 255.0.0.0 Null0 Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1 LSA 5’s flooded
LSA 5
LSA 5 .2 .3
Lo - RouterID
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100 ABR-2
.5
172.16.1.0/24
LSA 5
Area 0 172.16.10.4/30
172.16.51.0/24 .6
LSA 5
Lo - RouterID
172.16.0.0/16 LSA 5 Internal .1 192.168.4.1/32
Area 51
172.16.20.0/24
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X Blocked
172.16.10.4/30
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Stub Area 172.16.20.0/24
injected
Area 1
Totally Stubby Area
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X 172.16.10.4/30
X Blocked
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Totally Stubby Area injected Area 1
172.16.20.0/24
Area 1
Next
• E1 and E2 routes
• Default Routes
• Route Summarization
• NSSA (Not So Stubby Areas)
• Multiple ABR Scenario
• Multiple ASBR Scenario
• Virtual Links
• Load Balancing
• show commands
NSSA (Not So Stubby Area)
NSSA B a c k b o n e A re a
A re a 2 A re a 0
RTH
R IP
RTE
RTG RTD
ASBR
RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC
NSSA (Not So Stubby Area)
RTH
R IP
RTE
RTG RTD
ASBR
RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC
RTH
R IP
RTE
LSA 7
LSA 7
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
RTH
R IP
RTE
LSA 7
LSA 7
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
RTH
R IP
RTE
LSA 7
LSA 7
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
router ospf 1
area 2 nssa
NSSA Stub Areas NSSA B a c k b o n e A re a
Default route via RTG A re a 2 A re a 0
LSA 3s
RTH RTH routes:N1/N2
R IP LSA 4s & LSA 5s
RTE
LSA 7 X
0.0.0.0/0 RTH
LSA 7 X
routes:
E1/E2
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
NSSA Stub Area Routing Tables:
• RTG: Area 2 routes, Area 0 routes (IA), RTH RIP routes
– No 0.0.0.0/0 (IA) route from RTB (ABR), despite documentation
• Area 2 Internal Routers: Area 2 routes, RTH routes (N1/N2), Area 0 routes (IA)
– No 0.0.0.0/0 (IA) route from RTB (ABR), despite documentation
• RTB: Area 2 routes, Area 0 routes, RTH routes (N1/N2), External routes if redistributed from
RTA ASBR (E1/E2)
• RTA: Area 0 routes, Area 2 routes, RTH routes (E1/E2), External routes if redistributed from
RTA (E1/E2)
• Note: Area 2 routers may or may not receive E1/E2 routes from RTA, depending upon NSSA
configuration (next).
NSSA Stub Areas
NSSA B a c k b o n e A re a
Default route via RTG A re a 2 A re a 0
LSA 3s
RTH RTH routes:N1/N2
R IP LSA 4s & LSA 5s
RTE
LSA 7 X
0.0.0.0/0 RTH
LSA 7 X
routes:
E1/E2
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(P o s s ib le
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
Area 2 routers:
router ospf 1
network 172.16.2.0 0.0.0.255 area 2
area 2 nssa
NSSA – Totally Stubby
2 0 0 .2 0 0 .2 0 0 .0 /2 4
A re a 2
RTE NSSA A re a 0
1 0 .0 .0 .0 /8
R IP
D e fa u lt R o u te
RTB(config)#router ospf 1
RTB(config-router)#network 192.168.1.0 0.0.0.255 area 3
RTB(config-router)#network 192.168.2.0 0.0.0.255 area 0
RTB(config-router)#area 3 virtual-link 10.0.0.2
Virtual Links
On the ASBR only (Summarizes external routes before injecting them into the
OSPF domain.)
RTA
router ospf 100
summary-address 128.213.64.0 255.255.224.0
redistribute bgp 50 metric 1000 subnets (later)
RTD
router ospf 100
summary-address 128.213.96.0 255.255.224.0
redistribute bgp 20 metric 1000 subnets (later)
Injecting Default Routes into OSPF
The way that OSPF generates default routes (0.0.0.0) varies depending
on the type of area the default route is being injected into.
Stub and Totally Stubby Areas
• For stub and totally stubby areas, the area border router (ABR) to the
stub area generates a summary link-state advertisement (LSA) with the
link-state ID 0.0.0.0.
• This is true even if the ABR doesn't have a default route.
• In this scenario, you don't need to use the default-information
originate command.
11.0.0.0/8
Stub Area 12.0.0.0/8
13.0.0.0/8
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X Blocked
172.16.10.4/30
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Stub Area 172.16.20.0/24
injected Area 1
Area 1
All routers in the area must be configured as “stub” including the ABR:
router ospf 1
area 1 stub
11.0.0.0/8
Totally Stubby Area 12.0.0.0/8
13.0.0.0/8
10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
LSA 3 LSA 4 .2 .3
Lo - RouterID
.1 192.168.3.1/32
Pri 200 Pri 100
ABR-1 ABR-2 LSA 4
LSA 5 LSA.53
LSA 5 172.16.1.0/24
Blocked
Area 0
X X 172.16.10.4/30
X Blocked
172.16.51.0/24 .6
Default
Lo - RouterID
172.16.0.0/16 route to
192.168.4.1/32
Area 51 Internal .1
ABR
Totally Stubby Area injected Area 1
172.16.20.0/24
Area 1
All routers in the area must be configured as “stub” except the ABR “stub no summary”:
ABR: router ospf 1 Other: router ospf 1
area 1 stub no-summary area 1 stub
Injecting Default Routes into OSPF
Normal Areas
• By default, in normal areas routers don't generate default routes.
• To have an OSPF router generate a default route, use the default-
information originate command.
• This generates an external type-2 link with link-state ID 0.0.0.0 and
network mask 0.0.0.0.
• This command should only be used on the ASBR.
– Some documentation states this command works only on an
ASBR while other documentation states this command turns a
router into an ASBR.
Injecting Default Routes into OSPF
To have OSPF generate a default route use the following:
router ospf 10
default-information originate [always] [metric metric-
value] [metric-type type-value] [route-map map-name]
Injecting Default Routes into OSPF
0.0.0.0/0 10.1.0.0/24
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
0.0.0.0/0
0.0.0.0/0
0.0.0.0/0 .2 .3
Lo - RouterID
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100
ABR-2
0.0.0.0/0 .5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/160.0.0.0/0 Internal .10.0.0.0/0
192.168.4.1/32
ASBR Area 51
172.16.20.0/24
router ospf 1
redistribute static
Area 1
network 172.16.1.0 0.0.0.255 area 0
default-information originate
ip route 0.0.0.0 0.0.0.0 10.0.0.2
Injecting Default Routes into OSPF
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8 No 0.0.0.0/0 route, but
propagated anyway or
10.1.0.0/24
“always”
Lo - RouterID
192.168.1.1/32
ASBR
Lo - RouterID
192.168.2.1/32 .1
0.0.0.0/0
0.0.0.0/0
0.0.0.0/0 .2 .3
Lo - RouterID
.1 192.168.3.1/32
ABR-1 Pri 200 Pri 100
ABR-2
0.0.0.0/0 .5
172.16.1.0/24
Area 0 172.16.10.4/30
172.16.51.0/24 .6
Lo - RouterID
172.16.0.0/160.0.0.0/0 Internal .10.0.0.0/0
192.168.4.1/32
ASBR Area 51
172.16.20.0/24
router ospf 1
redistribute static
Area 1
network 172.16.1.0 0.0.0.255 area 0
default-information originate always
ip route 0.0.0.0 0.0.0.0 10.0.0.2
Redistributing External Routes
S w itc h
2 0 6 .2 0 2 .1 .0 /2 4
2 0 6 .2 0 2 .2 .0 /2 4
574 584
.2 .2
.1 584
R o u te rC R o u te rD
L o o p 1 .2 .2 0 2 .2 0 6 /2 4 L o o p 2 .2 .2 0 2 .2 0 6
ASBR
router ospf 1
redistribute rip metric 500 metric-type 1
network 206.202.0.0 0.0.0.255 area 0
Redistributing External Routes
L o o p 1 6 2 .1 0 .5 .1 /1 6
.2
metric-type 2
R IP
A S -R e m o te R IP RIP routes redistributed with a
10
.0 .
0.0 .1
metric (cost) of 500 and a
/ 8
metric-type 2 (default)
ASBR .3 500
L o o p 1 .5 .2 0 2 .2 0 6 /2 4
500
0
O SPF
A re a 0
.
O SPF 0 .10 . 1 .4
2 0 6 .2 0 2 .0 .0 /2 4
2. 1
A re a 5 1 19 /24
R o u te rE S w it c h
.2
L o o p 1 .1 0 .2 0 2 .2 0 6 /2 4 500
.1 .2
.1
R o u te rF 500
L o o p 2 .1 0 .2 0 2 .2 0 6 /2 4
O SPF
R o u te rA .1 A re a 1
R o u te rB
1 9 2 .1 0 .5 .0 /2 4 L o o p 1 .0 .2 0 2 .2 0 6 /2 4
L o o p 2 .0 .2 0 2 .2 0 6 /2 4
500
S w itc h
2 0 6 .2 0 2 .1 .0 /2 4
2 0 6 .2 0 2 .2 .0 /2 4
.2 .2
500 .1 500
R o u te rC R o u te rD
L o o p 1 .2 .2 0 2 .2 0 6 /2 4 L o o p 2 .2 .2 0 2 .2 0 6
ASBR
router ospf 1
redistribute rip metric 500 metric-type 2
network 206.202.0.0 0.0.0.255 area 0
Redistributing External Routes
So when should you redistribute a Type-1 (E1) External route?
• If there is more than one ABR for the area and the area is not a stub or
totally stubby area.
– In this case one of the ABRs may provide a shorter path
for certain non-area 0 internal routers, than other ABRs.
– E1 routes will include all internal costs from the internal
router to the ABR and to the ASBR, allowing each router
to choose which ABR provides the shorter path.
• show ip route
• show ip ospf
• show ip ospf neighbor
• show ip ospf border-router
• show ip database
• show ip interface
show ip route
Internal#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 NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
<text omitted>
This command will displays any ABRs in the area or any ASBRs in the OSPF routing domain.
• Destination - Router ID of the destination.
• Next Hop - Next hop toward the destination.
• Cost - Cost of using this route.
• Type - The router type of the destination; it is either an ABR or ASBR or both.
• Rte Type - The type of this route; it is either an intra-area or interarea route.
• Area - The area ID of the area from which this route is learned.
• SPF No - The internal number of the shortest path first (SPF) calculation that installs this route.
Router1 Router2
interface BRI1/1 interface BRI1/0
ip address 192.158.254.13 {/30} ip address 192.158.254.14 {/30}
ip ospf demand-circuit
router ospf 20
router ospf 20 network 192.158.254.0 0.0.0.255 area 0
network 192.158.254.0 0.0.0.255 area 0
Note: You need to configure the demand circuit at one end of the link only.
However, if you configure this command on both ends it does not cause any
harm.
Suggestion: To reduce the affect of link flaps on the demand circuit, configure
the area that contains the demand circuit as totally stub.
• In this case configure Area 1 to be a totally stubby area.
• Summarizing routes on Router 1 can also help if the flapping link is within the
summarized range.
Extra: OSPF and Load Balancing
router-id
• To use a fixed router ID, use the router-id router configuration
command.
• To force OSPF to use the previous OSPF router ID behavior, use the
no form of this command.
• Takes precedence over Loopback address
router ospf 1
router-id ip-address
OSPF and Redistribution (later)
• “Memory is required to store those Type-5 LSAs. The storage also requires a
CPU to process the LSAs during full or partial Shortest Path First (SPF) runs
and to flood them when some instability occurs.”
• “In Cisco IOS Software Release 12.1(3) and later, the Type-5 LSAs are no
longer created for connected networks included in the network statements
under router OSPF.”
• The reason for the difference is that when using the redistribute connected command, those
connected networks are not affected by the default-metric command. So once the ospf, 'redistribute
connected subnets' command is entered on SJ1, those directly connected networks, being
redistributed into rip, are no longer affected by the default-metric value.
"You cannot use the 'default-metric' command to affect the metric used to advertise 'connected'
routes."
Usually, it is not advisable to redistribute connected networks into area 0, but thats another story.
• In other words, if you are using the redistributed connected command, any connected networks
included using the OSPF network command, were not only advertised as normal using LSA Type 1,
2, or 3, but also as an external LSA Type-5.
We saw this in our multi-area OSPF labs when some students were using 12.0.5 and others were
using 12.2. With 12.0.5 an internal OSPF route, LSA Type-1, was also being advertised as a LSA
Type-5, when they used the "redistribute connected" command.
OSPF FAQs and FYIs
Number of Neighbors
• The number of routers connected to the same LAN is also important.
• Each LAN has a DR and BDR that build adjacencies with all other
routers.
• The fewer neighbors that exist on the LAN, the smaller the number of
adjacencies a DR or BDR have to build.
• That depends on how much power your router has. You could always
change the OSPF priority to select your DR.
• Also if possible, try to avoid having the same router be the DR on
more than one segment.
• If DR selection is based on the highest RID, then one router could
accidentally become a DR over all segments it is connected to.
• This router would be doing extra effort while other routers are idle.
OSPF Design Issues
Number of Areas per ABR
• ABRs will keep a copy of the database for all areas they service.
• If a router is connected to five areas for example, it will have to keep a list of
five different databases.
• The number of areas per ABR is a number that is dependent on many
factors, including type of area (normal, stub, NSSA), ABR CPU power,
number of routes per area, and number of external routes per area.
• For this reason, a specific number of areas per ABR cannot be
recommended.
• Of course, it's better not to overload an ABR when you can always spread
the areas over other routers.
• The following diagram shows the difference between one ABR holding five
different databases (including area 0) and two ABRs holding three databases
each.
• Again, these are just guidelines, the more areas you configure per ABR the
lower performance you get. In some cases, the lower performance can be
tolerated.
OSPF Design Issues