You are on page 1of 9

Centre F P A dAlbi-Castres

1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES


Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

TP - Communication entre VLAN - TP


Matriel utiliser :
Switch 2950 Series Routeur 2600 Series (IOS : c2950-c3h2s-mz.120-5.WC2.bin) (IOS : c2600-d-mz-120-7.T.bin)

Description succincte du mode TRUNK:


Pour tablir une communication entre VLAN, il faut tablir une encapsulation en mode "trunk". Ce type de fonctionnement est galement appel : "tagging" ou "trunking". Il existe deux types d'encapsulation pour le fonctionnement en "tagging" au niveau des Switches Cisco : le type propritaire Cisco dnomm ISL et le type normalis 802.1Q qui a l'avantage d'tre potentiellement multi-marques. Cette technique utilise en fait une mini-encapsulation () d'o le nom de "tagging" faisant allusion la trame classique qui serait "tiquette" avec une information permettant de distinguer tel ou tel VLAN auquel elle appartient. Ce fonctionnement permet la communication entre les stations de 2 VLAN diffrents sur un mme Switch et/ou entre les stations d'un mme VLAN sur des Switches diffrents. Il s'agit d'un processus intervenant a la couche 2 du modle OSI.

Cas d'cole
Dans ce cas : Il n'y a pas d'utilisation du mode "Trunk", on utilise en fait deux interfaces Ethernet sur un routeur ainsi que deux ports sur le switch (un par VLAN) pour linterconnexion entre chaque VLAN. Il s'agit l d'un routage classique. Son inconvnient majeur est la forte utilisation de ports (sur les Switches) et d'interfaces (sur les routeurs) pour interconnecter plusieurs VLAN. Routeur fonctionnant en mode VLAN 2 Rseau : 192.168.222.0/24 classique VLAN 3 Rseau : 192.168.223.0/24

Manipulation 1

Interconnexion de VLAN - Interne au Switch

Pour le Switch : 1. dfinir les ports contenus dans les VLAN 2. attribuer une adresse IP au VLAN 1 (ici IP 192.168.22.40 S/M 255.255.255.0) 3. dfinir un port utilisant lencapsulation en mode "trunk" 802.1q (ici interface Fastethernet 0/2) Pour le router : 1. Configurer linterface Fastethernet 0/0 (elle nous servira pour faire lencapsulation en mode "trunk") 2. Prciser les sous-interfaces pour dfinir les VLAN en mode encapsulation dot1q et prciser ladresse rseau pour chaque VLAN.

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 1/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

Schma
Dans ce cas : Utilisation dune seule interface Ethernet sur le routeur et d'un seul port sur le Switch pour raliser linterconnexion entre les diffrents VLAN.

Routeur fonctionnant en mode "Trunk"

VLAN2 Rseau : 192.168.222.0/24 Port 9

VLAN 1 Rseau 192.168.22.0/24

Port 2

VLAN 3 Rseau : 192.168.223.0/24 Port 24

Cblage

Switch 2950 Series Port 2 VLAN 1 Port 9 VLAN 2 Port 24 VLAN 3

Routeur 2620

IP 192.168.222.40 Passerelle 192.168.222.100

IP 192.168.223.40 Passerelle 192.168.223.100

Port Fast-ethernet 0 IP 192.168.22.100

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 2/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

Configuration ROUTEUR
! version 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Lab_C ! enable secret 5 $1$6SBR$48Y/T7BWpeEXW8s.OG8.I/ ! ! ! ! ! ! ip subnet-zero no ip domain-lookup ! ! ! ! interface FastEthernet0/0 ip address 192.168.22.100 255.255.255.0 no ip directed-broadcast duplex auto speed auto ! interface FastEthernet0/0.2 encapsulation dot1Q 2 ip address 192.168.222.100 255.255.255.0 no ip directed-broadcast ! interface FastEthernet0/0.3 encapsulation dot1Q 3 ip address 192.168.223.100 255.255.255.0 no ip directed-broadcast ! interface Serial0/0 no ip address no ip directed-broadcast shutdown ! interface Serial0/1 no ip address no ip directed-broadcast shutdown ! ip classless no ip http server !

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 3/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

! line con 0 password cisco login transport input none line aux 0 line vty 0 4 password cisco login !

Configuration SWITCH
! version 12.0 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname SW_C ! ! ! ! ! ip subnet-zero no ip domain-lookup ! ! ! interface FastEthernet0/1 ! interface FastEthernet0/2 switchport mode trunk ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 switchport access vlan 2 !

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 4/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface FastEthernet0/16 ! interface FastEthernet0/17 ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 switchport access vlan 3 ! interface VLAN1 ip address 192.168.22.40 255.255.255.0 no ip directed-broadcast no ip route-cache ! ! line con 0 transport input none stopbits 1 line vty 0 4 login line vty 5 15 login !

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 5/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

Manipulation 2

Interconnexion de VLAN - Switch Switch

Sur chaque Switch : 1. dfinir un port utilisant lencapsulation en mode "trunk" 802.1q (ici interface Fastethernet 0/2) 2. dfinir les ports contenus dans les VLAN 3. attribuer une adresse IP au VLAN 1 (ici : IP 192.168.22.40 et 192.168.22.41 S/M 255.255.255.0)

Schma

VLAN 2 Rseau : 192.168.222.0/24 Port 9

Switch C

VLAN 1 192.168.22.40 Rseau : 192.168.22.0/24 Port 2

VLAN 3 Rseau : 192.168.223.0/24 Port 24

VLAN 2 Rseau : 192.168.222.0/24 Port 9

VLAN 1 Switch D 192.168.22.41 2 Rseau : 192.168.22.0/24 Port

VLAN 3 Rseau : 192.168.223.0/24 Port 12

Cblage
Switch 2950 Series Port 2 24 VLAN 1 VLAN 2 VLAN 3 Port 9 Port

Switch 2950 Series


Port 2 Port 9 Port 12 VLAN 2 VLAN 3

VLAN 1

IP 192.168.222.40 Passerelle 192.168.222.100

IP 192.168.223.40 Passerelle 192.168.223.100

IP 192.168.222.41 Passerelle 192.168.222.100

IP 192.168.223.41 Passerelle 192.168.223.100

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 6/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

Configuration Switch SW_C


! version 12.0 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname SW_C ! ! ! ! ! ip subnet-zero no ip domain-lookup! ! ! ! interface FastEthernet0/1 ! interface FastEthernet0/2 switchport mode trunk ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 switchport access vlan 2 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface FastEthernet0/16

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 7/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

! interface FastEthernet0/17 ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 switchport access vlan 3 ! interface VLAN1 ip address 192.168.22.40 255.255.255.0 no ip directed-broadcast no ip route-cache ! ! line con 0 transport input none stopbits 1 line vty 0 4 login line vty 5 15 login !

L'affectation d'une adresse IP au VLAN 1 n'est pas obligatoire ! Elle est cependant ncessaire si on veut administrer le Switch l'aide d'une session Telnet (L'administration ne se faisant que sur le VLAN1 uniquement).

Configuration Switch SW_D


! version 12.0 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname SW_D ! ! ! ! ! ip subnet-zero no ip domain-lookup !

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 8/9

Centre F P A dAlbi-Castres
1 Rue Jean Perrin - ZI de Mlou 81100 CASTRES
Tl. : 05 63 59 15 49 msi.castres@afpatarn.fr Fax : 05 63 72 41 31

Section TAI

AFPA CASTRES

! ! interface FastEthernet0/1 ! interface FastEthernet0/2 switchport mode trunk ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 switchport access vlan 2 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 switchport access vlan 3 ! interface VLAN1 ip address 192.168.22.41 255.255.255.0 no ip directed-broadcast no ip route-cache ! ! line con 0 transport input none stopbits 1 line vty 0 4 login line vty 5 15 login !

L'affectation d'une adresse IP au VLAN 1 n'est pas obligatoire ! Elle est cependant ncessaire si on veut administrer le Switch l'aide d'une session Telnet (L'administration ne se faisant que sur le VLAN1 uniquement).

afpa

CFPA Castres

Section TAI

Auteur P.CLERMONT

Document 80497846.doc

Millsime 08/2002 - V1.3

Page 9/9

You might also like