Configuration des VLAN avec des Routeurs et Switches CISCO

Publié le par Aouati zakaria

 

Topologie du Réseau

 

  VLAN Topology

1- Câbler et Configurer les PC et les Interfaces de routeur en affectant les adresses suivantes

PC:

PC0: 192.168.10.10 255.255.255.0---------- Port F0/6  ----- Switch S1

PC1: 192.168.20.10 255.255.255.0---------- Port F0/11 ----- Switch S1

PC2: 192.168.30.10 255.255.255.0---------- Port F0/18 ----- Switch S1

PC3: 192.168.10.11 255.255.255.0---------- Port F0/6   ----- Switch S2

PC4: 192.168.20.11 255.255.255.0---------- Port F0/11 ----- Switch S2

PC5: 192.168.30.11 255.255.255.0---------- Port F0/18 ----- Switch S2

Router :

Interface Fa0/0.10 192.168.10.1 255.255.255.0

Interface Fa0/0.20 192.168.20.1 255.255.255.0

Interface Fa0/0.30 192.168.30.1 255.255.255.0

2- Configurer les VLANs Suivants dans le switch S1 :

VLAN :

VLAN 10 (Student)

VLAN 20 (Guest)

VLAN 30 (Admin) 

VLAN 99 (Management)

3- Configurer le Protocol VTP pour propager les VLAN aux autres Switches

SwitchS1: 

Port fastEthenet0/1-24 : Mode Trunk VLAN99 natif

VTP Mode Server

VTP Domain cisco

VTP Password cisco123

Switch S1 et S2

Port fastEthenet0/1-4 : Mode Trunk VLAN99 natif

Port fastEthenet0/5-10: Mode Access VLAN10

Port fastEthenet0/11-15: Mode Access VLAN20

Port fastEthenet0/16-24: Mode Access VLAN30

VTP Mode Client

VTP Domain cisco

VTP Password cisco123

4- Configurer le routeur Pour le routage inter VLANs

Router R1:

Interface Fa0/0.10 VLAN 10 -----Dot1q

Interface Fa0/0.20 VLAN 20 -----Dot1q

Interface Fa0/0.30 VLAN 30 -----Dot1q

Activer l'interface F0/0

5- tester la connectivité entre les PC's des différents VLAN's

Les configurations des Switches :

  • Switch S1

Fichier de Configuration

S1#show running-config
Building configuration...

Current configuration : 2481 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname S1
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
no ip domain-lookup
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/3
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/4
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/5
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/6
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/7
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/8
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/9
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/10
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/11
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/12
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/13
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/14
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/15
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/16
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/17
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/18
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/19
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/20
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/21
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/22
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/23
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/24
 switchport trunk native vlan 99
 switchport mode trunk
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
 no ip address
 shutdown
!
line con 0
 password cisco
 login
!
line vty 0 4
 password cisco
 login
line vty 5 15
 login
!
end

Configuration du Protocol VTP

S1#show vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 255
Number of existing VLANs        : 9
VTP Operating Mode              : Server
VTP Domain Name                 : cisco
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xEC 0xBF 0x76 0x2E 0xE7 0x90 0x61 0xCD
Configuration last modified by 0.0.0.0 at 3-1-93 00:21:30
Local updater ID is 0.0.0.0 (no valid interface found)

  • Switch S2 et S3:

Fichier de configuration:
S2#show running-config
Building configuration...

Current configuration : 2409 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname S2
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
no ip domain-lookup
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/3
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/4
 switchport access vlan 10
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/5
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/6
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/7
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/8
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/9
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/10
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/11
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/12
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/13
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/14
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/15
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/16
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/17
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/18
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/19
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/20
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/21
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/22
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/23
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/24
 switchport access vlan 30
 switchport mode access
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
 no ip address
 shutdown
!
line con 0
 password cisco
 login
!
line vty 0 4
 password cisco
 login
line vty 5 15
 login
!
end

Configuration du Protocol VTP

S2#show vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 255
Number of existing VLANs        : 9
VTP Operating Mode              : Client
VTP Domain Name                 : cisco
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xEC 0xBF 0x76 0x2E 0xE7 0x90 0x61 0xCD
Configuration last modified by 0.0.0.0 at 3-1-93 00:21:30

  • Routeur R1:

Fichier de Configuration:

R1#show running-config
Building configuration...

Current configuration : 888 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
no ip domain-lookup
!
spanning-tree mode pvst
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 192.168.30.1 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
banner motd ^CAuthorized Access Only!^C
!
line con 0
 password cisco
 login
line vty 0 4
 password cisco
 login
!
end

 

Commenter cet article

free crm software 01/07/2014 10:02

Thanks for explaining how the entire process works. Even though, I have a CCNA degree I do not have that much expertise in performing it my own. These steps are what I was looking for and you made it very simple in these lines.

Chris 01/07/2014 08:03

Post-Nice. Merci.