HC120115000 OSPF Protocol Basics
HC120115000 OSPF Protocol Basics
www.huawei.com
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 3
Contents
1. Challenges that RIP Is Confronted with in
Large Networks
2. Basic Principles of OSPF
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 4
Changes in Large Networks
Networks are Company
headquarters
expanding.
Higher network
reliability is
required.
A trend towards Branch Branch
A B
heterogeneity of
networks goes
up significantly.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 5
Existing RIP Problems in Large
Networks RTC
N1 N2
t1 t2 t3 t4
N1 convergence time
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 6
Solving RIP Problems
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 7
Link-State Routing Protocol OSPF
Separates routing information propagation from
route calculation.
Uses the Shortest Path First (SPF) algorithm.
Uses the accumulated link cost as the criterion for
route selection.
LSDB
synchronization
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 8
OSPF Working Process
Step 1: Establish a neighbor
relationship.
Step 2: Synchronize
LSDBs.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 9
Contents
1. Challenges that RIP Is Confronted with in Large
Networks
2. Basic Principles of OSPF
Neighbor Relationship Establishment
Link State Information
Packet Types and Functions
LSDB Synchronization
DR and BDR Election and Roles
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 10
Router ID
Each OSPF router owns a unique router ID, which
uniquely identifies a router within an autonomous
Who am I and who are
system (AS). others?
Each router must be identified
in an LSDB.
LSDB
synchronization
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 11
Neighbor Discovery and Neighbor
Relationship Establishment - Hello
Packet
A Hello packet performs the following functions:
To discover neighbors: An OSPF router can send a Hello
packet to discover neighboring routers.
To establish neighbor relationships: Two OSPF routers
negotiate parameters in Hello packets to establish a
neighbor relationship.
To maintain neighbor relationships: OSPF routers use
the Keepalive mechanism to continually detect the
neighbor reachability.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 12
OSPF Neighbor Relationship
Establishment Process
Router ID 1.1.1.1 Router ID 2.2.2.2
RTA RTB
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 13
Neighbor Discovery and Neighbor
Relationship Establishment -
Manual Configuration
OSPF allows routers to establish neighbor relationships
using unicast Hello packets.
If the network does not have the multicast capability,
neighbor relationships must be manually established.
1.1.1.1 2.2.2.2
RTA RTB
ospf 1 ospf 1
peer 2.2.2.2 peer 1.1.1.1
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 14
Contents
1. Challenges that RIP Is Confronted with in Large
Networks
2. Basic Principles of OSPF
Neighbor Relationship Establishment
Link State Information
Packet Types and Functions
LSDB Synchronization
DR and BDR Election and Roles
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 15
Link State Information
Link information includes:
Link type
Interface IP address and subnet mask
Neighboring routers sharing the same link
Link bandwidth (cost)
I am 1.1.1.1
See my link state information
below: xxxxx
I am 2.2.2.2
RTA See my link state information RTB
below: xxxxx
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 16
Extensive Data Link Layer Support
A variety of data link layer protocols exist, and their
working mechanisms differ.
Application scenarios of various data link layer
protocols must be considered to support these
protocols.
FR
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 17
Network Type - Point-to-Point
Network
Only two routers are connected to each other.
Broadcast and multicast are supported.
10.1.12.2
10.1.12.1
RTA RTB
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 18
Network Type - Broadcast Network
Two or more routers are connected through shared
media.
Broadcast and multicast are supported.
RTA RTB
10.1.1.1 10.1.1.2
Ethernet
10.1.1.
10.1.1.4
3
RTC RTD
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 19
Network Type - NBMA Network
RTA
Two or more routers are
connected through a virtual DLCI=102 DLCI=103
.1
10.1.123
circuit (VC).
Broadcast and multicast are
not supported. D
LC
1
I=
20
10 30
.
I=
23
3. .1 1
LC
3 .1
.1
FR 2
D
2 .1
D
20 LC
10
= 2
I I=
LC 30
D
3
RTB RTC
Fully meshed FR network
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 20
Network Type - Point-to-Multipoint
Network
RTA
A point-to-multipoint
network is a set of DLCI=102 DLCI=103
.1
10.1.123
multiple point-to-point
networks.
Broadcast and multicast D
LC
1
I=
20
10 30
are supported.
.
I=
23
3. .1 1
LC
3 .1
.1
2
D
2 .1
FR
10
RTB RTC
Partially-meshed FR network
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 21
OSPF Cost
Interface cost = Reference bandwidth/Interface
bandwidth
Hence, the cost can be changed in two ways:
Configure the cost directly under interface
configuration mode.
Change the reference bandwidth. This alternation
Loopback 1must
192.168.3.3/24
be performed
G1 on all routers
G2 G3 to G4
ensure route selection
RTA RTB RTC
consistency.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 23
OSPF Packet Header
Protocol number 89
OSPF OSPF
IP Packet
Packet Packet
header
header data
0 7 15 31
Versio
Type Packet Length
n
Router ID
Area ID
Checksum Auth Type
Authentication
Authentication
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 24
OSPF Packet Types
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 25
Functional Requirement of OSPF
Packets
Requirement
Function to Be
Implementation
Achieved
Analysis
Neighbor relationship
discovery and Use the Hello mechanism.
maintenance
Enable two routers to send
LSAs to each other for LSA
synchronization.
LSA synchronization
LSA synchronization is fast
and fewer resources are
consumed.
Ensure reliable LSA
Reliability
synchronization.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 26
Contents
1. Challenges that RIP Is Confronted with in Large
Networks
2. Basic Principles of OSPF
Neighbor Relationship Establishment
Link State Information
Packet Types and Functions
LSDB Synchronization
DR and BDR Election and Roles
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 27
OSPF LSDB Synchronization (1/2)
Router ID 1.1.1.1 Router ID 2.2.2.2
RTA RTB
(5) DD(Seq=Y+1)
Exchange > Exchange >
Loading Full
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 28
OSPF LSDB Synchronization (2/2)
Router ID 1.1.1.1 Router ID 2.2.2.2
RT RT
A B
(6) LS Request
Loading Full
(7) LS Update
Loading > Full Full
(8) LSAck
Full Full
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 29
OSPF Neighbor State Machines
Down
Start
Hello Received
Attempt
Hello Received
Init
1-way
Received
ExStart 2-way
Negotiation 2-way Hello Received
Done
Exchange
Exchange
Done
Full Loading
Loading Done
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 30
LSA Header
LSAs carry OSPF link state information.
0 15 23 31
Link State ID
Advertising Router
LS sequence number
LS checksum Length
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 31
Contents
1. Challenges that RIP Is Confronted with in Large
Networks
2. Basic Principles of OSPF
Neighbor Relationship Establishment
Link State Information
Packet Types and Functions
LSDB Synchronization
DR and BDR Election and Roles
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 32
Problems in MA Networks
Managing nx(n−1)/2 adjacencies is complicated.
Unnecessarily flooding repeated LSAs is a waste of
resources.
RTA RTB
RTC RTD
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 33
Responsibilities of DR and BDR
Reduces the number of adjacencies.
Reduces OSPF traffic.
RTA RTB
Pseudo node
RTC RTD
Whether to Establish an
Network Type
Adjacency
Point-to-point Yes
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 37
Thank You
www.huawei.com