Qu’est ce que protocole OSPF ?

Qu’est ce que protocole OSPF ?

Aujourd’hui on va voir le protocole OSPF. Vous allez me dire: “Le protocole OSP quoi ??” et vous avez tout à fait raison.. Je me suis posé la même question il y a peu et j’ai décidé de me faire un récap de ce protocole de routage. OSPF est peut être comparé à EIGRP, protocole propriétaire de CISCO, qui permet plus de flexibilité.

Alors pas de panique l’article est en Anglais, c’est un choix pour être compliant à mon entreprise, puis ça vous poussera à lire de l’Anglais 😉

What is OSPF ?

  • Routing Protocol
  • Interior Gateway Protocol (IGP)
  • Link State Protocol

Vocabulary

  • LSA: LinkState Advertisement. Infos on routers, neighbours, subnet around one router.
  • LSDB: Database containing all LSAs
  • RID: Router ID

Summary

  • 1 – Becoming Neighbours

  • 2 – Exchange LSDB Infos

  • 3 – Choosing best route

 
 
 

I - Becoming Neigbours

A – Generating RID

Before any relationship, routers choose one unique Router ID called RID formed like an IPv4 address (x.x.x.x)

This RID can be set up automaticly set up, or manually.

If set up auto it will take the highest loopback address the router has. If it has no loopback int, it takes the highest address on the others Interfaces.

B – Hello Messages

Before any relationship, routers choose one unique Router ID called RID formed like an IPv4 address (x.x.x.x)

Let’s imagine 2 routers: R1 and R2.

R1 RID is: 1.1.1.1

R2 RID is: 2.2.2.2

The first router sends an Hello Message on the others interface.

The hello message contains:

HELLO MESSAGE R1 to R2

RID1.1.1.1
Neighbours?

D – 2-Way State

  1. R1

R2 has send the hello message back to R1 and it contains this time one neighbours.

HELLO MESSAGE R2 back to R1

RID2.2.2.2
Neighbours1.1.1.1

There, R1 sees itself in the hello message as a neighbour. That triggers the 2-Way state on R1.

  1. R2

R1 then send another Hello Message containing this time R2 on neighbours.

HELLO MESSAGE R1 back to R2

RID1.1.1.1
Neighbours2.2.2.2

R2 sees itself as a neighbours for R1. That triggers the 2-Way state on R2 too.

At this time, both of our Routers are in the 2-Way state. They’ve exchanged their LSAs infos containing RID and Neighbours.

E – DR and BDR

 

DR: Designated Router

BDR: Backup Designated Router

The choice of the DR and BDR is made based on the OSPF priority (1 by Def, can be changed in the router settings)

/!\: For the routers to be in Full Neighbours state, we need to have a DR and BDR router on our network.

Explainations:

Let’s admit we have a 4 routers network (Point to point)

If one router int goes down, it sends this info to the others. Each other router then send again this informations to the others. That’s quite a long way to update every routers on the network…

So to prevent that to happen, we elect a DR and a BDR.

With them in the network, when a router int goes down, it sends an update frame to other routers but no one listens to it. Instead, only the DR (If not present, the BDR) forwards this information to other routers, and this time they’ll update because they only listen to DR or BDR.

II - Exchange LSDB infos

A -Exstart State

When routers start exchanging together, they enter a Exstart state.

One router is chosen to be slave and the other one master. This choice is based on the RID, and defines who’s going to start exchange.

B – Exchange State

Once the Exchange State is triggered, both sees LSAs infos, and ask to the other router infos on Subnets etc it does not have already on its LSA.

It’s called the LDSB Exchange.

This step is to fill the LSDB with multiple LSA infos from the whole network. So that each router knows exactly what Subnet is next etc…

 

C – Loading State

Then they start the loading state. Here’s a diagram that show each step:

R1 <———-> R2

     <–DBD–>

     <–LSR–> (LinkSate Request)

     <–LSU–> (Update)

     <–LSAck–> (Acknowledgement)

Those are the steps that are made when requesting LSDB infos.

Congratulation, your routers are know Full Neighbours !!

 

III - Choosing the best Route

Now that routers has a lot of infos on the network and subnets of others, they can start exchanging data etc choosing the best route.

To choose wich one is best, we calculate a “Cost

Cost: Reference BandWidth / Interface BandWidth

What to know:

INTERFACEDEF BDWITHCOST
Serial1.544 Kbps64
Ethernet10.000 Kbps10
FastEthernet100.000 Kbps1
Everyting Higher 1

Choosing the best route is calculating the cost for a packet to reach his destination.
R1 (cost 10)–> R2 (Cost 1)–> R3 (Cost 1) ROUTE TOTAL COST: 10+1+1 = 12
R1 (Cost 64)–> R2(Cost10)–> R3 (Cost1) ROUTE TOTAL COST: 64+10+1 = 75
You get the idea, less is best.

 

Easy to deploy

Simple Protocol

Very Robust

 

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *