Configuring Control-Plane Security

This chapter provides details about configuring Control-Plane Security on the Cisco Industrial Ethernet 2000U Series (IE 2000U) and Connected Grid Switches and includes the following sections:

Information About Control-Plane Security

In any network, Layer 2 and Layer 3 switches exchange control packets with other switches in the network.

The switch, which acts as a transition between the customer network and the service-provider network, uses control-plane security to isolate the topology information between the two networks. This mechanism protects against a possible denial-of-service (DoS) attack from another customer network.

NNIs, UNIs, and ENIs

In the switch, ports configured as network node interfaces (NNIs) connect to the service-provider network. The switch communicates with the rest of the network through these ports, exchanging protocol control packets as well as regular traffic. Other ports on the switch are user network interfaces (UNIs) that are used as customer-facing ports. Each port is connected to a single customer, and exchanging network protocol control packets between the switch and the customer is not usually required. Most Layer 2 protocols are not supported on UNIs. To protect against accidental or intentional CPU overload, the switch provides control-plane security automatically by dropping or rate-limiting a predefined set of Layer 2 control packets and some Layer 3 control packets for UNIs.

You can also configure a third port type, an enhanced network interface (ENI). An ENI, like a UNI, is a customer-facing interface. By default on an ENI, Layer 2 control protocols, such as Cisco Discovery Protocol (CDP), Spanning-Tree Protocol (STP), and Link Layer Discovery Protocol (LLDP), are disabled. On ENIs, unlike UNIs, you can enable these protocols. When configuring ENIs in port channels, you can also enable Link Aggregation Control Protocol (LACP) and Port Aggregation Protocol (PAgP). ENIs drop or rate-limit the protocol packets, depending on whether the protocol is enabled or disabled on the interface. For all other control protocols on ENIs, the switch drops or rate-limits packets the same way as it does for UNIs.

CPU protection, enabled by default, uses 19 policers per port. When enabled, you can configure a maximum of 45 policers per port. If you need to configure more policers per port, you can disable CPU protection by entering the no policer cpu uni all global configuration command and reloading the switch. When CPU protection is disabled, you can configure a maximum of 63 policers per port for user-defined classes and one for class-default.


NoteWhen you disable CPU protection on the switch, protocol packets can reach the CPU, which could cause CPU processing overload and storm control through software.


Control-plane security is supported on a port for Layer 2 control packets and non-IP packets with router MAC addresses, regardless of whether the port is in routing or nonrouting mode. (A port is in routing mode when global IP routing is enabled and the port is configured with the no switchport interface configuration command or is associated with a VLAN that has an active switch virtual interface [SVI].) These packets are either dropped or rate-limited, depending upon the Layer 2 protocol configuration.

For Layer 3 control packets, on a port in routing mode (whether or not a Layer 3 service policy is attached), control-plane security supports rate-limiting only for Internet Group Management Protocol (IGMP) control packets. For Layer 3 packets, on a port in nonrouting mode (whether or not a Layer 2 service policy is attached), only IP packets with router MAC addresses are dropped.

These types of control packets are dropped or rate-limited:

  • Layer 2 protocol control packets:

– Control packets that are always dropped on UNIs and ENIs, such as Dynamic Trunking Protocol (DTP) packets and some bridge protocol data units (BPDUs).

– Control packets that are dropped by default but can be enabled or tunneled, such as CDP, STP, LLDP, VLAN Trunking Protocol (VTP), UniDirectional Link Detection (UDLD) Protocol, LACP, and PAgP packets. When enabled, these protocol packets are rate-limited and tunneled through the switch.

– Control or management packets that are required by the switch, such as keepalive packets. These control packets are processed by the CPU but are rate-limited to normal and safe limits to prevent CPU overload.

  • Non-IP packets with router MAC addresses
  • IP packets with router MAC addresses
  • IGMP control packets that are enabled by default and need to be rate-limited. However, when IGMP snooping and IP multicast routing are disabled, the packets are treated like data packets, and no policers are assigned to them.

The switch uses policing to accomplish control-plane security by either dropping or rate-limiting Layer 2 control packets. If a Layer 2 protocol is enabled on a UNI or ENI port or tunneled on the switch, those protocol packets are rate-limited; otherwise control packets are dropped.

By default, some protocol traffic is dropped by the CPU, and some is rate-limited. Table 9-1 shows the default action and the action taken for Layer 2 protocol packets when the feature is enabled or when Layer 2 protocol tunneling is enabled for the protocol. Note that some features cannot be enabled on UNIs, and not all protocols can be tunneled (shown by dashes). If Layer 2 protocol tunneling is enabled for any of the supported protocols (CDP, STP, VTP, LLDP, LACP, PAgP, or UDLD), the switch Layer 2 protocol tunneling protocol uses the rate-limiting policer on every port. If UDLD is enabled on a port or UDLD tunneling is enabled, UDLD packets are rate-limited.

 

Table 9-1 Control-Plane Security Actions on Layer 2 Protocol Packets Received on a UNI or ENI

Protocol
Default
When Feature Is Enabled
When Layer 2 Protocol Tunneling Is Enabled 1

STP

Dropped

Rate limited

Note STP can be enabled only on ENIs.

Rate-limited

RSVD_STP (reserved IEEE 802.1D addresses)

Dropped

When the Ethernet Link Management Interface (ELMI) is enabled, globally or on a per-port basis whichever is configured last, a throttle policer is assigned to a port. When ELMI is disabled (globally or on a port, whichever is configured last), a drop policer is assigned to a port.

–

PVST+

Dropped

–

Rate limited

LACP

Dropped

Rate limited

Note LACP can be enabled only on ENIs.

Rate limited

PAgP

Dropped

Rate limited

Note PAgP can be enabled only on ENIs.

Rate limited

IEEE 802.1x

Dropped

Rate limited

–

CDP

Dropped

Rate limited

Note CDP can be enabled only on ENIs.

Rate limited

LLDP

Dropped

Rate limited

Note LLDP can be enabled only on ENIs.

Rate limited

DTP

Dropped

–

–

UDLD

Dropped

Rate limited

Rate limited

VTP

Dropped

–

Rate limited

CISCO_L2 (any other Cisco Layer 2 protocols with the MAC address 01:00:0c:cc:cc:cc)

Dropped

–

Rate limited if CDP, DTP, UDLD, PAGP, or VTP are Layer 2 tunneled

KEEPALIVE (MAC address, SNAP encapsulation, LLC, Org ID, or HDLC packets)

Rate-limited

–

–

1.Layer 2 protocol traffic is rate-limited when Layer 2 protocol tunneling is enabled for any protocol on any port.

The switch automatically allocates 27 control-plane security policers for CPU protection. At system bootup, it assigns a policer to each port numbered 0 to 26. The policer assigned to a port determines if the protocol packets arriving on the port are rate-limited or dropped. On the switch, a policer of 26 means a drop policer and is a global policer; any traffic type shown as 26 on any port is dropped. A policer of a value of 0 to 25 means that a rate-limiting policer is assigned to the port for the protocol. The policers 0 to 23 are logical identifiers for Fast Ethernet ports 1 to 24; policers 24 and 25 refer to Gigabit Ethernet ports 1 and 2, respectively. A policer value of 255 means that no policer is assigned to a protocol.

To see what policer actions are assigned to the protocols on an interface, enter the show platform policer cpu interface interface-id privileged EXEC command.

This example shows the default policer configuration for a UNI. Because the port is Fast Ethernet 1, the identifier for rate-limited protocols is 0; a display for Fast Ethernet port 5 would display an identifier of 4. The Policer Index refers to the specific protocol. The ASIC number shows when the policer is on a different ASIC.

Because UNIs do not support STP, CDP, LLDP, LACP, or PAgP, these packets are dropped (physical policer of 26). These protocols are disabled by default on ENIs as well, but you can enable them. When enabled on ENIs, the control packets are rate limited and a rate-limiting policer is assigned to the port for these protocols (physical policer of 22).

Switch# show platform policer cpu interface fastethernet 0/3
Policers assigned for CPU protection
===================================================================
Feature Policer Physical Asic
Index Policer Num
===================================================================
Fa0/1
STP 1 26 0
LACP 2 26 0
8021X 3 26 0
RSVD_STP 4 26 0
PVST_PLUS 5 26 0
CDP 6 26 0
LLDP 7 26 0
DTP 8 26 0
UDLD 9 26 0
PAGP 10 26 0
VTP 11 26 0
CISCO_L2 12 26 0
KEEPALIVE 13 0 0
CFM 14 255 0
SWITCH_MAC 15 26 0
SWITCH_ROUTER_MAC 16 26 0
SWITCH_IGMP 17 0 0
SWITCH_L2PT 18 26 0
 

This example shows the policers assigned to a ENI when control protocols are enabled on the interface. A value of 22 shows that protocol packets are rate limited for that protocol. When the protocol is not enabled, the defaults are the same as for a UNI.

Switch# show platform policer cpu interface fastethernet0/23
Policers assigned for CPU protection ===================================================================
Feature Policer Physical Asic
Index Policer Num
===================================================================
Fa0/23
STP 1 26 0
LACP 2 22 0
8021X 3 26 0
RSVD_STP 4 26 0
PVST_PLUS 5 26 0
CDP 6 22 0
LLDP 7 26 0
DTP 8 26 0
UDLD 9 26 0
PAGP 10 26 0
VTP 11 26 0
CISCO_L2 12 22 0
KEEPALIVE 13 22 0
CFM 14 255 0
SWITCH_MAC 15 26 0
SWITCH_ROUTER_MAC 16 26 0
SWITCH_IGMP 17 22 0
SWITCH_L2PT 18 22 0
 

This example shows the default policers assigned to NNIs. Most protocols have no policers assigned to NNIs. A value of 255 means that no policer is assigned to the port for the protocol.

Switch #show platform policer cpu interface gigabitethernet 0/1
Policers assigned for CPU protection
===================================================================
Feature Policer Physical Asic
Index Policer Num
===================================================================
Gi0/1
STP 1 255 0
LACP 2 255 0
8021X 3 255 0
RSVD_STP 4 255 0
PVST_PLUS 5 255 0
CDP 6 255 0
LLDP 7 255 0
DTP 8 255 0
UDLD 9 255 0
PAGP 10 255 0
VTP 11 255 0
CISCO_L2 12 255 0
KEEPALIVE 13 255 0
CFM 14 255 0
SWITCH_MAC 15 255 0
SWITCH_ROUTER_MAC 16 255 0
SWITCH_IGMP 17 255 0
SWITCH_L2PT 18 255 0
 

Prerequisites

Be sure to review the Guidelines and Limitations section and the Before You Begin section for each configuration.

Guidelines and Limitations

Reload Required When You Disable or Reenable CPU Protection

When you disable or enable CPU protection ([ no] policer cpu uni all) , you must reload the switch by entering the reload privileged EXEC command before the configuration takes effect.

Policer Support Per Port for CPU Protection

  • When you enable (system default) CPU protection on the switch, you can configure a maximum of 45 policers per port.
  • When you disable CPU protection allows, you to configure a maximum of 63 policers per port for user-defined classes and one for class-default.

– Due to hardware limitations, you can attach 64 per-port, per-VLAN policers to a maximum of 6 ports. If you attempt to attach more than 6 per-port per VLAN 64-policer policy maps, the attachment fails with a VLAN labels exceeded error message.

– When you disable CPU protection and attach a policy map with more than 45 policers, and then enable CPU protection again and reload, 19 policers per port are again required for CPU protection. During reload, the policers 46 and above will reach the policer resources exceeded error condition and no policers are attached to those classes.

Rate-limiting Threshold

The rate-limiting threshold applies to all supported control protocols on all UNIs and ENIs. It also applies to STP, CDP, LLDP, LACP, and PAgP when the protocol is enabled on an ENI.

You can configure only the rate-limiting threshold.

Ping Limitations

During normal Layer 2 operation, you cannot ping ( ping [ host ] | address ] the switch through a UNI or ENI.

This restriction does not apply to NNIs.

Default Settings

 

Parameters
Default

CPU protection

Enabled.

CPU policiers

A total of 27 pre-allocated to each port (0 to 26).

Configuring Control-Plane Security

You can set the threshold rate for CPU protection.

BEFORE YOU BEGIN

Review the Guidelines and Limitations for this feature.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

policer cpu uni rate

Configure the CPU protection policing threshold rate. The range is from 8000 to 409500 bits per second (b/s). The default, if none is configured, is 160000 b/s.

Note The configured rate applies to all supported and enabled control protocols on all UNIs and ENIs.

To return to the default threshold rate, use the no policer cpu uni global configuration command.

To disable CPU protection, enter the no policer cpu uni all global configuration command, and reload the switch.

Step 3

end

Return to privileged EXEC mode.

Step 4

show policer cpu uni-eni rate

Verify the configured CPU policer rate.

Step 5

copy running-config startup-config

(Optional) Save your entries in the configuration file.

EXAMPLE

This example shows how to set the CPU protection threshold to 10000 b/s and verify the configuration:

Switch# config t
Switch(config)# policer cpu uni 10000
Switch(config)# end
Switch# show policer cpu uni-eni rate
CPU UNI/ENI port police rate = 10000 bps
 

This is an example of the show command output when you disable CPU protection on the switch:

Switch# show policer cpu uni-eni rate
CPU Protection feature is not enabled
 

Verifying Configuration

You can verify control-plane security settings on the switch or on an interface.

For details on clear and debug commands, see Clear and Debug Commands.

 

Command
Purpose

show platform policer cpu { classification | interface interface-id }

Display control-plane policer information.

  • classification —show classification statistics.
  • interface interface-id —show policer indexes for the specified interface.

show policer cpu uni-eni {drop [interface interface-id ] | rate }

Display CPU policer information for the switch.

  • drop [interface interface-id ] —shows the number of dropped frames for all interfaces or the specified interface.
  • rate —shows the configured threshold rate for CPU policers.

If CPU protection is disabled on the switch, this message appears in the output:

Switch# show policer cpu uni drop
CPU Protection feature is not enabled

Clear and Debug Commands

 

Command
Purpose

clear policer cpu uni-eni counters { classification | drop }

Clear all control-plane statistics per feature ( classification ) or all statistics maintained by the control-plane policer ( drop ).

debug platform policer cpu uni-eni

Enable debugging of the control-plane policer. This command displays information messages when any changes are made to CPU protection.

Configuration Example

See example in the “Configuring Control-Plane Security” section.

Related Documents

  • Layer 2 Switching Software Configuration Guide for Cisco IE 2000U and Connected Grid Switches
  • System Management Software Configuration Guide for Cisco IE 2000U and Connected Grid Switches

You can find all of the related documents at www.cisco.com/go/ie2000u-docs.

Feature History

Platform
First Supported Release

IE 2000U

Cisco IOS Release 15.0(2)EH

CGS 2520

Cisco IOS Release 12.2(53)EX

Ethernet Switch Module (ESM) for CGR 2010

Cisco IOS Release 12.2(53)EX