---
title: Protocole OSPFv2
---
###### tags: `__ccna_EN`,`Routage dynamique`
default-information originate
# Protocole OSPF - Open Shortest Path First
Notion d'administrative distance:
Si plusieurs chemins avec différebts protocole de routage disponibles.
Le routeur R1, utilisera la métrique "administrative distancec" pour déterminer le chemin.
Il s'agit du cout de chaque protocole utilisé.

Les commandes:
SHOW IP OSPF INTERFACE BRIEF
show ip ospf int brief
shwo ip ospf neighbor
## Description
OsPF is a Link state protocol
Using LSA Lin state advertissement
## OSPF Path
What will be the best path ? what is the most efficient ?

It depend of **metric**
Cost = Bandwidth ref / Interface Bandwidth
BD ref = 100 Millions


# Router ID
How Router ID or RID is choosen ?
When we write
router ospf 1
> conf t
> **router ospf 1**
>
First option is the RID Configured = 2.3.4.5
Second option Loopback address ( Highest IP)
Three Highest IP on any active Interface
In this case

How to see the RID?

How to configure Router-id

# OSPF AREA

In order to not have heavy LSDB in OSPF Router
we split the topology in smaller AREA

# WILDCARD MASK and Network Statement

How many bit we want match ?

Include multiple interface in the same time?

in this case the router is interesed only by the interface begining with 10.x.x.x
Next Case
In this case Routeur is insterested only bit 2 first BITs

Next case
Routeur is interested by everything int directly connected

# How OSPF Wilcard mask & Network Operate
Relation between Network Mask & Wildcard Mask = INVERTED

SHOW IP OSPF INTERFACE BRIEF
# OSPF Wilcards Masks for Subnets
255-224 = 31


# OSPF DR and BRDs on Broadcast Networks
Communication with Neighbor
Down state: Waiting Init state
Init state (Hello Packet)
Two-way state: Bidirectionnial communication
Ex start: LSBD exchange
Excchange: DBD packet
FULL: Data synchro

In this schema
Incontrolable mesh


# Verifying OSPF Adjacencies

R1
show ip ospf int brief


show ip ospf neighbor

R2
show ip ospf int brief

show ip ospf neighbor

R3
show ip ospf int brief

show ip ospf neighbor

Table

# OSPF, LSA, and DRs

LSA 1
every router ospf is going to generate LSA type 1 to communicate with the rest of the router (they are in the darkness)
my rid is 2.2.2.2 my network is 10.12.34.0/24
LSA 2 is describing network broadcast which exist
very router create lsa 2 which generate DR

# OSPF and Point to Point Network Types

PPP unicast protocost
Point-to-point Protocol is a unicast link.
So there is only one neighbor
OSPF multicast => 224.0.0.5


