2026-10-05 · TP3 : Commandes Partie 3 (OSPFv2)

Contexte

Fiche principale : 2026-10-05 — TP3 Routage statique et OSPF · Tableaux : 2026-10-05 — TP3 Tableaux à rendre · Partie 2 : 2026-10-05 — TP3 Commandes Partie 2 routage statique Notion : 2026-09-11 — OSPF et algorithme à état de lien Fichier PT à utiliser : 297routageDynamique.pkt. Il ne doit contenir aucune route statique de la Partie 2.

Principe

  1. router ospf 297 : process-id = UID, valeur locale au routeur (même valeur partout pour faciliter la lecture).
  2. network <réseau> <wildcard> area 0 : une ligne par réseau directement connecté au routeur. On n’annonce jamais un réseau distant, OSPF l’apprend tout seul des voisins. Wildcard = 255.255.255.255 − masque.

🧮 Wildcards (rappel)

PréfixeMasqueWildcardRéseaux concernés
/24255.255.255.00.0.0.255192.168.1.0, 203.0.113.0
/25255.255.255.1280.0.0.127192.168.2.0
/26255.255.255.1920.0.0.63192.168.3.0
/27255.255.255.2240.0.0.31192.168.4.0
/28255.255.255.2400.0.0.15192.168.5.0
/29255.255.255.2480.0.0.710.0.1.0
/30255.255.255.2520.0.0.310.0.0.0, 10.0.0.4, 10.0.0.8, 10.0.0.12, 64.0.100.0

Paris 1 (3 réseaux)

enable
configure terminal
router ospf 297
network 10.0.0.0 0.0.0.3 area 0
network 10.0.0.8 0.0.0.3 area 0
network 10.0.0.12 0.0.0.3 area 0
end
copy running-config startup-config

Paris 2 (4 réseaux)

enable
configure terminal
router ospf 297
network 10.0.0.0 0.0.0.3 area 0
network 10.0.0.4 0.0.0.3 area 0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.127 area 0
end
copy running-config startup-config

Paris 3 (3 réseaux)

enable
configure terminal
router ospf 297
network 10.0.0.4 0.0.0.3 area 0
network 10.0.0.8 0.0.0.3 area 0
network 192.168.3.0 0.0.0.63 area 0
end
copy running-config startup-config

Laval 1 (3 réseaux)

enable
configure terminal
router ospf 297
network 10.0.0.12 0.0.0.3 area 0
network 10.0.1.0 0.0.0.7 area 0
network 64.0.100.0 0.0.0.3 area 0
end
copy running-config startup-config

Laval 2 (2 réseaux)

enable
configure terminal
router ospf 297
network 10.0.1.0 0.0.0.7 area 0
network 192.168.4.0 0.0.0.31 area 0
end
copy running-config startup-config

Laval 3 (2 réseaux)

enable
configure terminal
router ospf 297
network 10.0.1.0 0.0.0.7 area 0
network 192.168.5.0 0.0.0.15 area 0
end
copy running-config startup-config

ISP (2 réseaux)

enable
configure terminal
router ospf 297
network 64.0.100.0 0.0.0.3 area 0
network 203.0.113.0 0.0.0.255 area 0
end
copy running-config startup-config

ISP dans OSPF

L’énoncé demande OSPF sur tous les routeurs, ISP compris. Le réseau de l’Online Server (203.0.113.0/24) est donc appris par OSPF et apparaît en O partout. La Partie 4 ajoute ensuite la route par défaut sur Laval 1.


✅ Vérification

1. Voisins OSPF : show ip ospf neighbor

Les adjacences apparaissent quelques secondes après la config du 2e routeur d’un lien. État attendu : FULL.

RouteurVoisins attendusNb
Paris 1Paris 2, Paris 3, Laval 13
Paris 2Paris 1, Paris 32
Paris 3Paris 1, Paris 22
Laval 1Paris 1, Laval 2, Laval 3, ISP4
Laval 2Laval 1, Laval 32
Laval 3Laval 1, Laval 22
ISPLaval 11

DR / BDR sur le LAN Laval (10.0.1.0/29)

C’est le seul réseau multi-accès entre routeurs, donc le seul avec une élection DR/BDR (FULL/DR, FULL/BDR, 2WAY/DROTHER). Sur les liens /30, on voit souvent FULL/DR + FULL/BDR aussi en Ethernet. Sans loopback, le router-id = plus haute IP du routeur. L’élection n’est pas préemptive : le premier routeur configuré peut rester DR.

2. Routes apprises : show ip route ospf

Chaque routeur doit avoir 12 réseaux au total : ses C + des O pour tout le reste.

RouteurCO attendues
Paris 139
Paris 248
Paris 339
Laval 139
Laval 2210
Laval 3210
ISP210

Format d’une ligne : O 192.168.4.0/27 [110/4] via 10.0.0.14, ... → 110 = distance administrative OSPF, 4 = coût.

3. Autres commandes utiles

show ip protocols          (process-id, réseaux annoncés, router-id)
show ip ospf interface brief   (interfaces dans OSPF, coût, état)

4. Pings croisés

Même série que la Partie 2 : chaque PC vers toutes les IP de la table d’adressage, Online Server compris (203.0.113.100).

Si un réseau manque dans show ip route

  • Vérifier la ligne network sur le routeur directement connecté à ce réseau (mauvaise wildcard ou mauvaise adresse = interface pas dans OSPF).
  • show ip ospf neighbor vide sur un lien : vérifier que les deux routeurs du lien ont leur network pour ce /30 et qu’ils sont en area 0 tous les deux.
  • Corriger avec no network <réseau> <wildcard> area 0 dans router ospf 297.