Module1_elective2
Module1_elective2
Concepts
Enterprise Networking, Security, and Automationv7.0
(ENSA)
Module Objectives
Module Title: Single-Area OSPF Concepts
Module Objective: Explain how single-area OSPF operates in both point-to-point and
broadcast multiaccess networks.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
1.1 OSPF Features and
Characteristics
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
Static and Dynamic Routing
Static or Dynamic?
The table shows a comparison of some the differences between dynamic and static
routing.
Feature Dynamic Routing Static Routing
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
Dynamic routing protocols
IGP and EGP Routing Protocols
An autonomous system (AS) represents a collection of network devices under a
common administrator.
Routing protocols can be divided based on whether they exchange routes within an AS or
between different autonomous systems:
Interior Gateway Protocols (IGP)
§ Support small, medium-sized, and large organizations, but their scalability has its limits. Fast
convergence, and basic functionality is not complex to configure. The most commonly used IGPs
in enterprises are EIGRP, OSPF and RIP is rarely used. IS-IS is also commonly found as ISP
IGP
Exterior Gateway Protocols (EGP)
§ Used to exchange routes between different autonomous systems. BGP is the only EGP that is
used today. The main function of BGP is to exchange a huge number of routes between
different autonomous systems.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
Dynamic routing protocols
Types of Routing Protocols
Distance vector protocols
§ The distance vector routing approach determines the direction (vector) and distance (such as link cost or number
of hops) to any link in the network. The only information that a router knows about a remote network is the distance
or metric to reach this network and which path or interface to use to get there. Distance vector routing protocols do
not have an actual map of the network topology.
Link-state protocols
§ The link-state approach uses the Shortest Path First (SPF) algorithm to create an abstract of the exact topology of
the entire network or at least within its area. A link-state routing protocol is like having a complete map of the
network topology. The map is used to determine best path to a destination.
Path vector protocols
§ Path information is used to determine the best paths and to prevent routing loops. Similar to distance vector
protocols, path vector protocols do not have an abstract of the network topology. Path vector protocols indicate
direction and distance, but also include additional information about the specific path of the destination.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confide ntial 14
OSPF Features and Characteristics
Introduction to OSPF
• OSPF is a link-state routing protocol that was developed as an alternative for the
distance vector Routing Information Protocol (RIP). OSPF has significant advantages
over RIP in that it offers faster convergence and scales to much larger network
implementations.
• OSPF is a link-state routing protocol that uses the concept of areas. A network
administrator can divide the routing domain into distinct areas that help control routing
update traffic.
• A link is an interface on a router, a network segment that connects two routers, or a
stub network such as an Ethernet LAN that is connected to a single router.
• Information about the state of a link is known as a link-state. All link-state information
includes the network prefix, prefix length, and cost.
• This module covers basic, single-area OSPF implementations and configurations.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
OSPF Features and Characteristics
Components of OSPF
• All routing protocols share similar components. They all use routing protocol messages
to exchange route information. The messages help build data structures, which are
then processed using a routing algorithm.
• Routers running OSPF exchange messages to convey routing information using five
types of packets:
• Hello packet
• Database description packet
• Link-state request packet
• Link-state update packet
• Link-state acknowledgment packet
• These packets are used to discover neighboring routers and also to exchange routing
information to maintain accurate information about the network.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
OSPF Features and Characteristics
Components of OSPF (Cont.)
OSPF messages are used to create and maintain three OSPF databases, as follows:
• List of all neighbor routers to which a router has established bi-directional communication.
Adjacency Neighbor
• This table is unique for each router.
Database Table • Can be viewed using the show ip ospf neighbor command.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
OSPF Features and Characteristics
Components of OSPF (Cont.)
• The router builds the topology table using results of calculations based on the Dijkstra
shortest-path first (SPF) algorithm. The SPF algorithm is based on the cumulative cost
to reach a destination.
• The SPF algorithm creates an SPF tree by placing each router at the root of the tree
and calculating the shortest path to each node. The SPF tree is then used to calculate
the best routes. OSPF places the best routes into the forwarding database, which is
used to make the routing table.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
OSPF Features and Characteristics
Link-State Operation
To maintain routing information, OSPF routers complete a generic link-state routing
process to reach a state of convergence. The following are the link-state routing steps
that are completed by a router:
1. Establish Neighbor Adjacencies
2. Exchange Link-State Advertisements
3. Build the Link State Database
4. Execute the SPF Algorithm
5. Choose the Best Route
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
OSPF Features and Characteristics
Single-Area and Multiarea OSPF
To make OSPF more efficient and scalable, OSPF supports hierarchical routing using
areas. An OSPF area is a group of routers that share the same link-state information in
their LSDBs. OSPF can be implemented in one of two ways, as follows:
• Single-Area OSPF - All routers are in one area. Best practice is to use area 0.
• Multiarea OSPF - OSPF is implemented using multiple areas, in a hierarchical
fashion. All areas must connect to the backbone area (area 0). Routers
interconnecting the areas are referred to as Area Border Routers (ABRs).
The focus of this module is on single-area OSPFv2.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
OSPF Features and Characteristics
Multiarea OSPF
• The hierarchical-topology design options with multiarea OSPF can offer the following
advantages.
• Smaller routing tables - Tables are smaller because there are fewer routing table
entries. This is because network addresses can be summarized between areas.
Route summarization is not enabled by default.
• Reduced link-state update overhead - Designing multiarea OSPF with smaller
areas minimizes processing and memory requirements.
• Reduced frequency of SPF
calculations -– Multiarea
OSPF localize the impact of
a topology change within an
area. For instance, it
minimizes routing update
impact because LSA
flooding stops at the area
boundary. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
OSPF Features and Characteristics
OSPFv3
• OSPFv3 is the OSPFv2 equivalent for exchanging IPv6 prefixes. OSPFv3 exchanges
routing information to populate the IPv6 routing table with remote prefixes.
• Note: With the OSPFv3 Address Families feature, OSPFv3 includes support for
IPv4 and IPv6. OSPF Address Families is beyond the scope of this curriculum.
both
• OSPFv3 has the same functionality as OSPFv2, but uses IPv6 as the network layer
transport, communicating with OSPFv3 peers and advertising IPv6 routes. OSPFv3
also uses the SPF algorithm as the computation engine to determine the best paths
throughout the routing domain.
• OSPFv3 has separate processes from its IPv4 counterpart. The processes and
operations are basically the same as in the IPv4 routing protocol, but run
independently.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
1.2 OSPF Packets
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
OSPF Packets
Types of OSPF Packets
The table summarizes the five different types of Link State Packets (LSPs) used by
OSPFv2. OSPFv3 has similar packet types.
3 Link-State Request (LSR) Requests specific link-state records from router to router
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
OSPF Packets
Link-State Updates
• LSUs are also used to forward
OSPF routing updates. An LSU
packet can contain 11 different
types of OSPFv2 LSAs. OSPFv3
renamed several of these LSAs
and also contains two additional
LSAs.
• LSU and LSA are often used
interchangeably, but the correct
hierarchy is LSU packets contain
LSA messages.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
OSPF Packets
Hello Packet
The OSPF Type 1 packet is the
Hello packet. Hello packets are
used to do the following:
• Discover OSPF neighbors and
establish neighbor adjacencies.
• Advertise parameters on which
two routers must agree to
become neighbors.
• Elect the Designated Router
(DR) and Backup Designated
Router (BDR) on multiaccess
networks like Ethernet. Point-to-
point links do not require DR or
BDR.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
1.3 OSPF Operation
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28
OSPF Operation
OSPF Operational States
State Description
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
OSPF Operation
OSPF Operational States (Cont.)
State Description
On point-to-point networks, the two routers decide which router will initiate
ExStart State the DBD packet exchange and decide upon the initial DBD packet
sequence number.
• Routers exchange DBD packets.
Exchange • If additional router information is required then transition to Loading;
State
otherwise, transition to the Full state.
• LSRs and LSUs are used to gain additional route information.
Loading State • Routes are processed using the SPF algorithm.
• Transition to the Full state.
Full State The link-state database of the router is fully synchronized.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31
OSPF Operation
OSPF Operational States (Cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
OSPF Operation
Establish Neighbor Adjacencies
• To determine if there is an OSPF neighbor on the link, the router sends a Hello packet
that contains its router ID out all OSPF-enabled interfaces.
• The OSPF router ID is used by the OSPF process to uniquely identify each
the OSPF
router in area.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
OSPF Operation
Establish Neighbor Adjacencies (Cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34
OSPF Operation
Synchronizing OSPF Databases
After the Two-Way state, routers transition to database synchronization states. This is a
three step process, as follows:
• Decide first router: The router with the highest router ID sends its DBD first.
• Exchange DBDs: As many as needed to convey the database. The other router must
acknowledge each DBD with an LSAck packet.
• Send an LSR: Each router compares the DBD information with the local LSDB. If the
DBD has more current link information, the router transitions to the loading state.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35
OSPF Operation
The Need for a DR
Multiaccess networks can create two
challenges for OSPF regarding the flooding of
LSAs, as follows:
• Creation of multiple adjacencies -
Ethernet networks could potentially
interconnect many OSPF routers over a
common link. Creating adjacencies with
every router would lead to an excessive
number of LSAs exchanged between
routers on the same network.
• Extensive flooding of LSAs - Link-state
routers flood their LSAs any time OSPF is
initialized, or when there is a change in the
topology. This flooding can become
excessive.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36
OSPF Operation
LSA Flooding with a DR
• An increase in the number of routers on a multiaccess network also increases the
number of LSAs exchanged between the routers. This flooding of LSAs significantly
impacts the operation of OSPF.
• If every router in a multiaccess network had to flood and acknowledge all received
LSAs to all other routers on that same multiaccess network, the network traffic would
become quite chaotic.
• On multiaccess networks, OSPF elects a DR to be the collection and distribution point
for LSAs sent and received. A BDR is also elected in case the DR fails. All other
routers become DROTHERs. A DROTHER is a router that is neither the DR nor the
BDR.
• Note: The DR is only used for the dissemination of LSAs. The router will still use the best
next- hop router indicated in the routing table for the forwarding of all other packets.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37