Open Shortest Path First
• Open Shortest Path First (OSPF)
– An open standards, link-state routing protocol that
supports classless routing, variable-length subnet
masks, and authentication
• Link-state routing protocols allow routers to share a
common view of the entire network
– Each router sends out link-state advertisements
(LSAs) describing its attached links to all routers in an
area
• Each router needs to hold a topological database of
the entire area
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
398
Open Shortest Path First (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
399
Open Shortest Path First (continued)
• OSPF is ideally suited for large networks
– Uses a concept known as areas to bound link-state
advertisements
• An area is the portion of a network within which
LSAs are contained
– All OSPF routers configured with the same area
identification will accept LSAs from one another
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
400
1. Router Id – It is the highest active IP address present on the router. First, the highest loopback address is
considered. If no loopback is configured then the highest active IP address on the interface of the router is
considered.
2. Router priority – It is an 8-bit value assigned to a router operating OSPF, used to elect DR and BDR in a
broadcast network.
3. Designated Router (DR) – It is elected to minimize the number of adjacencies formed. DR distributes the LSAs to
all the other routers. DR is elected in a broadcast network to which all the other routers share their DBD. In a
broadcast network, the router requests for an update to DR, and DR will respond to that request with an update.
4. Backup Designated Router (BDR) – BDR is a backup to DR in a broadcast network. When DR goes down, BDR
becomes DR and performs its functions.
5. DR and BDR election – DR and BDR election takes place in the broadcast network or multi-access network. Here
are the criteria for the election:
- The router having the highest router priority will be declared as DR.
- If there is a tie in router priority then the highest router I’d be considered. First, the highest loopback address is
considered. If no loopback is configured then the highest active IP address on the interface of the router is
considered.
401
•
OSPF States
The device operating OSPF goes through certain states. These states are:
Down – In this state, no hello packets have been received on the interface.
•
Note – The Downstate doesn’t mean that the interface is physically down. Here, it means that the OSPF adjacency process has not started yet.
INIT – In this state, the hello packets have been received from the other router.
2WAY – In the 2WAY state, both the routers have received the hello packets from other routers. Bidirectional connectivity has been
established.
•
Note – In between the 2WAY state and Exstart state, the DR and BDR election takes place.
Exstart – In this state, NULL DBD are exchanged. In this state, the master and slave elections take place. The router having the higher
router I’d become the master while the other becomes the slave. This election decides Which router will send its DBD first (routers who
have formed neighbourship will take part in this election).
Exchange – In this state, the actual DBDs are exchanged.
Loading – In this state, LSR, LSU, and LSA (Link State Acknowledgement) are exchanged.
–
Important – When a router receives DBD from other router, it compares its own DBD with the other router DBD. If the received DBD is more
updated than its own DBD then the router will send LSR to the other router stating what links are needed. The other router replies with the LSU
containing the updates that are needed. In return to this, the router replies with the Link State Acknowledgement.
Full – In this state, synchronization of all the information takes place. OSPF routing can begin only after the Full state.
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
402
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
403
OSPF Concepts
• Link
– A router’s interface
• Link-state
• The status of a link on a router
• Area
– Defines the confines within which LSAs are contained
• Cost
– The default metric for OSPF
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
404
OSPF Concepts (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
405
OSPF Concepts (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
406
OSPF Concepts (continued)
• Adjacencies database
– Contains information about all OSPF peers with which
a router has successfully exchanged Hello packets
• Topological database
– Holds the common view of the network formed from
the link-state advertisements that are received
• Designated routers (DRs)
• Backup designated routers (BDRs)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
407
OSPF Concepts (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
408
OSPF Concepts (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
409
OSPF Concepts (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
410
OSPF Operation
• Steps
– An OSPF router forms adjacencies with neighbors
– A DR and BDR are elected in OSPF
– Routers will flood their link-state advertisements and
go through the process of selecting the best route to
each network
• OSPF uses Dijkstra’s Shortest Path First algorithm
to find the best path
– Each router sees itself as the central point from which
a loop-free, best-cost path to each network is
determined
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
411
OSPF Operation (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
412
OSPF Operation (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
413
Single-Area OSPF Configuration
• OSPF offers a huge number of configuration options
– Including multiple areas of different types
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
414
Single-Area OSPF Configuration
(continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
415
OSPF Authentication
• Routing update authentication is a basic security
requirement for all modern routing protocols
• OSPF provides authentication of routing table
updates via several methods
– No authentication (the default)
– Authentication with passwords sent in clear text
– Authentication using MD5 hashing of a shared secret
key
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
416
OSPF Authentication (continued)
• To perform MD5 authentication of routing updates in
OSPF, two steps must be completed:
– Configuration of authentication keys on each OSPF
interface
– Configuration of area authentication
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
417
OSPF Authentication (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
418
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
419
Controlling Route Traffic
• passive-interface command
– An important entry-level command for controlling route
traffic
– Disrupts the function of EIGRP and OSPF
• The command causes a router to listen only on the
passive interface
– Therefore, if used with EIGRP or OSPF, the router will
not send Hellos out the interface
• The result is a link that is seen as having no
neighbors on it
– Therefore, it will not be used to form adjacencies
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
420
Controlling Route Traffic (continued)
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
421
Summary
• Large, complex internetworks using variable-length
subnet masks require routing protocols that can
handle the task
• RIPv2 is a classless routing protocol built as an
extension to RIPv1
• EIGRP is a Cisco proprietary protocol designed to
incorporate some of the features of link-state
routing protocols
• The open standards protocol OSPF is the link-state
protocol of choice in many networks
CCNA Guide to Cisco Networking Fundamentals, Fourth Edition
422