X.
GNS3 RÉSEAU N° 8
Vous allez créer un réseau constitué d'un routeur et de deux commutateurs (Type Cisco 3725).
Le module "NM-16ESW" est installé sur "SWR1" et "SWR2" ; "SWR1" et "SWR2"
peuvent être installés avec un disque virtuel PCMCIA de 128 MiB pour sauvagarder vos
configurations. Des ordinateurs [VPCx] complètent la topologie pour les tests de
fonctionnement.
Figure 65 - RES8 - Topologie réseau n° 8
Note
Pour utiliser le disque virtuel PCMCIA de 128 MiB, effecutez les manipualtions
suivantes :
1) copy startup-config flash:startup-config
2) conf t
boot system slot0:startup-config
end
3) write mem
4) copy run start
10.1 - Créer la topologie du réseau
Les liens sont les suivants :
Tableau 1 - Liens manuels Cloud, routeur et
commutateurs
Routeurs / Commutateurs Liens
Cloud - Internet tap0 (Linux) est connecté à [Router] f0/0
f0/0 est connecté à Internet tap0
Router
f0/1 est connecté à SWR1 f1/0
f1/0 est connecté à [Router] f0/1
f1/1 est connecté à SWR2 f1/0
SWR1 f1/2 est connecté à SWR2 f1/1
f1/3 est connecté à VPC1
f1/4 est connecté à VPC2
f1/0 est connecté à SWR1 f1/1
f1/1 est connecté à SWR1 f1/2
SWR2
f1/2 est connecté à VPC3
f1/3 est connecté à VPC4
10.2 - Connecter et configurer les ordinateurs [VPCx]
Configurez les quatre ordinateurs [VPCx] de la manière suivante :
Tableau 2 - Ordinateurs VPCx
VPCx Valeurs
VPC1 LPort:30000 - hôte distant:[Link] - RPort : 20000
VPC2 LPort:30001 - hôte distant:[Link] - RPort : 20001
VPC3 LPort:30002 - hôte distant:[Link] - RPort : 20002
VPC4 LPort:30003 - hôte distant:[Link] - RPort : 20003
Sur le commutateur "SWR1", faites les liens manuels suivants :
Tableau 3 - Liens SW1, VPC1 et VPC2
VPCx Liens SWR1
VPC1 nio_udp:30000:[Link]:20000 ==> f1/3
VPC2 nio_udp:30001:[Link]:20001 ==> f1/4
Sur le commutateur "SWR2", faites les liens manuels suivants :
Tableau 4 - Liens SW2, VPC3 et VPC4
VPCx Liens SWR4
VPC3 nio_udp:30002:[Link]:20002 ==> f1/2
VPC4 nio_udp:30003:[Link]:20003 ==> f1/3
Configurez sur les ordinateurs "VPCx" les adresses IP suivantes :
Tableau 5 - Adressage IP des ordinateurs VPCx
VPCx Adresses IP
VPC1 - VLAN 10 IP : [Link]/21 - GW : [Link]
VPC2 - VLAN 20 IP : [Link]/24 - GW : [Link]
VPC3 - VLAN 20 IP : [Link]/24 - GW : [Link]
VPC4 - VLAN 10 IP : [Link]/21 - GW : [Link]
Note
Pour configurer un DNS, vous pouvez taper la commande suivante sur chaque [VPCx] :
"ip dns [Link]".
Sauvegardez la configuration de vos "VPCx" :
VPCS[1]> save [Link]
......... done
10.3 - Configurer les commutateurs SWR1 et SWR2
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)# line con 0
SWR1(config-line)# logging synchronous
SWR1(config-line)# exit
SWR1(config)# vlan 10
SWR1(config-vlan)# name Ingenierie
SWR1(config-vlan)# exit
SWR1(config)# int f1/3
SWR1(config-if)# switchport mode access
SWR1(config-if)# switchport access vlan 10
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# vlan 20
SWR1(config-vlan)# name Commerciaux
SWR1(config-vlan)# exit
SWR1(config)# int f1/4
SWR1(config-if)# switchport mode access
SWR1(config-if)# switchport access vlan 20
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# int f1/0
SWR1(config-if)# speed 100
SWR1(config-if)# duplex full
SWR1(config-if)# switchport mode trunk
SWR1(config-if)# switchport trunk encapsulation dot1q
SWR1(config-if)# switchport trunk allowed vlan add 10,20
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# int f1/1
SWR1(config-if)# switchport mode trunk
SWR1(config-if)# switchport trunk encapsulation dot1q
SWR1(config-if)# switchport trunk allowed vlan add 10,20
SWR1(config-if)# channel-group 1 mode on
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# int f1/2
SWR1(config-if)# switchport mode trunk
SWR1(config-if)# switchport trunk encapsulation dot1q
SWR1(config-if)# switchport trunk allowed vlan add 10,20
SWR1(config-if)# channel-group 1 mode on
SWR1(config-if)# no shut
SWR1(config-if)# exit
SWR1(config)# int port-channel 1
SWR1(config-if)# switchport mode trunk
SWR1(config-if)# switchport trunk encapsulation dot1q
SWR1(config-if)# switchport trunk allowed vlan add 10,20
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 "SWR2" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)# hostname SWR2
SWR2(config)# line con 0
SWR2(config-line)# logging synchronous
SWR2(config-line)# exit
SWR2(config)# vlan 10
SWR2(config-vlan)# name Ingenierie
SWR2(config-vlan)# exit
SWR2(config)# int f1/3
SWR2(config-if)# switchport mode access
SWR2(config-if)# switchport access vlan 10
SWR2(config-if)# no shut
SWR2(config-if)# exit
SWR2(config)# vlan 20
SWR2(config-vlan)# name Commerciaux
SWR2(config-vlan)# exit
SWR2(config)# int f1/2
SWR2(config-if)# switchport mode access
SWR2(config-if)# switchport access vlan 20
SWR2(config-if)# no shut
SWR2(config-if)# exit
SWR2(config)# int f1/0
SWR2(config-if)# switchport mode trunk
SWR2(config-if)# switchport trunk encapsulation dot1q
SWR2(config-if)# switchport trunk allowed vlan add 10,20
SWR2(config-if)# channel-group 1 mode on
SWR2(config-if)# no shut
SWR2(config-if)# exit
SWR2(config)# int f1/1
SWR2(config-if)# switchport mode trunk
SWR2(config-if)# switchport trunk encapsulation dot1q
SWR2(config-if)# switchport trunk allowed vlan add 10,20
SWR2(config-if)# channel-group 1 mode on
SWR2(config-if)# no shut
SWR2(config-if)# exit
SWR2(config)# int port-channel 1
SWR2(config-if)# switchport mode trunk
SWR2(config-if)# switchport trunk encapsulation dot1q
SWR2(config-if)# switchport trunk allowed vlan add 10,20
SWR2(config-if)# no shut
SWR2(config-if)# end
SWR2# write mem
Building configuration...
[OK]
SWR2# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Sauvegardez le projet :
Menu [Fichier] de GNS3 => [Sauvegarder]
10.4 - Configurer l'équilibrage de charge
Pour configurer l'équilibrage de charge sur "SWR1", tapez les commandes suivantes :
SWR1> en
SWR1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWR1(config)# port-channel load-balance src-dst-ip
SWR1(config)# end
SWR1# write mem
Building configuration...
[OK]
SWR1# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Sauvegardez le projet :
Menu [Fichier] de GNS3 => [Sauvegarder]
Pour visualiser la configuration de l'équilibrage de charge, tapez la commande "sh
etherchannel load-balance".
Figure 68 - RES8 - load-balance
10.5 - Configurer le routeur [Router]
Configuration de "Router" :
Router> en
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# hostname Router
Router(config)# line con 0
Router(config-line)# logging synchronous
Router(config-line)# exit
Router(config)# int f0/0
Router(config-if)# ip address [Link] [Link]
Router(config-if)# no shut
Router(config-if)# exit
Router(config)# ip route [Link] [Link] [Link]
Router(config)# int f0/1
Router(config)# speed 100
Router(config)# duplex full
Router(config-if)# no ip address
Router(config-if)# no shut
Router(config-if)# exit
Router(config)# int f0/1.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# exit
Router(config)# int f0/1.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# end
Router# write mem
Building configuration...
[OK]
Router# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Sauvegardez le projet :
Menu [Fichier] de GNS3 => [Sauvegarder]
10.6 - Les commandes utiles
Pour afficher la configuration des VLans, utilisez la commande : sh vlan-switch br.
Exemple sur "SWR1" :
SW1> en
SW1# sh vlan-switch br
Figure 66 - RES8 - Commande : sh vlan-switch br
Pour afficher les liens "trunkés", utilisez la commande : sh int trunk.
Exemple sur "SWR1" :
SW1> en
SW1# sh int trunk
Figure 67 - RES8 - Commande : sh int trunkr
Pour vérifier la configuration de l'Etherchannel, utilisez la commande : "sh int port-channel
1".
Exemple sur "SWR1" :
SW1> en
SW1# sh int Po1
Figure 69 - RES8 - Commande : sh int port-channel 1
Pour vérifier le fonctionnement de l'etherchannel, tapez la commande : "sh etherchannel 1
summary".
Exemple sur "SWR1" :
SW1> en
SW1# sh etherchannel 1 summary
Figure 70 - RES8 - Commande : sh etherchannel 1
summary
10.7 - Tester le fonctionnement de la topologie réseau
À partir de l'ordinateur "VPC1", tapez les commandes suivantes : "ping [Link]" puis
"ping [Link]" ; testez l'accès au dns de "google" : "ping [Link]".
Figure 62 - Commandes ping
À partir de l'ordinateur "VPC2", tapez les commandes suivantes : "ping [Link]" puis
"ping [Link]" ; testez l'accès au dns de "google" : "ping [Link]".
Figure 63 - Commandes ping
Tout fonctionne, y compris l'accès à l'extérieur.