Vous êtes sur la page 1sur 6

Vous êtes ici : Accueil » Cisco » CCNP ENCOR 350-401

Configuration OSPF multizone 

Contenu de la leçon

1. Configuration
2. Vérification
3. Conclusion

Nous allons voir comment vous pouvez configurer l'OSPF multizone.

Nous utiliserons la topologie suivante :

Ci-dessus, nous avons R1 et R2 dans la zone 0, la zone dorsale. Entre R1 et R3, nous
utiliserons la zone 1 et entre R2/R4 nous utiliserons la zone 2. R3 et R4 ont une interface de
bouclage avec une adresse IP que nous publierons dans leur zone.

1. Configuration

Commençons par toutes les commandes réseau pour faire fonctionner OSPF. La commande
network définit à quelle zone appartiendra chaque interface. Dans un premier temps, nous
allons configurer R1 et R2 pour la zone backbone :

R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0

R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0

Configurons R1 et R3 pour la zone 1 :

R1(config)#router ospf 1
R1(config-router)#network 192.168.13.0 0.0.0.255 area 1

R3(config)#router ospf 1
R3(config-router)#network 192.168.13.0 0.0.0.255 area 1
R3(config-router)#network 3.3.3.3 0.0.0.0 area 1
Et last but not least, R2 et R4 pour la zone 2 :

R2(config)#router ospf 1
R2(config-router)#network 192.168.24.0 0.0.0.255 area 2

R4(config)#router ospf 1
R4(config-router)#network 192.168.24.0 0.0.0.255 area 2
R4(config-router)#network 4.4.4.4 0.0.0.0 area 2

Ce sont toutes les commandes réseau dont nous avons besoin.

2. Vérification
Vérifions notre travail. Tout d'abord, assurons-nous d'avoir des voisins OSPF :

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address


Interface
192.168.24.2 1 FULL/DR 00:00:36 192.168.12.2
GigabitEthernet0/1
3.3.3.3 1 FULL/BDR 00:00:34 192.168.13.3
GigabitEthernet0/2

R1 a formé une contiguïté voisine avec R2 et R3. Vérifions R2 :

R2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address


Interface
192.168.13.1 1 FULL/BDR 00:00:34 192.168.12.1
GigabitEthernet0/1
4.4.4.4 1 FULL/BDR 00:00:30 192.168.24.4
GigabitEthernet0/2

R2 a formé des adjacences voisines avec R1 et R4. La commande s how ip ospf neighbor ,
cependant, ne me dit rien sur les zones utilisées. Si vous voulez voir ceci, vous pouvez
ajouter le paramètre detail comme ceci :
R2#show ip ospf neighbor detail
Neighbor 192.168.13.1, interface address 192.168.12.1
In the area 0 via interface GigabitEthernet0/1
Neighbor priority is 1, State is FULL, 6 state changes
DR is 192.168.12.2 BDR is 192.168.12.1
Options is 0x12 in Hello (E-bit, L-bit)
Options is 0x52 in DBD (E-bit, L-bit, O-bit)
LLS Options is 0x1 (LR)
Dead timer due in 00:00:33
Neighbor is up for 00:17:30
Index 1/1/1, retransmission queue length 0, number of retransmission
0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
Neighbor 4.4.4.4, interface address 192.168.24.4
In the area 2 via interface GigabitEthernet0/2
Neighbor priority is 1, State is FULL, 6 state changes
DR is 192.168.24.2 BDR is 192.168.24.4
Options is 0x12 in Hello (E-bit, L-bit)
Options is 0x52 in DBD (E-bit, L-bit, O-bit)
LLS Options is 0x1 (LR)
Dead timer due in 00:00:31
Neighbor is up for 00:15:57
Index 1/1/2, retransmission queue length 0, number of retransmission
0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec

Ci-dessus, vous pouvez voir que l'interface GigabitEthernet0/1 est dans la zone 0 et
l'interface GigabitEthernet0/2 est dans la zone 2. Une autre bonne commande pour trouver
des informations sur la zone est show ip protocols :
R2#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"


Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)

Routing Protocol is "ospf 1"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.24.2
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.12.0 0.0.0.255 area 0
192.168.24.0 0.0.0.255 area 2
Routing Information Sources:
Gateway Distance Last Update
4.4.4.4 110 00:16:04
192.168.13.1 110 00:16:53
Distance: (default is 110)

Ci-dessus, vous pouvez voir quels réseaux appartiennent à quelle zone :

Réseau 192.168.12.0 dans la zone 0.


Réseau 192.168.24.0 dans la zone 2.

Vérifions nos tables de routage. Commençons par R1 :


R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B -
BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user static
route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from
PfR

Gateway of last resort is not set

3.0.0.0/32 is subnetted, 1 subnets


O 3.3.3.3 [110/2] via 192.168.13.3, 00:01:47, GigabitEthernet0/2
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/3] via 192.168.12.2, 00:00:54, GigabitEthernet0/1
O IA 192.168.24.0/24 [110/2] via 192.168.12.2, 00:01:44,
GigabitEthernet0/1

Ci-dessus, nous voyons trois entrées OSPF. Le premier est pour 3.3.3.3/32, l'interface de
bouclage de R3. Il apparaît avec un O puisqu'il s'agit d'une route intra-zone. R1 a également
appris 4.4.4.4/32 et 192.168.24.0/24. Ces deux entrées apparaissent comme O IA puisqu'il
s'agit de routes inter-zones.

R2 a une sortie similaire :

R2#show ip route ospf

3.0.0.0/32 is subnetted, 1 subnets


O IA 3.3.3.3 [110/3] via 192.168.12.1, 00:02:19, GigabitEthernet0/1
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/2] via 192.168.24.4, 00:01:29, GigabitEthernet0/2
O IA 192.168.13.0/24 [110/2] via 192.168.12.1, 00:02:24,
GigabitEthernet0/1

Ci-dessus, nous voyons que R2 a appris à propos de 3.3.3.3/32 et 192.168.13.0/24 quelles


sont les routes inter-zones. 4.4.4.4/32 est une route intra-zone.

Vérifions R3 :

R3#show ip route ospf

4.0.0.0/32 is subnetted, 1 subnets


O IA 4.4.4.4 [110/4] via 192.168.13.1, 00:01:57, GigabitEthernet0/1
O IA 192.168.12.0/24 [110/2] via 192.168.13.1, 00:02:50,
GigabitEthernet0/1
O IA 192.168.24.0/24 [110/3] via 192.168.13.1, 00:02:47,
GigabitEthernet0/1
Tout ce que R3 a appris provient d'une autre zone, c'est pourquoi nous ne voyons ici que des
routes inter-zones. La même chose s'applique à R4 :

R4#show ip route ospf

3.0.0.0/32 is subnetted, 1 subnets


O IA 3.3.3.3 [110/4] via 192.168.24.2, 00:02:13, GigabitEthernet0/1
O IA 192.168.12.0/24 [110/2] via 192.168.24.2, 00:02:13,
GigabitEthernet0/1
O IA 192.168.13.0/24 [110/3] via 192.168.24.2, 00:02:13,
GigabitEthernet0/1

Juste pour être sûr, essayons un ping rapide entre R3 et R4 pour prouver que notre
configuration OSPF multizone fonctionne :

R3#ping 4.4.4.4 source 3.3.3.3


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/11/13 ms

Notre ping est réussi. Ce sera tout pour le moment.

3. Conclusion
Vous avez maintenant appris à configurer plusieurs zones OSPF et à vérifier les routes
OSPF dans la table de routage qui proviennent de différentes zones.

Vous aimerez peut-être aussi