Professional Documents
Culture Documents
6 – OSPF
Part 2 of 2: Multi-Area OSPF
2006. 3. 3
Note
1
Optional: Rick’s OSPF Scenarios
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
4
2
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
3
OSPF uses “Areas”
• Hierarchical routing enables you to separate large internetworks (autonomous
systems) into smaller internetworks that are called areas.
• With this technique, routing still occurs between the areas (called inter-area
routing), but many of the smaller internal routing operations, such as
recalculating the database – re-running the SPF algorithm, are restricted within
an area.
• 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.
8
4
OSPF uses “Areas”
10
5
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 (Autonomous System Boundary Router): Routers that have at least
one interface connected to an external internetwork (another
autonomous system)
ABR (Area Border Router): Routers with interfaces attached to multiple
areas.
11
6
OSPF Type 4 - Link State Advertisements
13
14
7
LSA Types
LSAs used for discovering routes and reaching Full State, along with
Maintain Routes
15
LSA Types
16
8
Area Types
• Stub
– Stub Area
– Totally Stubby Area (TSA)
– Not-so-stubby-area (NSSA)
17
Area Types
9
Part I - LSAs using all normal areas
19
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
20
10
Part I - LSAs using all normal areas
21
22
11
Understanding LSAs
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23
• 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.
24
12
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.
25
13
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
27
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
28
14
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
29
• 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”
30
15
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”
31
32
16
Your Turn -Discuss in groups (LSA 1s)
33
34
17
LSA 2 - Network 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 | 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Attached Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
35
Area 1
36
18
LSA 2 - Network Link States
ASBR#show ip ospf data
38
19
LSA 3 – Summary Net Link States
39
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
40
20
LSA 3 – Summary Net Link States
41
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
42
21
LSA 3 – Summary Net Link States
Area 1
43
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
22
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
172.16.0.0/16 LSA 3 Internal .1 192.168.4.1/32
Area 51
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
Area3’s.
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.
45
Area 1
46
23
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.
47
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.
48
24
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.
49
25
Update is sent to Area 0 and Area Normal Areas
51 routers using a “distance
vector update technique.” SPF not Area 0
Backbone Area
re-run, but routers update routing
LSA 3
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
52
26
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
54
27
Another example: non-area 0 router, Internal
Internal# show ip ospf database
LSA 3 - Generated by the ABR. Describes links between ABR and
Internal Routers of the Local Area
55
56
28
LSA 4 – ASBR Summary Link States
Exceptions
• Not flooded to Stub and Totally Stubby networks.
• More on this later
57
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
58
29
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
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.
30
LSA 4 – ASBR Summary Link States
Internal
61
• 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?
62
31
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
63
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
64
32
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
65
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 192.168.4.1/32
Area 51 Internal .1
172.16.20.0/24
33
LSA 5 - AS External Link States
ABR-2
ABR-2# show ip ospf database
AS External Link States <- Note, NO Area!
67
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.
68
34
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
69
70
35
Your Turn -Discuss in groups (LSA 5s)
• How many sets of LSA 5s does the ABRs have in their link state
summary database? Notice the ASBRs entries.
71
Stub Areas
72
36
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
Stub Area
Area 1
73
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”
74
37
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
75
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
ABR-1 Pri 200 Pri 100
ABR-2 LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X Blocked
172.16.10.4/30
Area 0
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 15s (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.
76
38
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
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X Blocked
172.16.10.4/30
Area 0
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.
77
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)
78
39
Stub Areas
Internal
Internal# show ip route
Gateway of last resort is 172.16.10.5 to network 0.0.0.0
Stub Areas
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.
80
40
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.
81
“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
82
41
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
83
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”
84
42
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
85
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
ABR-1 Pri 200 Pri 100
ABR-2 LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X 172.16.10.4/30
X Blocked
Area 0
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 172.16.20.0/24
injected Area 1
• LSA 3s (Inter-Area routes) are blocked by the ABR.
• ABR blocks all LSA 4s (reachability to ASBR) and LSA Area 5s
1 (External routes)
• The ABR injects a default route (LSA 3) 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 Totally Stubby Area only see the default route
to the ABR.
86
43
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
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X 172.16.10.4/30
X Blocked
Area 0
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 172.16.20.0/24
injected Area 1
Area 1
• Changes in any networks outside the Totally Stubby Area no longer
affects the Totally Stubby routing tables.
87
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)
88
44
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)
89
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.
90
45
OSPF design considerations
91
92
46
OSPF design considerations
93
Quick Review
• Areas
• LSAs
• Stub Area
• Totally Stubby Area
94
47
LSA-1 - Router LSA
95
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
96
48
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
97
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
98
49
LSA-2 - Network LSA
99
Area 1
100
50
LSA-3 - Summary LSA
101
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
102
51
LSA 3 – Summary Net Link States
Area 1
103
Area 1
104
52
LSA-4 – ASBR Summary LSA
105
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 192.168.4.1/32
Area 51 Internal .1
172.16.20.0/24 Area 1
106
53
LSA-5 - External LSA
107
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
108
54
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
Stub Area
110
55
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
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X Blocked
172.16.10.4/30
Area 0
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
111
112
56
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
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X 172.16.10.4/30
X Blocked
Area 0
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 172.16.20.0/24
injected Area 1
Area 1
113
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
114
57
NSSA (Not So Stubby Area)
RTH
RIP
RTE
RTG RTD
ASBR
RTB RTA
(Possible
ABR
ASBR)
RTF RTC
115
58
NSSA Backbone Area
Default route via RTG Area 2 Area 0
RTH
RIP
RTE
RTG RTD
ASBR
RTB RTA
(Possible
ABR
ASBR)
RTF RTC
RTH
RIP
RTE
LSA 7
LSA 7
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(Possible
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
118
59
NSSA Backbone Area
Default route via RTG Area 2 Area 0
RTH
RIP
RTE
LSA 7
LSA 7
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(Possible
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
NSSA Generic
NSSA Backbone Area
Default route via RTG Area 2 Area 0
RTH
RIP
RTE
LSA 7
LSA 7
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(Possible
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
60
NSSA (Not So Stubby Area)
121
NSSA –Stub
router ospf 1
area 2 nssa
122
61
NSSA Stub Areas NSSA Backbone Area
Default route via RTG Area 2 Area 0
LSA 3s
RTH RTH routes:N1/N2
RIP 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
(Possible
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).
123
LSA 7 X routes:
E1/E2
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(Possible
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
124
62
NSSA – Totally Stubby
125
63
NSSA Totally Stubby Areas
NSSA Backbone Area
Default route via RTG Area 2 Area 0
LSA 3s
RTH
RIP
RTH routes: N1/N2 X
LSA 4s & LSA 5s
RTE
LSA 7 X
0.0.0.0/0 RTH
routes:
LSA 7 E1/E2
RTG RTD LSA 5
ASBR LSA 7
LSA 7 RTB RTA
(Possible
ABR
ASBR)
RTF RTC LSA 7s
LSA 7 LSA 7 Blocked
200.200.200.0/24
Area 2
RTE NSSA Area 0
10.0.0.0/8
RIP
Default Route
128
64
Virtual Links
129
Virtual Links
65
Virtual Links
131
Virtual Links
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
132
66
Virtual Links
133
134
67
Route Summarization
Inter-Area Route Summarization - Area Range
• By default ABRs do not summarize routes between areas.
• Route summarization is the consolidation of advertised addresses.
• This feature causes a single summary route to be advertised to other areas by
an ABR.
• In OSPF, an ABR will advertise networks in one area into another area.
• If the network numbers in an area are assigned in a way such that they are
contiguous, you can configure the ABR to advertise a summary route that
covers all the individual networks within the area that fall into the specified
range.
On the ABR (Summarizes routes before injecting them into different area)
Router(config-router)# area area-id range network-
address subnet-mask
• area-id - Identifier of the area about which routes are to
be summarized. (From area)
135
Route Summarization
68
Route Summarization
137
Route Summarization
138
69
Route Summarization
139
Route Summarization
On the ASBR only (Summarizes external routes before injecting them into the
OSPF domain.)
140
70
Route Summarization
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)
141
142
71
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.
143
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
ABR-1 Pri 200 Pri 100
ABR-2 LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X Blocked
172.16.10.4/30
Area 0
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 144
72
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
ABR-1 Pri 200 Pri 100 ABR-2
LSA 4
LSA 5 LSA.5 3
LSA 5 172.16.1.0/24
Blocked X X 172.16.10.4/30
X Blocked
Area 0
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 172.16.20.0/24
injected Area 1
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
145
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.
146
73
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]
147
148
74
Injecting Default Routes into OSPF
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
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
network 172.16.1.0 0.0.0.255 area 0 Area 1
default-information originate
ip route 0.0.0.0 0.0.0.0 10.0.0.2
149
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
network 172.16.1.0 0.0.0.255 area 0 Area 1
default-information originate always
ip route 0.0.0.0 0.0.0.0 10.0.0.2
150
75
Redistributing External Routes
151
152
76
Redistributing External Routes
153
Switch
206.202.1.0/24
206.202.2.0/24
574 584
.2 .2
.1 584
RouterC RouterD
Loop 1.2.202.206/24 Loop 2.2.202.206
ASBR
router ospf 1
redistribute rip metric 500 metric-type 1
network 206.202.0.0 0.0.0.255 area 0
154
77
Redistributing External Routes
Loop 162.10.5.1/16
.2
metric-type 2
RIP
AS-Remote RIP RIP routes redistributed with a
10
.0.
0.0 .1
metric (cost) of 500 and a
/ 8
metric-type 2 (default)
ASBR .3
Loop 1.5.202.206/24
500
500
0
OSPF
Area 0
0.
OSPF 0.1 .1 .4
206.202.0.0/24
Area 51 2.1
19 /24
RouterE Switch
.2
Loop 1.10.202.206/24 500
.1 .2
.1
RouterF 500
Loop 2.10.202.206/24
OSPF
RouterA .1 Area 1
RouterB
192.10.5.0/24 Loop 1.0.202.206/24
Loop 2.0.202.206/24
500
Switch
206.202.1.0/24
206.202.2.0/24
.2 .2
500 .1 500
RouterC RouterD
Loop 1.2.202.206/24 Loop 2.2.202.206
ASBR
router ospf 1
redistribute rip metric 500 metric-type 2
network 206.202.0.0 0.0.0.255 area 0
155
• 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.
156
78
Know your outputs
• show ip route
• show ip ospf
• show ip ospf neighbor
• show ip ospf border-router
• show ip database
• show ip interface
157
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>
158
79
show ip ospf
ABR-2#show ip ospf
Routing Process "ospf 1" with ID 192.168.3.1
Supports only single TOS(TOS0) routes
It is an area border router
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 3. Checksum Sum 0x97E3
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm executed 8 times
<text omitted>
Area 1
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm executed 5 times
<text omitted>
159
160
80
show ip ospf border-router
• To display the internal OSPF routing table entries to an Area Border Router (ABR) and
Autonomous System Boundary Router (ASBR), use the show ip ospf border-routers
privileged EXEC command.
• LSA 4’s (routes to ASBRs) are not installed in the main IP routing table but in the special
internal OSPF routing table.
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.
161
162
81
Router Link States (LSA 1)
• Router Link States (LSA1’s) should display all the RouterIDs of routers in that area, including its own.
• Link State ID is always the same as the Advertising Router.
• ADV Router is the Router ID of the router that created this LSA 1.
163
82
부록. OSPF Extra’s, FAQs, and FYIs
165
83
Extra: OSPF over ISDN
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.
167
168
84
Extra: OSPF and DNS Lookups
169
85
Extra: IOS 12.01(T) – router-id
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
171
• “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.”
172
86
Question from another instructor (later)…
• I was teaching redistribution of RIP into OSPF and couldn't explain the Baypoint output on p. 132 of
the lab manual. Since both 172.16.8.0 and 172.16.7.0 are being redistributed into OSPF with a
default metric of 10, why does the .7.0 network have a metric of 20?
• 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.
173
174
87
OSPF FAQs and FYIs
176
88
OSPF FAQs and FYIs
178
89
OSPF Design Issues – Some extra info!
179
180
90
OSPF Design Issues
181
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.
182
91
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.
183
184
92
OSPF Design Issues
Memory Issues
• It is not easy to figure out the memory needed for a particular OSPF configuration. Memory
issues usually come up when too many external routes are injected in the OSPF domain. A
backbone area with 40 routers and a default route to the outside world would have less
memory issues compared with a backbone area with 4 routers and 33,000 external routes
injected into OSPF.
• Memory could also be conserved by using a good OSPF design. Summarization at the area
border routers and use of stub areas could further minimize the number of routes
exchanged.
• The total memory used by OSPF is the sum of the memory used in the routing table (show
ip route summary) and the memory used in the link-state database. The following
numbers are a rule of thumb estimate. Each entry in the routing table will consume
between approximately 200 and 280 bytes plus 44 bytes per extra path. Each LSA will
consume a 100 byte overhead plus the size of the actual link state advertisement, possibly
another 60 to 100 bytes (for router links, this depends on the number of interfaces on the
router). This should be added to memory used by other processes and by the IOS itself. If
you really want to know the exact number, you can do a show memory with and without
OSPF being turned on. The difference in the processor memory used would be the answer
(keep a backup copy of the configs).
• Normally, a routing table with less than 500K bytes could be accommodated with 2 to 4 MB
RAM; Large networks with greater than 500K may need 8 to 16 MB, or 32 to 64 MB if full
routes are injected from the Internet.
185
Whew!
186
93
Ch.6 – OSPF
Part 2 of 2: Multi-Area OSPF
94