Vous êtes sur la page 1sur 12

TP VLAN

Switch>enable
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.

« Configuration BASIC »

Switch(config)#hostname Federateur « Nom de Device »


Federateur(config)#no ip domain-lookup « Désactiver recherche DNS »
Federateur(config)#username youssef secret sopra « Login et Password Local »
Federateur(config)#enable secret tekup « Password Priviligé ou enable »
Federateur(config)#line console 0
Federateur(config-line)#login local « Config Line Console 0 par Login local »
Federateur(config-line)#exit
Federateur(config)#line vty 0 4
Federateur(config-line)#login local « Config Line VTY par Login local »
Federateur(config-line)#exit
Federateur(config)#

« Création des VLAN »

Federateur(config)#vlan 110
Federateur(config-vlan)#name DATA1
Federateur(config-vlan)#vlan 120
Federateur(config-vlan)#name DATA2
Federateur(config-vlan)#vlan 130
Federateur(config-vlan)#name DATA3
Federateur(config-vlan)#vlan 199
Federateur(config-vlan)#name Management
Federateur(config-vlan)#exit
Federateur(config)#exit
Federateur#
Federateur#wr
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
Federateur#

« Vérifier la création de VLAN »

Federateur#show vlan

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Gig1/0/1, Gig1/0/2, Gig1/0/3, Gig1/0/4
Gig1/0/5, Gig1/0/6, Gig1/0/7, Gig1/0/8
Gig1/0/9, Gig1/0/10, Gig1/0/11, Gig1/0/12
Gig1/0/13, Gig1/0/14, Gig1/0/15, Gig1/0/16
Gig1/0/17, Gig1/0/18, Gig1/0/19, Gig1/0/20
Gig1/0/21, Gig1/0/22, Gig1/0/23, Gig1/0/24
Gig1/1/1, Gig1/1/2, Gig1/1/3, Gig1/1/4
110 DATA1 active
120 DATA2 active
130 DATA3 active
199 Management active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
110 enet 100110 1500 - - - - - 0 0
120 enet 100120 1500 - - - - - 0 0
130 enet 100130 1500 - - - - - 0 0
199 enet 100199 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

Remote SPAN VLANs


------------------------------------------------------------------------------

Primary Secondary Type Ports


------- --------- ----------------- ------------------------------------------
Federateur#
Federateur#
Federateur#
Federateur#
Federateur#
Federateur#
« Configuration BASIC de SA1 »

Switch>enable
Switch#conf t
Switch(config)#hostname SA1
SA1(config)#username youssef secret sopra
SA1(config)#enable secret tekup
SA1(config)#no ip domain-lookup
SA1(config)#line console 0
SA1(config-line)#login local
SA1(config-line)#exit
SA1(config)#line vty 0 4
SA1(config-line)#login local
SA1(config-line)#exit
SA1(config)#

« Création des VLAN »

SA1(config)#vlan 110
SA1(config-vlan)#name DATA1
SA1(config-vlan)#vlan 120
SA1(config-vlan)#name DATA2
SA1(config-vlan)#vlan 130
SA1(config-vlan)#name DATA3
SA1(config-vlan)#vlan 199
SA1(config-vlan)#name Management
SA1(config-vlan)#exit

« Affectation de Port/ VLAN »

SA1(config)#interface F0/18
SA1(config-if)#switchport mode access
SA1(config-if)#switchport access vlan 199
SA1(config-if)#exit
SA1(config)#int F0/1
SA1(config-if)#switchport mode access
SA1(config-if)#switchport access vlan 110
SA1(config-if)#exit
SA1(config)#interface f0/2
SA1(config-if)#switchport mode access
SA1(config-if)#switchport access vlan 120
SA1(config-if)#exit
SA1(config)#int f0/3
SA1(config-if)#switchport mode access
SA1(config-if)#switchport access vlan 130
SA1(config-if)#end
SA1#
%SYS-5-CONFIG_I: Configured from console by console

SA1#wr
Building configuration...
[OK]
SA1#

« Vérifier la création de VLAN et affectation de port/VLAN »

SA1#show vlan

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active 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/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
110 DATA1 active Fa0/1
120 DATA2 active Fa0/2
130 DATA3 active Fa0/3
199 Management active Fa0/18
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
110 enet 100110 1500 - - - - - 0 0
120 enet 100120 1500 - - - - - 0 0

SA1#
SA1#

« Configuration BASIC de SA2 »

Switch>enable
Switch#conf t
Switch(config)#hostname SA2
SA2(config)#no ip domain-lookup
SA2(config)#username youssef secret sopra
SA2(config)#enable secret tekup
SA2(config)#line console 0
SA2(config-line)#login locale
SA2(config-line)#exit
SA2(config)#line vty 0 4
SA2(config-line)#login local
SA2(config-line)#exit
« Création des VLAN »

SA2(config)#vlan 110
SA2(config-vlan)#name DATA1
SA2(config-vlan)#vlan 120
SA2(config-vlan)#name DATA2
SA2(config-vlan)#vlan 130
SA2(config-vlan)#name DATA3
SA2(config-vlan)#vlan 199
SA2(config-vlan)#name Management
SA2(config-vlan)#exit

« Affectation de Port/VLAN »

SA2(config)#int f0/18
SA2(config-if)#switchport mode access
SA2(config-if)#switchport access vlan 199
SA2(config-if)#exit
SA2(config)#int f0/1
SA2(config-if)#switchport mode access
SA2(config-if)#switchport access vlan 110
SA2(config-if)#exit
SA2(config)#int f0/2
SA2(config-if)#switchport mode access
SA2(config-if)#switchport access vlan 120
SA2(config-if)#exit
SA2(config)#int
SA2(config)#interface f0/3
SA2(config-if)#switchport mode access
SA2(config-if)#switchport access vlan 130
SA2(config-if)#^Z
SA2#wr

« Vérifier la création de VLAN et affectation de port/VLAN »

SA2#show vlan

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active 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/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
110 DATA1 active Fa0/1
120 DATA2 active Fa0/2
130 DATA3 active Fa0/3
199 Management active Fa0/18
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
110 enet 100110 1500 - - - - - 0 0
120 enet 100120 1500 - - - - - 0 0
130 enet 100130 1500 - - - - - 0 0
199 enet 100199 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

Remote SPAN VLANs


------------------------------------------------------------------------------

Primary Secondary Type Ports


------- --------- ----------------- ------------------------------------------
SA2#
SA2#
SA2#wr
« Configuration de TRUNK au niveau SWITCH Fédérateur C3650 »

Federateur#
Federateur#conf t
Federateur(config)#interface range g1/0/1-3
Federateur(config-if-range)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured
to "trunk" mode.
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured
to "trunk" mode.
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured
to "trunk" mode.

« ERREUR : Obligation de choisir le protocole de Dot1Q ou ISL parce que Switch 3650
supporte les deux protocoles »

Federateur(config-if-range)#switchport trunk encapsulation dot1q


Federateur(config-if-range)#switchport mode trunk
Federateur(config-if-range)#switchport trunk native vlan 199
Federateur(config-if-range)#switchport trunk allowed vlan 110,120,130,199
Federateur(config-if-range)#
Federateur#wr
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on
GigabitEthernet1/0/3 (199), with SA2 GigabitEthernet0/1 (1). « ERREUR : Il faut que
VLAN native identique entre les deux Ports de TRUNK »

« Configuration de TRUNK au niveau SWITCH SA1 C2960 »


SA1(config)#int g0/1
SA1(config-if)#switchport mode trunk
SA1(config-if)#switchport trunk native vlan 199
SA1(config-if)#switchport trunk allowed vlan 110,120,130,199
SA1(config-if)#^Z
SA1#
%SYS-5-CONFIG_I: Configured from console by console
wr
Building configuration...
[OK]
SA1#
« Configuration de TRUNK au niveau SWITCH SA2 C2960 »

SA2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SA2(config)#int
SA2(config)#interface g0/1
SA2(config-if)#switchport mode trunk
SA2(config-if)#switchport trunk native vlan 199
SA2(config-if)#switchport trunk allowed vlan 110,120,130,199
SA2(config-if)#
SA2(config-if)#^Z
SA2#wr

« Vérifier Configuration de TRUNK au niveau SA2 »

SA2#show interfaces trunk


Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 199

Port Vlans allowed on trunk


Gig0/1 110,120,130,199

Port Vlans allowed and active in management domain


Gig0/1 110,120,130,199

Port Vlans in spanning tree forwarding state and not pruned


Gig0/1 110,120,130,199

SA2#
« Vérifier Configuration de TRUNK au niveau Fédérateur »
Federateur#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig1/0/2 on 802.1q trunking 199
Gig1/0/3 on 802.1q trunking 199

Port Vlans allowed on trunk


Gig1/0/2 110,120,130,199
Gig1/0/3 110,120,130,199

Port Vlans allowed and active in management domain


Gig1/0/2 110,120,130,199
Gig1/0/3 110,120,130,199

Port Vlans in spanning tree forwarding state and not pruned


Gig1/0/2 110,120,130,199
Gig1/0/3 110,120,130,199

Federateur#

« Configuration routage Inter VLAN au niveau Routeur R2 »


R2#conf t
R2(config)#interface g0/1
R2(config-if)#no shutdown
R2(config-if)#int g0/1.110
R2(config-subif)#encapsulation dot1Q 110
R2(config-subif)#ip address 10.10.110.1 255.255.255.0
R2(config-subif)#exit
R2(config)#int g0/1.120
R2(config-subif)#encapsulation dot1Q 120
R2(config-subif)#ip address 10.10.120.1 255.255.255.0
R2(config-subif)#exit
R2(config)#int g0/1.130
R2(config-subif)#encapsulation dot1Q 130
R2(config-subif)#ip address 10.10.130.1 255.255.255.0
R2(config-subif)#exit
R2(config)#int g0/1.199
R2(config-subif)#encapsulation dot1Q 199 native
R2(config-subif)#ip address 10.10.199.1 255.255.255.0
R2#wr

« Vérifier routage Inter VLAN au niveau Routeur R2 »


R2#show ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 172.30.1.1 YES manual up up
GigabitEthernet0/1 unassigned YES unset up up
GigabitEthernet0/1.110 10.10.110.1 YES manual up up
GigabitEthernet0/1.120 10.10.120.1 YES manual up up
GigabitEthernet0/1.130 10.10.130.1 YES manual up up
GigabitEthernet0/1.199 10.10.199.1 YES manual up up
Serial0/0/0 192.168.1.2 YES manual up up
Serial0/0/1 199.15.130.1 YES manual up up

R2#show ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP


D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is 199.15.130.2 to network 0.0.0.0

10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks


C 10.10.110.0/24 is directly connected, GigabitEthernet0/1.110
L 10.10.110.1/32 is directly connected, GigabitEthernet0/1.110
C 10.10.120.0/24 is directly connected, GigabitEthernet0/1.120
L 10.10.120.1/32 is directly connected, GigabitEthernet0/1.120
C 10.10.130.0/24 is directly connected, GigabitEthernet0/1.130
L 10.10.130.1/32 is directly connected, GigabitEthernet0/1.130
C 10.10.199.0/24 is directly connected, GigabitEthernet0/1.199
L 10.10.199.1/32 is directly connected, GigabitEthernet0/1.199
172.30.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.30.1.0/24 is directly connected, GigabitEthernet0/0
L 172.30.1.1/32 is directly connected, GigabitEthernet0/0
172.31.0.0/16 is variably subnetted, 2 subnets, 2 masks
S 172.31.1.0/25 [1/0] via 192.168.1.1
S 172.31.1.128/26 [1/0] via 192.168.1.1
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Serial0/0/0
L 192.168.1.2/32 is directly connected, Serial0/0/0
199.15.130.0/24 is variably subnetted, 2 subnets, 2 masks
C 199.15.130.0/30 is directly connected, Serial0/0/1
L 199.15.130.1/32 is directly connected, Serial0/0/1
S* 0.0.0.0/0 [1/0] via 199.15.130.2

R2#
« Configuration DHCP de 3 Pool au niveau Routeur R2 : VLAN-110, VLAN-120 et
VLAN-130 »

R2#conf t
R2(config)#ip dhcp excluded-address 10.10.110.1 10.10.110.39
R2(config)#ip dhcp excluded-address 10.10.120.1 10.10.120.40
R2(config)#ip dhcp excluded-address 10.10.130.1 10.10.130.41

R2(config)#ip dhcp pool VLAN-110


R2(dhcp-config)#network 10.10.110.0 255.255.255.0
R2(dhcp-config)#default-router 10.10.110.1
R2(dhcp-config)#dns-server 8.8.8.8
R2(dhcp-config)#domain-name tekup.tn
R2(dhcp-config)#exit
R2(config)#ip dhcp pool VLAN-120
R2(dhcp-config)#network 10.10.120.0 255.255.255.0
R2(dhcp-config)#default-router 10.10.120.1
R2(dhcp-config)#dns-server 8.8.8.8
R2(dhcp-config)#domain-name tekup.tn
R2(dhcp-config)#exit
R2(config)#ip dhcp pool VLAN-130
R2(dhcp-config)#network 10.10.130.0 255.255.255.0
R2(dhcp-config)#default-router 10.10.130.1
R2(dhcp-config)#dns-server 8.8.8.8
R2(dhcp-config)#domain-name tekup.tn
R2(dhcp-config)#end
R2#wr
Building configuration...
[OK]

« Configuration @IP Management de 3 Switch Fédérateur, SA1 et SA2»


Federateur(config)#ip default-gateway 10.10.199.1
Federateur(config)#interface vlan 199
Federateur(config-if)#ip address 10.10.199.10 255.255.255.0
Federateur(config-if)#^Z
Federateur#wr
Federateur#

SA1#conf t
SA1(config)#ip default-gateway 10.10.199.1
SA1(config)#interface vlan 199
SA1(config-if)#ip address 10.10.199.11 255.255.255.0
SA1(config-if)#end
SA1#wr
SA2#conf t
SA2(config)#ip default-gateway 10.10.199.1
SA2(config)#interface vlan 199
SA2(config-if)#ip address 10.10.199.12 255.255.255.0
SA2(config-if)#end
SA2#wr

« Vérifier le connexion IP « PING » et TRACERT » de INTRA-VLAN et INTER-


VLAN»

ADMIN1------------ ADMIN2 « Intra - VLAN

C:\>ping 10.10.199.102

Pinging 10.10.199.102 with 32 bytes of data:

Reply from 10.10.199.102: bytes=32 time=1ms TTL=128


Reply from 10.10.199.102: bytes=32 time<1ms TTL=128
Reply from 10.10.199.102: bytes=32 time=1ms TTL=128
Reply from 10.10.199.102: bytes=32 time=1ms TTL=128

Ping statistics for 10.10.199.102:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

ADMIN1------------ PC40 « Inter - VLAN

C:\>ping 10.10.110.40

Pinging 10.10.110.40 with 32 bytes of data:

Request timed out.


Reply from 10.10.110.40: bytes=32 time<1ms TTL=127
Reply from 10.10.110.40: bytes=32 time<1ms TTL=127
Reply from 10.10.110.40: bytes=32 time=10ms TTL=127

Ping statistics for 10.10.110.40:


Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 10ms, Average = 3ms

C:\>ping 10.10.110.40

Pinging 10.10.110.40 with 32 bytes of data:

Reply from 10.10.110.40: bytes=32 time=1ms TTL=127


Reply from 10.10.110.40: bytes=32 time<1ms TTL=127
Reply from 10.10.110.40: bytes=32 time<1ms TTL=127
Reply from 10.10.110.40: bytes=32 time=1ms TTL=127
Ping statistics for 10.10.110.40:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

ADMIN1------------ PC40 « Inter – VLAN »

C:\>tracert 10.10.110.40

Tracing route to 10.10.110.40 over a maximum of 30 hops:

1 0 ms 0 ms 0 ms 10.10.199.1
2 0 ms 1 ms 0 ms 10.10.110.40

Trace complete.

ADMIN1------------ PC40 « Intra– VLAN »

C:\>tracert 10.10.199.102

Tracing route to 10.10.199.102 over a maximum of 30 hops:

1 0 ms 0 ms 0 ms 10.10.199.102

Trace complete.

ADMIN1------------ PC40 « Telnet sur Switch Federateur »

C:\>telnet 10.10.199.10
Trying 10.10.199.10 ...Open

User Access Verification

Username: youssef
Password:
Federateur>enable
Password:
Federateur#
Federateur#
Federateur#
Federateur#wr
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
Federateur#

Vous aimerez peut-être aussi