Lab3test - Implementing VLAN Security - ILM
Lab3test - Implementing VLAN Security - ILM
Topology
Addressing Table
Device Interface IP Address Subnet Mask Default Gateway
10 Data
99 Management&Native
999 BlackHole
Objectives
Part 1: Build the Network and Configure Basic Device Settings Part
2: Implement VLAN Security on the Switches
Background / Scenario
Best practice dictates configuring some basic security settings for both access and trunk ports on switches.
This will help guard against VLAN attacks and possible sniffing of network traffic within the network.
Page 1 of 12
Lab – Implementing VLAN Security
Note: The switches used with this lab are Cisco Catalyst 2960s with Cisco IOS Release 15.0(2) (lanbasek9
image). Other switches and Cisco IOS versions can be used. Depending on the model and Cisco IOS version,
the commands available and output produced might vary from what is shown in the labs.
Note: Make sure that the switches have been erased and have no startup configurations. If you are unsure,
contact your instructor.
Instructor note: Refer to the Instructor Lab Manual for the procedures to initialize and reload devices.
Required Resources
• 2 Switches (Cisco 2960 with Cisco IOS Release 15.0(2) lanbasek9 image or comparable)
• 3 PCs (Windows 7, Vista, or XP with terminal emulation program, such as Tera Term)
• Console cables to configure the Cisco IOS devices via the console ports
• Ethernet cables as shown in the topology
Page 3 of 12
Lab – Implementing VLAN Security
b. From S1, ping the management address of S2. Were the pings successful? Why?
____________________________________________________________________________________
____________________________________________________________________________________
c. From a command prompt on PC-B, ping the management addresses on S1 and S2 and the IP address of
PC-A and PC-C. Were your pings successful? Why?
____________________________________________________________________________________
d. From a command prompt on PC-C, ping the management addresses on S1 and S2. Were you
successful? Why?
____________________________________________________________________________________
____________________________________________________________________________________
Port Vlans in spanning tree forwarding state and not pruned Fa0/1
1,10,99,999
Step 2: Change the native VLAN for the trunk ports on S1 and S2.
Changing the native VLAN for trunk ports from VLAN 1 to another VLAN is a good practice for security. a.
What is the current native VLAN for the S1 and S2 F0/1 interfaces?
b. Configure the native VLAN on the S1 F0/1 trunk interface to Management&Native VLAN 99.
Page 4 of 12
Lab – Implementing VLAN Security
S1# config t
S1(config)# interface f0/1
S1(config-if)# switchport trunk native vlan 99
c. Wait a few seconds. You should start receiving error messages on the console session of S1. What does
the %CDP-4-NATIVE_VLAN_MISMATCH: message mean?
d. Configure the native VLAN on the S2 F0/1 trunk interface to VLAN 99.
S2(config)# interface f0/1
S2(config-if)# switchport trunk native vlan 99
e. Verify that the native VLAN is now 99 on both switches. S1 output is shown below.
S1# show interface trunk
c. From a command prompt on PC-B, ping the management addresses on S1 and S2 and the IP address of
PC-A and PC-C. Were your pings successful? Why?
d. From a command prompt on PC-C, ping the management addresses on S1 and S2 and the IP address of
PC-A. Were you successful? Why?
____________________________________________________________________________________
Page 6 of 12
Lab – Implementing VLAN Security
e. Verify that VLAN port assignments on both switches are correct. S1 is shown below as an example.
S1# show vlan brief
By default, all VLANs are allowed to be carried on trunk ports. For security reasons, it is a good practice to
only allow specific desired VLANs to cross trunk links on your network. f. Restrict the trunk port F0/1
on S1 to only allow VLANs 10 and 99.
S1(config)# interface f0/1
S1(config-if)# switchport trunk allowed vlan 10,99
g. Restrict the trunk port F0/1 on S2 to only allow VLANs 10 and 99.
S2(config)# interface f0/1 S2(config-if)# switchport trunk allowed vlan 10,99
h. Verify the allowed VLANs. Issue a show interface trunk command in privileged EXEC mode on both S1
and S2.
S1# show interface trunk
is the result?
____________________________________________________________________________________
Reflection
What, if any, are the security problems with the default configuration of a Cisco switch?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Device Configs Switch S1
S1# show vlan brief
S1#sh run
Building configuration...
Page 8 of 12
Lab – Implementing VLAN Security
Page 9 of 12
Lab – Implementing VLAN Security
interface FastEthernet0/19
shutdown ! interface
FastEthernet0/20 shutdown !
interface FastEthernet0/21
shutdown ! interface
FastEthernet0/22 shutdown !
interface FastEthernet0/23
shutdown ! interface
FastEthernet0/24 shutdown !
interface GigabitEthernet0/1
shutdown
! interface
GigabitEthernet0/2 shutdown
!
interface Vlan1 no ip address
shutdown ! interface Vlan99 ip
address 172.17.99.11 255.255.255.0 !
no ip http server ip http secure-
server !
banner motd ^CWarning. Unauthorized access is prohibited.^C !
line con 0 password 7
070C285F4D06 logging
synchronous login line
vty 0 4 password 7
070C285F4D06 logging
synchronous login line
vty 5 15 password 7
070C285F4D06 logging
synchronous login ! end
Switch S2
S2#show vlan brief
S2#sh run
Page 10 of 12
Lab – Implementing VLAN Security
Building configuration...
Page 11 of 12
Lab – Implementing VLAN Security
interface FastEthernet0/12
shutdown ! interface
FastEthernet0/13 shutdown
! interface
FastEthernet0/14 shutdown
! interface
FastEthernet0/15 shutdown
! interface
FastEthernet0/16 shutdown
! interface
FastEthernet0/17 shutdown
!
interface FastEthernet0/18
switchport access vlan 99
switchport mode access !
interface FastEthernet0/19
shutdown ! interface
FastEthernet0/20 shutdown
! interface
FastEthernet0/21 shutdown
! interface
FastEthernet0/22 shutdown
! interface
FastEthernet0/23 shutdown
!
interface FastEthernet0/24
shutdown ! interface
GigabitEthernet0/1 shutdown
! interface
GigabitEthernet0/2 shutdown
!
interface Vlan1
no ip address !
interface Vlan99 ip address
172.17.99.12 255.255.255.0 !
no ip http server ip
http secure-server !
banner motd ^CWarning. Unauthorized access is prohibited.^C !
line con 0 password 7
00071A150754 logging
synchronous login line
vty 0 4 password 7
00071A150754 logging
synchronous login line
vty 5 15 password 7
070C285F4D06 logging
synchronous login ! end
Page 12 of 12