Vous êtes sur la page 1sur 11

VIII.

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é.

8.1 - Ajouter des modules dans un routeur et un switch-routeur


Lancez le logiciel GNS3.

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".

Figure 46 - RES6 - Cisco 3660, modules NM-16ESW et NM-4T

Créez, de la même manière, "SWR2", "R2", "R3", "SWR4", "SWR5" et "SWR6" comme ci-dessous.
Figure 56 - RES3 - Liens
Les liens sont les suivants :
Tableau 1 - Liens manuels

Routeurs / Switch-Routers Liens


s2/0 est connecté à R2 s1/0
SWR1
s1/0 est connecté à SWR1 s2/0
f0/0 est connecté à SWR4 f0/0
R2
s1/0 est connecté à SWR1 s2/0
SWR4 f0/0 est connecté à R2 f0/0
f0/0 est connecté à SWR5 f0/1
R3 f0/1 est connecté à SWR6 f0/1
s1/0 est connecté à SWR1 s2/1
f0/0 est connecté à SWR6 f0/0
SWR5
f0/1 est connecté à R3 f0/0
f0/0 est connecté à SWR5 f0/0
SWR6
f0/1 est connecté à R3 f0/0

8.2 - Connecter et configurer les ordinateurs "VPCS"


Configurez les six ordinateurs "VPCS" de la manière suivante :
Tableau 2 - Ordinateurs VPCS

VPCS Valeurs
VPC1 LPort:30000 - hôte distant:127.0.0.1 - RPort : 20000
VPC2 LPort:30001 - hôte distant:127.0.0.1 - RPort : 20001
VPC3 LPort:30002 - hôte distant:127.0.0.1 - RPort : 20002
VPC4 LPort:30003 - hôte distant:127.0.0.1 - RPort : 20003
VPC5 LPort:30004 - hôte distant:127.0.0.1 - RPort : 20004
VPC6 LPort:30005 - hôte distant:127.0.0.1 - RPort : 20005

Sur le Switch-Router "SWR1", faites les liens manuels suivants :


Tableau 3 - Liens SWR1, VPC1 et VPC2

VPCS Liens SWR1


VPC1 nio_udp:30000:127.0.0.1:20000 ==> f1/0
VPC2 nio_udp:30001:127.0.0.1:20001 ==> f1/1

Sur le Switch-Router "SWR4", faites les liens manuels suivants :

Tableau 4 - Liens SWR4, VPC3 et VPC4

VPCS Liens SWR4


VPC3 nio_udp:30002:127.0.0.1:20002 ==> f1/0
VPC4 nio_udp:30003:127.0.0.1:20003 ==> f1/1

Sur le Switch-Router "SWR5", faites les liens manuels suivants :

Tableau 5 - Liens SWR5, VPC5 et VPC6


VPCS Liens SWR5
VPC5 nio_udp:30004:127.0.0.1:20004 ==> f1/0
VPC6 nio_udp:30005:127.0.0.1:20005 ==> f1/1

Configurez sur les ordinateurs "VPCS" les adresses IP suivantes :


Tableau 6 - Adressage IP des ordinateurs VPCx

VPCS Adresses IP
VPC1 IP : 10.0.0.1/24 - GW : 10.0.0.254
VPC2 IP : 10.0.0.2/24 - GW : 10.0.0.254
VPC3 IP : 10.0.1.1/24 - GW : 10.0.1.254
VPC4 IP : 10.0.1.2/24 - GW : 10.0.1.254
VPC5 IP : 10.0.2.1/24 - GW : 10.0.2.254
VPC6 IP : 10.0.2.2/24 - GW : 10.0.2.254

Sauvegardez la configuration de vos "VPCx" :

VPCS[1]> save startupres6.vpc


......... done

8.3 - Configurer les interfaces des routeurs et des switch-routers


Démarrez tous les appareils puis Lancez les "consoles".

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 :

Menu [Fichier] de GNS3 => [Sauvegarder]

Vérifiez le fonctionnement des liens directs entre les appareils avec la commande "ping".

8.4 - Configurer les identifiants des appareils


O.S.P.F. doit identifier tous les appareils à l'aide d'un "Router ID". Cet identifiant, unique, peut être obtenu en
paramétrant une interface "Loopback" et en lui associant une adresse "IP".

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]

8.5 - Configurer "OSPF"


La première étape d'une configuration "OSPF" consiste à créer un processus à l'aide de la commande "router ospf
<Process ID>.

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.

Exemple : soit le réseau 172.16.8.0/21 ; le masque de réseau est : 255.255.248.0 ; le masque générique est : (255.255.255.255)
- (255.255.248.0) = 0.0.7.255. Les 21 premiers bits seront ignorés lors des tests de l'ACL.

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]

8.6 - Modifier la bande passante des interfaces séries


Les bandes passantes sur les interfaces séries sont restées au débit américain (ligne T1).

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]

8.7 - Les commandes utiles


Tableau 7 - commandes

Commande Usage
Liste des routeurs voisins avec son RID,l'état du diagramme
show ip ospf neighbor d'états de l'interface, l'état du diagramme d'états de la
(sh ip o n) relation de voisinage, l'adresse IP de l'interface du voisin sur
le réseau de rattachement
show ip ospf interface Informations OSPF : RID, aire d'appartenance, type de
(sh ip o n) réseau, coût, ...
show ip protocols
Informations sur le RID, les aires, la bande passante, ...
(sh ip pro)
show ip route ospf
Les routes apprises par OSPF
(sh ip ro os)
Figure 57 - Commande show ip protocols
8.8 - Tester la configuration avec "Tracert"
À partir de l'ordinateur "VPC3", tapez la commande suivante : tracert 10.0.2.2.

Figure 58 - Commande "Tracert"

Vous visualisez ici les routes suivies par la commande pour atteindre l'ordinateur VPC6 de l'aire 1 et VPC2 de l'aire 0.

Figure 55 - RES6 - Configuration finale

Vous aimerez peut-être aussi