0% found this document useful (0 votes)
172 views172 pages

Cis 185 CCNP Route Chapter 3: Implementing OSPF: Rick Graziani Cabrillo College Graziani@cabrillo - Edu Spring 2015

This document provides an overview of implementing OSPF routing protocols. It discusses link state routing protocols and how OSPF uses link state advertisements to build a shortest path first tree and populate the routing table. It also covers establishing OSPF neighbor adjacencies using hello packets, configuring OSPF processes and router IDs, and the different types of OSPF packets.

Uploaded by

Hung Phan Thanh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
172 views172 pages

Cis 185 CCNP Route Chapter 3: Implementing OSPF: Rick Graziani Cabrillo College Graziani@cabrillo - Edu Spring 2015

This document provides an overview of implementing OSPF routing protocols. It discusses link state routing protocols and how OSPF uses link state advertisements to build a shortest path first tree and populate the routing table. It also covers establishing OSPF neighbor adjacencies using hello packets, configuring OSPF processes and router IDs, and the different types of OSPF packets.

Uploaded by

Hung Phan Thanh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 172

CIS 185 CCNP ROUTE

Chapter 3: Implementing OSPF

Rick Graziani
Cabrillo College
[email protected]

Spring 2015
Basic OSPF
Types of Routing Protocols
Exterior
Gateway
Interior Gateway Protocols Protocols
Distance Vector Link State Path Vector
Distance Vector Routing Link State Routing Path Vector
Protocols Protocols
IPv4 RIPv2 EIGRP OSPFv2 IS-IS BGP-4
RIPng EIGRP for OSPFv3 * IS-IS for BGP-4 for
IPv6 IPv6 IPv6 IPv6 or
MP-BGP
* OSPFv3 supports routing both IPv4 and IPv6.

3
Link 2
• Network: 10.2.0.0/16
Link State Concepts •

IP address:
Type of network:
10.2.0.1
Serial
• Cost of that link: 20
Link 1 • Neighbors: R2
• Network: 10.1.0.0/16
• IP address: 10.1.0.1 Link 3
• Type of network: Ethernet • Network: 10.3.0.0/16
• Cost of that link: 2 • IP address: 10.3.0.1
• Neighbors: None • Type of network: Serial
• Cost of that link: 5
• Neighbors: R3
 Link states - Information about the state of a router’s links
Link 4
 This information includes interface’s: • Network: 10.4.0.0/16
 IP address/mask • IP address: 10.4.0.1
 Type of network • Type of network: Serial
 Ethernet (broadcast) or serial point-to-point link • Cost of that link: 20
• Neighbors: R4
 Cost of that link
 Any neighbor routers on that link

4
Link State Concepts

5
R1 Processes the LSPs from R2
Red: New
information
for tree.

 The SPF algorithm begins by processing the following LSP information from R2:
 Connected to neighbor R1 on network 10.2.0.0/16, cost of 20
 Connected to neighbor R5 on network 10.9.0.0/16, cost of 10
 Has a network 10.5.0.0/16, cost of 2 6
SPF Tree

 R1 has now constructed the


complete SPF tree.

7
Network 10.5.0.0/16
Determining the via R2 Serial 0/0/0 2
Shortest Path at a cost of 22
20

8
Generating a Routing Table from the SPF Tree
SPF Tree for R1

 These paths listed previously can now be added to the routing table.
 The routing table will also include
 Directly connected networks
 Routes from any other sources, such as static routes.
 Packets will now be forwarded according to these entries in the routing
table.
9
OSPF packet types

10
Hello 10.6.0.1 10.5.0.1
Establishing
Hello 10.6.0.1
Adjacencies Down
Init
2-way Down
Init
2-way

Hello 10.5.0.1

Hello 10.5.0.1 10.6.0.1

Down State - Init State – Two Way State


 Down State - OSPF routers send Hello packets at regular intervals (10 sec.) to establish
neighbors.
 When a router (sends or) receives its first Hello packet, it enters the init state.
 Hello packet contains a list of known neighbors.
 When the router sends a Hello packet (unicast reply) to the neighbor with its RouterID and
the neighbor sends a Hello packet packet back with that Router ID, the router’s interface
will transition to the two-way state.
 Now, the router is ready to take the relationship to the next level. 11
12
OSPF packet types

Partial list: More later!

13
Basic OSPF Configuration
OSPF Reference Topology

15
Neighbor Hello, I’m
Establishment, R2
OSPF Hello and
Dead Intervals Hello, I’m
Hello, I’m
R3
R1
More later

 Before an OSPF router can flood its link states, must discover neighbors.
 Before two routers can form an OSPF neighbor adjacency, they must agree on
three values:
 Hello interval
 Dead interval
 Network type
 Both the interfaces must be part of the same network, including having the same
subnet mask. 16
Hello Intervals Hello, I’m
R2

Hello, I’m
Hello, I’m
R3
R1

 By default, OSPF Hello packets are sent:


 10 seconds on multiaccess and point-to-point segments
 30 seconds on nonbroadcast multiaccess (NBMA) segments (Frame
Relay, X.25, ATM).
 Sent to ALLSPFRouters at 224.0.0.5
17
Dead Hello, I’m
Intervals R2

Hello, I’m
Hello, I’m
R3
R1

 Dead interval - Period, expressed in seconds, that the router will wait to receive a
Hello packet before declaring the neighbor “down.”
 Cisco uses a default of four times the Hello interval.
 40 seconds - Multiaccess and point-to-point segments.
 120 seconds - NBMA networks.
 Dead interval expires
 OSPF removes that neighbor from its link-state database.
 Floods the link-state information about the “down” neighbor out all OSPF-enabled
interfaces. 18
The router ospf Command
R1(config)# router ospf 10
R1(config-router)#

 The process-id
 Between 1 and 65,535
 Chosen by the network administrator.
 Locally significant:
 Does not have to match other OSPF routers.
 This differs from EIGRP.
 We are using the same process ID simply for consistency.

19
OSPF Router ID

 A router is known to OSPF by the OSPF router ID number.


 LSDBs use the OSPF router ID to differentiate one router from
the next.
 By default, the router ID is the highest IP address on an active
interface at the moment of OSPF process startup.
 However, for stability reason, it is recommended that the router-
id command or a loopback interface be configured. 20
OSPF Router ID What’s my
Router ID?

What’s my
Router ID?

What’s my
Router ID?
 Cisco routers derive the router ID based on three criteria and with the following
precedence:
1. IP address configured with the OSPF router-id command.
2. Highest IP address of any of its loopback interfaces.
3. Highest active IP address of any of its physical interfaces.
 The interface does not need to be enabled for OSPF, i.e. it does not need to
be included in one of the OSPF network commands.
21
Define the Router ID
 Assign a specific router ID to the router.
Router(config)# router ospf process-id
Router(config-router)# router-id ip-address

 Any unique arbitrary 32-bit value in an IP address format (dotted


decimal) can be used.
 If this command is used on an OSPF process that is already active,
then the new router ID takes effect:
 After the next router reload.
 After a manual restarting of the OSPF process using the clear
ip ospf process privileged EXEC command.

Router# clear ip ospf process


Define the Router ID

R1(config)# router ospf 10


R1(config-router)# router-id 1.1.1.1
R1(config-router)# end
R1#
*Mar 25 19:50:36.595: %SYS-5-CONFIG_I: Configured from
console by console
R1# 23
Define the Router ID

R1# show ip protocols


*** IP Routing is NSF aware ***

Routing Protocol is "ospf 10"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 1.1.1.1
Number of areas in this router is 0. 0 normal 0 stub 0 nssa
Maximum path: 4
<Output omitted> 24
Changing the OSPF Router-ID
R1(config)# router ospf 10
R1(config-router)# router-id 1.1.1.1
% OSPF: Reload or use "clear ip ospf process" command, for this to take
effect
R1(config-router)# end
R1#
R1# clear ip ospf process
Reset ALL OSPF processes? [no]: y
R1#
*Mar 25 19:46:22.423: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on Serial0/0/1
from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 25 19:46:22.423: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/0
from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 25 19:46:22.475: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on Serial0/0/1
from LOADING to FULL, Loading Done
*Mar 25 19:46:22.475: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/0
from LOADING to FULL, Loading Done
R1#
R1# show ip protocols | section Router ID
Router ID 1.1.1.1
R1# 25
The network Command
Router(config-router)# network network-address wildcard-mask area area-id

 The network command (same function as when used with other IGP routing
protocols)
 Any interfaces on a router that match the network address in the
network command will be enabled to send and receive OSPF packets.
 This network (or subnet) will be included in OSPF routing updates.

 Requires the wildcard mask.


 Used to specify the interface or range of interfaces that will be enabled
for OSPF.

26
The network Command
Router(config-router)# network network-address wildcard-mask area area-id

255.255.255.255
- 255.255.255.240 Subtract the subnet mask
---------------
0. 0. 0. 15 Wildcard mask

 The wildcard mask can be configured as the inverse of a subnet mask.

 Note:
 Like EIGRP, some Cisco IOS software versions allow you to simply
enter the subnet mask instead of the wildcard mask.
 The Cisco IOS software then converts the subnet mask to the wildcard
mask format. 27
The network Command
Router(config-router)# network network-address wildcard-mask area area-id

 The area area-id refers to the OSPF area.


 A group of routers that share link-state information.
 Identical link-state databases.
 In this chapter, we configure all the OSPF routers within a single
area.
 This is known as single-area OSPF.
 The network commands must be configured with the same area ID
on all routers.
 Good practice to use an area ID of 0 with single-area OSPF.

28
Advertising
OSPF Networks

R1(config)# router ospf 10


R1(config-router)# route-id 1.1.1.1
R1(config-router)# network 172.16.1.0 0.0.0.255 area 0
R1(config-router)# network 172.16.3.0 0.0.0.3 area 0
R1(config-router)# network 192.168.10.4 0.0.0.3 area 0
R1(config-router)# end
R1#
29
Optional Method:
Identify OSPF
Networks
• No network command needed.
• Because this command is configured
explicitly for the interface, it takes
precedence over the network area
command.
R1(config)# interface gig 0/0
R1(config-router)# ip ospf 10 area 0
R1(config-router)# exit
R1(config)# interface serial 0/0/0
R1(config-router)# ip ospf 10 area 0
R1(config-router)# exit
R1(config)# interface serial 0/0/1
R1(config-router)# ip ospf 10 area 0
30
R1(config-router)# end
Fine Tuning OSPF Interfaces
Modifying OSPF Intervals
Router(config-if)# ip ospf hello-interval seconds
Router(config-if)# ip ospf dead-interval seconds

 It might be desirable to change the OSPF timers so that routers


will detect network failures in less time.
 Before changing any timer default values, be sure to give it careful
consideration and understand the effects of making those changes.
 The OSPF Hello and Dead intervals are configurable on a per-
interface basis.
 NOTE:
 OSPF intervals must match or a neighbor adjacency does not
occur.
 EIGRP hello and hold timers do NOT have to match. 32
Verifying the OSPF Intervals on R1

R1# show ip ospf interface serial 0/0/0


Serial0/0/0 is up, line protocol is up
Internet Address 172.16.3.1/30, Area 0, Attached via Network Statement
Process ID 10, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 64
Topology-MTID Cost Disabled Shutdown Topology Name
0 64 no no Base
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40 33
Changing the OSPF Hello = 10 sec
Intervals on R1 Dead = 40 sec
 Remember, OSPF Hello
Hello = 5 sec
and Dead intervals Dead = 20 sec
must be equivalent
between neighbors.
 Loss of adjacency with
R2 but R3 is still a
R1(config)#
neighbor. interface Serial 0/0/0
R1(config-if)# ip ospf hello-interval 5
R1(config-if)# ip ospf dead-interval 20
R1(config-if)# end
R1#
*Apr 7 17:28:21.529: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on
Serial0/0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
R1#
R1# show ip ospf neighbor 34
Changing the Hello = 5 sec
Dead = 20 sec
OSPF Intervals
on R2 Hello = 5 sec
Dead = 20 sec
 OSPF automatically
adjusts Dead timer to 4
times the Hello timer.
R2(config)# interface serial 0/0/0
R2(config-if)# ip ospf hello-interval 5
R2(config-if)#
*Apr 7 17:41:49.001: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on
Serial0/0/0 from LOADING to FULL, Loading Done
R2(config-if)# end
R2#
R2# show ip ospf neighbor
35
Neighbor ID Pri State Dead Time Address Interface
Passive Interfaces
Passive Interface

 By default, OSPF messages are forwarded out all OSPF-enabled


interfaces.

37
Configuring Passive
Interfaces on R1 & R2

R1(config)# router ospf 10


R1(config-router)# passive-interface GigabitEthernet 0/0
R1(config-router)# end
R1#
R2(config)# router ospf 10
R2(config-router)# passive-interface GigabitEthernet 0/0
R2(config-router)# end
R2#
38
Verifying Passive
Interfaces on R1 and
R2

R1# show ip protocols | section Passive


Passive Interface(s):
GigabitEthernet0/0
R1#

R2# show ip protocols | section Passive


Passive Interface(s):
GigabitEthernet0/0
R2# 39
Configuring Passive
Interfaces on R3
R3(config)# router ospf 10
R3(config-router)# passive-interface default
R3(config-router)#
*Apr 7 16:22:58.090: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/0
from FULL to DOWN, Neighbor Down: Interface down or detached
*Apr 7 16:22:58.090: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/1
from FULL to DOWN, Neighbor Down: Interface down or detached
R3(config-router)#
R3(config-router)# no passive-interface serial 0/0/0
*Apr 7 16:23:18.590: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/0
from LOADING to FULL, Loading Done
R3(config-router)#
R3(config-router)# no passive-interface serial 0/0/1
R3(config-router)#
*Apr 7 16:23:24.462: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/1
from LOADING to FULL, Loading Done 40
DR/BDR Multiaccess Networks
Solution: Designated Router

 OSPF elects a Designated Router (DR) to be the collection and distribution


point for LSAs sent and received.
 A Backup Designated Router (BDR) is also elected in case the DR fails.
 All other routers become DROthers. 42
224.0.0.5

224.0.0.6

DROther DROther DROther DROther

DROther DROther

 DROthers only form full adjacencies with the DR and BDR in the network.
 send their LSAs to the DR and BDR, multicast address 224.0.0.6 (ALLDRouters)
 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. 43
DR/BDR Election

BDR

DROther DR
 The following criteria are applied:
1. DR: Router with the highest OSPF interface priority.
2. BDR: Router with the second highest OSPF interface priority.
3. If OSPF interface priorities are equal, the highest router ID is used to break the
tie.
 Default OSPF interface priority is 1.
 Current configuration, the OSPF router ID is used to elect the DR and BDR. 44
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>

45
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.

46
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.
47
 After doing a shutdown and a
Highest priority wins no shutdown on the Fast
Ethernet 0/0 interfaces of all
Pri = 100
three routers, we see the result
of the change of OSPF
interface priorities.

Pri = 200

RouterA(config)# interface fastethernet 0/0


RouterA(config-if)# ip ospf priority 200

RouterB(config)# interface fastethernet 0/0


RouterB(config-if)# ip ospf priority 100
48
Clarifications regarding DR/BDR

 Hello packets are still exchanged between all routers on a multi-access


segment (DR, BDR, DROthers,….) to maintain neighbor adjacencies.
 OSPF LSA packets (coming) are packets which are sent from the
BDR/DROthers to the DR, and then from the DR to the BDR/DROthers.
(The reason for a DR/BDR.)
 Normal routing of IP packets still takes the lowest cost route, which might
be between two DROthers. 49
OSPF Metric (Cost)
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 51
OSPF Metric

Cisco IOS Cost for OSPF = 108/bandwidth in bps


 Cisco IOS software uses the cumulative bandwidths of the outgoing
interfaces from the router to the destination network as the cost value.
 108 is known as the reference bandwidth
 So that interfaces with the higher bandwidth values will have a lower
52
calculated cost.
Accommodating 10Gig Interfaces

In Mb/s

R1(config-router)# auto-cost reference-bandwidth 10000


53
Adjusting to Reference Bandwidth for Gig
Cost = 1

Cost = 647

R1(config)# router ospf 10


R1(config-router)# auto-cost reference-bandwidth 1000
R1(config-router)#
R2(config)# router ospf 10
R2(config-router)# auto-cost reference-bandwidth 1000
R2(config-router)#
R3(config)# router ospf 10
R3(config-router)# auto-cost reference-bandwidth 1000 54
Modifying the Cost of
the Link
 Both sides of the link should be
configured to have the same
value.

R1(config)# inter serial 0/0/1


R2(config-if)# bandwidth 64

R2(config-if)# inter serial 0/0/1


R2(config-if)# bandwidth 1024

R3(config)# inter serial 0/0/1


R2(config-if)# bandwidth 1024
R3(config-if)# inter serial 0/0/0 55
The ip ospf cost Command
R1(config)# inter serial 0/0/1
R1(config-if)# bandwidth 64
R1(config-if)# end 1,000,000,000/64,000 = 15625
R1# show ip ospf interface serial 0/0/0
Serial0/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: 15625
<output omitted>
R1(config)# interface serial 0/0/1
R1(config-if)# ip ospf cost 15625

 An alternative method to using the bandwidth command is to use


the ip ospf cost command, which allows you to directly specify
the cost of an interface.
 This will not change the output of the show ip ospf interface
56
Multi-Area OSPF
Multi-Area OSPF

 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).
 Some operations are restricted within an area:
 Flooding of LSAs
 Recalculating the database
 Re-running the SPF algorithm 58
Multi-Area OSPF

59
Multi-Area OSPF

Internal: Routers with all their interfaces within the same area
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. 60
Single Area OSPF
 In single area OSPF, all routers are in area 0.
 Area 0 is also called the backbone area.

 Single area OSPF is useful in smaller networks with few routers.


OSPF Area 0

R1 R2

61
Issues With a Large OSPF Area

 Large routing table:


 OSPF does not automatically summarize routes and therefore
routing tables can become very large, depending on the size of
the network.

R1 R2

My routing table is too


big and I am running
low on memory.
62
Issues With a Large OSPF Area
 Large link-state database (LSDB):
 The LSDB maintain an entry for every network in the area, even
if not every route is selected for the routing table.
 Too many routers in one area would make the LSDBs very large
and increase the load on the CPU.

R1 R2

I’m receiving too


many LSAs.
63
Issues With a Large OSPF Area

 Frequent SPF algorithm calculations:


 In a large network, changes are inevitable, so the routers spend
many CPU cycles recalculating the SPF algorithm and
updating the routing table.

R1 R2

My SPF algorithm is
running too often for me to
route properly.
64
Multi-Area OSPF
 Multiarea OSPF uses a two-layer area hierarchy using a
backbone area interconnecting regular areas.
 Useful in larger network deployments to reduce processing
and memory overhead.
Area 1 Area 0 Area 51

R1 R2

 All regular areas must interconnect to the backbone area (area 0).
 Interconnecting routers are called Area Border Routers (ABR).
65
Backbone (Transit) Area
 OSPF area whose primary function is the fast and efficient
movement of IP packets.
 Backbone areas interconnect with other OSPF area types.
 Generally, end users are not found within a backbone area.

Area 1 Area 0 Area 51

R1 R2

 The backbone area is also called OSPF area 0.


 Hierarchical networking defines area 0 as the core to which all
66
Regular or Normal Areas

 Connects users and resources.


 Areas are usually set up along functional or geographical groupings.

Area 1 Area 0 Area 51

R1 R2

 By default, all traffic from other areas must cross a transit area, area 0.
 A regular area does not allow traffic from another area to use its links
to reach other areas.

67
Multiarea OSPF Advantages
Area 1 Area 0 Area 51

R1 R2

 Smaller routing tables:


 Fewer routing table entries because network addresses can be summarized
between areas.
 Route summarization is not enabled by default.
 Reduced link-state update overhead:
 Minimizes processing and memory requirements.
 Reduced frequency of SPF calculations:
 Localizes the impact of a topology change within an area.
 For instance, it minimizes routing update impact because LSA flooding stops at
the area boundary.
68
Topology Change Impacts Local Area Only
 The ABR (R2) isolates the fault to area 51 only.
 Link failure affects the local area only (area 51)

Only R2 and routers in area 51 exchange LSAs


and run the SPF algorithm.
Area 1 Area 0 Area 51

R1 R2

Link fails
 Routers in areas 0 and 1 do not need the run the SPF algorithm.
69
Cisco OSPF Implementation Guidelines

Area 1 Area 0 Area 51

R1 R2

 The optimal number of routers per area varies based on factors


such as network stability.
 However, Cisco guidelines recommend:
 A router should not be in more than three areas.
 An area should have no more than 50 routers.
 Any single router should not have more than 60 neighbors.
70
Internal Routers

 This is a router that has all of its interfaces in the same area.

Internet

Area 1 Area 0 Area 51

R1 R2

 All internal routers in an area have identical LSDBs.

71
Backbone Routers
 Backbone router have at least one interface in Area 0.
 This is a router with an interface(s) in the backbone area.

Internet

Area 1 Area 0 Area 51

R1 R2

72
Area Border Router (ABR)

 This is a router that has interfaces attached to multiple areas.

Internet

Area 1 Area 0 Area 51

R1 R2

 ABRs:
 Maintain separate LSDBs for each area it is connected to.
 Are exit points for the area.
 Distribute the routing information into the backbone and the
backbone routers then forward the information to the other ABRs. 73
Autonomous System Boundary Router (ASBR)
 This is a router that has at least one interface attached to an
external non-OSPF network.
Internet

Area 1 Area 0 Area 51

R1 R2

 An ASBR can redistribute non-OSPF network information into


and out of the OSPF network.

74
Configuring Basic Multi-Area
OSPF
OSPF Multiarea OSPF Topology
10.2.1.0/24
Area 0
G0/0 .1

R2
.2 S0/0/0 S0/0/1 .5
192.168.10.0/30 192.168.10.4/30

.1 S0/0/0 S0/0/1 .6

R1 R3
.1 G0/0 G0/1 .1 .1 G0/0 G0/1 .1
10.1.1.0/24 10.1.2.0/24 192.168.1.0/24 192.168.2.0/24
Area 1 Area 2

76
Configuring Multiarea OSPF on R1

R1(config)# router ospf 10


R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.1.1.1 0.0.0.0 area 1
R1(config-router)# network 10.1.2.1 0.0.0.0 area 1
R1(config-router)# network 192.168.10.1 0.0.0.0 area 0
R1(config-router)# end
R1#

77
Configuring Multiarea OSPF on R2

R2(config)# router ospf 10


R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 192.168.10.0 0.0.0.7 area 0
R2(config-router)# network 10.2.1.0 0.0.0.255 area 0
R2(config-router)# end
*Apr 19 18:11:04.029: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on
Serial0/0/0 from LOADING to FULL, Loading Done
R2#

78
Configuring Multiarea OSPF on R3

R3(config)# router ospf 10


R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 192.168.10.6 0.0.0.3 area 0
R3(config-router)# network 192.168.1.1 0.0.0.0 area 2
R3(config-router)# network 192.168.2.1 0.0.0.0 area 2
R3(config-router)# end
*Apr 19 18:12:55.881: %OSPF-5-ADJCHG: Process 10, Nbr
2.2.2.2 on Serial0/0/1 from LOADING to FULL, Loading Done
R3# 79
OSPFv3 Topology
Area 0 2001:DB8:CAFE:2::/64

G0/0 :1
LLA: FE80::2
R2 :1 S0/0/1
:2 S0/0/0
2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

:1 S0/0/0 :2 S0/0/1
LLA: FE80::1 LLA: FE80::3
Area 1 R1 R3
Area 2 G0/0 :1
G0/0 :1

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64

80
Configuring Multiarea OSPFv3 on R1

*Apr 24 14:18:10.463:
%OSPFv3-4-NORTRID: Process
OSPFv3-10-IPv6 could not
pick a router-id, please
configure manually

R1(config)# ipv6 router ospf 10


R1(config-rtr)# router-id 1.1.1.1
R1(config-rtr)# exit
R1(config)# interface GigabitEthernet 0/0
R1(config-if)# ipv6 ospf 10 area 1
R1(config-if)# exit
R1(config)# interface Serial0/0/0
R1(config-if)# ipv6 ospf 10 area 0
81
Configuring Multiarea OSPFv3 on R2

R2(config)# ipv6 router ospf 10


R2(config-rtr)# router-id 2.2.2.2
R2(config-rtr)# exit
R2(config)# interface g0/0
R2(config-if)# ipv6 ospf 10 area 0
R2(config-if)# interface s0/0/0
R2(config-if)# ipv6 ospf 10 area 0
R2(config-if)# interface s0/0/1
R2(config-if)# ipv6 ospf 10 area 0 82
Configuring Multiarea OSPFv3 on R3

R3(config)# ipv6 router ospf 10


R3(config-rtr)# router-id 3.3.3.3
R3(config-rtr)# exit
R3(config)# interface g0/0
R3(config-if)# ipv6 ospf 10 area 2
R3(config-if)# interface s0/0/1
R3(config-if)# ipv6 ospf 10 area 0
R3(config-if)# end
83
Configuring OSPF Route
Summarization
Why Summarize?

 Summarization helps keep routing tables small.


 Involves consolidating multiple routes into a single advertisement,
which can then be propagated into the backbone area.
 Summarized into type 3 LSAs, and sent to other areas.
 If area 1 had 30 networks to advertise, then 30 type 3 LSAs
would be forwarded into the backbone.
 With route summarization, the ABR consolidates the 30
networks into one or a few advertisements.
85
86

eedd
iizz AA
aarr SS
mm LL
mm ee33
SSuu yypp
TT
eedd
iizz AA
aarr SS
mm LL
mm ee33
SSuu yypp
TT
Summarized
Summarized Summarized
Summarized
Type
Type 33 LSA
LSA Type
Type 33 LSA
LSA
Propagating a Summary Route

iz A
a S
ed
m 3L
r
e
Su yp
T
m
OSPF Route Summarization Topology
10.2.1.0/24
Area 0
G0/0 .1 209.165.200.224/27
.225 .226 EIGRP
R2 Lo0
(172.16.0.0 /24
.2 S0/0/0 S0/0/1 .5 – 172.16.31.0/24)
192.168.10.0/30 192.168.10.4/30

.1 S0/0/0 S0/0/1 .6

R1 R3
.1 G0/0 G0/1 .1 .1 G0/0 G0/1 .1
10.1.1.0/24 10.1.2.0/24 192.168.1.0/24 192.168.2.0/24
Area 1 Area 2

87
Interarea Route Summarization
10.2.1.0/24
Area 0
G0/0 .1 209.165.200.224/27
.225 .226 EIGRP
S
y
an SA R2 Lo0
ro um
ut m
(172.16.0.0 /24
m L .2 S0/0/0 S0/0/1 .5 es a – 172.16.31.0/24)
ize one
192.168.10.0/30 in rize
192.168.10.4/30
r to
a
m nto on ma
m i e ny
LS
Su tes A
u
ro .1 S0/0/0 S0/0/1 .6

R1 R3
.1 G0/0 G0/1 .1 .1 G0/0 G0/1 .1
10.1.1.0/24 10.1.2.0/24 192.168.1.0/24 192.168.2.0/24
Area 1 Area 2

88
External Route Summarization
10.2.1.0/24
Area 0
G0/0 .1 209.165.200.224/27
l .225 .226 EIGRP
r na A R2 Su (172.16.0.0 /24
te S Lo0 rou mm
ex e L .2 S0/0/0 S0/0/1 .5 tes ari – 172.16.31.0/24)
ze n
192.168.10.0/30 ze
in192.168.10.4/30
ari to o to ext
on e
mm s in e rna
Su ute L
SA l
ro .1 S0/0/0 S0/0/1 .6

R1 R3
.1 G0/0 G0/1 .1 .1 G0/0 G0/1 .1
10.1.1.0/24 10.1.2.0/24 192.168.1.0/24 192.168.2.0/24
Area 1 Area 2

89
R1 Routing Table Before Summarization

R1# show ip route ospf | begin Gateway


Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks


O 10.2.1.0/24 [110/648] via 192.168.10.2, 00:00:49, Serial0/0/0
O IA 192.168.1.0/24 [110/1295] via 192.168.10.2, 00:00:49, Serial0/0/0
O IA 192.168.2.0/24 [110/1295] via 192.168.10.2, 00:00:49, Serial0/0/0
192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.10.4/30 [110/1294] via 192.168.10.2, 00:00:49, Serial0/0/0
R1#
90
R3 Routing Table Before Summarization

R3# show ip route ospf | begin Gateway


Gateway of last resort is not set

10.0.0.0/24 is subnetted, 3 subnets


O IA 10.1.1.0 [110/1295] via 192.168.10.5, 00:27:14, Serial0/0/1
O IA 10.1.2.0 [110/1295] via 192.168.10.5, 00:27:14, Serial0/0/1
O 10.2.1.0 [110/648] via 192.168.10.5, 00:27:57, Serial0/0/1
192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.10.0/30 [110/1294] via 192.168.10.5, 00:27:57, Serial0/0/1
R3#
91
3 Steps to Calculating the Summary Route
1. List the networks in binary format.
2. Count the number of far left matching bits to determine the mask for the summary
route.
3. Copy the matching bits and then add zero bits to determine the summarized network
address.
Some bits are
Step 1 Step 2 different
10.1.1.0 00001010.00000001.00000001.00000000
10.1.2.0 00001010.00000001.00000010.00000000

First 22 bits match


Step 3

10.1.0.0 00001010.00000001.00000000.00000000
255.255.252.0 11111111.11111111.11111100.00000000

/22
10.1.0.0/22 or 10.1.0.0 255.255.252.000 92
Summarizing Area 1 Routes on R1
te
rou
y
ar 2
m 0/2
m .
su .1.0
d
n 10
Se

R1(config)# router ospf 10


R1(config-router)# area 1 range 10.1.0.0 255.255.252.0
R1(config-router)#

93
R1 Routing Table After Summarization

R1# show ip route ospf | begin Gateway


Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks


O 10.1.0.0/22 is a summary, 00:00:09, Null0
O 10.2.1.0/24 [110/648] via 192.168.10.2, 00:00:09, Serial0/0/0
O IA 192.168.1.0/24 [110/1295] via 192.168.10.2, 00:00:09, Serial0/0/0
O IA 192.168.2.0/24 [110/1295] via 192.168.10.2, 00:00:09, Serial0/0/0
192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.10.4/30 [110/1294] via 192.168.10.2, 00:00:09, Serial0/0/0
R1# 94
R3 Routing Table After Summarization

R3# show ip route ospf | begin Gateway


Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


O IA 10.1.0.0/22 [110/1295] via 192.168.10.5, 00:00:06, Serial0/0/1
O 10.2.1.0/24 [110/648] via 192.168.10.5, 00:29:23, Serial0/0/1
192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.10.0/30 [110/1294] via 192.168.10.5, 00:29:23, Serial0/0/1
R3#

95
Summarizing Area 2 Routes on R3

Se
nd
19 sum
2.
16 ma
8. ry
0.
0 r ou
/2 te
2

R3(config)# router ospf 10


R3(config-router)# area 2 range 192.168.0.0 255.255.252.0
R3(config-router)# end
R3# show ip route ospf

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


O IA 10.1.0.0/22 [110/1295] via 192.168.10.5, 00:01:07, Serial0/0/1
O 10.2.1.0/24 [110/648] via 192.168.10.5, 00:01:07, Serial0/0/1
O 192.168.0.0/22 is a summary, 00:01:07, Null0
192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.10.0/30 [110/1294] via 192.168.10.5, 00:01:07, Serial0/0/1 96
Verifying OSPF Status on R1
R1# show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 10"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 1.1.1.1
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.1.1 0.0.0.0 area 1
10.1.2.1 0.0.0.0 area 1
192.168.10.1 0.0.0.0 area 0
Routing Information Sources:
Gateway Distance Last Update
3.3.3.3 110 02:20:36
2.2.2.2 110 02:20:39
Distance: (default is 110)
R1# 97
Verifying OSPF Enabled Interface on R1

R1# show ip ospf interface brief


Interface PID Area IP Address/Mask Cost State Nbrs F/C
Se0/0/0 10 0 192.168.10.1/30 64 P2P 1/1
Gi0/1 10 1 10.1.2.1/24 1 DR 0/0
Gi0/0 10 1 10.1.1.1/24 1 DR 0/0
R1#

98
Verifying OSPF Routes on R1

R1# show ip route ospf | begin Gateway


Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks


O 10.2.1.0/24 [110/648] via 192.168.10.2, 00:26:03, Serial0/0/0
O IA 192.168.1.0/24 [110/1295] via 192.168.10.2, 00:26:03, Serial0/0/0
O IA 192.168.2.0/24 [110/1295] via 192.168.10.2, 00:26:03, Serial0/0/0
192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.10.4/30 [110/1294] via 192.168.10.2, 00:26:03, Serial0/0/0
R1#
99
LSAs
OSPF packet types

101
Part I - LSAs using all normal areas
Multi Area OSPF
What are the router Backbone
types? Area Normal Areas

ASBR

Internal ABR ABR

Internal
Internal
Internal

102
Part I - LSAs using all normal areas
Routes Received on all OSPF Routers

Overview of Normal Areas – This will all be explained!

Receives all routes from within A.S.:


 Within the local area – LSA 1 and LSA 2
 From other areas (Inter-Area) – LSA 3, LSA 4, LSA 5
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 103
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
R22 network 172.16.10.0 0.0.0.255 area 51
router ospf 1 network 172.16.11.0 0.0.0.255 area 51
network 172.16.1.0 0.0.0.255 area 1 network 99.0.0.0 0.0.0.3 area 51
network 172.30.2.0 0.0.0.255 area 1
R1 R100
router ospf 1
router ospf 1
network 10.0.0.0 0.0.0.3 area 0
network 99.0.0.0 0.0.0.3 area 51
network 9.0.0.0 0.0.0.3 area 0
network 172.16.1.0 0.0.0.255 area 1 network 99.1.0.0 0.0.255.255 area 51
network 172.16.2.0 0.0.0.255 area 1 network 99.0.0.4 0.0.0.3 area 51

R200
R2 router ospf 1
router ospf 1 network 99.0.0.4 0.0.0.3 area 51
network 192.168.2.0 0.0.0.255 area 0 network 99.0.0.0 0.0.255.255 area 51
network 10.0.0.0 0.0.0.3 area 0
network 11.0.0.0 0.0.0.3 area 0
default-information originate
ABR contains network statements for
ip route 0.0.0.0 0.0.0.0 serial 0/2 each area it belongs to, using the
proper area value.
LSAs using all normal areas
Multi Area OSPF
What are the router Backbone
types? Area Normal Areas

ASBR

Internal ABR ABR

Internal
Internal
Internal

105
Multi Area OSPF
What are the router Backbone Normal Areas
types? Area

ASBR

Internal ABR ABR

Internal
Internal
Internal

106
Multi Area OSPF

What are the router


Normal Areas
Backbone
types? Area

ASBR

Internal ABR ABR

Internal
Internal
Internal

107
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|…]
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 |
LSA Header +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 108
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
B to which this router belongs.

“Leaf” network Router A’s LSA 1s


A
2
C which are flooded to all
other routers in this
D area.
 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.
109
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

LSA 1 - Router |

|
LS age |

Link State ID
Options | 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|

Link States
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
110
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.
111
R100# show ip ospf database
OSPF Router with ID (100.100.100.100) (Process ID 1)

Router Link States (Area 51) <- Note the Area


(LSA 1 - Links in this area.)

Link ID ADV Router Age Seq# Checksum LinkCnt


3.3.3.3 3.3.3.3 42 0x80000004 0x00168d 4
100.100.100.100 100.100.100.100 10 0x80000005 0x00472f 4
200.200.200.200 200.200.200.200 10 0x80000002 0x00db5f 1

LSA 1 - Router Link States


For Router Links:
 Link State ID: Advertising Router ID
 Advertising Router: 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”
112
LSA 1 - Router Link States
R100# show ip route

172.16.0.0/24 is subnetted, 4 subnets


O 172.16.10.0 [110/65] via 99.0.0.1, 00:08:30, Serial0/0
O 172.16.11.0 [110/65] via 99.0.0.1, 00:08:30, Serial0/0

• Denoted by just an “O” in the routing table, or a “C”

• Note: Only partial routing tables will be shown

113
LSA 1 - Router Link States

LSA 1’s
LSA 1’s
LSA 1’s

114
LSA 2 - Network Link States

LSA 2 – Network LSA


 Generated by the DR on every multi-access network
 Denoted by just an “O” in the routing table or “C” if the network is
directly connected.
 Flooded only within the originating area.
 LSA 2’s are in link state database for all routers within area, even
those routers on not on multi-access networks or DRs on other multi-
access networks in the same area.
 ABR may include a set of LSA 2s for each area it belongs to. 115
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
116
LSA 2s

LSA 2’s
LSA 2’s

 LSA 2s flooded within area by DR.

117
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

• Link ID IP address of DR on MultiAccess Network


• ADV Router Router ID of DR
• Bottom line: Net Link States (LSA2’s) should display the RouterIDs of
the DRs on all multi-access networks in the area and their IP
addresses.
• Rick’s reminder: LSA 2 -> “Ethernet = Layer 2 or D R”
1 2
118
LSA 2 - Network Link States

LSA 2’s
LSA 2’s

119
LSA 3 – Summary Net Link States

LSA 3 – Summary LSA


 Originated by the ABR.
 Describes links between ABR and Internal Routers of the Local Area
 ABR will include a set of LSA 3’s for each area it belongs to.
 LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs.
 Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the
routing table.
120
LSA 3 – Summary
LSAs

LSA 1’s ABR ABR


LSA 3’s
LSA 3’s

LSA 3 – Summary LSA


 Originated by the ABR.
 Describes links between ABR and Internal Routers of the Local Area
 ABR will include a set of LSA 3’s for each area it belongs to.
 LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs.
 Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the
routing table. 121
LSA 3 – Summary LSAs

LSA 3’s ABR ABR


LSA 1’s
LSA 3’s

122
LSA 3 – Summary LSAs

LSA 3’s
LSA 3’s
LSA 1’s

123
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
124
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
distance-vector technique. 125
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.
126
Area 0
Backbone Area

RTA
LSA 1’s 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.
127
Normal Areas
Area 0
Backbone Area
LSA 3
RTA RTB

LSA 1’s LSA 3


Area 1 Area 51
RTC

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.
128
Update is sent to Area 0 and Area 51
Normal Areas
routers using a “distance vector Area 0
Backbone Area
update technique.” SPF not re-run,
but routers update routing table. LSA 3
RTA RTB

Area 1 routers re-run


SPF, creates new SPF LSA 1’s LSA 3
Area 1 Area 51
tree and updates routing
RTC
table.
Topology Change: Down Link X
• When a router detects a topology change it immediately sends out LSA 1’s
(Router LSAs) with the change.
• Age of the LSA is set to MaxAge (3,600 seconds) – Routers remove this entry
from their LSDB (Link State Data Base).
• Routers that receive the LSA 1’s, within the area of the change:
• Re-run their SPF algorithm
• Build a new SPF tree
• Update IP routing tables. (Continued next slide) 129
Update is sent to Area 0 and Area 51 Normal Areas
routers using a “distance vector Area 0
update technique.” SPF not re-run, Backbone Area
but routers update routing table. LSA 3
RTA RTB
Area 1 routers re-run
SPF, creates new SPF LSA 3
LSA 1’s
tree and updates routing Area 1 Area 51
table. RTC

Topology Change: Down Link


X
• ABR RTA receives the LSA 1 and recalculate their SPF for that area, Area 1.
• RTA floods the change as a LSA 3 within its other area, Area 0.
• RTB receives the LSA 3 and floods it within Area 51.
• Area 0 and Area 51 routers do not recalculate their SPFs, but inject the change
into their routing tables.

130
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 • Link ID =
1.1.1.1 IP network
130addresses of networks
0x80000013 in other
0x00ec09 areas
99.1.0.0 • ADV Router = ABR
1.1.1.1 130Router ID 0x80000014
sending the0x00ec09
LSA-3
• 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”
1 2 3
131
LSA 3
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• ABR 1.1.1.1
will show all routes
255 it is injecting into the
0x80000012 other area
0x00ec09 including:
99.0.0.4 • LSA 3s from other 255
1.1.1.1 areas 0x80000013 0x00ec09
99.1.0.0 • LSA 1s from it’s adjacent
1.1.1.1 255 area it0x80000014
is injecting0x00ec09
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”
1 2 3 132
LSA 3 – Summary Net Link States
R2# show ip route

99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks


O IA 99.0.0.0/30 [110/1626] via 11.0.0.2, 00:43:01, Serial0/1
O IA 99.0.0.4/30 [110/1627] via 11.0.0.2, 00:43:01, Serial0/1
O IA 99.1.0.0/16 [110/1627] via 11.0.0.2, 00:43:01, Serial0/1
172.16.0.0/24 is subnetted, 4 subnets
O IA 172.16.1.0 [110/65] via 10.0.0.1, 00:42:21, Serial0/0
O IA 172.16.2.0 [110/65] via 10.0.0.1, 00:42:51, Serial0/0
O IA 172.16.10.0 [110/1563] via 11.0.0.2, 00:43:01, Serial0/1
O IA 172.16.11.0 [110/1563] via 11.0.0.2, 00:43:01, Serial0/1
172.30.0.0/24 is subnetted, 2 subnets
O IA 172.30.1.0 [110/66] via 10.0.0.1, 00:42:21, Serial0/0
O IA 172.30.2.0 [110/66] via 10.0.0.1, 00:42:21, Serial0/0

• Routes learned via LSA type 3s are denoted by an “IA” (Inter-Area


Routes) in the routing table. 133
LSA 1’s
LSA 3’s
LSA 3’s

134
LSA 4 – ASBR
Summary Link
States

LSA 4 – ASBR Summary LSA


 Originated by the ABR.
 Flooded throughout the area.
 Describes the reachability to the ASBRs
 Advertises an ASBR (Router ID) not a network
 Included in routing table as an “IA” route.
Exceptions
 Not flooded to Stub and Totally Stubby networks.
 More on this later 135
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

136
LSA 4 – ASBR Summary Link States

LSA 4 LSA 1’s


(e bit)
LSA 4

 How does the ABRs know about the ASBR?


 ASBR sends a type 1 Router LSA with a bit (external bit – e bit) that
is set to identify itself as the ASBR.
137
LSA 4 – ASBR
Summary Link ABR
States (ABR)
R1# show ip ospf database

Summary ASB Link States (Area 1)


ASBR (This) ABR
Link ID ADV Router Age Seq# Checksum
2.2.2.2 1.1.1.1 1482 0x8000000b 0x00ec09

• Link ID - Router ID of ASBR


• ADV Router - Router ID ABR advertising route
• Bottom line: Routers in non-area 0, should see Router ID of ASBR
and its ABR to get there .
• Rick’s reminder: LSA 4 -> “Reachability to the A S B R”
1 2 3 4 138
LSA 4 – ASBR Summary Link States (INTERNAL)
ABR
R33# show ip ospf database

Summary ASB Link States (Area 1)


ASBR (Advertising) ABR
Link ID ADV Router Age Seq# Checksum
2.2.2.2 1.1.1.1 130 0x8000000b 0x00ec09

• Link ID - Router ID of ASBR


• ADV Router - Router ID ABR advertising route

• Bottom line: Routers in non-area 0, should see Router ID of ASBR


and its ABR to get there .
• Rick’s reminder: LSA 4 -> “Reachability to the A S B R”
1 2 3 4
139
LSA 4 – ASBR Summary Link States

LSA 4 LSA 1’s


e bit
LSA 4

140
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)
 ASBR – Router which “redistributes” routes into the OSPF domain.
Exceptions
 Not flooded to Stub and Totally Stubby networks.
 More on this later
141
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | 142
Added ->

ASBR

R2 (ASBR)
router ospf 1
redistribute static
ip route 57.0.0.0 255.0.0.0 ser 0/3

143
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

 redistribute command or default-information originate command creates


an ASBR router.
 LSA 5s
 Originated by the ASBR.
 Describes destination networks external to the OSPF Routing Domain
 Flooded throughout the OSPF AS except to stub and totally stubby
areas 144
ASBR
R1# show ip ospf database

Type-5 AS External Link States <- Note, NO Area!


R2 (ASBR)
router ospf 1
Link ID ADV Router Age Seq#
redistribute Checksum Tag
static
0.0.0.0 2.2.2.2 2088 0x80000003 0x00ddeb
default-information 1
originate
57.0.0.0 2.2.2.2 2089 0x80000003
ip route 0x00ddeb
0.0.0.0 0.0.0.0 ser0 0/2
ip route 57.0.0.0 255.0.0.0 ser 0/3
• Link ID = External Networks
• ADV Router = Router ID of ASBR
• Note: For ABRs: There is only one set of “AS External Link States” in
database summary. In other words, an ABR router will only show one set of
“AS External Link States,” not one per area.
• Bottom line: All Routers should see External networks and the Router ID of
ASBR to get there .
• Rick’s reminder: LSA 5 -> O T H E R networks
1 2 3 4 5 145
LSA 5 - AS External Link States
R1# show ip route

O E2 57.0.0.0/8 [110/20] via 10.0.0.2, 00:16:02, Serial0/0


O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:16:02, Serial0/0

• 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.

146
LSA 5 - AS External Link States
R33# show ip ospf database

Type-5 AS External Link States <- Note, NO Area!

Link ID ADV Router Age Seq# Checksum Tag


0.0.0.0 2.2.2.2 278 0x80000003 0x00ddeb 1
57.0.0.0 2.2.2.2 1187 0x80000003 0x00ddeb 0

R33# show ip route

O E2 57.0.0.0/8 [110/20] via 10.0.0.2, 00:16:02, Serial0/0


O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:16:02, Serial0/0

147
LSA 5 - AS External Link States
E1 vs. E2 External Routes
 External routes fall under two categories:
 external type 1
 external type 2 (default)
 The difference between the two is in the way the cost (metric) of the route
is being calculated.
 The cost of a type 2 route is always the external cost, irrespective of the
interior cost to reach that route.
 A type 1 cost is the addition of the external cost and the internal cost
used to reach that route.
 A type 1 route is always preferred over a type 2 route for the same
destination.
 More later… 148
Stub Areas
Stub Areas

Considerations for both Stub and Totally Stubby Areas


 An area could be qualified a stub when:
 There is a single exit point (a single ABR) from that area. More than one ABR can
be used, but be ready to “accept non-optimal routing paths.”
 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
150
network.
Stub Area

151
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

Does not receive routes from External A.S. (External Routes).

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.

Note: Default route is automatically injected into stub area by ABR


 External Routes: Once the ABR gets a packet headed to a default route, it must have
a default route, either static or propagated by the ASBR via default information
originate (coming!)
Configuration:
 All routers in the area must be configured as “stub”
152
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) • All routers in the area must


  be configured as “stub”
router ospf 1 including the ABR
area 51 stub << Command: area area stub
153
LSA 1s still
sent within
each area.
Stub Area
LSA 3 LSA 3
LSA 4 LSA 4 Blocked
LSA 5 LSA 5 Blocked

Default
route to
ABR We only see routes in our
• Sent by ABR: LSA 3s (Inter-Area routes) injected area, other areas, and a
• Blocked: default route.
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.
• Changes in External routes no longer affect Stub Area routing tables. 154
Stub Areas
R100# show ip ospf database

Summary Net Link States (Area 51)

Link ID ADV Router Age Seq# Checksum


9.0.0.0 3.3.3.3 1752 0x80000037 0x00ba22
0.0.0.0 3.3.3.3 1612 0x80000038 0x00ca50
11.0.0.0 3.3.3.3 625 0x80000039 0x00db11
192.168.2.0 3.3.3.3 614 0x8000003a 0x00dd10
10.0.0.0 3.3.3.3 614 0x8000003b 0x00dd10
172.16.2.0 3.3.3.3 614 0x8000003c 0x00dd10
172.16.1.0 3.3.3.3 614 0x8000003d 0x00dd10
172.30.2.0 3.3.3.3 614 0x8000003e 0x00dc11
172.30.1.0 3.3.3.3 614 0x8000003f 0x00dc11

• No LSA 4s or LSA 5s for stub area routers.


• Default Route injected by ABR (LSA 3) 155
R200# show ip route
Stub Areas
9.0.0.0/30 is subnetted, 1 subnets
O IA 9.0.0.0 [110/129] via 99.0.0.5, 00:25:52, FastEthernet0/0
10.0.0.0/30 is subnetted, 1 subnets
O IA 10.0.0.0 [110/1691] via 99.0.0.5, 00:25:52, FastEthernet0/0
11.0.0.0/30 is subnetted, 1 subnets
O IA LSA
11.0.0.0 [110/1627] via1’s (Within00:25:52,
99.0.0.5, area) FastEthernet0/0
LSA
99.0.0.0/8 is variably 3’s (Other
subnetted, areas) 2 masks
4 subnets,
O 99.0.0.0/30 [110/65] via 99.0.0.5, 00:25:52, FastEthernet0/0
C No LSA
99.0.0.4/30 is directly 4’s (ASBR)
connected, FastEthernet0/0
O No LSA 5’s (External routes)
99.1.0.0/16 [110/2] via 99.0.0.5, 00:25:52, FastEthernet0/0
C 99.2.0.0/16 is directly connected, FastEthernet0/1
Default Route (Injected by ABR)
172.16.0.0/24 is subnetted, 4 subnets
O IA NOTE
172.16.1.0 [110/1692] viaon default 00:25:52,
99.0.0.5, route: FastEthernet0/0
O IA
O

172.16.2.0 [110/1692] via 99.0.0.5, 00:25:52, FastEthernet0/0
ABR will advertise a default route with a cost of 1
172.16.10.0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0
O • cost99.0.0.5,
172.16.11.0 [110/66] via of 66 = 100:25:52,
(Default)FastEthernet0/0
+1 (Fa) + 64 (serial link)
O IA

172.30.0.0/24 is subnetted, 2 subnets
The default cost can be modified with the ospf command:
172.30.1.0 [110/1693] via 99.0.0.5, 00:25:52, FastEthernet0/0
O IA ABR(config-router)#
172.30.2.0 [110/1693] via area area-id default-cost
99.0.0.5, 00:25:52, FastEthernet0/0 cost
O IA 192.168.2.0/24 [110/1628] via 99.0.0.5, 00:25:52, FastEthernet0/0
200.200.200.0/32 is subnetted, 1 subnets
C 200.200.200.200 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0
156
R3# show ip route
Stub Areas
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
9.0.0.0/30 is subnetted, 1 subnets
C 9.0.0.0 is directly connected, Serial0/2
10.0.0.0/30 is subnetted, 1 subnets
O 10.0.0.0 [110/1626] via 11.0.0.1, 00:00:41, Serial0/3
11.0.0.0/30 is subnetted, 1 subnets
C 11.0.0.0 is directly connected, Serial0/3
• Notice, there
99.0.0.0/8 is no automatic
is variably subnetted,default route
3 subnets, on ABR, as there are with the internal
2 masks
C 99.0.0.0/30 is directly connected, Serial0/0
O
stub routers.
99.0.0.4/30 [110/65] via 99.0.0.2, 00:00:46, Serial0/0
O• This default [110/65]
99.1.0.0/16 route came from the00:00:46,
via 99.0.0.2, ASBR. Serial0/0

O IA
172.16.0.0/24 is subnetted, 4 subnets
In other words the ABR will inject the default route into the stub area
172.16.1.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3
O IA whether or not
172.16.2.0 it hasvia
[110/1627] a default route
11.0.0.1, in itsSerial0/3
00:00:31, routing table.
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
157
Totally Stubby Areas
Totally Stubby
Area

159
Totally Stubby Areas
Receives routes from within A.S.:
 Only from within the local area - LSA 1s and LSA 2s (if appropriate)
 Does not receive routes from other areas (Inter-Area) - LSA 3s

Does not receive routes from External A.S. (External Routes)

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” 160
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
161
LSA 1s still sent
Totally within each area.
Stubby Area
Stub Area
Blocked LSA 3 LSA 3
Blocked LSA 4 LSA 4 Blocked
Blocked LSA 5 LSA 5 Blocked

Default
Default
route to
We only see routes in our area and route to
ABR
a default route. ABR
injected No inter-area or external routes. We only see routes in
• Blocked:
injected our area, other areas,
• LSA 3s (Inter-Area routes) and a default route.
• LSA 4s (reachability to ASBR) No external routes.
• 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.
• Changes in other areas and external routes no longer affect Stub Area routing tables. 162
Totally Stubby
Areas
R33# show ip route

33.0.0.0/32 is subnetted, 1 subnets


C 33.33.33.33 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
O 172.16.2.0 [110/2] via 172.16.1.1, 00:02:13, FastEthernet0/0
172.30.0.0/24 is subnetted, 2 subnets
C 172.30.1.0 is directly connected, FastEthernet0/1
O 172.30.2.0 [110/2] via 172.16.1.3, 00:02:23, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 172.16.1.1, 00:02:13, FastEthernet0/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) 163
Totally Stubby Areas
R1# show ip route
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
9.0.0.0/24 is subnetted, 1 subnets
C 9.0.0.0 is directly connected, Serial0/1
10.0.0.0/30 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Serial0/0
11.0.0.0/30 is subnetted, 1 subnets
O 11.0.0.0 [110/1626] via 10.0.0.2, 00:05:26, Serial0/0
99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA • Notice, there is no automatic default route on ABR, as there
99.0.0.0/30 [110/1690] via 10.0.0.2, 00:05:26, Serial0/0
O IA
O IA
are with the internal stub routers.
99.0.0.4/30 [110/1691] via 10.0.0.2, 00:05:26, Serial0/0
99.1.0.0/16 [110/1691] via 10.0.0.2, 00:05:26, Serial0/0

C
• This default route came from the ASBR.
172.16.0.0/24 is subnetted, 4 subnets
172.16.1.0 is directly connected, FastEthernet0/0
C • In other words the ABR will inject the default route into the
172.16.2.0 is directly connected, FastEthernet0/1
O IA 172.16.10.0 [110/1627] via 10.0.0.2, 00:05:26, Serial0/0
O IA stub area whether or not it has a default route in its routing
172.16.11.0 [110/1627] via 10.0.0.2, 00:05:26, Serial0/0
table.
172.30.0.0/24 is subnetted, 2 subnets
O 172.30.1.0 [110/2] via 172.16.1.2, 00:04:51, FastEthernet0/0
O 172.30.2.0 [110/2] via 172.16.1.3, 00:04:41, FastEthernet0/0
O 192.168.2.0/24 [110/65] via 10.0.0.2, 00:05:26, Serial0/0
O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:05:26, Serial0/0
164
Quick Review

165
LSA 1s – Router LSAs

LSA 1’s
LSA 1’s
LSA 1’s

 show ip ospf database – Router Link States (LSA 1’s)


 Should display all the RouterIDs of routers in that area, including its own.

 show ip route – “O” routes


 Routes within that area 166
LSA 2s – Network LSAs

LSA 2’s
LSA 2’s

 show ip ospf database – Net Link States (LSA 2’s)


 Net Link States (LSA2’s) should display the RouterIDs of the DRs on all
multi-access networks in the area and their IP addresses.
 show ip route – “O” routes
 Routes within that area
167
LSA 3 – Summary LSAs

LSA 3’s
LSA 3’s
LSA 1’s

 show ip ospf database – Summary Net Link States (LSA 3’s)


 Link ID = IP network addresses of networks in other areas
 ADV Router = ABR Router ID sending the LSA-3
 show ip route – “IA” (Inter-Area Routes)
 Routes in other areas 168
LSA 4 – ASBR Summary Link States

LSA 4 LSA 1’s


ebit
LSA 4

 show ip ospf database – Summary Net Link States (LSA 3’s)


 Link ID = IP network addresses of networks in other areas
 ADV Router = ABR Router ID sending the LSA-3
 show ip route – “IA” (Inter-Area Routes)
 Routes in other areas 169
LSA 5 – External Link States
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

 Redistribute or default-information originate creates an ASBR router.


 Originated by the ASBR.
 Describes destination networks external to the OSPF Routing Domain
 Flooded throughout the OSPF AS except to stub and totally stubby areas 170
Stub Area LSA 1s still sent
within each area.
Stub Area
LSA 3 LSA 3
LSA 4 LSA 4 Blocked
LSA 5 LSA 5 Blocked

Default
route to
ABR We only see routes in our
• Sent by ABR: LSA 3s (Inter-Area routes) injected area, other areas, and a
• Blocked: default route.
• LSA 4s (reachability to ASBR) No external routes.
• 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.
• Changes in External routes no longer affect Stub Area routing tables. 171
Totally Stubby Area LSA 1s still sent
Totally within 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 We only see routes in our area and route to
injected a default route. ABR
No inter-area or external routes. We only see routes in
• Blocked: injected our area, other areas,
• LSA 3s (Inter-Area routes) and a default route.
• LSA 4s (reachability to ASBR) No external routes.
• 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.
• Changes in other areas and external routes no longer affect Stub Area routing tab les. 172

You might also like