0% found this document useful (0 votes)
83 views46 pages

Single-Area OSPFv2 Concepts

The document discusses the features and operation of single-area OSPF. It describes OSPF characteristics, packets, and how it uses link state routing and shortest path first algorithms to converge on a routing table. The document also explains differences between single-area and multi-area OSPF deployment.

Uploaded by

marwanosama229
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views46 pages

Single-Area OSPFv2 Concepts

The document discusses the features and operation of single-area OSPF. It describes OSPF characteristics, packets, and how it uses link state routing and shortest path first algorithms to converge on a routing table. The document also explains differences between single-area and multi-area OSPF deployment.

Uploaded by

marwanosama229
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Module 1: Single-Area OSPFv2

Concepts
Enterprise Networking, Security, and Automation v7.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.

Topic Title Topic Objective


OSPF Features and
Describe basic OSPF features and characteristics.
Characteristics
OSPF Packets Describe the OSPF packet types used in single-area OSPF.
OSPF Operation Explain how single-area OSPF operates.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
1.1 OSPF Features and
Characteristics

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
OSPF Features and Characteristics
Introduction to OSPF

IGP → Interior Gateway Protocol EGP → Exterior Gateway


Protocol
RIP → Routing Information Protocol OSPF → Open Shortest Path
First
IGRP → Interior Gateway Routing Protocol EIGRP → Enhanced IGRP
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
BGP → Border Gateway Protocol
OSPF Features and Characteristics
Introduction to OSPF
Dynamic Routing
▪ A route (path) that a network routing protocol discovers automatically and adjusted
when topology changes.
▪ A dynamic routing table is updated periodically by using one of the dynamic routing
protocols such as RIP, OSPF, or BGP.
▪ Routing protocol must be configured on the router.
▪ The goal of a routing protocol is to build and maintain the routing table.
▪ Symbol in routing table according to the routing protocol used.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
OSPF Features and Characteristics
Introduction to OSPF
▪ Codes of different routes and routing protocols as appear on the routing table

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
OSPF Features and Characteristics
Introduction to OSPF
Definitions:
Link: is the interface on a router.
Link state: describes of an interface and of its relationship to its neighboring routers, or
this is the information about the state of the links including:
- IP address/mask of the interface.
- The type of network it is connected to.
- The routers connected to that network
- The metric (cost) of that link.
Link-State Data-Base (LSDB): is the collection of all the link-states.
Link state protocols are based on shortest path first (SPF) algorithm which also known as
Dijkstra’s algorithm.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
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. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
OSPF Features and Characteristics
Introduction to OSPF
▪ Open standard.
▪ Link-state routing protocol.
▪ Use Shortest path first (SPF) algorithm. Metric is cost = 108/bandwidth
▪ Administrative Distance = 110.
▪ Hop-count is unlimited.
▪ Symbol in routing table is O.
▪ Classless routing protocol
▪ OSPF supports VLSM and CIDR.
 Metric in OSPF is called.
cost = 108 / bandwidth

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
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 10
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 11
OSPF Features and Characteristics
Components of OSPF (Cont.)
OSPF messages are used to create and maintain three OSPF databases, as follows:

Database Table Description

•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.

•Lists information about all other routers in the network.


Link-state
Topology •The database represents the network LSDB.
Database
Table •All routers within an area have identical LSDB.
(LSDB)
•Can be viewed using the show ip ospf database command.

•List of routes generated when an algorithm is run on the link-state database.


Forwarding Routing •Each router's routing table is unique and contains information on how and where to send
Database Table packets to other routers.
•Can be viewed using the show ip route command.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
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:
Link-State Routing Process
How routers using Link State Routing Protocols to reach convergence:-
1. Each router learns about its own directly connected networks.
2. Link state routers exchange hello packets to discover neighbors.
3. Each router building its own Link State Packet (LSP).
4. Each router floods its LSP to Neighbors.
5. Each router construct a link state database (LSDB) – topological map of the network.
6. Each router determine the shortest path Tree using SPF (Dijkstra) Algorithm.
7. Each router constructing its Routing Table.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
OSPF Features and Characteristics
Link-State Operation
Show how routers using Link State Routing Protocols to reach convergence of the network shown in
Figure

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
OSPF Features and Characteristics
Components of OSPF (Cont.)
OSPF messages are used to create and maintain three OSPF databases, as follows:

Database Table Description

•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 15
OSPF Features and Characteristics
Link-State Operation
Step #1 Each routers learns about its own directly connected networks as shown in Figure

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
OSPF Features and Characteristics
Link-State Operation
Step #2 Link state routers exchange hello packets to discover neighbors as shown in Figure
▪ Connected interfaces that are using the same link state routing protocols will exchange hello packets.
▪ Once routers learn it has neighbors, they form an adjacency:
- 2 adjacent neighbors will exchange hello packets.
- These packets will serve as a keep alive function.

Type Packet Name Description


1 Hello Discovers neighbors and builds adjacencies between them

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
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 18
OSPF Packets
Hello Packet

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
OSPF Operation
Establish Neighbor Adjacencies
• 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:
• These packets are used to discover neighboring routers and also to exchange routing
information to maintain accurate information about the network.
Type Packet Name Description
1 Hello Discovers neighbors and builds adjacencies between them

2 Database Description (DBD) Checks for database synchronization between routers

3 Link-State Request (LSR) Requests specific link-state records from router to router

4 Link-State Update (LSU) Sends specifically requested link-state records

5 Link-State Acknowledgment (LSAck) Acknowledges the other packet types


© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
OSPF Features and Characteristics
Link-State Operation
Step #3 Building the Link State Packet (LSP) as shown in Fig. 6.22(c).
▪ Each router builds its own Link State Packet (LSP) whose contents are:
- State of each directly connected link.
- Includes information about neighbors such as neighbor ID, link type, and the metric value (Cost).

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
OSPF Operation
Establish Neighbor Adjacencies
Step #4 Flooding LSPs to Neighbors as shown in Figure
- Once LSP are created they are forwarded out to neighbors.
- After receiving the LSP the neighbor continues to forward it throughout routing area.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
OSPF Features and Characteristics
Components of OSPF (Cont.)
OSPF messages are used to create and maintain three OSPF databases, as follows:

Database Table Description

•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.

•Lists information about all other routers in the network.


Link-state
Topology •The database represents the network LSDB.
Database
Table •All routers within an area have identical LSDB.
(LSDB)
•Can be viewed using the show ip ospf database command.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
OSPF Operation
Establish Neighbor Adjacencies
Step #5 Constructing a link state database (LSDB).
▪ Routers use a database to construct a topology map of the network as shown in Figure

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
OSPF Operation
Establish Neighbor Adjacencies
Step #6 Determining the shortest path Tree using SPF (Dijkstra) Algorithm. in Figure
▪ The shortest path to each destination is determined by adding the costs & finding the lowest cost.

the shortest path Tree for router R1

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
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 26
Dijkstra algorithm
Let us understand with the following example: Following graph shows
vertices (Routers) and their distance values

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Dijkstra algorithm
Let us understand with the following example: Following graph shows
vertices (Routers) and their distance values
destination Next hop cost
destination Next hop cost

1 direct 4
1 direct 4
2 4 12
2
3
3
4
4
5
5
6
6
7 direct 8
7 direct 8
8
8
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28
Dijkstra algorithm
Let us understand with the following example: Following graph shows
vertices (Routers) and their distance values
destination Next hop cost destination Next hop cost

1 direct 4 1 direct 4

2 4 12 2 4 12

3 3

4 4

5 5 6 11

6 7 9 6 7 9

7 direct 8 7 direct 8

8 7 15 8 7 15

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29
Dijkstra algorithm
Let us understand with the following example: Following graph shows
vertices (Routers) and their distance values

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
OSPF Features and Characteristics
Components of OSPF (Cont.)
OSPF messages are used to create and maintain three OSPF databases, as follows:

Database Table Description

•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.

•Lists information about all other routers in the network.


Link-state
Topology •The database represents the network LSDB.
Database
Table •All routers within an area have identical LSDB.
(LSDB)
•Can be viewed using the show ip ospf database command.

•List of routes generated when an algorithm is run on the link-state database.


Forwarding Routing •Each router's routing table is unique and contains information on how and where to send
Database Table packets to other routers.
•Can be viewed using the show ip route command.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31
OSPF Operation
Establish Neighbor Adjacencies
Step #7 Constructing the Routing Table
Once the SPF algorithm has determined the shortest path routes, these routes are placed in the routing table.

Routing table for router R1

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
1.2 Establish Neighbor
Adjacencies

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
OSPF Operation
Establish Neighbor Adjacencies
• 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:
• These packets are used to discover neighboring routers and also to exchange routing
information to maintain accurate information about the network.
Type Packet Name Description
1 Hello Discovers neighbors and builds adjacencies between them

2 Database Description (DBD) Checks for database synchronization between routers

3 Link-State Request (LSR) Requests specific link-state records from router to router

4 Link-State Update (LSU) Sends specifically requested link-state records

5 Link-State Acknowledgment (LSAck) Acknowledges the other packet types


© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34
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 35
OSPF Packets
Hello Packet

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36
OSPF Operation
Establish Neighbor Adjacencies (Cont.)
The process routers use to establish adjacency on a multiaccess network:

1 Down to Init State When OSPFv2 is enabled on the interface, R1 transitions from Down to Init and starts
sending OSPFv2 Hellos out of the interface in an attempt to discover neighbors.
2 Init State When a R2 receives a hello from the previously unknown router R1, it adds R1’s router
ID to the neighbor list and responds with a Hello packet containing its own router ID.
3 Two-Way State R1 receives R2’s hello and notices that the message contains the R1 router ID in the list
of R2’s neighbors. R1 adds R2’s router ID to the neighbor list and transitions to the Two-
Way State.
If R1 and R2 are connected with a point-to-point link, they transition to ExStart
If R1 and R2 are connected over a common Ethernet network, the DR/BDR election
occurs.
4 Elect the DR & BDR The DR and BDR election occurs, where the router with the highest router ID or highest
priority is elected as the DR, and second highest is the BDR

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37
OSPF Operation
OSPF Operational States
State Description

•No Hello packets received = Down.


Down State •Router sends Hello packets.
•Transition to Init state.
•Hello packets are received from the neighbor.
Init State •They contain the Router ID of the sending router.
•Transition to Two-Way state.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38
OSPF Operation
OSPF Operational States
State Description

•In this state, communication between the two routers is bidirectional.


Two-Way State •On multiaccess links, the routers elect a DR and a BDR.
•Transition to ExStart state.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 39
OSPF Operation
Synchronizing OSPF Databases
After the Two-Way state, routers transition to database synchronization states. This is a
three step process, as follows:
1. Decide first router: The router with the highest router ID sends its DBD first.
2. Exchange DBDs: As many as needed to convey the database. The other router
must acknowledge each DBD with an LSAck packet.
3. 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.

After all LSRs have been exchanged and satisfied, the routers are considered
synchronized and in a full state. Updates (LSUs) are sent:
• When a change is perceived (incremental updates)
• Every 30 minutes

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 40
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.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 41
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 42
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.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 43
OSPF Operation
OSPF Operational States (Cont.)
State Description

•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 44
1.2 Dijkstra shortest-path first
(SPF) algorithm

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 45

You might also like