Basic OSPF: BSCI Module 3
Basic OSPF: BSCI Module 3
BSCI Module 3
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 1
Introduction
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Introduction to OSPF
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 4
OSPF operation
Respond quickly to
network changes
Send triggered updates
when a network change
occurs
Send periodic updates,
known as link-state
refresh, at long intervals,
such as every 30 minutes
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 5
LSA characteristics
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 6
OSPF data structures
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 7
OSPF hello packets
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 8
OSPF areas
Minimizes routing
table entries
Localizes impact of
a topology change
within an area
Detailed LSA
flooding stops at
the area boundary
Requires a
hierarchical
network design
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 10
OSPF router types
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 11
OSPF terminology
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 12
New Terminology
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 13
OSPF Areas
New terminology for areas:
Transit Area
Also known as
Backbone Area 0
Regular Area
Also known as
Nonbackbone areas
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 14
OSPF Database
OSPF maintains three databases
Adjacency Database (show ip ospf neighbor)
Link-state Database (show ip ospf database)
Forwarding Database (show ip route)
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 15
What is LSDB?
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 16
OSPF metric
10
10 10
10
10
10 10 10
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 17
OSPF packet types
The OSPF protocol
exchanges 5 packet types:
Hello
Database description (DBD)
Link-state request (LSR)
Link-state update (LSU)
Link-state acknowledgement
(LSAck)
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 18
OSPF packet
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 19
Establishing bidirectional communication
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Maintaing network routes
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 22
LSAs and the Link-
state Database
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 23
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
0x7FFFFFFF.
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.
Ultimately, an LSA sequence number will wrap around
to 0x80000001. When this occurs, the existing LSA is
prematurely aged to maxage (one hour) and flushed.
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.
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 24
The OSPF Link-State Database
The show ip ospf database command displays
the current LSDB for the local router.
The next slide discusses the purpose of the Age and
Seq# fields highlighted below.
RTC#show ip ospf database
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 25
Link-State Data Structures: LSA
Operation
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 26
Verifying LSA Age and Sequence
Number
In the first output below, notice the age timer will expire
sometime after 1800 seconds or 30 minutes.
RTC#show ip ospf database
A few minutes later, the router has received an LSU for both links.
Note the refreshed age timer and incremented sequence number.
RTC#show ip ospf database
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 27
Basic OSPF
Configuration
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 28
Configuring OSPF
An excellent resource for information on the many
different OSPF configurations is the Cisco white paper,
“Configuring OSPF”, which can be downloaded from
the Cisco website:
http://www.cisco.com/en/US/tech/tk365/tk480/tsd_technology_s
upport_sub-protocol_home.html
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 29
Configuring Basic OSPF
Router(config)#
router ospf process-id [vrf vpn-name]
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 31
Configuring OSPF for Multiple Areas
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 32
OSPF Router ID
The 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.
If no interface is up when the OSPF process starts, you will get the following error message:
p5r2(config)#router ospf 1
2w1d: %OSPF-4-NORTRID: OSPF process 1 cannot start.
Router(config)#router ospf 1
Router(config-router)#router-id 172.16.1.1
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 34
Summary
OSPF is an open-standard link-state routing protocol,
offering quick convergence and the ability to scale large
networks.
There are five OSPF packet types: hello, DBD, LSU,
LSR, and LSAck.
Configuration of OSPF is a two-step process:
• Enter OSPF configuration with the router ospf
command.
• Use the network command to describe which
interfaces will run OSPF in which area.
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 35
Additional Links
http://www.cisco.com/en/US/products/sw/iosswrel/ps18
35/products_configuration_guide_chapter09186a00800
b3f2e.html
http://www.cisco.com/en/US/tech/tk365/technologies_c
onfiguration_example09186a0080094069.shtml
http://www.cisco.com/en/US/products/ps6121/products
_user_guide_chapter09186a00806a2f02.html
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 36
Q and A
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 37
BSCI Module 3 © 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 38