TP05 – Configuration des VLAN

Topologie du réseau

100%
G0/1G0/1G0/2G0/2G0/2G0/1FeF0/1FeF0/2FeF0/3F0/1FeF0/2FeF0/3FeF0/4FeS0S1S2PC1PC2PC3PC4PC5PC6Admin

Adressage IP

Périphérique réseauInterfaceAdresse IPMasque de sous-réseauPasserelle par défaut
S0Vlan 99192.168.99.10255.255.255.0192.168.99.1
S1Vlan 99192.168.99.11255.255.255.0192.168.99.1
S2Vlan 99192.168.99.12255.255.255.0192.168.99.1
PC1Fe192.168.10.10255.255.255.0192.168.10.1
PC2Fe192.168.11.10255.255.255.0192.168.11.1
PC3Fe192.168.12.10255.255.255.0192.168.12.1
PC4Fe192.168.10.11255.255.255.0192.168.10.1
PC5Fe192.168.11.11255.255.255.0192.168.11.1
PC6Fe192.168.12.11255.255.255.0192.168.12.1

Mots de passe des équipements

PériphériqueMode d’exécution chiffréLigne console 0VTY 0 15
S0cisco0cisco01cisco02
S1cisco1cisco11cisco12
S2cisco2cisco21cisco22

Configuration des VLAN

ID du VLANNom du VLANEquipements
10FormateursPC1 et PC4
11StagiairesPC2 et PC5
12AdministrationPC3 et PC6
99Gestion/NatifS0, S1 et S2
Tâche 1

Tâche 1 : Configuration initiale

Configuration initiale des adresses IP et des mots de passe
Q1
Configurez les adresses IP des ordinateurs PC1 à PC6.
Réponse :
Pour chaque PC :
1. Cliquer sur l'icône du PC
2. Aller dans l'onglet Desktop
3. Cliquer sur IP Configuration
4. Saisir l'adresse IP, le masque et la passerelle selon la table d'adressage.
Q2
Configurez les noms des équipements réseau S0, S1 et S2.
Réponse :
Pour S0 :
Switch> enable
Switch# configure terminal
Switch(config)# hostname S0
S0(config)#
Pour S1 :
Switch> enable
Switch# configure terminal
Switch(config)# hostname S1
S1(config)#
Pour S2 :
Switch> enable
Switch# configure terminal
Switch(config)# hostname S2
S2(config)#
Q3
Désactivez la recherche DNS.
Réponse :
S0(config)# no ip domain-lookup
S1(config)# no ip domain-lookup
S2(config)# no ip domain-lookup
Q4
Ajoutez une bannière du message du jour « Configuration des VLAN ».
Réponse :
S0(config)# banner motd #Configuration des VLAN#
S1(config)# banner motd #Configuration des VLAN#
S2(config)# banner motd #Configuration des VLAN#
Q5
Configurez tous les mots de passe pour S0, S1 et S2.
Réponse :
Pour S0 :
S0(config)# enable secret cisco0
S0(config)# line console 0
S0(config-line)# password cisco01
S0(config-line)# login
S0(config-line)# exit
S0(config)# line vty 0 15
S0(config-line)# password cisco02
S0(config-line)# login
S0(config-line)# exit
Pour S1 :
S1(config)# enable secret cisco1
S1(config)# line console 0
S1(config-line)# password cisco11
S1(config-line)# login
S1(config-line)# exit
S1(config)# line vty 0 15
S1(config-line)# password cisco12
S1(config-line)# login
S1(config-line)# exit
Pour S2 :
S2(config)# enable secret cisco2
S2(config)# line console 0
S2(config-line)# password cisco21
S2(config-line)# login
S2(config-line)# exit
S2(config)# line vty 0 15
S2(config-line)# password cisco22
S2(config-line)# login
S2(config-line)# exit

Tâche 2 : Configuration de base des VLAN

Configuration de base des VLAN
Q6
Créez les VLAN 10, 11, 12, 99 sur les trois commutateurs.
Réponse :
Pour S0 :
S0(config)# vlan 10
S0(config-vlan)# name Formateurs
S0(config-vlan)# vlan 11
S0(config-vlan)# name Stagiaires
S0(config-vlan)# vlan 12
S0(config-vlan)# name Administration
S0(config-vlan)# vlan 99
S0(config-vlan)# name Gestion/Natif
Pour S1 :
S1(config)# vlan 10
S1(config-vlan)# name Formateurs
S1(config-vlan)# vlan 11
S1(config-vlan)# name Stagiaires
S1(config-vlan)# vlan 12
S1(config-vlan)# name Administration
S1(config-vlan)# vlan 99
S1(config-vlan)# name Gestion/Natif
Pour S2 :
S2(config)# vlan 10
S2(config-vlan)# name Formateurs
S2(config-vlan)# vlan 11
S2(config-vlan)# name Stagiaires
S2(config-vlan)# vlan 12
S2(config-vlan)# name Administration
S2(config-vlan)# vlan 99
S2(config-vlan)# name Gestion/Natif
Q7
Affichez la liste des VLAN créés.
Réponse :
S0# show vlan brief
S1# show vlan brief
S2# show vlan brief
Q8
Configurez les ports connectés aux PC en mode ACCESS.
Réponse :
Pour les 3 ports du commutateur S1 :
S1(config)# interface range fa0/1-3
S1(config-if)# switchport mode access
Pour les 3 ports du commutateur S2 :
S2(config)# interface range fa0/1-3
S2(config-if)# switchport mode access
Q9
Vérifiez que les ports sont en mode ACCESS.
Réponse :
S0# show interface fa0/1 switchport
Q10
Affectez les ports d’accès aux VLAN correspondants.
Réponse :
Pour les 3 ports du commutateur S1 :
S1(config)# interface fa0/1
S1(config-if)# switchport access vlan 10
S1(config)# interface fa0/2
S1(config-if)# switchport access vlan 11
S1(config)# interface fa0/3
S1(config-if)# switchport access vlan 12
Pour les 3 ports du commutateur S2 :
S2(config)# interface fa0/1
S2(config-if)# switchport access vlan 10
S2(config)# interface fa0/2
S2(config-if)# switchport access vlan 11
S2(config)# interface fa0/3
S2(config-if)# switchport access vlan 12
Q11
Vérifiez l’affectation des ports aux VLAN.
Réponse :
S0# show vlan brief
Q12
Configurez les ports entre commutateurs en mode TRUNK.
Réponse :
Au niveau du commutateur S0 :
S0(config)# interface range g0/1-2
S0(config-if)# switchport mode trunk
Au niveau du commutateur S1 :
S1(config)# interface range g0/1-2
S1(config-if)# switchport mode trunk
Au niveau du commutateur S2 :
S2(config)# interface range g0/1-2
S2(config-if)# switchport mode trunk
Q13
Vérifiez la configuration des ports TRUNK.
Réponse :
S0# show interface g0/1 switchport
Q14
Vérifiez la connectivité entre les PC du même VLAN.
Réponse :
Depuis PC1 : ping 192.168.10.11 (PC4)
Depuis PC2 : ping 192.168.11.11 (PC5)
Depuis PC3 : ping 192.168.12.11 (PC6)

Tâche 3 : Configuration avancée des VLAN

Configuration du VLAN de gestion, VLAN natif et VLAN autorisés
Q15
Configurez l’ordinateur Admin afin qu’il appartienne au VLAN de gestion
Réponse :
S0(config)# interface f0/4
S0(config-if)# switchport mode access
S0(config-if)# switchport access vlan 99
S0(config-if)# exit
S0(config)#
Q16
Configurez les interfaces de gestion (VLAN 99) sur S0, S1 et S2.
Réponse :
Au niveau du commutateur S0 :
S0(config)# interface vlan 99
S0(config-if)# ip address 192.168.99.10 255.255.255.0
S0(config-if)# no shutdown
S0(config-if)# exit
S0(config)# ip default-gateway 192.168.99.1
Au niveau du commutateur S1 :
S1(config)# interface vlan 99
S1(config-if)# ip address 192.168.99.11 255.255.255.0
S1(config-if)# no shutdown
S1(config-if)# exit
S1(config)# ip default-gateway 192.168.99.1
Au niveau du commutateur S2 :
S2(config)# interface vlan 99
S2(config-if)# ip address 192.168.99.12 255.255.255.0
S2(config-if)# no shutdown
S2(config-if)# exit
S2(config)# ip default-gateway 192.168.99.1
Q17
Configurez l’accès par Telnet aux commutateurs.
Réponse :
Au niveau du commutateur S0 :
S0(config)# line vty 0 15
S0(config-line)# password cisco02
S0(config-line)# login
S0(config-line)# transport input telnet
Au niveau du commutateur S1 :
S1(config)# line vty 0 15
S1(config-line)# password cisco12
S1(config-line)# login
S1(config-line)# transport input telnet
Au niveau du commutateur S2 :
S2(config)# line vty 0 15
S2(config-line)# password cisco22
S2(config-line)# login
S2(config-line)# transport input telnet
Q18
Testez l’accès Telnet depuis l’ordinateur Admin vers S0, S1 et S2.
Réponse :
Sur l'ordinateur Admin :
1. Ouvrir Command Prompt
2. Taper : telnet 192.168.99.10 (pour S0)
3. Taper : telnet 192.168.99.11 (pour S1)
4. Taper : telnet 192.168.99.12 (pour S2)
Q19
Configurez le VLAN 99 comme VLAN natif sur les liaisons Trunk.
Réponse :
Au niveau du commutateur S0 :
S0(config)# interface range g0/1-2
S0(config-if)# switchport trunk native vlan 99
Au niveau du commutateur S1 :
S1(config)# interface range g0/1-2
S1(config-if)# switchport trunk native vlan 99
Au niveau du commutateur S2 :
S2(config)# interface range g0/1-2
S2(config-if)# switchport trunk native vlan 99
Q20
Autorisez les VLAN 10 et 11 sur les liaisons Trunk.
Réponse :
Au niveau du commutateur S0 :
S0(config)# interface range g0/1-2
S0(config-if)# switchport trunk allowed vlan 10,11
Au niveau du commutateur S1 :
S1(config)# interface range g0/1-2
S1(config-if)# switchport trunk allowed vlan 10,11
Au niveau du commutateur S2 :
S2(config)# interface range g0/1-2
S2(config-if)# switchport trunk allowed vlan 10,11
Q21
Testez la connectivité entre PC3 et PC6.
Réponse :
Sur PC3 : ping 192.168.12.11
⛔ Le ping n’aboutit pas car le VLAN 12 n’est pas autorisé.
Q22
Ajoutez les VLAN 1, 12 et 99 comme VLAN autorisés sur les trunks.
Réponse :
Au niveau du commutateur S0 :
S0(config)# interface range g0/1-2
S0(config-if)# switchport trunk allowed vlan add 1,12,99
Au niveau du commutateur S1 :
S1(config)# interface range g0/1-2
S1(config-if)# switchport trunk allowed vlan add 1,12,99
Au niveau du commutateur S2 :
S2(config)# interface range g0/1-2
S2(config-if)# switchport trunk allowed vlan add 1,12,99
Q23
Testez à nouveau la connectivité entre PC3 et PC6.
Réponse :
Sur PC2 : ping 192.168.12.11
✅ Le ping aboutit car le VLAN 12 est autorisé.
Q24
Supprimez le VLAN 1 de la liste des VLAN autorisés.
Réponse :
Au niveau du commutateur S0 :
S0(config)# interface range g0/1-2
S0(config-if)# switchport trunk allowed vlan remove 1
Au niveau du commutateur S1 :
S1(config)# interface range g0/1-2
S1(config-if)# switchport trunk allowed vlan remove 1
Au niveau du commutateur S2 :
S2(config)# interface range g0/1-2
S2(config-if)# switchport trunk allowed vlan remove 1
Q25
Affichez la liste des VLAN autorisés.
Réponse :
S0# show interface g0/1 switchport

Comments

No comments yet. Why don’t you start the discussion?

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *