Cis185 ROUTE Lecture3 OSPF Part1
Cis185 ROUTE Lecture3 OSPF Part1
Cis185 ROUTE Lecture3 OSPF Part1
Review of OSPF
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
2
Single Area OSPF - Review
Introduction to OSPF
OSPF is:
Classless
Link-state routing protocol
Uses the concept of areas for scalability
RFC 2328 defines the OSPF metric as an arbitrary value called cost.
Cisco IOS software uses bandwidth to calculate the OSPF cost metric.
4
The network Command
Router(config-router)# network network-address wildcard-mask area area-id
5
Link State Concepts
1 – Flooding of link-state
information
5 – Routing Table
3 – SPF Algorithm
2 – Building a
Topological 4 – SPF Tree
Database
6
Neighbors and
Adjacencies
8
Dead Intervals
9
Modifying OSPF Intervals
R1# show ip ospf neighbor
10
Modifying OSPF Intervals
Router(config-if)# ip ospf hello-interval seconds
Router(config-if)# ip ospf dead-interval seconds
11
Basic OSPF Configuration
Lab Topology
The router ospf command
The network command
OSPF Router ID
Verifying OSPF
Examining the Routing Table
Router ID?
OSPF Router ID
13
Verifying New Router IDs (Loopbacks)
R1# show ip protocols
Routing Protocol is “ospf 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.1.1.1
<output omitted>
15
Verifying OSPF
R1# show ip ospf interface serial 0/0/0
Serial0/0/0 is up, line protocol is up
Internet Address 192.168.10.1/30, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<output omitted>
16
Verifying OSPF
R1# show ip protocols
Routing Protocol is “ospf 1” OSPF Process ID
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.1.1.1 OSPF Router ID
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.1.16 0.0.0.15 area 0 Networks OSPF is
192.168.10.0 0.0.0.3 area 0 advertising that are
192.168.10.4 0.0.0.3 area 0 originating from this router
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
10.2.2.2 110 11:29:29 OSPF Neighbors
10.3.3.3 110 11:29:29
Distance: (default is 110) Administrative Distance
17
Verifying OSPF
R1# show ip ospf
<some output omitted>
Routing Process “ospf 1” with ID 10.1.1.1
Start time: 00:00:19.540, Time elapsed: 11:31:15.776
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
Area BACKBONE(0)
Number of interfaces in this area is 3
Area has no authentication
SPF algorithm last executed 11:30:31.628 ago 18
SPF algorithm executed 5 times
Verifying OSPF
R1# show ip ospf
<some output omitted>
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Any time a router receives new information about the topology (addition,
deletion, or modification of a link), the router must:
Rerun the SPF algorithm
Create a new SPF tree
Update the routing table
The SPF algorithm is CPU intensive, and the time it takes for calculation
depends on the size of the area.
19
Verifying OSPF
R1# show ip ospf
<some output omitted>
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
20
Verifying OSPF
R1# show ip ospf interface serial 0/0/0
Serial0/0/0 is up, line protocol is up
Internet Address 192.168.10.1/30, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<output omitted>
21
Examining the Routing Table
R1# show ip route
Codes: <some code output omitted>
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
Unlike RIPv2 and EIGRP, OSPF does not automatically summarize at major
network boundaries.
22
The OSPF Metric
OSPF Metric
Modifying the Cost of the Link
OSPF Metric
The OSPF metric is called cost. The following passage is from RFC 2328:
A cost is associated with the output side of each router interface. This
cost is configurable by the system administrator. The lower the cost, the
more likely the interface is to be used to forward data traffic.
RFC 2328 does not specify which values should be used to determine the
cost. 24
OSPF Metric
25
Reference Bandwidth
R1(config-router)# auto-cost reference-bandwidth ?
1-4294967 The reference bandwidth in terms of Mbits per second.
To increase it to 10GigE (10 Gbps Ethernet) speeds, you need to change the reference
bandwidth to 10,000.
26
OSPF
Accumulates Cost
28
Modifying the Cost of the Link
Router(config-if)# bandwidth bandwidth-kbps
32
224.0.0.5
224.0.0.6
DROther DROther
DROthers only form full adjacencies with the DR and BDR in the network.
send their LSAs to the DR and BDR
using the multicast address 224.0.0.6 (ALLDRouters, all DR routers).
R1 sends LSAs to the DR.
The BDR listens, too.
The DR is responsible for forwarding the LSAs from R1 to all other routers.
DR uses the multicast address 224.0.0.5 (AllSPFRouters, all OSPF routers).
Only one router doing all the flooding.
33
DR/BDR Election
BDR
DROther DR
34
Verifying Router States
RouterA# show ip ospf interface fastethernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0
Process ID 1, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3
Backup Designated router (ID) 192.168.31.22, Interface address
192.168.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<output omitted>
35
Timing of DR/BDR Election
36
Timing of DR/BDR Election DR failed! I am now the
DR! Elections will now
happened for BDR
DR
I am now
the BDR!
BDR
If a new router enters the network after the DR and BDR have been
elected, it will not become the DR or the BDR even if it has a higher
OSPF interface priority or router ID than the current DR or BDR.
38
I’m back but I don’t
DR get to become DR
Timing of again. I am now just a
DR/BDR DROther.
Election
BDR
DROther
DROther
39
DR
Timing of
DR/BDR
Election
BDR
If the BDR fails, an election is held among the DROthers to see which router
will be the new BDR.
40
DR
Timing of I am now the new
BDR!
DR/BDR
Election
BDR
DROther
BDR
RouterB fails.
Because RouterD is the current BDR, it is promoted to DR.
RouterC becomes the BDR.
41
To simplify our discussion, we
Timing of DR/BDR Election removed RouterD from the topology.
We can change the OSPF interface priority to better control our DR/BDR
elections.
42
OSPF Interface Priority
Router(config-if)# ip ospf priority {0 - 255}
Control the election of these routers with the ip ospf priority interface
command.
Priority (Highest priority wins):
0 = Cannot become DR or BDR
1 = Default
Therefore, the router ID determines the DR and BDR.
Priorities are an interface-specific value, they provide better control of the
OSPF multiaccess networks.
They also allow a router to be the DR in one network and a DROther in
another.
43
OSPF Interface Priority
RouterA# show ip ospf interface fastethernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0
Process ID 1, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3
Backup Designated router (ID) 192.168.31.22, Interface address
192.168.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<output omitted>
The OSPF interface priority can be viewed using the show ip ospf
interface command.
44
Highest priority wins
Pri = 100
Pri = 200
46
More OSPF Configuration
Redistributing an OSPF Default Route
Fine-tuning OSPF
Redistributing
an OSPF
Default Route
The static default route is using the
loopback as an exit interface
because the ISP router in this
topology does not physically exist.
48
R3’s Routing Table
R3# show ip route
49
External Type 2 Route
R3# show ip route
Hello 10.6.0.1
Down
Init
2-way Down
Init
2-way
Hello 10.5.0.1
53
Explanations in Notes Section
Couple of notes on link state flooding…
OSPF is a link state routing protocol and does not send periodic updates
like RIP.
OSPF only floods link state state advertisements when there is a change
in topology (this includes when a routers are first booted).
OSPF uses hop-by-hop flooding of LSAs; an LSA received on one
interface are flooded out other OSPF enabled interfaces.
If a link state entry in the LSDB (Link State DataBase) reaches an age of 60
minutes (MaxAge) without being updated, it is removed and SPF is
recalculated.
Every 30 minutes (LSRefreshTime), OSPF routers flood only their link
states to all other routers (in the area).
This is known as a “paranoid update”
These do not trigger SPF recalculations.
Special note: When a link goes down and a router wants to send a LSA to
tell other routers to remove this link state, it sends this link state with a
value of 60 minutes (MAXAGE).
Single Area OSPF
End of Review
56
OSPF uses “Areas”
58
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.
59
An advantage of Multiple Areas
Question: I understand the routing table is recalculated every time the router receives an
new version of an LSA. Does OSPF recalculate its routing table when their is a topology
change in another area? show ip ospf displays no change in SPF execution, but show ip
ospf database shows a change in the topology?
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 EIGRP.
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.
60
OSPF Packet Types
In CCNA we discussed various OSPF packets
61
OSPF Type 4 - Link State Advertisements
62
OSPF packet types
63
LSA Types
LSAs used for discovering routes and reaching Full State, along with
Maintain Routes
64
LSA Types
LSA Types 1 through 5
We will look at these in detail as we discuss areas in this chapter.
Stub Areas
Stub Area
Totally Stubby Area
Not-so-stubby-area (NSSA)
66
Area Types
67
Part I - LSAs using all normal areas
Multi Area OSPF
What are the router Backbone
types? Normal Areas
Area
ASBR
Internal
Internal
Internal
68
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 Route
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
69
1. OSPF Multi-Areas - All Normal Areas
R33 R3
router ospf 1 router ospf 1
network 172.16.1.0 0.0.0.255 area 1 network 11.0.0.0 0.0.0.3 area 0
network 172.30.1.0 0.0.0.255 area 1
network 9.0.0.0 0.0.0.3 area 0
network 172.16.10.0 0.0.0.255 area 51
R22 network 172.16.11.0 0.0.0.255 area 51
router ospf 1 network 99.0.0.0 0.0.0.3 area 51
network 172.16.1.0 0.0.0.255 area 1
network 172.30.2.0 0.0.0.255 area 1
R100
R1 router ospf 1
network 99.0.0.0 0.0.0.3 area 51
router ospf 1
network 10.0.0.0 0.0.0.3 area 0 network 99.1.0.0 0.0.255.255 area 51
network 9.0.0.0 0.0.0.3 area 0 network 99.0.0.4 0.0.0.3 area 51
network 172.16.1.0 0.0.0.255 area 1
network 172.16.2.0 0.0.0.255 area 1 R200
router ospf 1
network 99.0.0.4 0.0.0.3 area 51
R2 network 99.0.0.0 0.0.255.255 area 51
router ospf 1
network 192.168.2.0 0.0.0.255 area 0 ABR contains network statements for
network 10.0.0.0 0.0.0.3 area 0
network 11.0.0.0 0.0.0.3 area 0 each area it belongs to, using the
default-information originate proper area value.
ip route 0.0.0.0 0.0.0.0 serial 0/2
70
Part I - LSAs using all normal areas
Multi Area OSPF
What are the router Backbone
types? Normal Areas
Area
ASBR
Internal
Internal
Internal
71
Part I - LSAs using all normal areas
Multi Area OSPF
What are the router Backbone
types? Normal Areas
Area
ASBR
Internal
Internal
Internal
72
Part I - LSAs using all normal areas
Multi Area OSPF
What are the router Backbone
types? Normal Areas
Area
ASBR
Internal
Internal
Internal
73
Understanding LSAs (FYI ONLY)
show ip ospf database
This is not the link state database, only a summary.
It is a tool to help determine what routes are included in the routing table.
We will look at this output to learn the tool as well as become familiar with the
different types of LSAs.
To view the link state database use: show ip ospf database [router|network|
…]
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
74
LSA 1 - Router Link States
LSA 1 – Router LSA
Generated by each router for each area it belongs to.
Describes the states of the links in the area to which this router belongs.
B
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.
When a new LSA 1 is received and installed in the LSDB, the router forwards
that LSA, using hop-by-hop or asynchronous flooding.
75
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
76
LSA 1 – Router Link States
LSA 1’s
LSA 1’s
LSA 1’s
Each router floods their LSA 1s ONLY within their own area.
LSA 1s only announce the links (networks) within the area.
Router receives LSA 1s from neighbor, floods those LSA 1s to other
neighbors within the same area.
77
R100# show ip ospf database
OSPF Router with ID (100.100.100.100) (Process ID 1)
79
LSA 1 - Router Link States
LSA 1’s
LSA 1’s
LSA 1’s
80
LSA 2 - Network Link States
81
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
82
LSA 2s
LSA 2’s
LSA 2’s
83
LSA 2 - Network Link States
R3# show ip ospf database
Net Link States (Area 51)
Link ID ADV Router Age Seq# Checksum
99.0.0.6 200.200.200.200 241 0x80000002 0x006159
LSA 2’s
LSA 2’s
85
LSA 3 – Summary Net Link States
86
LSA 3 – Summary LSAs
88
LSA 3 – Summary LSAs
LSA 3’s
LSA 3’s
LSA 1’s
89
LSA 3 – Summary Net 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
90
LSA 3 – Summary Net Link States New or
change, do
not run SPF
algorithm.
LSA 1’s
LSA 3’s
X LSA 3’s
Process
using DV
technique
not LSA 1
Link States.
• Routers only see the topology of the area they belong to.
• When a link in one area changes, the adjacent routers originate 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 91
distance-vector technique.
LSA 3 – Summary Net Link States
LSA 1’s
LSA 3’s
LSA 3’s
• ABRs calculate intra-area routes and announce them to all other areas as
inter-area routes, using LSA 3’s.
• 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. 92
Area 0
Backbone Area
LSA 1’s
RTA RTB
LSA 3 LSA 3
Area 1 Area 51
RTC
Not ABR
• 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.
93
Normal Areas
Area 0
Backbone Area
LSA 3
RTA RTB
Not ABR
• RTC does not forward the LSA 3’s back into Area 1, or routing
loops may develop.
• Note: RTC will create LSA 1’s and flood them within the appropriate
area.
• OSPF specification states that ABRs are restricted to considering LSA 3’s only
from the backbone area to avoid routing information loops.
94
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
96
LSA 3 – Summary Net Link States (INTERNAL)
ABR
R33# show ip ospf database
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.0.0.0 1.1.1.1 130 0x8000000c 0x00ec09
9.0.0.0 1.1.1.1 130 0x8000000d 0x00ec09
192.168.2.0 1.1.1.1 130 0x8000000e 0x00ec09
11.0.0.0 1.1.1.1 130 0x8000000f 0x00ec09
172.16.10.0 1.1.1.1 130 0x80000010 0x00ec09
172.16.11.0 1.1.1.1 130 0x80000011 0x00ec09
99.0.0.0 1.1.1.1 130 0x80000012 0x00ec09
99.0.0.4 1.1.1.1 130 0x80000013 0x00ec09
99.1.0.0 1.1.1.1 130 0x80000014 0x00ec09
• Bottom line: Should see networks in other areas and the ABR advertising that
route.
• Rick’s reminder: LSA 3 -> “networks sent by the A B R” 97
LSA 3 – Summary Net Link States (ABR)
R1# show ip ospf database
Summary Net Link States (Area 1) <- Per Area
Link ID ADV Router Age Seq# Checksum
10.0.0.0 1.1.1.1 255 0x8000000c 0x00ec09
9.0.0.0 1.1.1.1 255 0x8000000d 0x00ec09
192.168.2.0 1.1.1.1 255 0x8000000e 0x00ec09
11.0.0.0 1.1.1.1 255 0x8000000f 0x00ec09
172.16.10.0 1.1.1.1 255 0x80000010 0x00ec09
172.16.11.0 1.1.1.1 255 0x80000011 0x00ec09
99.0.0.0 1.1.1.1 255 0x80000012 0x00ec09
99.0.0.4 1.1.1.1 255 0x80000013 0x00ec09
99.1.0.0 1.1.1.1 255 0x80000014 0x00ec09
• ABR will show all routes it is injecting into the other area including:
• LSA 3s from other areas
• LSA 1s from it’s adjacent area it is injecting into this area
• Bottom line: Should see networks in other areas and the ABR advertising that
route.
• Rick’s reminder: LSA 3 -> “networks sent by the A B R”
98
1 2 3
LSA 3 – Summary Net Link States
R2# show ip route
99
LSA 1’s
LSA 3’s
LSA 3’s
100
LSA 4 – ASBR
Summary Link
States
Exceptions
Not flooded to Stub and Totally Stubby networks.
More on this later
101
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
102
LSA 4 – ASBR Summary Link States
103
LSA 4 – ASBR Summary Link States (ABR)
ABR
LSA 4
106
LSA 5 - AS External
Link States
Exceptions
Not flooded to Stub and Totally Stubby networks.
More on this later
107
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
108
Added ->
ASBR
R2 (ASBR)
router ospf 1
redistribute static
ip route 57.0.0.0 255.0.0.0 ser 0/3
109
R2 (ASBR)
router ospf 1
redistribute static
ip route 57.0.0.0 255.0.0.0 ser 0/3
LSA 5
LSA 5’s
LSA 5
• Designated by “E2”
• Notice that the cost is 20 for all redistributed 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.
• Cost of 1 for the redistributed route.
112
LSA 5 - AS External Link States
R33# show ip ospf database
113
LSA 5 - AS External Link States
114
Stub Areas
Stub Areas
117
Stub Areas
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” 118
Stub Areas –
Additional Commands
R3 (ABR)
router ospf 1
area 51 stub << Command: area area stub
R100 (INTERNAL)
router ospf 1
area 51 stub << Command: area area stub
R200 (INTERNAL)
router ospf 1
area 51 stub << Command: area area stub
Default
route to
ABR
injected We only see routes in
our area, other areas,
• Sent by ABR: LSA 3s (Inter-Area routes) and a default route.
• Blocked: No external routes.
• LSA 4s (reachability to ASBR)
• LSA 5s (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.
120
• Changes in External routes no longer affect Stub Area routing tables.
Stub Areas
C
internal stub routers.
99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
99.0.0.0/30 is directly connected, Serial0/0
O• This default route came from the ASBR.
99.0.0.4/30 [110/65] via 99.0.0.2, 00:00:46, Serial0/0
O 99.1.0.0/16 [110/65] via 99.0.0.2, 00:00:46, Serial0/0
• In other words the ABR will inject the default route into the stub
172.16.0.0/24 is subnetted, 4 subnets
O IA area whether or not it has a default route in its routing table.
172.16.1.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3
O IA 172.16.2.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3
C 172.16.10.0 is directly connected, FastEthernet0/0
C 172.16.11.0 is directly connected, FastEthernet0/1
172.30.0.0/24 is subnetted, 1 subnets
O IA 172.30.1.0 [110/1628] via 11.0.0.1, 00:00:01, Serial0/3
O 192.168.2.0/24 [110/1563] via 11.0.0.1, 00:00:41, Serial0/3
O*E2 0.0.0.0/0 [110/1] via 11.0.0.1, 00:00:41, Serial0/3
123
Totally Stubby Areas
Totally Stubby
Area
125
Totally Stubby
Areas
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” 126
Totally Stubby
Areas
R1: (ABR)
router ospf 1
area 1 stub no-summary
^^ Command: area area stub no-summary
R22 and R33: (INTERNAL ROUTERS)
router ospf 1
area 1 stub
^^ Command: area area stub
127
LSA 1s still
sent within
Totally each area.
Stubby Area
Stub Area
Blocked LSA 3 LSA 3
Blocked LSA 4 LSA 4 Blocked
Blocked LSA 5 LSA 5 Blocked
Default
route to Default
ABR route to
We only see routes in our area
injected and a default route.
ABR
No inter-area or external routes. injected We only see routes in
our area, other areas,
• Blocked: and a default route.
• LSA 3s (Inter-Area routes) No external routes.
• LSA 4s (reachability to ASBR)
• LSA 5s (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.
128
• Changes in other areas and external routes no longer affect Stub Area routing tables.
Totally Stubby
Areas
• 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)
129
Totally Stubby Areas
131
LSA 1s – Router LSAs
LSA 1’s
LSA 1’s
LSA 1’s
LSA 2’s
LSA 2’s
LSA 3’s
LSA 3’s
LSA 1’s
LSA 4
LSA 5
LSA 5’s
LSA 5
Default
route to
ABR
injected We only see routes in
our area, other areas,
• Sent by ABR: LSA 3s (Inter-Area routes) and a default route.
• Blocked: No external routes.
• LSA 4s (reachability to ASBR)
• LSA 5s (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.
137
• Changes in External routes no longer affect Stub Area routing tables.
Totally Stubby Area LSA 1s still
sent within
Totally each area.
Stubby Area
Stub Area
Blocked LSA 3 LSA 3
Blocked LSA 4 LSA 4 Blocked
Blocked LSA 5 LSA 5 Blocked
Default
route to Default
ABR route to
We only see routes in our area
injected and a default route.
ABR
No inter-area or external routes. injected We only see routes in
our area, other areas,
• Blocked: and a default route.
• LSA 3s (Inter-Area routes) No external routes.
• LSA 4s (reachability to ASBR)
• LSA 5s (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.
138
• Changes in other areas and external routes no longer affect Stub Area routing tables.
Multi Area OSPF – Part 1 of 2