Chapter 10 Lab 10-1, Securing Layer 2 Switches: Topology
Chapter 10 Lab 10-1, Securing Layer 2 Switches: Topology
1 SWITCH
Objectives
Prepare the Network.
Implement Layer 2 network security features.
Prevent DHCP spoofing attacks.
Prevent unauthorized access to the network using AAA.
Background
A fellow network engineer that you have known and trusted for many years has invited you to lunch this week.
At lunch, he brings up the subject of network security and how two of his former co-workers had been
arrested for using different Layer 2 attack techniques to gather data from other users in the office for their own
personal gain in their careers and finances. The story shocks you because you have always known your
friend to be very cautious with security on his network. His story makes you realize that your business
network has been cautious with external threats, Layer 3–7 security, firewalls at the borders, and so on, but
insufficient at Layer 2 security and protection inside the local network.
When you get back to the office, you meet with your boss to discuss your concerns. After reviewing the
company’s security policies, you begin to work on a Layer 2 security policy.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
First, you establish which network threats you are concerned about and then put together an action plan to
mitigate these threats. While researching these threats, you learn about other potential threats to Layer 2
switches that might not be malicious but could threaten network stability. You decide to include these threats
in the policies as well.
Other security measures need to be put in place to further secure the network, but you begin with configuring
the switches against a few specific types of attacks, including MAC flood attacks, DHCP spoofing attacks, and
unauthorized access to the local network. You plan to test the configurations in a lab environment before
placing them into production.
Required Resources
2 switches (Cisco 2960 with the Cisco IOS Release 15.0(2)SE6 C2960-LANBASEK9-M image or
comparable).
1 switches (Cisco 3560 with the Cisco IOS Release 15.0(2)SE6 C3560-IPSERVICESK9-M image or
comparable).
3 PC’s with Windows OS. One of the PCs should be equipped Wireshark, WinRadius, and Tftpd32
software.
Ethernet and console cables
Configure all four switches. An example of DLS1 and ALS1 configuration follows:
DLS1# clock set 14:55:00 3 August 2015
DLS1# config t
DLS1(config)# clock timezone CST -6
DLS1(config)# clock summer-time CDT recurring
DLS1(config)# ntp master 10
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
g. Verify trunking and spanning-tree operations using the show interfaces trunk and show spanning-tree
commands. Which switch is the root bridge?
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
h. For ALS1 and ALS2, which trunks have a role of designated (Desg), Alternate (Altn), and Root?
e2/2-3, e3/0-1, e3/2-3
DLS1(config)# vlan 99
DLS1(config-vlan)# name Management
DLS1(config-vlan)# vlan 100
DLS1(config-vlan)# name STAFF
DLS1(config-vlan)# vlan 200
DLS1(config-vlan)# name STUDENTS
DLS1(config-vlan)# exit
DLS1(config)#
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
Verify the configuration using the show vlan brief, show vtp status, show standby brief, and show ip
route command on DLS1. Output from DLS1 is shown here.
DLS1# show vlan brief
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 9
Configuration Revision : 3
MD5 digest : 0xE2 0x62 0xBC 0xCE 0x16 0xF3 0xBC 0x0C
0x6D 0x84 0x63 0xF2 0x38 0x55 0xB9 0xB7
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
What is the active router for VLANs 1 and 100? What is the active router for VLAN 200?
DLS 1 es el enrutador activo para las VLAN 1 y 100. DLS2 es el enrutador activo para la VLAN 200
DLS1# show ip route | begin Gateway
Gateway of last resort is not set
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
What would be the effect on virtual interface VLAN 100 if VLAN 100 had not been created?
El estado de SVI VLAN 100 estaría activo, pero el protocolo de línea estaría inactivo
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 13 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
To accurately configure these levels, you must know the amount of these traffic types flowing in your network
during peak hours.
When a traffic storm is detected and storm control is configured, the default response is to silently filter the
traffic. Storm control can optionally be configured to either shutdown the interface receiving the traffic storm or
to send an SNMP trap to the NMS.
a. Enable broadcast storm control on ports 0/6 and 0/15 - 0/24 on ALS1 with the parameters listed below. If
any storm is detected, an SNMP trap will be sent.
1) Unicast storms will be noted at 65% bandwidth usage, and abated at 35% bandwidth
2) Broadcast storms will be noted at 1000 pps and abated at 300pps
3) Multicast storms will be noted at 40% bandwidth usage and abated at 25% bandwidth
ALS1(config)# interface range FastEthernet 0/6, f0/15-24
ALS1(config-if-range)# storm-control unicast level 65 35
ALS1(config-if-range)# storm-control broadcast level pps 1k 300
ALS1(config-if-range)# storm-control multicast level 40 25
ALS1(config-if-range)# storm-control action trap
b. Verify the configuration with the show storm-control command. The output below is showing the
information for just f0/6; leaving the interface designation off would show configuration information for all
storm-control configured interfaces.
ALS1# show storm-control f0/6 unicast
Interface Filter State Upper Lower Current
--------- ------------- ----------- ----------- ----------
Fa0/6 Forwarding 65.00% 35.00% 0.00%
ALS1# show storm-control f0/6 broadcast
Interface Filter State Upper Lower Current
--------- ------------- ----------- ----------- ----------
Fa0/6 Forwarding 1k pps 300 pps 0 pps
ALS1# show storm-control f0/6 multicast
Interface Filter State Upper Lower Current
--------- ------------- ----------- ----------- ----------
Fa0/6 Forwarding 40.00% 25.00% 0.00%
ALS1#
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 14 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 15 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
Note: By default, issuing the switchport port-security command by itself sets the maximum
number of MAC addresses to 1, and the violation mode to shutdown. It is not necessary to specify the
maximum number of addresses, unless it is greater than 1.
ALS2(config)# interface range fastethernet 0/6, f0/15 - 24
ALS2(config-if-range)# switchport port-security
e. Verify the configuration for ALS2 using the show port-security interface command.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 16 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 17 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
Configure the recovery interval for 30 seconds. If no recovery interval is specified, the recovery time defaults
to 300 seconds.
ALS1(config)# errdisable recovery interval ?
<30-86400> timer-interval (sec)
ALS1(config)# errdisable recovery interval 30
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 18 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 19 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 20 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
a. On DLS1, issue the ip helper-address 172.16.99.50 command under interface VLAN 200.
b. Reassign interface f0/6 on ALS1 to VLAN 200.
c. On Host A, run Wireshark and have it collect on its ethernet interface. In the filter bar, type bootp and
press enter (this filters the output to show only packets related to DHCP).
d. On Host B, reconfigure the network interface to use DHCP. You should see that Host B receives an IP
address and other DHCP information.
Ethernet adapter Local Area Connection:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 21 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
If Host A were an attacker, it could craft DHCP server OFFER messages or other DHCP sever messages to
respond to Host B’ s DHCP request.
To help protect the network from such an attack, you can use DHCP snooping.
b. Configure ALS1 and ALS2 to trust DHCP information on the trunk ports only, and limit the rate that
requests are received on the access ports. Configuring DHCP snooping on the access layer switches
involves the following steps:
Turn snooping on globally using the ip dhcp snooping command.
Configure the trusted interfaces with the ip dhcp snooping trust command. By default, all ports
are considered untrusted unless statically configured to be trusted. * Very Important * : The topology
used for this lab is not using EtherChannels. Remember that when an EtherChannel created, the
virtual port channel interface is used by the switch to pass traffic; the physical interfaces (and
importantly their configuration) is not referenced by the switch. Therefore, if this topology was using
EtherChannels, the ip dhcp snooping trust command would need to be applied to the Port
Channel interfaces and not to the physical interfaces that make up the bundle.
Configure a DHCP request rate limit on the user access ports to limit the number of DHCP requests
that are allowed per second. This is configured using the ip dhcp snooping limit rate
rate_in_pps. This command prevents DHCP starvation attacks by limiting the rate of the DHCP
requests on untrusted ports.
Configure the VLANs that will use DHCP snooping. In this scenario, DHCP snooping will be used on
both the student and staff VLANs.
Configure this on ALS1 and ALS2. An example from ALS1 is below:
ALS1(config)# ip dhcp snooping
ALS1(config)# interface range fastethernet 0/7 - 12
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 22 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
c. Verify the configurations on ALS1 and ALS2 using the show ip dhcp snooping command.
ALS2# show ip dhcp snooping
Switch DHCP snooping is enabled
DHCP snooping is configured on following VLANs:
100,200
DHCP snooping is operational on following VLANs:
100,200
DHCP snooping is configured on the following L3 Interfaces:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 23 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
Will DHCP replies be allowed to ingress access ports assigned to VLAN 200?
No. los puertos de acceso asignados a la VLAN 200 no son confiables para la inspección DHCP. Solo se
pueden enviar solicitudes DHCP desde estos puertos, no respuestas
How many DHCP packets will be allowed on Fast Ethernet 0/16 per second?
Se limitará a 20 paquetes por segundo
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 24 of 25
CCNPv7.1 SWITCH: Lab 10-1, Securing Layer 2 Switches
g. Configure a local user named lastditch with a privilege level of 15 and a password of $cisco123&
ALS1(config)# username lastditch privilege 15 password $cisco123&
h. Configure the radius server to use authentication port 1812, accounting port 1813 and the shared key
WinRadius
ALS1(config)# radius server RADIUS
ALS1(config-radius-server)# address ipv4 172.16.99.50 auth-port 1812 acct-port
1813
ALS1(config-radius-server)# key WinRadius
ALS1(config-radius-server)# exit
i. Configure the AAA authentication method REMOTE-CONTROL to use the radius server and to fallback to
the local database
ALS1(config)# aaa authentication login REMOTE-CONTROL group radius local
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 25 of 25