GNS3 RÉSEAU N° 6
Vous allez créer un réseau constitué de deux "routeurs" et de quatre "Switch-routers". Le
module "NM-16ESW" est installé sur "SWR1", "SWR4", "SWR5" et "SWR5" ; le module
"NM-4T" est installé sur "SWR1", "R2" et "R3". Les liens entre "SWR1", "R2" et "R3" se
font par les interfaces séries ; des ordinateurs "VPCS" complètent la topologie pour les tests
de fonctionnement. "OSPF" sera activé et configuré.
Reprenez le tutoriel "GNS3 RÉSEAU N° 1" pour créer le nouveau projet "RES6".
L'ajout d'un routeur se fait simplement par "glisser-déplacer". Bouton droit de la souris sur le
routeur "R1". Cliquez sur l'option "Changer le nom d'hôte" ; tapez "SWR1" pour "Switch-
Router 1".
Bouton droit de la souris sur le routeur "SWR1". Cliquez sur l'option "Changer le symbole" ;
sélectionnez "label_switch_router".
Bouton droit de la souris sur le routeur "SWR1". Cliquez sur l'option "Configurer".
Sélectionnez "SWR1". Cliquez sur l'onglet "Slots". Rubrique "slot 1", sélectionnez le module
"NM-16ESW" ; rubrique "slot 2", sélectionnez le module "NM-4T".
Note
Un message vous indique que les liens devront se faire manuellement avec le
module."NM-16ESW".
Configuration de "SWR1" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname SWR1
SWR1(config)# int s2/0
SWR1(config-if)# desc "Connection to R2"
SWR1(config-if)# clock rate 64000
SWR1(config-if)# ip address 192.168.0.1 255.255.255.252
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# int s2/1
SWR1(config-if)# desc "Connection to R3"
SWR1(config-if)# clock rate 64000
SWR1(config-if)# ip address 192.168.1.1 255.255.255.252
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# int vlan 1
SWR1(config-if)# desc "Connection to SWR1"
SWR1(config-if)# ip address 10.0.0.254 255.255.255.0
SWR1(config-if)# no shut
SWR1(config-if)# end
SWR1# write mem
Building configuration...
[OK]
SWR1# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R2" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname R2
R2(config)# int s1/0
R2(config-if)# desc "Connection to SWR1"
R2(config-if)# ip address 192.168.0.2 255.255.255.252
R2(config-if)# no shut
R2(config-if)# exit
R2(config)# int f0/0
R2(config-if)# desc "Connection to SWR4"
R2(config-if)# ip address 192.168.5.1 255.255.255.252
R2(config-if)# no shut
R2(config-if)# end
R2# write mem
Building configuration...
[OK]
R2# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR4" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname SWR4
SWR4(config)# int f0/0
SWR4(config-if)# desc "Connection to R2"
SWR4(config-if)# ip address 192.168.5.2 255.255.255.252
SWR4(config-if)# no shut
SWR4(config-if)# exit
SWR4(config)# int vlan 1
SWR4(config-if)# desc "Connection to SWR4"
SWR4(config-if)# ip address 10.0.1.254 255.255.255.0
SWR4(config-if)# no shut
SWR4(config-if)# end
SWR4# write mem
Building configuration...
[OK]
SWR4# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R3" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname R3
R3(config)# int s1/0
R3(config-if)# desc "Connection to SWR1"
R3(config-if)# ip address 192.168.1.2 255.255.255.252
R3(config-if)# no shut
R3(config-if)# exit
R3(config)# int f0/0
R3(config-if)# desc "Connection to SWR5"
R3(config-if)# ip address 192.168.2.1 255.255.255.252
R3(config-if)# no shut
R3(config-if)# exit
R3(config)# int f0/1
R3(config-if)# desc "Connection to SWR6"
R3(config-if)# ip address 192.168.3.1 255.255.255.252
R3(config-if)# no shut
R3(config-if)# end
R3# write mem
Building configuration...
[OK]
R3# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR5" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname SWR5
SWR5(config)# int f0/1
SWR5(config-if)# desc "Connection to R3"
SWR5(config-if)# ip address 192.168.2.2 255.255.255.252
SWR5(config-if)# no shut
SWR5(config-if)# exit
SWR5(config)# int f0/0
SWR5(config-if)# desc "Connection to SWR6"
SWR5(config-if)# ip address 192.168.4.1 255.255.255.252
SWR5(config-if)# no shut
SWR5(config-if)# exit
SWR5(config)# int vlan 1
SWR5(config-if)# desc "Connection to SWR5"
SWR5(config-if)# ip address 10.0.2.254 255.255.255.0
SWR5(config-if)# no shut
SWR5(config-if)# end
SWR5# write mem
Building configuration...
[OK]
SWR5# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR6" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname SWR6
SWR6(config)# int f0/1
SWR6(config-if)# desc "Connection to R3"
SWR6(config-if)# ip address 192.168.3.2 255.255.255.252
SWR6(config-if)# no shut
SWR6(config-if)# exit
SWR6(config)# int f0/0
SWR6(config-if)# desc "Connection to SWR5"
SWR6(config-if)# ip address 192.168.4.2 255.255.255.252
SWR6(config-if)# no shut
SWR6(config-if)# exit
SWR6(config-if)# end
SWR6# write mem
Building configuration...
[OK]
SWR6# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Sauvegarder le projet :
Vérifiez le fonctionnement des liens directs entre les appareils avec la commande "ping".
Configuration de "SWR1" :
SWR1> en
SWR1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR1(config)# int Loopback0
SWR1(config-if)# ip address 1.1.1.1 255.255.255.255
SWR1(config-if)# end
SWR1# write mem
Building configuration...
[OK]
SWR1# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R2" :
R2> en
R2# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# int Loopback0
R2(config-if)# ip address 2.2.2.1 255.255.255.255
R2(config-if)# end
R2# write mem
Building configuration...
[OK]
R2# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR4" :
SWR4> en
SWR4# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR4(config)# int Loopback0
SWR4(config-if)# ip address 2.2.2.2 255.255.255.255
SWR4(config-if)# end
SWR4# write mem
Building configuration...
[OK]
SWR4# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R3" :
R3> en
R3# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)# int Loopback0
R3(config-if)# ip address 3.3.3.1 255.255.255.255
R3(config-if)# end
R3# write mem
Building configuration...
[OK]
R3# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR5" :
SWR5> en
SWR5# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR5(config)# int Loopback0
SWR5(config-if)# ip address 3.3.3.2 255.255.255.255
SWR5(config-if)# end
SWR5# write mem
Building configuration...
[OK]
SWR5# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR6" :
SWR6> en
SWR6# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR6(config)# int Loopback0
SWR6(config-if)# ip address 3.3.3.3 255.255.255.255
SWR6(config-if)# end
SWR6# write mem
Building configuration...
[OK]
SWR6# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
La deuxième étape consiste à avertir le processus "OSPF" des réseaux que le protocole devra
prendre en compte à l'aide de la commande : "network IP MASQUE_GÉNÉRIQUE area
AREA_ID". L'option "area" permet de définir une "Aire". Une Aire" est un groupe de
routeurs ; elle permet de segmenter le réseau. Grâce à ce systéme, on limite le "flapping"
c'est-à-dire l'alternance rapide dans la disponibilité d'un lien.
Chaque sous-réseau appartient à une seule "Aire". Il existe toujours une aire dorsale - area 0 -
sur laquelle sont connectées les autres aires.
Le masque générique - Wildcard - permet de définir les bits qu'il faut ignorer. Le masque
générique est associé à l'adresse IP à l'aide d'un "OU" logique afin de déterminer si la
condition est remplie ou nom remplie.
Configuration de "SWR1" :
SWR1> en
SWR1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR1(config)# router ospf 1
SWR1(config-router)# log-adjacency-changes
SWR1(config-router)# network 10.0.0.0 0.0.0.255 area 0
SWR1(config-router)# network 192.168.0.0 0.0.0.3 area 0
SWR1(config-router)# network 192.168.1.0 0.0.0.3 area 0
SWR1(config-router)# end
SWR1# write mem
Building configuration...
[OK]
SWR1# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R2" :
R2> en
R2# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# router ospf 1
R2(config-router)# log-adjacency-changes
R2(config-router)# network 192.168.5.0 0.0.0.3 area 2
R2(config-router)# network 192.168.0.0 0.0.0.3 area 0
R2(config-router)# end
R2# write mem
Building configuration...
[OK]
R2# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR4" :
SWR4> en
SWR4# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR4(config)# router ospf 1
SWR4(config-router)# log-adjacency-changes
SWR4(config-router)# network 10.0.1.0 0.0.0.255 area 2
SWR4(config-router)# network 192.168.5.0 0.0.0.3 area 2
SWR4(config-router)# end
SWR4# write mem
Building configuration...
[OK]
SWR4# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R3" :
R3> en
R3# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)# router ospf 1
R3(config-router)# log-adjacency-changes
R3(config-router)# network 192.168.1.0 0.0.0.3 area 0
R3(config-router)# network 192.168.2.0 0.0.0.3 area 1
R3(config-router)# network 192.168.3.0 0.0.0.3 area 1
R3(config-router)# end
R3# write mem
Building configuration...
[OK]
R3# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR5" :
SWR5> en
SWR5# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR5(config)# router ospf 1
SWR5(config-router)# log-adjacency-changes
SWR5(config-router)# network 192.168.2.0 O.O.O.3 area 1
SWR5(config-router)# network 10.0.2.0 O.O.O.255 area 1
SWR5(config-router)# network 192.168.4.0 0.0.0.3 area 1
SWR5(config-router)# end
SWR5# write mem
Building configuration...
[OK]
SWR5# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "SWR6" :
SWR6> en
SWR6# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR6(config)# router ospf 1
SWR6(config-router)# log-adjacency-changes
SWR6(config-router)# network 192.168.3.0 0.0.0.3 area 1
SWR6(config-router)# network 192.168.4.0 0.0.0.3 area 1
SWR6(config-router)# end
SWR6# write mem
Building configuration...
[OK]
SWR6# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Les liens entre "SWR1" et "R2" ainsi qu'entre "SWR1" et "R3 " sont des liens à "64" Kbps.
Vous devez modifier le débit de vos interfaces par la commande : "bandwidth".
Configuration de "SWR1" :
SWR1> en
SWR1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR1(config)# int s2/0
SWR1(config-if)# bandwidth 64
SWR1(config-if)# int s2/1
SWR1(config-if)# bandwidth 64
SWR1(config-if)# end
SWR1# write mem
Building configuration...
[OK]
SWR1# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R2" :
R2> en
R2# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# int s1/0
R2(config-if)# bandwidth 64
R2(config-if)# end
R2# write mem
Building configuration...
[OK]
R2# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Configuration de "R3" :
R3> en
R3# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)# int s1/0
R3(config-if)# bandwidth 64
R3(config-if)# end
R3# write mem
Building configuration...
[OK]
R3# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]