Vous êtes sur la page 1sur 36

2012/5/3

Security Level:

OSPF Routing Protocol


ISSUE1.6
www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

OSPF is an open shortest path first protocol. It is an IGP protocol based on link status. At present, OSPF has two versions :version 2 and version 3.OSPF version2 (defined in RFC 2328) is

used for IPv4 and OSPF version 3 (defined in RFC


2740) is used for IPv6.

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 1

Upon completion of this course, you


will be able to:

Know OSPF routing protocol features Understand concept of OSPF Understand process of route calculation Understand OSPF packet and state machine Understand OSPF route calculation

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 2

Chapter 1 Features of OSPF Chapter 2 Process of Route Calculation Chapter 3 Concept of OSPF Chapter 4 OSPF Packet and State Machine

Chapter 5 OSPF Route Calculation

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 3

Basic features

Support large networks Calculates loop-free routes Fast route convergence--------Responds quickly to topology changes uses IP multicast for transmitting the OSPF packets Supports ECMP( equal cost multi-path ) Supports the packet authentication

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 4

Chapter 1 Features of OSPF Chapter 2 Process of Route Calculation Chapter 3 Network Type of OSPF Chapter 4 Concept of OSPF

Chapter 5 OSPF Packet and State Machine


Chapter 6 OSPF Route Calculation

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 5

The process of route calculation


10M RTA RTC
2.048M

LSDB RTB
LSAs generated by RTA

LSAs generated by RTB

Flooding LSA

LSAs generated by RTC LSAs generated by RTD

RTD
1.

First step , each router originates the link-state advertisement(LSA). It describes the topology of the router. Second step, Each router collects the LSAs from other routers to form the LSDB. The LSDB describes the topology of network .

2.

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 6

The process of route calculation


LSDB
LSAs generated by RTA
LSAs generated by RTB LSAs generated by RTC LSAs generated by RTD

A 1

10 1 C

Equals

48 D

3.

Third step,the routers transform the LSDB into a weighted directed map. The weighted directed map reflects the topology of the entire network. All routers

have the same map.


HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 7

The process of route calculation


10 1 C

A 1 C

48
D

Shortest Path First algorithm

48
D

4.

Fourth step, According to the weighted directed map, each router take itself being the root ,then calculate the shortest path tree with SPF algorithm . The tree shows the

routes to each node in the network .

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 8

Chapter 1 Features of OSPF Chapter 2 Process of Route Calculation Chapter 3 Concept of OSPF Chapter 4 OSPF Packet and State Machine

Chapter 5 OSPF Route Calculation

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 9

OSPF Basic Concepts

OSPF Domain :

A group of routers running ospf routing protocol

Router ID:

A 32-bit number assigned to each router running the OSPF protocol. This number uniquely identifies the router within an AS .

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 10

Network Type
Point To Point Networks
Encapsulate the link with PPP / HDLC Protocol

Broadcast Networks
Encapsulate the link with Ethernet / FDDI / Token Ring Protocol

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 11

Network Type (cont.)


FR/ATM/X.25

Point To Multi-Point Networks

FR/ATM/X.25

Non-Broadcast Multi-Access Network

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 12

Neighbors And Adjacencies

Neighbors

If two routers sharing a common data link agree on some parameters specified in their hello packets, they will setup neighbor relationship.

Adjacencies
The adjacency refers to the logical connection. It can be established only
when two routers can exchange the LSAs. Whether the neighbors will become adjacencies depends on the type of network.

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 13

DR and BDR
DR Other

DR

BDR M= n(n-1)/2 = 28
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential

M= (n-2)2+1 = 13
Page 14

Electing DR and BDR


candidates: routers whose DR priorities are greater than 0 are the eligible
"candidates".

Vote
first, compare the router DR-priority. the one with the higher priority is
elected as the DR.

Second, If two routers have the same priority, the one with the larger
router ID is elected as the DR

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 15

Electing DR and BDR


There are three points we must be pay attention to : First, DR is elected on only the broadcast or NBMA interfaces. second, A router acts as a DR on a certain router interface. Third, If a new router is added after the DR/BDR election is complete,
the new router cannot become the DR even if it has the highest priority.
I am late, I can not be the DR right now, although my Router Priority is the biggest

120 90
10.1.1.2

10.1.1.3

Ethernet

100

10.1.1.1

BDR

DR

The numbers in red are the values of Router Priority


HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 16

Problems with the grown network


Maintain a big LSDB in the router --- occupies a great amount of memory SPF calculation become more complex ----leads to the overload of routers. Topology Change oftenly---- impact the network stability and reduce the
utilization of bandwidth,

Management and troubleshooting become more difficult

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 17

Partition Area

Area 1
Area 0

Area 4

Area 2 Area 3

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 18

Type of routers
BR

Area 0

Area 1
Area 2 ABR

Talking BGP with another AS


ASBR

IR

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 19

Chapter 1 Features of OSPF Chapter 2 Process of Route Calculation Chapter 3 Concept of OSPF Chapter 4 OSPF Packet and State Machine

Chapter 5 OSPF Route Calculation

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 20

The Position of OSPF Packets


Link Layer Header IP Packet Header OSPF Protocol Packet Frame Checksum

Protocol Number: 89

OSPF Protocol Header

OSPF Packet Data

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 21

OSPF Packets
Type Packet name Protocol function

1
2

Hello
Database Description

Discover/maintain neighbors
Summary of the database contents

3
4 5

Link State Request


Link State Update Link State Ack

Request specific LSA


LSA contents in details acknowledgments for packets transmitting

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 22

OSPF Neighbor State Machine


Down

Attempt

Init
Loading

2-way

ExStart

Exchange

Full

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 23

Adjacency Building Process


RT1
Broadcast/NBMA

RT2 Hello( DR = 0.0.0.0,Neighbors Seen = 0) Hello( DR = RT2,Neighbors Seen = RT1) Hello( DR = RT2,Neighbors Seen = RT2) DD (Seq = x,I = 1, M = 1, MS = 1) DD (Seq = y,I = 1, M = 1, MS = 1) DD (Seq = y,I = 0, M = 1, MS = 0) DD (Seq = y+1,I = 0, M = 1, MS = 1) DD (Seq = y+1,I = 0, M = 1, MS = 0) DD (Seq = y+n,I = 0, M = 0, MS = 1) DD (Seq = y+n,I = 0, M = 0, MS = 0) LS Request LS Update LS ACK
Huawei Confidential Page 24

Down
Two Way

Down Init(one way)


Two Way

ExStart Exchange

ExStart Done Exchange

Loading

Full

Full
HUAWEI TECHNOLOGIES CO., LTD.

Chapter 1 Features of OSPF Chapter 2 Process of Route Calculation Chapter 3 Concept of OSPF Chapter 4 OSPF Packet and State Machine

Chapter 5 OSPF Route Calculation

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 25

LSA types
LSA Type 1 Router-LSA generated by each routers. This LSA describes status and cost of the routers links . Flooded throughout the local area only 2 Network-LSA generated by DR in broadcast and NBMA networks. This LSA contains the list of routers connected to the network. Flooded throughout the local area only LSA Name LSA description

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 26

LSA types

LSA Type 3

LSA Name

LSA description

Network-SummaryLSA

generated by ABR, describes the route of the area, flooded to other related area

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 27

LSA types
LS Type
4

LSA Name

LSA description

ASBR-Summary-LSA Generated by ABR. This LSA describes the route to an ASBR. Advertised to the related area except the area to which ASBR belongs.

AS-external-LSA

generated by ASBR. This LSA describes the route to a destination outside the OSPF domain . Advertised to all areas except the stub and NSSA area.

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 28

Route Summary On ABR


area 1
20.1.0.0/24 20.1.1.0/24 20.1.2.0/24 20.1.15.0/24

area 0 20.1.0.0/20

ABR

ABR can perform the address summarization from one area to another area, and this can reduce the network summary LSA flooding and improve the network performances

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 29

Route Summary On ASBR


RIP
20.1.0.0/24 20.1.1.0/24 20.1.2.0/24 20.1.15.0/24

OSPF 20.1.0.0/20

ASBR

ASBR can perform the address summarization from Non-OSPF routing domain to OSPF routing and this can reduce the AS external LSA flooding and improve the network performances

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 30

Stub Area
area 0 Type 3 LSA

area 1 Stub area

Type 3 LSA (default route)


Type 4 LSA

Type 5 LSA

ABR router will stop the type 5 LSA to enter the stub area, all the traffic forward outside the OSPF routing domain will be using the default route generated by the ABR .
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 31

Total Stub Area


area 0

Type 3 LSA

area 2 (total stub area)

Type 3 LSA (default route)


Type 4 LSA Type 5 LSA

ABR will stop the type 3/4/5 LSA to enter total stub area except the one type 3 LSA: the default route for the traffic outside the total stub area
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 32

Not-So-Stubby Area (NSSA)


RIP
Type 7 LSA

area 0

NSSA area

ASBR

NSSA area can import the Non-OSPF route into the OSPF routing domain using the type 7 LSA, type 7 LSA will only be flooded in the NSSA area and translated into type 5 LSA by the ABR.

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 33

Summary

Basic features The process of calculating routes Network type Partition Area DR/BDR; Neighbor/adjacency Packet type; LSA type Special areas

HUAWEI TECHNOLOGIES CO., LTD.

Huawei Confidential

Page 34

Thank you
www.huawei.com

Vous aimerez peut-être aussi