Download - Tp Inter Vlan
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 1/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] Fax : 05 63 72 41 31
Section TAI AFPA CASTRES
TP - Communication entre VLAN - TP
Matériel à utiliser : Switch 2950 Series (IOS : c2950-c3h2s-mz.120-5.WC2.bin)
Routeur 2600 Series (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 propriétaire
Cisco dénommé 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 "étiquettée" avec une
information permettant de distinguer tel ou tel VLAN auquel elle appartient.
Ce fonctionnement permet la communication entre les stations de 2 VLAN différents sur un même Switch et/ou entre les
stations d'un même VLAN sur des Switches différents. Il s'agit d'un processus intervenant a la couche 2 du modèle 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 l’interconnexion entre chaque VLAN. Il s'agit là d'un routage classique.Son inconvénient majeur est la forte utilisation de ports (sur les Switches) et d'interfaces (sur les routeurs) pour interconnecter
plusieurs VLAN.
Manipulation 1 Interconnexion de VLAN - Interne au Switch
Pour le Switch :
1. définir 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. définir un port utilisant l’encapsulation en mode "trunk" 802.1q (ici interface Fastethernet 0/2)
Pour le router :
1. Configurer l’interface Fastethernet 0/0 (elle nous servira pour faire l’encapsulation en mode "trunk")
2. Préciser les sous-interfaces pour définir les VLAN en mode encapsulation dot1q
et préciser l’adresse réseau pour chaque VLAN.
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 1 / 9
VLAN 2
Réseau : 192.168.222.0/24
VLAN 3
Réseau : 192.168.223.0/24
Routeur
fonctionnant
en mode
classique
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 2/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] Fax : 05 63 72 41 31
Section TAI AFPA CASTRES
Schéma
Dans ce cas : Utilisation d’une seule interface Ethernet sur le routeur et d'un seul port sur le Switch pour réaliser
l’interconnexion entre les différents VLAN.
Câblage
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 2 / 9
VLAN2
Réseau : 192.168.222.0/24
Port 9
VLAN 3
Réseau : 192.168.223.0/24
Port 24
VLAN 1
R éseau 192.168.22.0/24 Port 2
Routeur
fonctionnant
en mode
"Trunk"
Switch 2950 Series
Port 2 Port 9 Port 24
VLAN 1 VLAN 2 VLAN 3
IP 192.168.222.40
Passerelle 192.168.222.100IP 192.168.223.40
Passerelle 192.168.223.100
Port Fast-ethernet 0
IP 192.168.22.100
Routeur 2620
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 3/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] Fax : 05 63 72 41 31
Section TAI AFPA CASTRES
Configuration ROUTEUR
!
version 12.0 service timestamps debug uptime
service timestamps log uptimeno service password-encryption
!hostname Lab_C
!enable secret 5 $1$6SBR$48Y/T7BWpeEXW8s.OG8.I/
!
!
!!
!!
ip subnet-zerono ip domain-lookup
!!
!!
interface FastEthernet0/0ip address 192.168.22.100 255.255.255.0
no ip directed-broadcast
duplex autospeed auto!
interface FastEthernet0/0.2encapsulation dot1Q 2
ip address 192.168.222.100 255.255.255.0no ip directed-broadcast
!
interface FastEthernet0/0.3
encapsulation dot1Q 3ip address 192.168.223.100 255.255.255.0
no ip directed-broadcast !
interface Serial0/0no ip address
no ip directed-broadcast shutdown
!interface Serial0/1
no ip addressno ip directed-broadcast
shutdown!
ip classlessno ip http server
!
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 3 / 9
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 4/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] Fax : 05 63 72 41 31
Section TAI AFPA CASTRES
!line con 0password cisco
logintransport input none
line aux 0line vty 0 4
password ciscologin
!
Configuration SWITCH
!version 12.0
no service pad service timestamps debug uptime
service timestamps log uptimeno service password-encryption
!hostname SW_C
!!
!
!!ip subnet-zero
no ip domain-lookup!
!!
interface FastEthernet0/1
!
interface FastEthernet0/2switchport 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!
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 4 / 9
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 5/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] 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.0no ip directed-broadcast
no ip route-cache
!!
line con 0
transport input nonestopbits 1line vty 0 4
loginline vty 5 15
login!
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 5 / 9
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 6/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] Fax : 05 63 72 41 31
Section TAI AFPA CASTRES
Manipulation 2 Interconnexion de VLAN - Switch à SwitchSur chaque Switch :
1. définir un port utilisant l’encapsulation en mode "trunk" 802.1q (ici interface Fastethernet 0/2)
2. définir 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)
Schéma
Câblage
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 6 / 9
Switch D 192.168.22.41
Switch C 192.168.22.40
VLAN 2
Réseau : 192.168.222.0/24Port 9
VLAN 3
Réseau : 192.168.223.0/24Port 24
VLAN 1
R éseau : 192.168.22.0/24 Port 2
VLAN 3
Réseau : 192.168.223.0/24
Port 12
VLAN 2
Réseau : 192.168.222.0/24
Port 9
VLAN 1
R éseau : 192.168.22.0/24 Port 2
IP 192.168.223.40Passerelle 192.168.223.100
IP 192.168.222.40Passerelle 192.168.222.100
Switch 2950 Series
Port 2 Port 9 Port 12
VLAN 1 VLAN 2 VLAN 3
IP 192.168.222.41Passerelle 192.168.222.100
IP 192.168.223.41Passerelle 192.168.223.100
Switch 2950 Series
Port 2 Port 9 Port
24
VLAN 1 VLAN 2 VLAN 3
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 7/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] 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
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 7 / 9
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 8/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] 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
!
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
!
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 8 / 9
L'affectation d'une adresse IP au VLAN 1 n'est pas obligatoire !
Elle est cependant nécessaire si on veut administrer le Switch àl'aide d'une session Telnet
(L'administration ne se faisant que sur le VLAN1 uniquement).
8/3/2019 Tp Inter Vlan
http://slidepdf.com/reader/full/tp-inter-vlan 9/9
afpa ©
Centre F P A d’Albi-Castres1 Rue Jean Perrin - ZI de Mélou
81100 CASTRESTél. : 05 63 59 15 49 [email protected] 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
loginline vty 5 15
login
!
CFPA Section Auteur Document Millésime Page
Castres TAI P.CLERMONT 80497846.doc 08/2002 - V1.3 9 / 9
L'affectation d'une adresse IP au VLAN 1 n'est pas obligatoire !
Elle est cependant nécessaire si on veut administrer le Switch à
l'aide d'une session Telnet
(L'administration ne se faisant que sur le VLAN1 uniquement).