zte ospf protocol, principle and configuration

51
OSPF Routing Protocol Principle V2.1

Upload: ghee17

Post on 21-Jul-2016

236 views

Category:

Documents


9 download

DESCRIPTION

ZTE OSPF Protocol, Principle and Configuration

TRANSCRIPT

Page 1: ZTE OSPF Protocol, Principle and Configuration

OSPF Routing Protocol Principle

V2.1

Page 2: ZTE OSPF Protocol, Principle and Configuration

Outline

Through learning this course, you will: Master computing methods of OSPF routing

protocol Master advanced applications of OSPF routing

protocol

Page 3: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 4: ZTE OSPF Protocol, Principle and Configuration

OSPF Overview

Open Shortest Path First (OSPF) OSPF is Internal Gateway Protocol (IGP).

OSPF is a kind of link-state protocol, it maintains complex network topology database and then adopts SPF algorithm to calculate the best route.

The types of network supported by OSPF are classified into multi-access network and point-to-point network.

Page 5: ZTE OSPF Protocol, Principle and Configuration

OSPF Advantages

No route loop Adapt to large-scale network High convergence rate of route Support area allocation Support equivalent route Support verification Support hierarchic management Transmit protocol messages in multicast address

Page 6: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 7: ZTE OSPF Protocol, Principle and Configuration

Hi, I am router A and my name is 192.132.1.3.

OSPF Concept (1)

Router ID Definition: 32-bit binary to identify each router on OSPF network. Selection method: SelecteThe IP address of the interface which is activated firstly. If

multiple interfaces are activated, the minimum IP address of the router is selected on the ZTE router.

If loopback interface is configured on the router, router ID will be the minimum IP address of all loopback interfaces, in spite of IP addresses of other physical interfaces or even when they are activated.

Features: Globally unique; Once selected, it cannot be changed unless OSPF progress is

restarted. ZXR10# clear ip ospf process <process-id>

Page 8: ZTE OSPF Protocol, Principle and Configuration

OSPF Concept (2) Interface Interfaces run OSPF protocol; transmit protocol messages periodically (Hello packet) to search and find

neighbors. Designated Router (DR) and Backup Designated Router (BDR) To reduce traffic of OSPF synchronous link state information, broadcast

network can be automatically represented as DR or BDR according to interface priority or router-id.

Link State Database Contains link state of all routers on the network and indicates the topology

structure of the whole network. Neighboring Routers OSPF routers on the direct network become neighbors automatically after

exchanging hello packets. Adjacency On the basis of neighbors, Link State Advertisement (LSA) is synchronized to

form adjacency.

Page 9: ZTE OSPF Protocol, Principle and Configuration

OSPF Working Process (1)

Run OSPF protocol and find neighbors;

Exchange LSA, synchronize Link State Database (LSDB), and form adjacency;

Use SPF algorithm to establish the shortest path tree and calculate the best route.

Page 10: ZTE OSPF Protocol, Principle and Configuration

OSPF Working Process (2)

Autonomous system

Route tableTopology databaseNeighbor table

Interfaces start OSPF

Page 11: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Finding Neighbors Selecting DR or BDR Forming Adjacency Updating LSA Computing Optimal Route Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 12: ZTE OSPF Protocol, Principle and Configuration

Neighborhood

Hello

afadjfjorqpoeru39547439070713

Router IDHello/dead intervalsNeighborsArea-IDRouter priorityDR IP addressBDR IP addressAuthentication passwordStub area flag

* *

* *

Hello

A

D E

CB

Interfaces run OSPF send periodicallyItems with *which must be consistent to establish neighbors

Page 13: ZTE OSPF Protocol, Principle and Configuration

Neighborhood—Hello Message

Page 14: ZTE OSPF Protocol, Principle and Configuration

Process of Forming OSPF Neighbor List

10.75.32.1/30Int1

10.75.32.2/30Int1A B

Lo: 10.75.0.1 Lo: 10.75.0.2

RB Neighbors List RA Neighbors List

Hello, my router ID is 10.75.0.1 and see no neighbors.

Down State

10.75.0.1, int1 , init

Hello, my router ID is 10.75.0.2 and my neighbor is 10.75.0.1.

Init State

10.75.0.2, int1 , 2-way

Hello, my router ID is 10.75.0.1 and my neighbor is 10.75.0.2.

Two-way

10.75.0.1, int1, 2-way

Page 15: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Finding Neighbors Selecting DR or BDR Forming Adjacency Updating LSA Computing Optimal Route Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 16: ZTE OSPF Protocol, Principle and Configuration

LSA Synchronization on Broadcast Network

On broadcast network or NBMA, resource will be wasted when each neighbor transmits LSA (network bandwidth and CPU resources).

Neighbor, receive my LSA.

Page 17: ZTE OSPF Protocol, Principle and Configuration

Functions of DR and BDR

To reduce traffic of OSPF protocol messages, each network segment uses DR or BDR to represent the network.

Each router can synchronize LSA with DR and BDR to form adjacency.

DR BDR

Page 18: ZTE OSPF Protocol, Principle and Configuration

P=1 P=0P=1

Selection of DR and BDR

P=3 P=2

Hello

DR BDR

The router that is started first on the network is selected as DR; When started simultaneously or reselected, the router with the

superior priority (0-255) is selected as DR; When started simultaneously or with the same priority, the router

with the largest ID is selected as DR; DR selection is not preemptive unless OSPF progress is restarted.

Page 19: ZTE OSPF Protocol, Principle and Configuration

Selection of DR and BDR—Hello Message

Page 20: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Finding Neighbors Selecting DR or BDR Forming Adjacency Updating LSA Computing Optimal Route Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 21: ZTE OSPF Protocol, Principle and Configuration

Forming Adjacency of OSPF (1)

10.75.32.1/30Int1

10.75.32.2/30Int1A B

Lo: 10.75.0.1 Lo: 10.75.0.2

RB Neighbors List RA Neighbors List

DR, I will initiate interaction of LSA and I am the master sender (MS=1).

10.75.0.1, int1 , init10.75.0.2, int1 , 2-way 10.75.0.1, int1, 2-way

DR

Exstart

10.75.0.2, int1, Exstart

DBD

afadjfjorqpoeru39547439070713

No, I am the master sender, because I have higher router ID. DBDafadjfjorqpoeru39547439070713

10.75.0.1, int1, Exchange

This is summary information about my LSDB. DBD

afadjfjorqpoeru39547439070713Exchange State

This is summary information about my LSDB.DBD

afadjfjorqpoeru39547439070713

10.75.0.2, int1, Exchange

Page 22: ZTE OSPF Protocol, Principle and Configuration

Forming Adjacency of OSPF (2)

10.75.32.1/30Int1

10.75.32.2/30Int1A B

lo : 10.75.0.1 lo : 10.75.0.2

RB Neighbors List

10.75.0.1, int1 , init10.75.0.1, int1, Exchange

DR

I have no information about 172.16.6.0/24 and I need entire LSA.LSR

afadjfjorqpoeru39547439070713

Loading State

This is LSA of 172.16.6.0/24. LSU

afadjfjorqpoeru39547439070713

RA Neighbors List

10.75.0.1, int1 , init10.75.0.2, int1, Exchange10.75.0.2, int1, Loading

Full State

Received, thanks!LSAck

afadjfjorqpoeru39547439070713

10.75.0.2, int1, Full

My LSDB is complete. No query is needed.

10.75.0.1, int1, Full

Page 23: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Finding Neighbors Selecting DR or BDR Forming Adjacency Updating LSA Computing Optimal Route Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 24: ZTE OSPF Protocol, Principle and Configuration

Flooding Process (1)

The router notifies changed topology information of neighbors in 224.0.0.5.

xx

Point-to-point link state changes

LSU1

LSU

Update route table

2

3

A B

Page 25: ZTE OSPF Protocol, Principle and Configuration

Update route table4

LSU

3

LSU

2

xxLSU1

Flooding Process (2)

Router A notifies DR in 224.0.0.6. DR notifies other routers in 224.0.0.5.

Broadcast link state changes

DR

A B

Page 26: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Finding Neighbors Selecting DR or BDR Forming Adjacency Updating LSA Computing Optimal Route Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 27: ZTE OSPF Protocol, Principle and Configuration

Process of Computing OSPF Protocol

LSDB

LSA of RTA

LSA of RTB

LSA of RTC

LSA of RTD

(2) LSDB of each router (3) Weighted digraph created by LSDB

C

A B

D

1

2

3

5

C

A B

D

1

2

3

C

A B

D

1

2

3

C

A B

D

1

2

3

C

A B

D

1

2

3

RTA

RTC

RTD

3

2

1

5

(1) Network topology structure

(4) Each router computes the minimal spanning tree with itself as the root node.

RTB

Page 28: ZTE OSPF Protocol, Principle and Configuration

Computing Minimal Spanning Tree

Sum of COST from external ports in data forwarding direction

Cost=1

Cost=5

Cost=1

Cost=5

10.1.1.0/24 10.2.2.0/24 10.3.3.0/24

Ospf route TableNet Cost10.2.2.0 210.3.3.0 3

Ospf route TableNet Cost10.1.1.0 10

A B C

Cost=1

Page 29: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 30: ZTE OSPF Protocol, Principle and Configuration

Problems Large-Scale OSPF Network Meets

My route table is too large and my memory is too small.

Always computing route table, boring!

Only LSA is received, no data.

OSPF OSPF

OSPF

OSPF

OSPF

Page 31: ZTE OSPF Protocol, Principle and Configuration

Area 0

Area 1 Area 2

Autonomous system

Solution: Allocate Areas

Rules for allocating areas: Each network segment must belong to an area, that is, each interface that runs OSPF protocol must

be designated to an area; Each area is identified by area ID, which is an integer ranging from 0 to 32; Backbone area (area 0) cannot be separated by non-backbone areas; Non-backbone areas (not area 0) must be connected to backbone area (virtual link is not

suggested).

Page 32: ZTE OSPF Protocol, Principle and Configuration

Advantages for Allocating Areas

Only LSDB of routers in the same area can be synchronized. The changes of network topology structure are first updated within the area..

After areas are allocated, route aggregation can be performed on the boundary router within the area to reduce the number of LSA notified to other areas and minimize the influence caused by changes of network topology.

Page 33: ZTE OSPF Protocol, Principle and Configuration

External AS

Internal router

Backbone/internal router

ABR and backbone router

ABR and backbone router

Internal router

ASBR and backbone router

Area 1 Area 2Backbone area 0

Types of OSPF Routers

Page 34: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Area Allocation LSA Transmission among Multiple Areas Route Optimization

Page 35: ZTE OSPF Protocol, Principle and Configuration

Types of LSA

Types of LSA Initiator Transmission Range Described Object

LSA1:Router LSA

Each router in the area

Within the area Direct link state of the router

LSA2:Network LSA

DR and BDR Within the area Directly connected routers within the network segment

LSA3:Network Summary LSA

ABR Among areas Route of the area where ABR is located (LSA1 and LSA2)

LSA4:ASBR Summary LSA

ABR Among areas Notify ASBR of the area where ABR is located

LSA5:Autonomous system external LSA

ASBR Among areas Notify exterior route (non-ospf route, such as RIP or BGP)

Page 36: ZTE OSPF Protocol, Principle and Configuration

Types of LSA

Router

Area 1 Area 0

Network

Summary

External

ExternalAS

DR

ABR ASBR

Page 37: ZTE OSPF Protocol, Principle and Configuration

Flooding of LSA among Multiple Area Network

Type 1

afadjfjorqpoeru39547439070713

Area 1 Area 0 Area 50

Type 3

afadjfjorqpoeru39547439070713

Type 3

afadjfjorqpoeru39547439070713

RIP

Internal ABR1 ABR2 Internal

BBone

Type 5

afadjfjorqpoeru39547439070713

Type 5

afadjfjorqpoeru39547439070713afadjfjorqpoeru39547439070713

Type 4

afadjfjorqpoeru39547439070713

Page 38: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Area Allocation LSA Transmission among Multiple Areas Route Optimization Stub Area Route Summarization

Page 39: ZTE OSPF Protocol, Principle and Configuration

Constitution of OSPF Route

Route table

Route among areas

Route within areas

External route (non-OSPF route)

Area 1

Area 1 Area 0

Area 1 RIP

Page 40: ZTE OSPF Protocol, Principle and Configuration

Totally Stubby

Do not receive route outside areas Network Summary LSADo not receive redistributed routeASBR Summary LSAAutonomous system external LSA

Do not receive redistributed routeASBR Summary LSAAutonomous system external LSA

Area 0

Receive all LSA

Types of Areas

Stub

Page 41: ZTE OSPF Protocol, Principle and Configuration

Stub and Totally Stubby Area (1)

Area 1Area 0Area 50RIP

C D A B E F

ABR ABR

ASBR

1.1.1.0 1.1.2.0 1.1.3.0

2.1.1.0

2.1.2.03.1.1.0

3.1.2.0

4.1.1.04.1.2.0

1.1.1.0 int1 ospf1.1.2.0 int1 ospf1.1.3.0 int1 ospf

2.1.1.0 int1 direct2.1.2.0 int2 direct3.1.1.0 int1 ospf3.1.2.0 int1 ospf4.1.1.0 int1 ospf4.1.2.0 int1 ospf

1.1.1.0 int1 direct1.1.2.0 int1 ospf1.1.3.0 int1 ospf2.1.1.0 int2 direct2.1.2.0 int2 ospf3.1.1.0 int1 ospf3.1.2.0 int1 ospf4.1.1.0 int1 ospf4.1.2.0 int1 ospf

RD route tableRC route table

1.1.1.0 int1 ospf1.1.2.0 int1 ospf

1.1.3.0 int1 direct2.1.1.0 int1 ospf2.1.2.0 int1 ospf

3.1.1.0 int2 direct3.1.2.0 int2 ospf4.1.1.0 int1 ospf4.1.2.0 int1 ospf

RE route table

1.1.1.0 int1 ospf1.1.2.0 int1 ospf1.1.3.0 int1 ospf2.1.1.0 int1 ospf2.1.2.0 int1 ospf

3.1.1.0 int1 direct3.1.2.0 int2 direct 4.1.1.0 int1 ospf4.1.2.0 int1 ospf

RF route table

Page 42: ZTE OSPF Protocol, Principle and Configuration

Default

Default

Summary

Default

Stub and Totally Stubby Area (2)

Area 1—Totally StubbyArea 0Area 50—Stub

Summary

External External

RIP

afadjfjorqpoeru39547439070713

afadjfjorqpoeru39547439070713

afadjfjorqpoeru39547439070713

afadjfjorqpoeru39547439070713

afadjfjorqpoeru39547439070713

afadjfjorqpoeru39547439070713

afadjfjorqpoeru39547439070713

Internal ABR1 ASBR BBone ABR2 Internal

Summary

afadjfjorqpoeru39547439070713

Page 43: ZTE OSPF Protocol, Principle and Configuration

Stub and Totally Stubby Area (3)

Area 1—Totally StubbyArea 0Area 50—StubRIP

C D A B E F

ABR ABR

ASBR

1.1.1.0 1.1.2.0 1.1.3.0

2.1.1.0

2.1.2.03.1.1.0

3.1.2.0

4.1.1.04.1.2.0

1.1.1.0 int1 ospf1.1.2.0 int1 ospf1.1.3.0 int1 ospf

2.1.1.0 int1 direct2.1.2.0 int2 direct3.1.1.0 int1 ospf3.1.2.0 int1 ospf0.0.0.0 int1 ospf

1.1.1.0 int1 direct1.1.2.0 int1 ospf1.1.3.0 int1 ospf2.1.1.0 int2 direct2.1.2.0 int2 ospf3.1.1.0 int1 ospf3.1.2.0 int1 ospf4.1.1.0 int1 ospf4.1.2.0 int1 ospf

RD route tableRC route table

1.1.1.0 int1 ospf1.1.2.0 int1 ospf

1.1.3.0 int1 direct2.1.1.0 int1 ospf2.1.2.0 int1 ospf

3.1.1.0 int2 direct3.1.2.0 int2 ospf4.1.1.0 int1 ospf4.1.2.0 int1 ospf

RE route table

3.1.1.0 int1 direct3.1.2.0 int2 direct 0.0.0.0 int1 ospf

RF route table

Page 44: ZTE OSPF Protocol, Principle and Configuration

Only one outletNo ASBR within the areaCan not be AREA 0 (Backbone)No Virtual links

Limitation of Stub and Totally Stubby Area

Unique outlet

Area 20.0.0.0

ExternalAS

0.0.0.0

R3 R4

XX

Page 45: ZTE OSPF Protocol, Principle and Configuration

NSSA

Not So Stubby Area

To Other Area Type 5

Area 2

ExternalAS

RIP

Type 7Type 7

Area 0

R3R4

Page 46: ZTE OSPF Protocol, Principle and Configuration

Contents

OSPF Overview OSPF Concept OSPF Working Process Area Allocation LSA Transmission among Multiple Areas Route Optimization Stub Area Route Summarization

Page 47: ZTE OSPF Protocol, Principle and Configuration

Reduce the size of route table Limit the influence of topology changes in the local area Reduce the number of LSAs and save CPU resource

Support Route Summarization

Area 0 backbone area

ABRs

Area 1

Summarized route

xx

Page 48: ZTE OSPF Protocol, Principle and Configuration

A summarized route can represent multiple sub networks.

Route Summarization

O 172.16.8.0 255.255.252.0O 172.16.12.0 255.255.252.0O 172.16.16.0 255.255.252.0O 172.16.20.0 255.255.252.0O 172.16.24.0 255.255.252.0O 172.16.28.0 255.255.252.0

Route table of router B LSAs transmitted to route C

IA 172.16.16.0 255.255.240.0

Summarized route

IA 172.16.8.0 255.255.248.0

Area 1 Area 0ABR

A B C

Page 49: ZTE OSPF Protocol, Principle and Configuration

Review

OSPF concept and features OSPF working principle OSPF area allocation Stub and Totally Stubby area Route summarization

Page 50: ZTE OSPF Protocol, Principle and Configuration

Questions

Can OSPF achieve load balance or equivalent load balance?

How is OSPF Metric computed? How many types of LSA does OSPF have? Who

creates theses types? Can you describe the working process of OSPF?

Page 51: ZTE OSPF Protocol, Principle and Configuration