Vous êtes sur la page 1sur 8

CREATION ET GESTIONS DES RÉSEAUX VIRTUELS

1- Vérification des VLANs

On utilise la commande ≪show vlan brief≫

Swicth#show vlan brief

On constate que par défaut on a 5 Vlan:

- VLAN 1 = VLAN par défaut.


- VLAN 1002 = FDDI-default
- VLAN 1003 = TOKEN-RING-default
- VLAN 1004 = FDDINET-default
- VLAN 1005 = TRNET-default

2- Création de VLAN

On utilise les commandes ≪VLAN 10≫ et ≪name financier≫

Switch(config)#vlan 10

Switch(config-vlan)#name financier

Switch(config)#vlan 20

Switch(config-vlan)#name ingénieur

Switch(config)#vlan 30

Switch(config-vlan)#name secrétaire

3- Affectation de port aux Vlans

On utilise la commande ≪switchport mode acess≫

Exemple1:

Switch(config)#interface fa0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Exemple 2:

Switch(config)#interface range fa0/1-6

Switch(config-if)#switchport mode acess

Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit

Switch(config)#interface range fa0/7-12

Switch(config-if)#switchport mode access


Switch(config-if)#switchport access vlan 20

Switch(config-if)#exit

Switch(config)#interface range fa0/13-18

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 30

Switch(config-if)#exit

4- Pour connecté 2 switch avec trunk

On utilise les commandes Sur chaque switch

Switch(config)#int fa 0/20

#switchport mode trunk

5- PROTOCOLE VTP (vlan trunking protocol)

Comm1 comme VTP , comm2 et comm3 comme client VTP

Configuration comm1

Switch(config)#hostname comm 1
Comm1(config)#vtp mode server
Comm1(config)#vtp domaine eln
Comm1(config)#vtp password eln
Comm1(config)#vlan 10
Comm1(config)#name administration
Comm1(config)#exit
Comm1(config)#vlan 20
Comm1(config)#name administration
Comm1(config)#exit
Comm1(config)#vlan 30
Comm1(config)#name invites
Comm1(config)#exit
Comm1(config)#int fa 0/1
Comm1(config-if)#switchport mode trunk

Configuration comm2

- Vérification des VLAN


Switch#sh vlan brief
- Configuration VTP
Switch(config)#hostname comm 2
Comm2(config)#vtp mode client
Comm2(config)#vtp domaine eln
Comm2(config)#vtp password eln
Comm2(config)#int fa 0/1
Comm2(config-if)#switchport mode trunk
Configuration comm3

Switch(config)#hostname comm3
Comm3(config)#vtp mode client
Comm3(config)#vtp domaine eln
Comm3(config)#vtp password eln
Comm3(config)#int fa 0/3
Comm3(config-if)#switchport mode trunk

6- Configuration des ports d’accès


a- Comm2
Comm2(config)#int fa 0/11
Comm2(config)#switchport mode access
Comm2(config)#switchport access vlan 10
Comm2(config)#int fa 0/18
Comm2(config)#switchport mode access
Comm2(config)#switchport access vlan 20
Comm2(config)#int fa 0/6
Comm2(config)#switchport mode access
Comm2(config)#switchport access vlan 30

b- Comm3
Comm3(config)#int fa 0/11
Comm3(config)#switchport mode access
Comm3(config)#switchport access vlan 10
CCom3(config)#int fa 0/18
CCom3(config)#switchport mode access
Comm3(config)#switchport access vlan 20
Comm3(config)#int fa 0/6
Comm3(config)#switchport mode access
Comm3(config)#switchport access vlan 30

Configuration de comm1 avec le routeur.

Comm1

Comm1(config)#int fa 0/2

#switchport mode trunk

Routeur Vlan 10  172.17.10.0 /24


Toujours mettre no à chaque question Passerelle= 172.17.10.1 /24
Router>en Vlan20 172.17.20.0 /24
Router#conf t Gâter way= 172.17.20.1
Router(config)#int g 0/0 Vlan30 172.17.30.0/24
#no shut Gateway= 172.17.30.1
Router(config)#int g 0/0.10

#encapsulation dot1Q 10

#ip address 172.17.10.1 255.255.255.0

#exit

#Int g 0/0.20

#encapsulation dot1Q 20

#Ip address 172.17.20.1 255.255.255.0

#exit

#Int g 0/0.30

#encapsulation dot1Q 30

#Ip address 172.17.30.1 255.255.255.0

Suite de correction de l’exercice

3) Adresse de gestion D’un switch

Par défaut, cette adresse est attribuée au vlan 1:

Switch(config)#int vlan 1

Switch(config-if)#ip address ≪adresse≫ ≪masque≫

Switch(config-if)#no shut

Ici, le bain 60 est le vlan natif. La configuration devient :

S1(config)#int vlan 60

S1(config-if)#ip address 200.200.200.129 255.255.255.248

S1(config-if)#no shut

On le configure ainsi jusqu’au switch S6

S2(config)#int vlan 60

S2(config-if)#ip address 200.200.200.130 255.255.255.248

S2(config-if)#no shut

4) Configuration vtp

a)S3 comme serveur


S3(config)#vtp mode server

S3(config)#vtp domain ISIG

S3(config)#vtp password ISIG

b)S1, S2, S4,S5,S6

S1(config)#vtp mode client

S1(config)#vtp domain ISIG

S1(config)#vtp password ISIG

5) Configuration de liaison trunk

S1(config)#int g0/1

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk native vlan 60

S1(config-if)#exit

S1(config)#int fa 0/3

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk native vlan 60

De S2 a S6

s2(config)#int range fa 0/1-3

S2(config-if)#switchport mode trunk

S2(config-if)#switchport trunk native vlan 60

6) création des vlans

S3(config)#vlan 10

S3(config-vlan)#name direction

S3(config)#vlan 11

S3(config-vlan)#name étudiants

S3(config)#vlan 12

S3(config-vlan)#name profs

S3(config)#vlan 60

S3(config-vlan)#name natif
7)Attribution des port

S1(config)#int range fa 0/4-10

S1(config-if)#switchport mode acess

S1(config-if)#switchport access vlan 10

S1(config-if)#exit

S1(config)#int range fa 0/11-20

S1(config-if)#switchport mode acess

S1(config-if)#switchport access vlan 11

S1(config-if)#exit

S1(config)##int range fa 0/21-24

S1(config-if)#switchport mode acess

S1(config-if)#switchport access vlan 12

S1(config-if)#exit

Routage inter-vlan

Passerelle pour vlan 10= 200.200.200.65 255.255.255.224

Passerelle pour vlan 11= 200.200.200.1 255.255.255.192

Passerelle pour vlan 12= 200.200.200.97 255.255.255.224

Sur le routeur

Router(config)#int g0/1

Router(config-if)#no shut

Router(config-if)#exit

Router(config)#Int g0/1.10

Router(config-if)#encapsulation dot1Q 10

Router(config-if)#Ip address 200.200.200.65 255.255.255.224

Router(config-if)#exit
Router(config)#Int g0/1.11

Router(config-if)#encapsulation dot1Q 11

Router(config-if)#Ip address 200.200.200.1 255.255.255.192

Router(config-if)#exit

Router(config)#Int g0/1.12

Router(config-if)#encapsulation dot1Q 12

Router(config-if)#Ip address 200.200.200.97 255.255.255.224

No ip domain-lookup

Pour le masque sur les switch : #ip default-gateway 172.16.4.254

Table ARP

Fait une correspondance entre une adresse et une adresse Mac correspondante

arp -a

Table MAC ou Table CAM

Fait une correspondance entre une adresse MAC et le PORT correspondant

Show mac-address-table

Sécurité des ports

On sécurisé le port fa 0/4 sur Switch1

Switch1(config)#in range fa 0/4-6

Switch1(config-if)#switchport port-security

Switch1(config-if)#switchport port-security mac-address stisky

Switch1(config-if)#switchport port-security maximum 2

Switch1(config-if)#switchport port-security violation shutdown (quand il faut éteindre le port)

Switch1(config-if)# switchport port-security violation protection ( quand il faut juste empêcher la


transmission)
Switch1(config-if)# switchport port-security violation restrict

A saisir sur tous les switch absolument

Switch(conf)#no ip domain-lookup

Switch(conf)#line console 0

Switch(conf)#logging synchronous

Réponse de la question 10

Vlan 10

Switch1(config)#spanning-tree vlan 10 root primary

Vlan 20

Switch4(config)#spanning-tree vlan 20 root primary

Vlan 30

Switch3(config)#spanning-tree vlan 30 root primary

Vous aimerez peut-être aussi