You are on page 1of 16

INSAT

RT 3 Groupe 3

Compte Rendu TP N 2 Rseau


Cration de VLAN, configuration des TRUNK et des serveurs/clients VTP
Ralis par :

RT 3 Gr 3

Omar Khayem Cherif Meriam Kedidi Leila Naffeti

2012/2013

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

I. Introduction
Dans cette sance de TP, on a procder la cration des VLAN, leurs configurations, ainsi que la configuration de lagrgation des rseaux virtuels connus aussi par trunk . Enfin on procdera la configuration du serveur et des clients VTP.

II. Prsentation thorique


Avant de prsenter la dmarche adopte pour raliser le travail demand, on commence par une prsentation brve des notions de VLAN, TRUNK et serveur VTP. 1. VLAN VLAN est une abrviation du terme Virtual LAN c'est--dire Virtual Local Area Network. Un Vlan est un rseau local qui permet le regroupement dun ensemble de matriels dune faon logique et non physique. Autrement dit un VLAN permet une segmentation logique et non pas physique du matriel suivant le choix de ladministrateur de rseau. 2. Trunking Dans un Lan compos de plusieurs VLANs, le Trunk est une liaison qui permet de transporter les diffrentes donnes en provenance de tout les Vlans sur la mme liaison. Un exemple pratique similaire celui ralis dans notre tp, si on plusieurs VLAN sur plusieurs Switch, le trunk permet la circulation de ces VLANs sur tous les Switch avec un seul lien entre deux Switch. En absence de cette solution, on se trouve dans lobligation de fournir un lien par VLAN. 3. VTP Le VTP, facilite la gestion des VLAN et permet dviter tous discordance de configuration des VLAN. En effet, en spcifiant un Switch comme serveur et dautres comme clients toute modification portant sur les VLAN et appliqu sur les le Switch serveur est prises en considration par les Switch clients. En plus des modes serveur et client on distingue le mode transparent qui permet la transmission des modifications sans les appliquer.

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

III. Ralisation du TP

On ralise la topologie prsente dans lnonc du TP, et on procde la configuration des PC avec les adresses IP donnes.

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

Tche 1 : configuration de base des commutateurs


Switch 1 Switch>enable Switch#config t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname S1 S1(config)#no ip domain-lookup S1(config)#enable secret class S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit S1(config)#line vty 0 4 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit Switch 2 Switch>enable Switch#config t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname S2 S2(config)#no ip domain-lookup S2(config)#enable secret class S2(config)#line console 0 S2(config-line)#password cisco S2(config-line)#login S2(config-line)#exit S2(config)#line vty 0 4 S2(config-line)#password cisco S2(config-line)#login S2(config-line)#exit Switch 3 Switch>enable Switch#config t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname S3 S3(config)#no ip domain-lookup S3(config)#enable secret class S3(config)#line console 0 S3(config-line)#password cisco S3(config-line)#login S3(config-line)#exit S3(config)#line vty 0 4 S3(config-line)#password cisco S3(config-line)#login S3(config-line)#exit

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

Tche 3 : configuration des rseaux locaux virtuels sur le commutateur


Switch 1 S1(config)#vlan 99 S1(config-vlan)#name Management&Native S1(config-vlan)#exit S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff S1(config-vlan)#exit S1(config)#vlan 20 S1(config-vlan)#name Students S1(config-vlan)#exit S1(config)#vlan 30 S1(config-vlan)#name Guest(Default) S1(config-vlan)#exit Switch 2 S2(config)#vlan 99 S2(config-vlan)#name Management&Native S2(config-vlan)#exit S2(config)#vlan 10 S2(config-vlan)#name Faculty/Staff S2(config-vlan)#exit S2(config)#vlan 20 S2(config-vlan)#name Students S2(config-vlan)#exit S2(config)#vlan 30 S2(config-vlan)#name Guest(Default) S1(config-vlan)#exit Switch 1 S1(config)#vlan 99 S1(config-vlan)#name Management&Native S1(config-vlan)#exit S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff S1(config-vlan)#exit S1(config)#vlan 20 S1(config-vlan)#name Students S1(config-vlan)#exit S1(config)#vlan 30 S1(config-vlan)#name Guest(Default) S1(config-vlan)#exit

On vrifie la cration des vlan par la commande : Show vlan brief En appliquant la commande dans les trois Switch, on obtenue la rsulta suivante :

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3 Switch 1 - Switch 2 - Switch 3 VLAN Name Status Ports

---- -------------------------------- --------- ------------------------------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig1/1, Gig1/2 10 Faculty/Staff 20 Students 30 Guest(Default) active active active

99 Management&Native active 1002 fddi-default 1003 token-ring-default 1004 fddinet-default 1005 trnet-default active active active active

Puis On procde laffectation des ports du commutateur aux rseaux locaux virtuels. Une fois termin, on vrifie que pour chaque VLAN on a bien attribu le port demand.

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3 Switch 1 S1(config)#int fa0/6 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 30 S1(config-if)#exit S1(config)#int fa0/11 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 10 S1(config-if)#exit S1(config)#int fa0/18 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 20 S1(config-if)#end Switch 2 S2(config)#int fa0/6 S2(config-if)#switchport mode access S2(config-if)#switchport access vlan 30 S2(config-if)#exit S2(config)#int fa0/11 S2(config-if)#switchport mode access S2(config-if)#switchport access vlan 10 S2(config-if)#exit S2(config)#int fa0/18 S2(config-if)#switchport mode access S2(config-if)#switchport access vlan 20 S2(config-if)#end Switch 2 Switch 2 S3(config)#int fa0/6 S3(config-if)#switchport mode access S3(config-if)#switchport access vlan 30 S3(config-if)#exit S3(config)#int fa0/11 S3(config-if)#switchport mode access S3(config-if)#switchport access vlan 10 S3(config-if)#exit S3(config)#int fa0/18 S3(config-if)#switchport mode access S3(config-if)#switchport access vlan 20 S3(config-if)#end

REPONSE AU QUESTION: Pour le switch 2, on a affect le port FastEthernet 0/11 (Fa0/11)

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3 Switch 3

Noubliez pas denregistrer la configuration de chaque Switch pour tre adopt pour toujours. On utilise la commande: copy running-config startup-config Pour pouvoir la configuration des switch via une interface http, SSH, TELNET, sans avoir chaque fois se dplacer prs des switch et utiliser un port console on configure vlan de gestion. Dans notre cas il est le VLAN 99.
Switch 1 S1(config)#interface vlan 99 %LINK-5-CHANGED: Interface Vlan99, changed state to upS1(config-if)# S1(config-if)#ip address 172.17.99.11 255.255.255.0 S1(config-if)#no shutdown S1(config-if)#exit

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

Pour permettre la communication pour tous les rseaux locaux virtuels entre les diffrents Switch, on doit procder la configuration de lagrgation et du rseau local virtuel natif pour les ports dagrgation sur tous les commutateurs. On passe pour chacun des Switch les commandes suivantes : Remarque: On reportera les messages affich par chaque Switch au cours de sa configuration aussi bien que les messages des autres Switch qui afficherai des messages fur et mesure que la programmation des autres Switch. LES COMMANDES SONT EN GRAS, LES MESSAGES SONT NORMALES. Configuration sur Switch 1:
Switch 1 (en cours de configuration) S1(config)#int fa0/1 S1(config-if)#switchport mode trunk %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up S1(config-if)#switchport trunk native vlan 99 %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (99), with S2 FastEthernet0/1 (1). S1(config-if)#int fa0/2 S1(config-if)#switchport mode trunk %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up S1(config-if)#switchport trunk native vlan 99 S1(config-if)#end %SYS-5-CONFIG_I: Configured from console by console S1# %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/2 (99), with S3 FastEthernet0/1 (1). %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/2 (99), with S3 FastEthernet0/1 (1). REMARQUE : Tant que la configuration des autres Switchs nest pas configure correctement laffichage de ce message persiste

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3 Switch 2 (nest pas en cours de configuration) %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with S1 FastEthernet0/1 (99). %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with S1 FastEthernet0/1 (99).%SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 99 on FastEthernet0/1 VLAN1. %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/1 on VLAN0001. Inconsistent local vlan. %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with S1 FastEthernet0/1 (99). %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with S1 FastEthernet0/1 (99). REMARQUE : Tant que la configuration des autres Switchs nest pas configure correctement laffichage de ce message persiste Switch 3 (nest pas en cours de configuration) %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with S1 FastEthernet0/2 (99). %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with S1 FastEthernet0/2 (99). REMARQUE : Tant que la configuration des autres Switchs nest pas configure correctement laffichage de ce message persiste

10

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

Configuration sur Switch 2 & 3:


Switch 2 (en cours de configuration) S2(config)#int fa0/1 S2(config-if)#switchport mode trunk S2(config-if)#switchport trunk native vlan 99 S2(config-if)#%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/1 on VLAN0099. Port consistency restored. %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/1 on VLAN0001. Port consistency restored. end %SYS-5-CONFIG_I: Configured from console by console REMARQUE : On remarque quun message qui saffiche pour confirmer la bonne configuration du trunking Switch 3 (en cours de configuration) S3(config)#int fa0/2 S3(config-if)#switchport mode trunk S3(config-if)#switchport trunk native vlan 99 S3(config-if)#%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/2 on VLAN0099. Port consistency restored. %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/2 on VLAN0001. Port consistency restored. end %SYS-5-CONFIG_I: Configured from console by console REMARQUE : On remarque quun message qui saffiche pour confirmer la bonne configuration du trunking

Une fois termine, on doit sassurer de la bonne configuration des agrgation. On utilise la commande show interface trunk ou bien show vlan brief On prsente la rsultat prsente par le Switch 1 pour la commande show vlan brief et on encadre linformation prcise qui dmontre le bon droulement de la configuration.

11

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

A partir du Switch S1, on envoie une requte ping vers les Switch S2 et S3 pour la vrification de la bonne communication entre les Switchs.
Switch 1 S1#ping 172.17.99.12 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.17.99.12, timeout is 2 seconds: ..!!! Success rate is 60 percent (3/5), round-trip min/avg/max = 31/37/49 ms S1#ping 172.17.99.13 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.17.99.13, timeout is 2 seconds: ..!!! Success rate is 60 percent (3/5), round-trip min/avg/max = 31/31/32 ms

12

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

Les rponses aux questions des tapes 9, 10 et 11 sont donnes aprs la ralisation des testes : tape 9 : envoi dune requte ping plusieurs htes depuis PC2 Question: Envoyez une requte ping au PC1 depuis le PC2 hte. La requte ping a-telle abouti ?

Rponse: La requte ping na pas abouti Explication: PC1 et PC2 nappartiennent pas aux mmes VLAN. Question: Envoyez une requte ping ladresse IP 172.17.99.12 du VLAN 99 du commutateur depuis le PC2 hte. La requte ping a-t-elle abouti ?

Rponse: La requte ping na pas abouti Explication: PC2 appartient au VLAN 20 et non VLAN99. Question: Envoyez une requte ping au PC5 hte depuis le PC2 hte. La requte ping a-t-elle abouti ?

Rponse: La requte ping a bien abouti Explication: PC2 et PC5 appartiennent au mme VLAN 20 et au mme rseau local. tape 10 : dplacement de PC1 sur le mme VLAN que PC2 Question: Envoyez une requte ping au PC1 hte depuis le PC2 hte. La requte ping a-t-elle abouti ?

Rponse: La requte na pas abouti Explication: PC1 et PC2 appartiennent au mme VLAN 20. tape 11 : modification de ladresse IP et du rseau sur PC1 Question: La requte ping a-t-elle aboutie ?

Rponse: Oui, la requte a aboutie. Question: Pourquoi cette tentative a-t-elle russi ?

Rponse: En changeant ladresse rseau et la passerelle par dfaut du PC1, ce dernier (PC1) et PC2 appartiennent au mme rseau local 172.17.20.0/24 et mme VLAN 20

13

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

IV.

Partit supplmentaire: VTP

La Configuration VTP revient un Switch comme serveur et dautres comme clients et peut tre des Switch comme transparent. Dans notre TP, Le Switch S1 comme un serveur et le Switch S2 et S3 comme des clients. Pour une bonne configuration VTP, c'est--dire qui facilite la gestion des VLAN partir du Switch serveur, il faut que les noms de domaine soient identiques dans les trois Switchs aussi bien que les mots de passe en cas de leurs initialisations. Voici les commandes utilises lors du TP pour configurer le VTP :
Switch 1 S1(config)#vtp mode server Device mode already VTP SERVER. S1(config)# vtp domain INSAT Changing VTP domain name from NULL to INSAT S1(config)#vtp password class Setting device VLAN database password to class Switch 2 S2(config)#vtp mode client Setting device to VTP CLIENT mode. S2(config)#vtp domain INSAT Changing VTP domain name from NULL to INSAT S2(config)#vtp password class Setting device VLAN database password to class Switch 3 S3(config)#vtp mode client Setting device to VTP CLIENT mode. S3(config)#vtp domain INSAT Changing VTP domain name from NULL to INSAT S3(config)#vtp password class Setting device VLAN database password to class

Remarque: On constate quun Switch est en mode Server par dfaut. Pour la vrification de notre configuration on utilise la commande: show vtp status
Switch 1

14

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

Switch 2

Switch 3

Une simple manipulation nous permet de vrifier si notre configuration VTP est bien fonctionnelle: En effet, on procde la cration dun nouvel VLAN au sein du swirch serveur, ce nouveau VLAN doit tre cre en mme temps sur les Switchs clients (vrification en utilisant la commande show vlan brief ) On remarque aussi que la commande (show vtp status) permet de vrifier la date et la source de la dernire modification (voir flche en rouge).

15

Scurit rseaux Compte Rendu N2 RT 3 Groupe 3

16

You might also like