You are on page 1of 2

Easy Learning

OSPF
What Is OSPF?

Open Shortest Path First (OSPF) refers to an Interior Gateway Protocol (IGP). As a
link-state protocol, OSPF maintains a large network topology database and uses
the SPF algorithm to calculate the optimum route.

Packets

Working Mechanism of OSPF

1 Neighbor Relationship Establishment

Router ID 10.0.0.1 Router ID 10.0.0.2

I'm 10.0.0.1.

I'm 10.0.0.2, and my neighbor is 10.0.0.1.

I'm 10.0.0.1, and my neighbor is 10.0.0.2.

Two routers both enter two-way state and establish a neighbor


relationship.

2 Adjacency Establishment

Router ID: 10.0.0.1 Router ID: 10.0.0.2


I have a higher
router ID, and thus I
send packets first.
This is my link-state database summary.

This is my link-state database


summary.

I have no information about 172.16.6.0/24, and need a complete LSA entry.

This is the LSA entry of 172.16.6.0/24.

Received the entry.


Thanks.

Two routers both enter Full state and establish an adjacency.

3 Route Calculation

1 The link-state database generates a direction-


capable, weight-capable figure, and the
numbers in the figure represent weight
2 5 values.

Each router calculates the minimum spanning tree by considering itself as


the root node.

1 1 1

2 2 2

DR and BDR

For the broadcast and NBMA networks, if there are N routers, N x(N-1)/2
adjacencies need to be established, which thereby wastes bandwidth resources.

DR BDR I'm the backup DR and


maintains adjacencies with all
the routers in this network
segment. When the DR fails, I
become the DR immediately.

To solve this problem, OSPF designates a router as the Designated Router (DR).
All routers except the DR send information only to the DR, which then sends
routing information to all the other routers in the network segment.

Problems of a Large OSPF Network


The routing table needs to
be calculated all the time.
How bothersome it is!

My routing table is
large, but my
memory is too
small.

Solution: Area Division

Area Border Router (ABR)


Area0

Area1 Area2

Principle of area division: The backbone area (Area 0) must not be partitioned by
non-backbone areas, and non-backbone areas must be connected to the
backbone area (the virtual links are not recommended).
Advantages of area division: only routers in the same area keep the
synchronization of link-state databases and routes are aggregated on ABRs,
thereby reducing the number of LSAs to other areas.
Router Types in an OSPF Network
ABR

Area0

IAR ASBR

Area1 Area2

Internal Area Router (IAR): All the interfaces belong to the same OSPF area.
Area Border Router (ABR): This router belongs to more than two areas at the
same time.
Autonomous System Boundary Router (ASBR): This router introduces routes
discovered by other routing protocols.

LSA Types
For OSPF, all the descriptions about routing information are encapsulated in
LSAs. LSAs can be divided into six types in accordance with their different uses.

LSA 2

1 LSA1

LSA1 is also referred to as the Router LSA and is generated by all the
routers running OSPF. LSA1 is used to describe the link status, costs, and
other information of OSPF interfaces of the router.

Area0
LSA1
LSA1
ABR

LSA1 LSA1

Area1

2 LSA2
LSA2 is also referred to as the Network LSA, and is generated by a DR.
LSA2 is used to describe all the routers that establish adjacencies with the
DR (by listing the router IDs).
DR BDR

LSA2

3 LSA3
LSA3 is also referred to as the Network Summary LSA, and is generated by
an ABR. LSA3 is used to describe routing information of the area where the
ABR belongs.

LSA3

Area0
ABR

Area1

4 LSA4
LSA4 is also referred to as the ASBR Summary LSA and is generated by an
ABR.

LSA4
Area0
ABR

ASBR

Area1
LSA4 is used to describe ASBR routing information that reaches the area.
Because LSA4 describes the destination address of an ASBR, which is a
host route, the mask is 0.0.0.0.

5 LSA5

LSA5 is generated by an ASBR, and is used to describe routing information


sent to outside the autonomous system.

LSA5
Area0
ABR

LSA5

ASBR
Area1

6 LSA7
LSA7 is applied to a Not-So-Stubby Area (NSSA).
An ABR converts LSA7 generated in an NSSA area into LSA5, sends LSA5
out, and changes the LSA originator to the ABR itself.

LSA5
Area0
ABR

LSA7
ASBR
Area1
(NSSA)

Three Special Areas


A standard area can receive routing information of LSAs 1-5, but three special
areas can only receive routing information of part of the LSA types.

Stub area Totally stub area NSSA area

LSA5
Area0 Area0 Area0

ABR ABR ABR


LSA3
LSA5 LSA4 LSA5
LSA7
LSA5
ASBR

Area1 Area1 Area1

Receives no information Receives no information Provides functions


about routes outside of about routes outside of similar to the stub area,
the autonomous the autonomous system but allows ASBRs.
system. or summary LSA from
other areas.

Version: R2.0 Released: 2018-06-13

Tel: +86-755-26771900
E-mail: doc@zte.com.cn
URL: http://supporthk.zte.com.cn

Documentation Development Department

You might also like