Lesson 3 OSPF
Lesson 3 OSPF
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
OSPF Fundamentals
• The Open Shortest Path First (OSPF) protocol is a nonproprietary Interior Gateway
Protocol (IGP) that overcomes the deficiencies of other distance vector routing
protocols and distributes routing information within a single OSPF routing domain.
• OSPF introduced variable-length subnet masking (VLSM), which supports classless
routing, summarization, authentication, and external route tagging.
• There are two main versions of OSPF in production networks today: OSPF Version 2
(OSPFv2) which supports IPv4, OSPF Version 3 (OSPFv3) which supports IPv6.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
OSPF Fundamentals
LSAs, LSDB, and SPT
• OSPF sends link-state advertisements (LSAs) to neighboring routers. LSAs contain
the link state and link metric. The received LSAs are stored in a local database called
the link-state database (LSDB). The LSDB provides the topology of the network.
The SPT contains all network destinations within the OSPF domain.
• Figure 8-1 shows a simple OSPF topology and the SPT from R1’s and R4’s
perspective. Notice that the local router’s perspective will always be the root (top of
the tree).
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
OSPF Fundamentals
OSPF Architecture
• OSPF uses multiple OSPF areas within the routing domain. OSPF uses a two-tier
hierarchical architecture, where Area 0 is a special area known as the backbone, to
which all other areas must connect. Nonbackbone areas advertise routes into the
backbone. The backbone advertises routes into other nonbackbone areas.
• Figure 8-2 shows route advertisement into other areas. Area 12 routes are
advertised to Area 0 and then into Area 34. Area 34 routes are advertised to Area 0
and then into Area 12. Area 0 routes are advertised into all other OSPF areas.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
OSPF Fundamentals
Inter-Router Communication
OSPF uses the assigned IPv4 protocol 89 and multicast addresses 224.0.0.5 (All routers)
and 224.0.0.6 (DR routers) where possible to reduce unnecessary traffic.
Table 8-2 briefly describes the five OSPF packet types.
Type Packet Name Functional Overview
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
OSPF Fundamentals
Neighbors Table 8-4 OSPF neighbor states
State Description
Down The initial state of a neighbor relationship. Indicates that the router
has not received any OSPF hello packets.
Attempt Indicates that no information has been received recently, but the
router is still attempting communication.
Init Indicates that a hello packet has been received from another
router, but bidirectional communication has not been established.
2-Way Bidirectional communication established. If a DR or BDR is
needed, the election occurs during this state.
ExStart The first state in forming an adjacency. Routers identify which
router will be the master or slave for the LSDB synchronization.
Exchange Routers are exchanging link states by using DBD packets.
Loading LSRs sent to neighbor asking for more recent LSAs that have been
discovered (but not received) in the Exchange state.
Full Neighboring routers are fully adjacent.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
OSPF Fundamentals
DR and BDR
• If four routers share the same
multi-access network, six OSPF
adjacencies form, along with six
occurrences of database flooding
on a network. Figure 8-3 shows a
simple four-router physical
topology and the adjacencies
established.
• Figure 8-5 shows how a DR
simplifies a four-router topology
with only three neighbor
adjacencies.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9