Lab 3.5.1: Basic VLAN Configuration: (Instructor Version)
Lab 3.5.1: Basic VLAN Configuration: (Instructor Version)
Lab 3.5.1: Basic VLAN Configuration: (Instructor Version)
Addressing Table
Device
(Hostname
)
S1
Interface
IP Address
Subnet Mask
Default Gateway
VLAN 99
172.17.99.11
255.255.255.0
N/A
S2
VLAN 99
172.17.99.12
255.255.255.0
N/A
S3
VLAN 99
172.17.99.13
255.255.255.0
N/A
PC1
NIC
172.17.10.21
255.255.255.0
172.17.10.1
PC2
NIC
172.17.20.22
255.255.255.0
172.17.20.1
PC3
NIC
172.17.30.23
255.255.255.0
172.17.30.1
PC4
NIC
172.17.10.24
255.255.255.0
172.17.10.1
PC5
NIC
172.17.20.25
255.255.255.0
172.17.20.1
PC6
NIC
172.17.30.26
255.255.255.0
172.17.30.1
Assignment
802.1q Trunks (Native VLAN 99)
VLAN 30 Guest (Default)
VLAN 10 Staff
VLAN 20 Students
Network
172.17.99.0 /24
172.17.30.0 /24
172.17.10.0 /24
172.17.20.0 /24
Learning Objectives
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 1 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
Create VLANs
EXEC mode password z cvinch dvod nastavte, vyzkouejte a zrute. Jinak ho budete pi prci
nesetnkrt vyukvat vdy, kdy switch automaticky vycouv z EXEC mdu.
Step 2: Re-enable the user ports on S2 and S3.
S2(config)#interface range fa0/6, fa0/11, fa0/18
S2(config-if-range)#switchport mode access
S2(config-if-range)#no shutdown
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 2 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
staff
20
students
30
guest
99
management
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 3 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 4 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
Step 7: Configure trunking and the native VLAN for the trunking ports on all switches.
Trunks are connections between the switches that allow the switches to exchange information for all
VLANS. By default, a trunk port belongs to all VLANs, as opposed to an access port, which can only
belong to a single VLAN.
A native VLAN is assigned to an 802.1Q trunk port. In the topology, the native VLAN is VLAN 99. An
802.1Q trunk port supports traffic coming from many VLANs (tagged traffic) as well as traffic that does not
come from a VLAN (untagged traffic). The 802.1Q trunk port places untagged traffic on the native
VLAN. Untagged traffic is generated by a computer attached to a switch port that is configured with the
native VLAN. One of the reasons for Native VLANs is to maintain backward compatibility with
untagged traffic common to legacy LAN scenarios. It is a best practice to use a VLAN other than
VLAN 1 as the native VLAN.
Use the interface range command in global configuration mode to simplify configuring trunking.
S1(config)#interface range fa0/1-5
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk native vlan 99
S1(config-if-range)#no shutdown
S1(config-if-range)#end
S2(config)# interface range fa0/1-5
...........................................................................................................
S3(config)# interface range fa0/1-5
.............................................................................................................
Verify that the trunks have been configured with the show interface trunk command.
S1#show interface trunk
Port
Fa0/1
Fa0/2
Port
Fa0/1
Fa0/2
Mode
on
on
Encapsulation
802.1q
802.1q
Status
trunking
trunking
Native vlan
99
99
Port
Fa0/1
Fa0/2
Port
Fa0/1
Fa0/2
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 5 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
Ping from host PC2 to host PC1. Is the ping attempt successful? _________ no
Even though the ports used by PC1 and PC2 are in the same VLAN, they are still in different
subnetworks, so they cannot communicate directly.
Step 11: Change the IP address and network on PC1.
Change the IP address on PC1 to 172.17.20.22. The subnet mask and default gateway can remain the
same. Once again, ping from host PC2 to host PC1, using the newly assigned IP address.
Is the ping attempt successful? _________yes
Why was this attempt successful?
____________________________________________________________________________________
____________________________________________________________________________________
Hosts must be in the same VLAN and in the same subnet to communicate directly through the switches.
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 6 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 7 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
line vty 0 4
exec-timeout 0 0
password cisco
logging synchronous
login
line vty 5 15
exec-timeout 0 0
password cisco
logging synchronous
login
!
end
S2
hostname S2
!
enable secret class
no ip domain-lookup
!
interface FastEthernet0/1
switchport trunk native vlan
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk native vlan
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk native vlan
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk native vlan
switchport mode trunk
!
interface FastEthernet0/5
switchport trunk native vlan
switchport mode trunk
!
interface FastEthernet0/6
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 30
switchport mode access
99
99
99
99
99
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 8 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
shutdown
!
interface FastEthernet0/8
switchport access vlan 30
switchport mode access
shutdown
!
interface FastEthernet0/9
switchport access vlan 30
switchport mode access
shutdown
!
interface FastEthernet0/10
switchport access vlan 30
switchport mode access
shutdown
!
interface FastEthernet0/11
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 10
switchport mode access
shutdown
!
interface FastEthernet0/13
switchport access vlan 10
switchport mode access
shutdown
!
interface FastEthernet0/14
switchport access vlan 10
switchport mode access
shutdown
!
interface FastEthernet0/15
switchport access vlan 10
switchport mode access
shutdown
!
interface FastEthernet0/16
switchport access vlan 10
switchport mode access
shutdown
!
interface FastEthernet0/17
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 9 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 10 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
shutdown
!
interface Vlan99
ip address 172.17.99.12 255.255.255.0
no ip route-cache
!
ip http server
!
control-plane
!
!
line con 0
exec-timeout 0 0
password cisco
logging synchronous
login
line vty 0 4
exec-timeout 0 0
password cisco
logging synchronous
login
line vty 5 15
exec-timeout 0 0
password cisco
logging synchronous
login
!
!
end
S3
hostname S3
no ip domain-lookup
enable secret class
!
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
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 11 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
!
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 access vlan 30
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 30
!
interface FastEthernet0/8
switchport access vlan 30
!
interface FastEthernet0/9
switchport access vlan 30
!
interface FastEthernet0/10
switchport access vlan 30
!
interface FastEthernet0/11
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 10
!
interface FastEthernet0/13
switchport access vlan 10
!
interface FastEthernet0/14
switchport access vlan 10
!
interface FastEthernet0/15
switchport access vlan 10
!
interface FastEthernet0/16
switchport access vlan 10
!
interface FastEthernet0/17
switchport access vlan 10
!
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 12 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
interface FastEthernet0/18
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/19
switchport access vlan 20
!
interface FastEthernet0/20
switchport access vlan 20
!
interface FastEthernet0/21
switchport access vlan 20
!
interface FastEthernet0/22
switchport access vlan 20
!
interface FastEthernet0/23
switchport access vlan 20
!
interface FastEthernet0/24
switchport access vlan 20
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
interface Vlan99
ip address 172.17.99.13 255.255.255.0
no ip route-cache
!
line con 0
password cisco
login
line vty 0 4
password cisco
login
line vty 5 15
password cisco
login
!
end
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 13 of 14
CCNA Exploration
LAN Switching and Wireless: VLANs
All contents are Copyright 19922007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 14 of 14