Switch security features

4.2.a i VACL, PACL

VACL

VLAN Access Control List

General Information on “VACL”:

Types of VACLs:

Configuration considerations:

“VACL” CLI configuration commands:

## Defining a MAC-based ACL
Switch(config)# mac access-list extended [ACL NAME]
Switch(config-ext-macl)# permit host [src-mac | any] [dst-mac | any]

## Defining an IP-based ACL
Switch(config)# ip access-list <type> [ACL NAME]
Switch(config-ext-nacl)# permit <protocol> [src-ip | any] [dst-ip | any]

## Defining a VLAN access map
Switch(config)# vlan access-map [MAP NAME]
Switch(config-access-map)# match [mac | ip] address [ACL NAME]
Switch(config-access-map)# action [drop | forward] [log]

Switch(config)# vlan filter [MAP NAME] vlan-list <vlan-ids>

PACL

Port Access Control List

General Information on “PACL”:

PACL types:

PACL interaction type:

“PACL” CLI configuration commands:

## Defining a MAC-based ACL
Switch(config)# mac access-list extended [ACL NAME]
Switch(config-ext-macl)# permit host [src-mac | any] [dst-mac | any]

## Applying a MAC-based ACL to an interface
Switch(config)# interface <if>
Switch(config-if)# mac access-group [ACL NAME] in

## Defining an IP-based ACL
Switch(config)# ip access-list <type> [ACL NAME]
Switch(config-ext-nacl)# permit <protocol> [src-ip | any] [dst-ip | any]

## Applying a IP-based ACL to an interface
Switch(config)# interface <if>
Switch(config-if)# ip access-group [ACL NAME] in

4.2.a ii Storm control

What Storm Control does:

Why Storm Control is needed:

// Graphic missing - Coming soon //

How Storm Control works:

Storm Control default behavior:

Storm Control optional behavior:

“Storm control” CLI configuration commands:

## Applying Strom control to an interface using percentage values
Switch(config)# interface <if>
Switch(config-if)# storm-control <traffic-type> level <rising-in-%> <falling-in-%>

## Applying Strom control to an interface using bits per second (bps) values
Switch(config)# interface <if>
Switch(config-if)# storm-control <traffic-type> bps <rising-in-bps> <falling-in-bps>

## Applying Strom control to an interface using packets per second (pps) values
Switch(config)# interface <if>
Switch(config-if)# storm-control <traffic-type> pps <rising-in-pps> <falling-in-pps>

## Configuring the behavior when storms occur (both actions simultaneously possible)
Switch(config)# interface <if>
Switch(config-if)# storm-control action [trap | shutdown]

“Storm control” CLI show commands:

## Showing the storm control enabled interfaces, thresholds, ...
Switch# show storm control

## Showing the storm control enabled interfaces, thresholds, ... for a specific traffic type
Switch# show storm control <traffic-type>

4.2.a iii DHCP Snooping, DHCP option 82

What DHCP Snooping does:

DHCP Spoofing (attack vector):

  1. Attacker sets up malicious DHCP server (eg. his own machine) in the network
  2. This machine responds to DHCP requests
  3. Traffic gets routed via attackers machine and data can be sniffed

How DHCP Snooping works:

DHCP Option 82:

DHCP Snooping configuration steps:

  1. Enable DHCP Snooping globally
  2. Enable DHCP Snooping on selected VLANs
  3. Optionally: Disable DHCP Snooping DHCP option 82
  4. Configure trusted interfaces (untrusted is the default config!)

“DHCP Snooping” CLI configuration commands:

## Enabling DHCP snooping globally
Switch(config)# ip dhcp snooping

## Enabling DHCP snooping per VLAN
Switch(config)# ip dhcp snooping vlan <vlan-id>

## Disabling DHCP snooping DHCP option 82 globally
Switch(config)# no ip dhcp snooping information option

## Configuring an interface as DHCP snooping trusted
Switch(config)# interface <if>
Switch(config-if)# ip dhcp snooping trust

“DHCP Snooping” CLI show commands:

## Showing DHCP snooping status
Switch# show ip dhcp snooping

## Showing DHCP snooping binding table
Switch# show ip dhcp snooping binding

4.2.a iv IP Source Guard

What IP Source Guard does:

IP Spoofing (attack vector):

How IP Source Guard works:

Possible port configurations:

IP Source Guard port behavior:

  1. All traffic is blocked except for DHCP packets
  2. When DHCP configuration or static configuration is assigned, a PVACL is installed

IP Source Guard configuration steps:

  1. Enable and Configure DHCP Snooping
  2. Configure IP Source Guard on untrusted Layer 2 ports

“IP Source Guard” CLI configuration commands:

## Enabling IP Source Guard (normal mode) on an interface
Switch(config)# interface <if>
Switch(config-if)# ip verify source

## Enabling IP Source Guard (extended mode) on an interface
Switch(config)# interface <if>
Switch(config-if)# ip verify source port-security

## Creating a static IP-to-MAC binding entry
Switch(config)# ip source binding [MAC] [VLAN] [IP] binding interface [INTERFACE]

“IP Source Guard” CLI show commands:

## Showing IP Source Guard status
Switch# show ip verify source

4.2.a v Dynamic ARP Inspection

What Dynamic ARP Inspection (DAI) does:

ARP Spoofing (attack vector):

How Dynamic ARP Inspection (DAI) works:

Dynamic ARP Inspection (DAI) in detail:

Dynamic ARP Inspection (DAI) default settings (when enabled):

Dynamic ARP inspection (DAI) configuration steps:

  1. Enable and Configure DHCP Snooping
  2. Disable DAI on DHCP Snooping trusted Layer 2 ports

“Dynamic ARP Inspection” CLI configuration commands:

## Enabling DAI per VLAN
Switch(config)# ip arp inspection vlan <vlan-id>

## Configuring an interface as DAI trusted
Switch(config)# interface <if>
Switch(config-if)# ip arp inspection trust

“Dynamic ARP Inspection” CLI show commands:

## Showing Dynamic ARP Inspection status
Switch# show ip arp inspection

4.2.a vi Port Security

What Port Security does:

How Port Security works:

Port Security default behavior:

Port Security optional behavior:

Port Security configuration steps:

  1. Configure the port statically as access/trunk port
  2. Enable port security on a given port
  3. Fine tune the default port security settings if needed
  4. Optionally: Define static MAC addresses

“Port Security” CLI configuration commands:

## Enabling port-security on an interface
Switch(config)# interface <if>
Switch(config-if)# switchport port-security

## Fine tuning port-security on an interface
Switch(config-if)# switchport port-security maximum <1-to-4097>
Switch(config-if)# switchport port-security aging type <type>
Switch(config-if)# switchport port-security aging time <time-in-sec>
Switch(config-if)# switchport port-security mac-address xxxx.xxxx.xxxx
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security violation <mode>

“Port Security” CLI show commands:

## Showing port security status
Switch# show switchport port-security

4.2.a vii Private VLAN

What Private VLANs do:

// Graphic missing - Coming soon //

Why Private VLANs are needed:

Private VLAN types:

Private VLAN port types:

Private VLAN configuration:

  1. Configure Primary VLAN
  2. Configure Secondary VLANs (Isolated + Community)
  3. Associate Secondary VLANs to Primary VLAN

PVLAN port connections:

Important: VTP must be off/transparent mode or VTPv3 must be used for Private VLANs to work!

“Private VLAN” CLI configuration commands:

## Configuring PVLAN Primary
Switch(config)# vlan <vlan-id>
Switch(config-vlan)# private-vlan primary

## Configuring PVLAN Secondary Isolated
Switch(config)# vlan <vlan-id>
Switch(config-vlan)# private-vlan isolated

## Configuring PVLAN Secondary Community
Switch(config)# vlan <vlan-id>
Switch(config-vlan)# private-vlan community

## Associating PVLAN Primary with PVLAN Secondary
Switch(config)# vlan <primary-vlan-id>
Switch(config-vlan)# private-vlan association <secondary-vlan-ids>

## Configuring interface as Promiscuous port
Switch(config)# interface <if>
Switch(config-if)# switchport mode private-vlan promiscuous
Switch(config-if)# switchport private-vlan mapping <primary-vlan-id> add <secondary-vlan-ids>

## Configuring interface as Host port
Switch(config)# interface <if>
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host-association <primary-vlan-id> <secondary-vlan-id>

## Configuring SVI as PVLAN gateway
Switch(config)# interface <if>
Switch(config-if)# private-vlan mapping <secondary-pvlans>

“Private VLAN” CLI show commands:

## Showing Private VLANs and associated ports, ...
Switch# show vlan private-vlan