0% found this document useful (0 votes)
22 views42 pages

OSPF

Uploaded by

Gouthum M
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)
22 views42 pages

OSPF

Uploaded by

Gouthum M
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/ 42

Open Shortest Path First (Basic)

Safwan Muntasir (Sufi)


Networking Enthusiast

www.linkedin.com/in/smsufi OSPF Basic


Contents
No Topic Page No Topic Page

01 Introduction 03 17 Route Table 20

02 Key Features 04 18 OSPF Route Table 21

03 Pack et Header Format 05 19 Protocols Table 22

04 How it work s! 06 20 Interfaces 23

05 Becoming Neighbors 07-08 21 Cost Metric 24-25

06 Pack et Type 1 (Hello) 09 22 OSPF Area 26

07 Exchanging Database 10 23 Multi-Area Configuration & Database 27-28

08 Pack et Type 2 (DD) 11 24 OSPFv2 Interface Subcommands 29

09 Calculating Best Route 12 25 Type of Routers 30

10 Pack et Type 3 (LSR) 13 26 Network Types 31

11 Pack et Type 4 (LSU) 14 27 Point-to-Point Network 32

12 LSA Flooding 15 28 Broadcast Network 33

13 Maintaining Updates 16 29 DR and BDR Election 34

14 Basic Configuration 17 30 DR/BDR/DROTHER & OSPF Show Commands 35

15 Neighbor Table 18 31 OSPF Passive Interface 36

16 Database Table 19 32 PDU (Pack et Type 1,2,3,4,5) 37-40

www.linkedin.com/in/smsufi OSPF Basic 2


Back to Contents

Introduction
The history of OSPF can be traced back to the early 1980s, when the internet was still in its early stages of development. At the time, the
most common routing protocol was RIP (Routing Information Protocol), but RIP had a number of limitations, such as its inability to support
large networks or to distribute external routes.

In response to the limitations of RIP and to develop a new routing protocol, the IETF (Internet Engineering Task Force) -
• Formed a working group in 1998.
• In 1991, published RFC 1247, which defined the first version of OSPF.
• In 1998, published RFC 2328, which defines the current version of OSPF (OSPFv2).
• In 1999, published RFC 2740, which defines OSPFv3 for IPv6 networks.

OSPF is now one of the most widely used routing protocols worldwide. In fact, it the most used IGP (Interior Gateway Protocol). OSPF
has continued to evolve over the years, and the IETF continues to publish new RFCs that define new features and enhancements for OSPF.
OSPF is an IGP (Interior Gateway Protocol) but it can also Redistribute External Routes from different Autonomous System into its routing
table. This routing protocol is known for its scalability, reliability and support for advanced features such as authentication and traffic
engineering.

www.linkedin.com/in/smsufi OSPF Basic 3


Back to Contents

Key Features
• OSPF stands for Open Shortest Path First. It uses Dijkstra’s Algorithm (SPF).
• IGP (Interior Gateway Protocol) - route traffic within a single AS (Autonomous System).
• Standard Protocol – Cisco/Non-Cisco devices.
• Link-State Protocol – sent LSAs (Link-State Advertisement) periodically.
• Thus, convergence is Fast (40 seconds).
• Protocol number 89.
• AD (Administrative Distance) value 110.
• Multicast address 224.0.0.5 for normal communication and 224.0.0.6 for update to DR/BDR (Designated Router/Backup
Designated Router).
• Supports equal Load balancing.
• No automatic summarization.
• Multiple Areas.
• Different OSPF Processes in a single autonomous system.
• Supports CIDR (Classless Inter-Domain Routing).
• No limit for number of Hops (routers) connected.

www.linkedin.com/in/smsufi OSPF Basic 4


Back to Contents

Packet Header Format

Version: OSPFv2 for IPv4.


IP Header OSPF Packet Header OSPF Data
Type: OSPF packet type from 1 to 5. Such as:
Hello, DD, LSR, LSU, LSAck.
Packet Length: Total length of the packet in bytes
including header.
0 7 15 31
Router ID: Advertising router ID.
Version Type Packet Length
Area ID: To which the OSPF enabled interface
Router ID belongs.

24 bytes
Area ID Checksum: To perform error checking.
Checksum Authentication Type Authentication Type: Authentication type ranging
Authentication from 0 to 2 respectively non-authentication, simple
Authentication (plaintext) authentication, and MD5 authentication.
Authentication: Data used for authentication.

www.linkedin.com/in/smsufi OSPF Basic 5


Back to Contents

How it works!
OSPF works in three steps mainly:
1. Becoming Neighbors: OSPF routers discover and establish neighbor relationships with other OSPF routers on the same network
segment by sending Hello packets.
To see the neighbor table, type this command in privileged EXEC mode:
‘show ip ospf neighbor’
2. Exchanging Database: OSPF routers exchange Link-State Advertisements (LSAs) to create and maintain a synchronized link-state
database. LSAs contain information about the routers, links, and subnets within the OSPF area.
To see the database table, type this command in privileged EXEC mode:
‘show ip ospf database’
3. Calculating Best Route: OSPF use Dijkstra's algorithm to calculate the shortest path tree (SPF tree). The SPF tree represents the
best paths to reach all destinations within the OSPF area.
To see the routing table, type this command in privileged EXEC mode:
‘show ip route’

www.linkedin.com/in/smsufi OSPF Basic 6


Back to Contents

Becoming Neighbors
OSPF process stars with a Hello message. There are 3 states in becoming neighbors:

Hello! My RID: 1.1.1.1


Neighbors: 224.0.0.5
Multicast
Down Down
Router ID: 1.1.1.1 Router ID: 2.2.2.2
Hello! My RID: 2.2.2.2
Neighbors: 1.1.1.1
Unicast
Down Init
Router ID: 1.1.1.1 Router ID: 2.2.2.2
Hello! My RID: 1.1.1.1
Neighbors: 2.2.2.2
Unicast
2-Way Init
Router ID: 1.1.1.1 Router ID: 2.2.2.2

2-Way 2-Way
Router ID: 1.1.1.1 Router ID: 2.2.2.2

www.linkedin.com/in/smsufi OSPF Basic 7


Back to Contents

Becoming Neighbors
Router ID: A 32 bit unique number. OSPF router is identified using same ID in all directions. It is selected in following cascading
selection:
1. Manually assigned. To reset the Router ID, use following
‘Router(config)# router ospf 1’ command in privileged EXEC mode:
‘Router(config-router)# router-id 1.1.1.1’ ‘Router# clear ip ospf process’
2. Highest ‘up’ status loopback interface IP address.
3. Highest ‘up’ status physical interface IP address.

Conditions: There are some requirements to match to become neighbors:


1. Hello interval 5. Subnet mask
2. Dead interval 6. Authentication
3. OSPF area ID 7. Stub area flag
4. Subnet number 8. Unique router ID

www.linkedin.com/in/smsufi OSPF Basic 8


Back to Contents

Packet Type 1 (Hello)


Network Mask: The netmask of the interface.
IP Header OSPF Header OSPF Hello Packet Hello Interval: The default is 10 seconds for broadcast and
point-to point networks and 30 seconds for NBMA (Non-
broadcast Multi-access).
Options: Indicating the various OSPF router capability, such
0 7 15 31 as whether stub areas are supported in the Options field.
Network Mask Router Priority: This is a number from 0 to 255, which
Hello Interval Options Router Priority defaults to 1. The router with the highest value will become

Dead Interval the designated router. If the Priority is set to 0, the router
does not participate in the DR/BDR selection.
Designated Router (DR)
Dead Interval: Time before declaring a silent router down. It
Backup Designated Router
is four times hello interval.
Neighbor
DR: IP address of the Designated Router.

BDR: IP address of the Backup Designated Router.
***Initial DR, BDR & Neighbors are “0.0.0.0” Neighbors: Router ID of the neighbor routers.

www.linkedin.com/in/smsufi OSPF Basic 9


Back to Contents

Exchanging Database
After becoming neighbors, routers starts to flood the summary information of LSAs. There are some states to become adjacent router:

I will start exchange!


My RID: 1.1.1.1
Unicast
Exstart Exstart
Router ID: 1.1.1.1 Router ID: 2.2.2.2
No, I will start exchange!
My RID: 2.2.2.2
Unicast
Exstart Exstart
Router ID: 1.1.1.1 Router ID: 2.2.2.2
Here is the summary
of my DB! DD Packets
My RID: 1.1.1.1

Exchange Exchange
Router ID: 1.1.1.1 Router ID: 2.2.2.2
Here is the summary
DD Packets of my DB!
My RID: 2.2.2.2
Exchange Exchange
Router ID: 1.1.1.1 Router ID: 2.2.2.2

www.linkedin.com/in/smsufi OSPF Basic 10


Back to Contents

Packet Type 2 (DD-Database Descriptor)


Interface MTU: largest IP datagram in bytes that the
interface can send without fragmentation. If the MTU
IP Header OSPF Header OSPF DD Packet sizes do not match, the neighbor will get stuck in the
Exstart state.
Options: Indicate the various capabilities of the OSPF
router.
5 bits following options are fixed to “00000”.
0 7 15 31 I (Initial): The Initial bit is set to 1 if the packet is the first
M DD packet. It is set to 0 if not.
Interface MTU Options 00000IM S
M (More): The More bit is set to 0 if the packet is the last
DD Sequence Number
DD packet. It is set to 1 if more DD packets are to follow.
LSA Header M/S (Master/Slave): The master/Slave bit. M/S-bit=1
… indicates that the router is the Master router, otherwise
the router is the Slave router.
… DD Sequence Number: Ensures that DD packets are
LSA Header received; the router that serves as the Master determines
a unique initial value and increments the sequence
number in subsequent DD packet exchanges.
LSA Header: A list of LSA headers for all LSAs in the
LSDB of the router generating the DD packet.

www.linkedin.com/in/smsufi OSPF Basic 11


Back to Contents

Calculating Best Route


Each router can check which LSAs it already has and then ask the router for only remaining LSAs. After the link-state databases of the
neighbors are fully synchronized, they become full adjacent and apply algorithm analyzing the LSDB.

I need complete entry


LSR Packets
for network ‘this’
My RID: 1.1.1.1
Loading Loading
Router ID: 1.1.1.1 Router ID: 2.2.2.2
Here is complete entry
LSU Packets
for network ‘this’
My RID: 2.2.2.2
Loading Loading
Router ID: 1.1.1.1 Router ID: 2.2.2.2

LSAck Packets Thanks for the LSAck Packets


information!

Full Full
Router ID: 1.1.1.1 Router ID: 2.2.2.2

There is another state named “Attempt” state. It is only seen in NBMA (Non-Broadcast Multi Access) links. In NMBA, we have to manually
configure the neighbor’s IP because it doesn’t support multicast. Then, hello packets are sent unicast to manually configured neighbor IP.

www.linkedin.com/in/smsufi OSPF Basic 12


Back to Contents

Packet Type 3 (LSR-Link State Request)


Link-State Type: It is a number (1-7) that indicates the
type of LSA.
IP Header OSPF Header OSPF LSR Packet LSA type code 1 - Router LSA
LSA type code 2 - Network LSA
LSA type code 3 - Network Summary LSA
LSA type code 4 - ASBR Summary LSA
LSA type code 5 - AS External LSA
LSA type code 7 - NSSA External LSA
0 7 15 31
Link-State ID: The Link State ID is contained in the LSA
Link-State Type header, and what the Link State ID contains depends on
the type of LSA. For,
Link-State ID LSA type 1 - the router ID that generated the LSA.
Advertising Router LSA type 2 - the IP address of the DR.
LSA type 3 - the network address of another area
… generated by ABRs (inter-area routes).
LSA type 4 – the network address of another area (routes
Link-State Type to ASBRs).
Link-State ID LSA type 5 - the router ID of the ASBR advertising the
external routes.
Advertising Router LSA type 7 - the ABR in the NSSA (Not So Stubby Area)
translates type 7 LSAs into Type 5 LSAs before sending
Advertising Router: The router ID of the router that generated the LSA. them to other OSPF areas..

www.linkedin.com/in/smsufi OSPF Basic 13


Back to Contents

Packet Type 4 (LSU-Link State Update) & Type 5 (LSAck)

IP Header OSPF Header OSPF LSU Packet IP Header OSPF Header OSPF LSAck Packet

0 7 15 31 0 7 15 31
Number of LSAs LSA Header
LSAs …
… LSA Header

Number of LSAs: the number of LSAs contained in the LSU LSA Header: A list of received LSA headers; a single LSAck
packet. packet can contain multiple LSA headers.
LSAs: LSAs to be advertised in LSU packets; multiple LSAs
can be included and advertised in a single LSU packet. The
LSA consists of LSA header and LSA data.

www.linkedin.com/in/smsufi OSPF Basic 14


Back to Contents

LSA Flooding

R3
R5 LSA R5 LSA

R5 LSA R5 LSA

R1 R2 R5

R5 LSA R5 LSA
R4

www.linkedin.com/in/smsufi OSPF Basic 15


Back to Contents

Maintaining Updates
Maintaining Neighbors and the LSDB-
• Incremental updates (whenever there is a change).
• Hello packets are sent periodically every 10 seconds and Dead time is 40 seconds.
• Convergence rate is fast (40 seconds).
Periodic Updates-
• Each router re-flood the LSA every 30 minutes by default even if no changes occur.
• But the network is not overloaded with flooding LSAs. Why?
Because, each LSA has e separate timer, based on when the LSA was created.

www.linkedin.com/in/smsufi OSPF Basic 16


Back to Contents

Basic Configurations
Process ID: 32 bit Process ID is a number used
to identify an OSPF routing process on the
router. Multiple OSPF processes can be started
on the same router. This process ID is locally
significant. Its range is 0 to 65535.
‘R1(config)# router ospf <process ID>’
Network ID: Advertising network’s IP address.
‘R1(config-router)# network <network ID> <wildcard mask> area <area ID>’
Wildcard Mask: Tell the IOS which portion of
the bits to match or ignore.
• Decimal 0 (Min): The router must compare
this octet as normal .
• Decimal 255 (Max): The router ignores this
octet, considering it to already match.
Area ID: OSPF area number in which this
interface/network will exist.

www.linkedin.com/in/smsufi OSPF Basic 17


Back to Contents

Neighbor Table
Neighbor ID: The router ID of the neighbor.
Pri: The priority value is used in the OSPF
neighbor election process. It determines the
likelihood of a router becoming the Designated
Router (DR) or Backup Designated Router (BDR)
on a multi-access network segment.
State: The current status of neighborship.
Dead Time: time interval within which OSPF
routers expect to receive Hello packets from their
neighbors, if not received it will go to down state.
Address: IP address of the neighbor.
Interface: the specific interface through which the
OSPF neighbor is reachable.

Table-1: Neighbor Table

www.linkedin.com/in/smsufi OSPF Basic 18


Back to Contents

Database Table
• OSPF Database Table is called LSDB.
• Each Entry in LSDB is known as LSA.

Seq#: Each LSA has a sequence number


associated with it, which helps routers track the
most recent version of the LSA. If a router
receives an LSA with a higher sequence
Table-2: Database Table
number, it indicates a more recent update.

Link ID: What the Link State ID contains depends on the type of LSA. Checksum: A checksum value calculated for

ADV Router: IP address of the OSPF router that originated or advertised the LSA. the LSA's contents. Routers use this value to

Age: indicates how long (in seconds) ago the LSA was originally generated by the verify the integrity of the LSA during

advertising router. It helps routers determine the freshness of the routing transmission.

information. Link count: The number of individual links or


entries within the LSA. The number of links can
vary depending on the LS type.

www.linkedin.com/in/smsufi OSPF Basic 19


Back to Contents

Route Table
• Destination Network IP address with its
Subnet Mask (CIDR) value.
• Administrative Distance and Cost
(Metric) value (lowest).
• Next Hop ID Address
• Existing Route duration time.
• Interface through which traffic should be
sent to reach the destination network.

Table-3: Route Table

www.linkedin.com/in/smsufi OSPF Basic 20


Back to Contents

OSPF Route Table


In Route Table, we only get the best route to
get to the destination network. But in OSPF
Route Table, we get every possible route
found to get to the destination network by
OSPF routing protocol with their Destination IP
Address (with CIDR value), Administrative
Table-4: OSPF Route Table
Distance, Cost (Metric), Next Hop IP Address,
Existing Route Duration Time and Source
Interface IP Address.

www.linkedin.com/in/smsufi OSPF Basic 21


Back to Contents

Protocols Table
In Route Table, we only get the best route to
get to the destination network. But in OSPF
Route Table, we get every possible route
found to get to the destination network by
OSPF routing protocol with their Destination IP
Address (with CIDR value), Administrative
Distance, Cost (Metric), Next Hop IP Address,
Existing Route Duration Time and Source
Interface IP Address.

Table-5: Protocols Table

www.linkedin.com/in/smsufi OSPF Basic 22


Back to Contents

Interfaces
This command provides details about
OSPF-enabled interfaces, including their
state, IP addresses, area assignments,
hello time, dead time, waiting time,
process ID and many more.

To see summary of OSPF interfaces


apply this command-
‘Router# show ip ospf interface brief’

www.linkedin.com/in/smsufi OSPF Basic 23


Back to Contents

Cost Metric
• OSPF uses SPF (Shortest Path First) algorithm to calculate the best route.
• The sum of the OSPF interface costs for all outgoing interfaces in the route.
• Router then adds each route to its routing table. 𝑹𝒆𝒇𝒆𝒓𝒆𝒏𝒄𝒆 𝑩𝒂𝒏𝒅𝒘𝒊𝒅𝒕𝒉
• The Formula used to calculate the OSPF cost is: Cost = 𝑰𝒏𝒕𝒆𝒓𝒇𝒂𝒄𝒆 𝑩𝒂𝒏𝒅𝒘𝒊𝒅𝒕𝒉
• By default, Reference Bandwidth is 𝟏𝟎𝟖 in bps (bit per second)
• Default Cost Metric value is given below:

Interface Default
Interface Bandwidth (Kbps) Formula (Kbps) OSPF Cost
Serial 1544 100,000/1544 64
Ethernet 10,000 100,000/10,000 10
Fast Ethernet 100,000 100,000/100,000 1
Gigabit Ethernet 1,000,000 100,000/1,000,000 1
10 Gigabit Ethernet 10,000,000 100,000/10,000,000 1
100 Gigabit Ethernet 100,000,000 100,000/100,000,000 1

www.linkedin.com/in/smsufi OSPF Basic 24


Back to Contents

Cost Metric
There are three ways to change interface cost in cisco routers:
1. Changing Interface Bandwidth: It will change the total cost metric of
interface by using the interface subcommand- ‘bandwidth <value>’
2. Changing Default Reference Bandwidth: Any interface with an interface
bandwidth of 100 Mbps or
faster ties with a calculated
OSPF cost of 1 which is a
limitation. It is probably not
the right basis for choosing
routes. It can be changed by using this command-
‘auto-cost reference-bandwidth <value>’
3. Changing Cost Manually: Manually setting the cost will replace the
calculated cost metric. Thus the calculated best route might also change.
We can change the cost manually using the interface subcommand- ***Ci sco recommends making the OS PF reference bandwidth
settings the same on all OSPF routers in an Enterprise Network.
‘ip ospf cost <value>’

www.linkedin.com/in/smsufi OSPF Basic 25


Back to Contents

OSPF Area
Single Area Limitations: OSPF Multiple Area:
• Larger topology requires more memory on router. • Multiple area allows to logically group set of routers in one area.
• Too many LSAs may cause network overload. • It will break one large LSDB into several smaller LSDBs.
• Take more CPU time & resources to run SPF algorithm. • Minimizes the CPU & memory resources.
• A single interface status change anywhere forces every router • Convergence becomes fast.
to run SPF again. • Any changes are restricted, LSA advertised in the particular
• Convergence time becomes very slow. area only.
• OSPF area range 0 to 4294967295.
OSPF Multiple Area Design Rules:
• In each area, recommended number of router is less than 30 to 50.
• Two or more area must have at least one area named ‘area 0’ which is called the backbone area.
• All the non-backbone areas must connect to area 0. Else it cannot advertise its networks in other areas by default.
• There must be at least one ABR (Area Border Router) connecting two or more areas.
• Interfaces of both routers facing must be in the same area.

www.linkedin.com/in/smsufi OSPF Basic 26


Back to Contents

Multiple Area Configuration

ABR ABR

Area 1 Area 0 Area 2

***Router doesn’t belong to any area, only router’s


interfaces belong to specific areas.

www.linkedin.com/in/smsufi OSPF Basic 27


Back to Contents

Multiple Area Database Tables


1 2

3 4

***OSPF Areas create a 2-Tier Hierarchy:


• Area 0 – Top of Hierarchy – Backbone Area (Assures loop free area topologies, also Hub and Spike design)
• Area # – All other Areas

www.linkedin.com/in/smsufi OSPF Basic 28


Back to Contents

OSPFv2 Interface Subcommands


• We can use Interface Subcommands instead of using the
network command in global config mode to advertise OSPF-
‘Router(config)# interface <interface name>’
‘Router(config-if)# ip ospf <process ID> area <area no>’
• It can also be used in sub-interfaces using these commands-
‘Router(config)# interface g0/0.1’
‘Router(config-if)# ip ospf 1 area 0’
‘Router(config-if)# interface g0/0.2’
‘Router(config-if)# ip ospf 1 area 0’
‘Router(config-if)# interface g0/0’
‘Router(config-if)# ip ospf 1 area 0’

www.linkedin.com/in/smsufi OSPF Basic 29


Back to Contents

Types of Routers
• IR (Internal Router): IRs are routers that have all their interfaces in the same OSPF area. They don’t have interfaces in multiple
OSPF areas. They maintain the OSPF Database for their area and participate in the calculation of the best routes within the area.
• ABR (Area Border Router): An ABR is a router that is connected to two or more OSPF areas. They maintain an LSDB for each
area and serve as a gateway, thus summarize routes from one area to another, reducing the size of the OSPF database in each area.
• ASBR (Autonomous System Border Router): Connect the OSPF routing domain to external networks or other routing domains,
such as those using different routing protocols. ASBRs redistribute external routes into the OSPF routing domain and vice versa.
• BR (Backbone Router): Backbone Routers are routers that have at least one interface in the OSPF backbone area (Area 0).
Backbone Routers are crucial for interconnecting OSPF areas.
• DR (Designated Router): Elected on multi-access network segments (Ethernet) to reduce OSPF traffic and adjacencies. The DR
is responsible for generating network-specific LSAs (Type 2 LSAs) & forwarding OSPF updates to other routers on the same segment.
• BDR (Backup Designated Router): The BDR monitors the DR and quickly assumes the DR role if the DR becomes unavailable.
This ensures redundancy and stability on multi-access segments.
• VLR (Virtual Link Router): Virtual Routers are routers that establish virtual links to connect OSPF areas when physical connectivity
to the backbone area (Area 0) is not possible. They allow routers in non-backbone areas to reach the backbone area indirectly.
• SR (Stub Router): A stub router is a router that is connected to only one OSPF area and does not exchange routing information
with other areas. Stub routers are typically used in small networks.

www.linkedin.com/in/smsufi OSPF Basic 30


Back to Contents

Network Types
Primarily, there are three types of OSPF network-
OSPF

1. Point-to-Point 2. Broadcast Multi Access 3. NBMA (Non Broadcast Multi Access

A point-to-point network is a A broadcast network is a An NBMA network is a network


network where two routers are network where all routers are where multiple routers are
directly connected to each connected to a single connected to a shared medium,
other. This type of network is broadcast domain. This type but they don’t have broadcast
typically used for serial links of network is typically used for capabilities and this type of
by default. Ethernet networks by default. network is typically used for
Frame Relay & ATM networks.

www.linkedin.com/in/smsufi OSPF Basic 31


Back to Contents

Point-to-Point Network
➢ A single point-to-point link is a single pair of router.
➢ Does not support the ability to add a third router to the link.
➢ Usually a serial interface running either PPP or HDLC.
➢ May also be a point-to-point sub-interface running Frame
Relay or ATM.
➢ No election of DR or BDR is required.
➢ OSPF packets are sent using multicast 224.0.0.5.
➢ OSPF auto-detects this interface type.
Point-to-Point over Ethernet Links:
Most of the WAN Ethernet connections can be P2P. Like-
Ethernet Private Wire Service, Ethernet Line, etc. In this
scenario, Ethernet DR/BDR adds a extra convergence time.
P2P over ethernet links can be done using the commands-
‘R1(config)# interface se0/1/0’
‘R1(config-if)# ip ospf network point-to-point’

www.linkedin.com/in/smsufi OSPF Basic 32


Back to Contents

Broadcast Network
DROTHER DROTHER
➢ OSPF by default uses Broadcast network type on all types
of Ethernet interfaces.
➢ In broadcast multi-access networks there is two challenges-
• Multiple adjacencies. DR BDR
• Flooding of LSAs.
➢ These challenges are solved by electing DR and BDR.
➢ All neighbor routers form full adjacencies with the DR and
BDR only.
➢ The DROTHER routers will never update other routers in
the network.
➢ DROTHER DR, use multicast 224.0.0.6
DR DROTHER, use multicast 224.0.0.5.

www.linkedin.com/in/smsufi OSPF Basic 33


Back to Contents

DR and BDR Election


➢ The router having highest priority will become DR.
➢ The router with second-highest priority is BDR.
➢ The default priority value is 1.
➢ The range of priority value is 0-255.
➢ In case of a tie,
• Router with highest router ID is DR.
• Second highest router ID becomes BDR.
➢ This DR/BDR election occurs during OSPF neighborship,
specifically during the last phase of 2-Way neighbor state
and just before the Exstart state. ➢ DR BDR – EXSTART
➢ If router priority is 0, it cannot become DR/BDR. DR/BDR DROTHER – FULL
➢ DR/BDR election is not preemtive. DROTHER DROTHER – 2-WAY
• If a new router is added within the topology with a better ➢ To change the priority value manually using the command-
priority value after DR/BDR election, it does not preempt the ‘Router(config)# interface <interface name>’
existing DR and BDR until the current DR and BDR fail. ‘Router(config-if)# ip ospf priority <priority value>’

www.linkedin.com/in/smsufi OSPF Basic 34


Back to Contents

DR/BDR/DROTHER & OSPF Show Commands


➢ ‘show ip protocols’
➢ ‘show ip ospf interface’
➢ Show ip ospf interface ?’
➢ ‘show ip ospf interface brief’
➢ ‘show ip neighbors’
➢ ‘show ip ospf rib’
➢ ‘show ip route’
➢ ‘show ip route ospf’
➢ ‘show ip ospf’
➢ ‘show ip ospf database’
➢ ‘show ip ospf database router (routerID)’
➢ ‘show ip ospf database network (networkID)’
➢ ‘show ip ospf database ?’
➢ ‘debug ip ospf ?’

www.linkedin.com/in/smsufi OSPF Basic 35


Back to Contents

OSPF Passive Interface


➢ Passive Interface is used to prevent OSPF interfaces from sending OSPF Hello packets.
➢ Thus, the passive interface does not participate in OSPF neighborship.
➢ Instead, these interfaces only listen to OSPF updates and do not actively advertise OSPF routing information.
➢ It can be used in Stub areas where no further OSPF routing information is needed.
➢ It can be used on interfaces connected to external networks, such as the internet or untrusted networks.
➢ It can be used to minimize OSPF traffic on specific links without affecting overall network functionality.
➢ To make one or few interfaces as passive interface use these commands-
‘Router(config)# router ospf <process ID>’
‘Router(config-router)# passive-interface <interface name>’
➢ In scenarios where multiple interfaces are need to make as passive interfaces excluding few interfaces, use these commands-
‘Router(config)# router ospf <process ID>’
‘Router(config-router)# passive-interface default’
‘Router(config-router)# no passive-interface <excluded interface name>’
The ‘passive-interface default’ command make all the interfaces as passive interface.

www.linkedin.com/in/smsufi OSPF Basic 36


Back to Contents

PDU – Packet Type 1 (Hello)

www.linkedin.com/in/smsufi OSPF Basic 37


Back to Contents

PDU – Packet Type 2 (DD)

www.linkedin.com/in/smsufi OSPF Basic 38


Back to Contents

PDU – Packet Type 3 (LSR) & Type 4 (LSU)

www.linkedin.com/in/smsufi OSPF Basic 39


Back to Contents

PDU – Packet Type 5 (LSAck)

PDU: A protocol data unit is a single unit of information transmitted among peer entities of a computer network.

www.linkedin.com/in/smsufi OSPF Basic 40


Thank You
Feel free to reach out to me for any suggestions or feedback via LinkedIn or Mail

www.github.com/smsufi www.linkedin.com/in/smsufi [email protected]

www.linkedin.com/in/smsufi OSPF Basic


References
• https://en.wikipedia.org/wiki/Open_Shortest_Path_First
• https://www.youtube.com/@SIKANDARshaik/playlists
• https://www.youtube.com/@kushalkabi/playlists
• https://www.youtube.com/@Certbros/playlists
• https://www.geeksforgeeks.org/open-shortest-path-first-ospf-protocol-states/
• https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html
• https://study-ccna.com/ospf-overview/
• https://networklessons.com/ospf/basic-ospf-configuration
• https://www.javatpoint.com/ospf-protocol
• https://www.techtarget.com/searchnetworking/definition/HELLO-
packet#:~:text=A%20HELLO%20packet%20is%20a,First%20(OSPF)%20communications%20protocol.
• https://www.n-study.com/en/ospf-detail/ospf-hello/
• https://techhub.hpe.com/eginfolib/networking/docs/switches/5500hi/5998-5330_l3-ip-rtng_cg/content/351988006.htm#279688693
• https://www.n-study.com/en/ospf-detail/ospf-packet/

www.linkedin.com/in/smsufi OSPF Basic

You might also like