0% found this document useful (0 votes)
58 views

Understanding Ospf Lsas: © 2007 - 2010, Cisco Systems, Inc. All Rights Reserved. Cisco Public

Lecture slide pack

Uploaded by

Daniel Neill
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)
58 views

Understanding Ospf Lsas: © 2007 - 2010, Cisco Systems, Inc. All Rights Reserved. Cisco Public

Lecture slide pack

Uploaded by

Daniel Neill
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/ 30

Understanding

OSPF LSAs

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 1
LSAs
 LSAs are the building blocks of the OSPF LSDB.
• Individually, LSAs act as database records.
• When combined, they describe the entire topology of an OSPF area.
 There are several types of OSPF network LSAs
• Not all are in use.
LSA Type Description
1 Router LSA
2 Network LSA
3 and 4 Summary LSAs
5 AS external LSA
6 Multicast OSPF LSA
7 Defined for NSSAs
8 External attributes LSA for Border Gateway Protocol (BGP)
9, 10, or 11 Opaque LSAs

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 2
LSA Type 1: Router LSA
 Generated by all routers in an area to describe their directly
attached links (Intra-area routes).
• Floods within its area only and cannot cross an ABR.
• LSA includes list of directly attached links and is identified by the router
ID of the originating router
• Routing Table Entry = O

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 3
LSA Type 2: Network LSA
 Advertised by the DR of the broadcast network.
• Floods within its area only; does not cross ABR.
• Link-state ID is the DR.
• Routing Table Entry = O

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 4
LSA Type 3: Summary LSA
 Advertised by the ABR of originating area.
• Regenerated by subsequent ABRs to flood throughout the autonomous
system.
• By default, routes are not summarized, and type 3 LSA is advertised for
every subnet.
• Link-state ID is the network or subnet advertised in the summary LSA
• Routing Table Entry = O IA

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 5
LSA Type 4: Summary LSA
 Generated by the ABR of the originating area to advertise
an ASBR to all other areas in the autonomous system.
• They are regenerated by all subsequent ABRs to flood throughout the
autonomous system.
• Link-state ID is the router ID of the ASBR.
• Routing Table Entry = O IA

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 6
LSA Type 5: External LSA
 Used by the ASBR to advertise networks from other
autonomous systems.
• Type 5 LSAs are advertised and owned by the originating ASBR.
• The Link-state ID is the external network number.
• Routing Table Entry = O E1 or O E2

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 7
LSA Type 7: NSSA LSA
 Generated by an ASBR inside a Not-so-stubby area
(NSSA) to describe routes redistributed into the NSSA.
• LSA 7 is translated into LSA 5 as it leaves the NSSA.
• Routing Table Entry = O N1 or O N2
• Much like LSA 5, N2 is a static cost while N1 is a cumulative cost that
includes the cost up to the ASBR.

ABR

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 8
Interpreting the
OSPF LSDB
and Routing
Table

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 9
Interpreting the OSPF Database
Use the show ip ospf database command to gather link
state information.
R1# show ip ospf database
OSPF Router with ID (10.0.0.11) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.11 10.0.0.11 548 0x80000002 0x00401A 1
10.0.0.12 10.0.0.12 549 0x80000004 0x003A1B 1
100.100.100.100 100.100.100.100 548 0x800002D7 0x00EEA9 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
172.31.1.3 100.100.100.100 549 0x80000001 0x004EC9
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.0.0 10.0.0.11 654 0x80000001 0x00FB11
10.1.0.0 10.0.0.12 601 0x80000001 0x00F516
<output omitted>

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 10
LSA Sequence Numbering
 Each LSA in the LSDB maintains a sequence number.
• The sequence numbering scheme is a 4-byte number that begins with
0x80000001 and ends with 0x8FFFFFFF.
 OSPF floods each LSA every 30 minutes to maintain proper
database synchronization.
• Each time the LSA is flooded, the sequence number is incremented
by one.
 When a router encounters two instances of an LSA, it must
determine which is more recent.
• The LSA having the newer (higher) LS sequence number is more
recent.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 11
Route Designator in Routing Table
Route Designator Description
• Networks from within the router’s
O OSPF intra-area (router LSA) and network LSA area. Advertised by way of router
LSAs and network LSAs.
• Networks from outside the router’s
O IA OSPF interarea (summary LSA) area but within the OSPF AS.
Advertised by way of summary LSAs.
• Networks from outside the router’s
O E1 Type 1 external routes AS, advertised by way of external
LSAs.
• Networks from outside the router’s
O E2 Type 2 external routes AS, advertised by way of external
LSAs.

R1# show ip route


<output omitted>
Gateway of last resort is not set
172.31.0.0/24 is subnetted, 2 subnets
O IA 172.31.2.0 [110/1563] via 10.1.1.1, 00:12:35, FastEthernet0/0
O IA 172.31.1.0 [110/782] via 10.1.1.1, 00:12:35, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0/0/0
O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:12:35, Serial0/0/0
C 10.1.1.0/24 is directly connected, FastEthernet0/0
O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:12:37, FastEthernet0/0
O E2 10.254.0.0/24 [110/50] via 10.1.1.1, 00:12:37, FastEthernet0/0

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 12
Best Path Calculation
1. All routers calculate the best paths to destinations within
their area (intra-area) and add these entries to the routing
table.
• Includes type 1 and 2 LSAs, noted with a designator of O.
2. All routers calculate the best paths to the other areas.
• Includes type 3 and 4 LSAs, noted with a designator of O IA.
3. All routers (except stub areas) calculate the best paths to
the external autonomous system (type 5) destinations.
• Includes either external type 1 (E1), indicated with an O E1 or
external type 2 (E2), indicated with an O E2.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 13
ASBR – Type 1 and 2 Routes
 The cost of an external route varies, depending on the
external type configured on the ASBR.
 An ASBR can be configured to send out two types of
external routes into OSPF.
• Denoted in the routing table as E1 for Type 1
• Denoted in the routing table as E2 for Type 2.
 Depending on the type, OSPF calculates the cost of
external routes differently.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 14
ASBR – Type 1 and 2 Routes
 O E1 Routes
• The metric is calculated by adding the external cost to the internal
cost of each link that the packet crosses.
• Use this packet type when there are multiple ASBRs advertising a route to
the same autonomous system.
 O E2 Routes
• The packet will always have the external cost assigned, no matter
where in the area it crosses.
• Default setting on ASBRs.
• Use this packet type if only one router is advertising a route to the
autonomous system.
• Type 2 routes are preferred over Type 1 routes unless two equal cost
routes exist to the destination.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 15
E2 Routes

 By default, RTA uses a Type 2 metrics to send external routing


information.
 RTB will receive the external RIP routes, including 9.0.0.0/8 from RTA.
 When RTB forwards this route, the metric for the external route remains
the same (in this case, 20).

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 16
E1 Routes

 If RTA is configured to use a Type 1 metric with external


routes, OSPF will increment the metric value of the external
route according to its standard cost algorithm.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 17
Configuring and
Verifying
Advanced OSPF
Features

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 18
OSPF Passive-Interface
 Prevent OSPF updates out a specified router interface.
Router(config-router)#

passive-interface type number [default]

 Set a particular interface or all router interfaces to passive.


 The default option sets all router interfaces to passive.
 For OSPF, the command:
 The specified interface appears as a stub network in the OSPF
domain
 The OSPF routing information is neither sent nor received through
the specified router interface.
 Prevents neighbor relationships from being established.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 19
Passive-Interface Example

192.168.1.96 /27
64 kbps
.101 S0/0/1
.102 .1 Internet
R1 S0/0/0 R2
S0/0/0
.1 Fa0/0 .1 Fa0/0 192.168.1.0 /27

172.16.1.0 /24 172.17.2.0 /24

R1(config)# router ospf 1


R1(config-router)# passive-interface fa0/0
R1(config-router)#

R2(config)# router ospf 10


R2(config-router)# passive-interface fa0/0
R2(config-router)#

Alternate configuration:
R1(config)# router ospf 1
R1(config-router)# passive-interface default
R1(config-router)# no passive-interface S0/0/0

R2(config)# router ospf 10


R2(config-router)# passive-interface default
R2(config-router)# no passive-interface S0/0/0
R2(config-router)# no passive-interface S0/0/1
Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 20
Propagating a Default Route
 To propagate a default route in OSPF, use the default-
information originate router configuration
command.
• A default static rote also needs to be configured on the originating
router
 Once configured, the default route has to be propagated
into the OSPF domain.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 21
default-information originate Command

 Configures a router to generate a default external route into an OSPF


routing domain.
Router(config-router)#

default-information originate [always] [metric metric-value]


[metric-type type-value] [route-map map-name]

Parameter Description
(Optional) Specifies that OSPF always advertises the default route
always
regardless of whether the router has a default route in the routing table.
(Optional) A metric used for generating the default route. If you omit a value
metric and do not specify a value using the default-metric router configuration
command, the default metric value is 1. Cisco IOS Software documentation
metric-value indicates that the default metric value is 10; testing shows that it is actually
1.
(Optional) The external link type that is associated with the default route
metric-type that is advertised into the OSPF routing domain. It can be one of the
type-value following values: 1—Type 1 external route 2—Type 2 external route. The
default is type 2 external route (indicated by O*E2 in the routing table).
route-map (Optional) Specifies that the routing process generates the default route if
map-name the route map is satisfied.
Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 22
default-information originate Example

0.0.0.0 Cost 10
172.16.1.0 /24

10.1.1.1 .2 ISP A
R1 .1
OSPF Domain
172.17.1.0 /24
10.2.1.1 .2
R2 .1 ISP B
0.0.0.0 Cost 100

R1(config)# router ospf 1


R1(config-router)# network 10.1.1.1 0.0.0.0 area 0
R1(config-router)# default-information originate metric 10
R1(config-router)# exit
R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.1.2
R1(config)#

R2(config)# router ospf 1


R2(config-router)# network 10.2.1.1 0.0.0.0 area 0
R2(config-router)# default-information originate metric 100
R2(config-router)# exit
R2(config)# ip route 0.0.0.0 0.0.0.0 172.17.1.2
R2(config)#

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 23
Route Summarization
 Route summarization involves consolidating multiple routes
into a single advertisement.
 Proper route summarization directly affects the bandwidth,
memory and CPU, that are consumed by the OSPF
process.
• If a network link fails or flaps, the topology change will not be
propagated into the backbone or other areas.
• It protects routers from needless routing table recalculations.
• Because the SPF calculation places a significant demand on the
router's CPU, proper summarization is an imperative part of OSPF
configuration.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 24
Using Route Summarization

IA 172.16.8.0 255.255.248.0

IA 172.16.16.0 255.255.252.0

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 25
Types of Route Summarization
 Inter-area summarization
• Performed at the ABR and creates Type 3 LSAs.
 External summarization
• Performed at the ASBR and creates Type 5 LSAs.
 Both have the same fundamental requirement of contiguous
addressing.
 If summarization is not configured correctly and there are
multiple ASBRs, or multiple ABRs in an area, suboptimal
routing is possible.
• For example, summarizing overlapping ranges from two different
routers can cause packets to be sent to the wrong destination.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 26
Intra-Area Summarization
 Configure an ABR to summarize routes for a specific area.
Router(config-router)#

area area-id range address mask [advertise | not-advertise]


[cost cost]

Parameter Description
area area-id Identifies the area subject to route summarization.
address The summary address designated for a range of addresses.
mask The IP subnet mask used for the summary route.
(Optional) Sets the address range status to advertise and generates a
advertise
type 3 summary LSA.
(Optional) Sets the address range status to DoNotAdvertise. The type
not-advertise 3 summary LSA is suppressed, and the component networks remain
hidden from other networks.
(Optional) Metric or cost for this summary route, which is used during
cost cost the OSPF SPF calculation to determine the shortest paths to the
destination. The value can be 0 to 16777215.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 27
Intra-Area Summarization Example

Area 0
172.16.96.0 /24 - 172.16.127.0 /24

R1 R2
Area 2
Area 1 172.16.64.0 /24 - 172.16.95.0 /24
172.16.32.0 /24 - 172.16.63.0 /24

R1(config)# router ospf 100


R1(config-router)# network 172.16.32.1 0.0.0.0 area 1
R1(config-router)# network 172.16.96.1 0.0.0.0 area 0
R1(config-router)# area 0 range 172.16.96.0 255.255.224.0
R1(config-router)# area 1 range 172.16.32.0 255.255.224.0
R1(config-router)#

R2(config)# router ospf 100


R2(config-router)# network 172.16.64.1 0.0.0.0 area 2
R2(config-router)# network 172.16.127.1 0.0.0.0 area 0
R2(config-router)# area 0 range 172.16.96.0 255.255.224.0
R2(config-router)# area 2 range 172.16.64.0 255.255.224.0
R2(config-router)#

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 28
External Summarization
 Configure an ASBR to summarize external routes.
Router(config-router)#

summary-address ip-address mask [not-advertise] [tag tag]

Parameter Description

ip-address The summary address designated for a range of addresses.


mask The IP subnet mask used for the summary route.
not-advertise (Optional) Used to suppress routes that match the address/mask pair.
(Optional) A tag value that can be used as a “match” value to control
tag tag
redistribution via route maps.

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 29
External Summarization

ABR
External AS – RIPv2 .1 OSPF Area 1 OSPF Area 0
172.16.32.0 /24 – 172.16.63.0 /24 R1 172.16.64.0 /24 R2

R1(config)# router ospf 100


R1(config-router)# network 172.16.64.1 0.0.0.0 area 1
R1(config-router)# summary-address 172.16.32.0 255.255.224.0
R1(config-router)#

Chapter 3
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public 30

You might also like