Configuring Rate Limits

This chapter describes how to configure rate limits for supervisor-bound traffic on Cisco NX-OS devices.

This chapter includes the following sections:

About Rate Limits

Rate limits can prevent redirected packets for exceptions from overwhelming the supervisor module on a Cisco NX-OS device.

You can configure rate limits for the following types of redirected packets:

  • Access-list log packets

  • Bidirectional Forwarding Detection (BFD) packets

  • Catch-all exception traffic

  • Fabric Extender (FEX) traffic

  • Layer 3 glean packets

  • Layer 3 multicast data packets

  • SPAN egress traffic

For Cisco Nexus 9200, 9332C, 9364C, 9300-EX, 9300-FX/FXP/FX2/FX3, and 9300-GX platform switches and Cisco Nexus 9500 platform switches with -EX/FX line cards, the CoPP policer rate is kilo bits per second. For other Cisco Nexus 9000 Series switches, the CoPP policer rate is in packets per second; However, it is kilo bits per second for SPAN egress traffic.

Guidelines and Limitations for Rate Limits

Rate limits has the following configuration guidelines and limitations:

  • You can set rate limits for supervisor-bound exception and redirected traffic. Use control plane policing (CoPP) for other types of supervisor-bound traffic.


    Note


    Hardware rate-limiters protect the supervisor CPU from excessive inbound traffic. The traffic rate allowed by the hardware rate-limiters is configured globally and applied to each individual I/O module. The resulting allowed rate depends on the number of I/O modules in the system. CoPP provides more granular supervisor CPU protection by utilizing the modular quality-of-service CLI (MQC).


  • You can configure a hardware rate-limiter to show statistics for outbound traffic on SPAN egress ports. This rate-limiter is supported on all Cisco Nexus 9000, 9300, and 9500 Series switches, and the Cisco Nexus 3164Q, 31128PQ, 3232C, and 3264Q switches.

  • The rate-limiter on egress ports is limited per pipe on the Cisco Nexus 9300 and 9500 Series switches, Cisco Nexus 3164Q, 31128PQ, Cisco Nexus 3232C, and 3264Q switches. The rate-limiter on egress ports is limited per slice on the Cisco Nexus 9200 and 9300-EX Series switches.

  • Cisco Nexus 9300 and 9500 Series switches, Cisco Nexus 3164Q, Cisco Nexus 31128PQ, Cisco Nexus 3232C, and Cisco Nexus 3264Q switches support both local and ERSPAN. However, the rate-limiter only applies to ERSPAN. You must configure e-racl ACL TCAM region to enable the rate-limiter on these switches. For more information, see the Configuring ACL TCAM Region Sizes section in the Cisco Nexus 9000 Series NX-OS Security Configuration Guide.

  • For Cisco Nexus 9200 and 9300-EX Series switches and the N9K-X9736C-EX, N9K-97160YC-EX, N9K-X9732C-EX, N9K-X9732C-EXM line cards, the SPAN egress rate-limiter applies to both ERSPAN and local SPAN. You do not require special TCAM carving to use the rate-limiter on these devices.

  • For Cisco Nexus 92160YC-X, 92304QC, 9272Q, 9232C, 92300YC, 9348GC-FXP, 93108TC-FX, 93180YC-FX Series switches and Cisco Nexus 3232C and Cisco Nexus 3264Q switches, you should not configure both, sFlow and ERSPAN.

  • Logging rate-limit is enabled by default. No default configuration is shown up in show running-config and in show running-config all. Use show logging cli to check if rate-limit is enabled. It has a dedicated field to verify if rate-limit is enabled or disabled.

    Once no logging rate-limit config is applied, it appears in the running-config and displayed in show logging output.

  • The rate-limit cpu direction {input | output | both} pps packets action log command is not supported on Cisco Nexus 9000 Series switches.


Note


If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might differ from the Cisco IOS commands that you would use.


Default Settings for Rate Limits

This table lists the default settings for rate limits parameters.

Table 1. Default Rate Limits Parameters Settings

Parameters

Default

Access-list log packets rate limit

100 packets per second

BFD packets rate limit

10000 packets per second

Exception packets rate limit

50 packets per second

FEX packets rate limit

12000 packets per second

Layer 3 glean packets rate limit

100 packets per second

Layer 3 multicast data packets rate limit

3000 packets per second

SPAN egress rate limit

No limit

R-L Class packets rate limit

100 packets per second

SPAN packets rate limit

50 packets per second

sFLOW packets rate limit

40000 kilobits per second

VXLAN-OAM packets rate limit

1000 packets per second

100M-ethports packets rate limit

10000 packets per second

SPAN egress disabled dot1x packets rate limit

3000 packets per second

MPLS-OAM packets rate limit

300 packets per second

Netflow packets rate limit

120000 packets per second

SSX packets rate limit

120000 packets per second

UCS-mgmt packets rate limit

120000 packets per second

MDNS packets rate limit

1024 packets per second

Configuring Rate Limits

You can set rate limits on supervisor-bound traffic.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

hardware rate-limiter access-list-log {packets | disable} [module module [port start end]]

Example:

switch(config)# hardware rate-limiter access-list-log 200

Configures rate limits for packets that are copied to the supervisor module for access list logging. The range is 0–10000.

Step 3

hardware rate-limiter bfd packets [module module [port start end]]

Example:

switch(config)# hardware rate-limiter bfd 500

Configures rate limits for bidirectional forwarding detection (BFD) packets. The range is 0–10000.

Step 4

hardware rate-limiter exception packets [module module [port start end]]

Example:

switch(config)# hardware rate-limiter exception 500

Configures rate limits for any exception traffic in the system that is not classified by the Control Plane Policing (CoPP) policy. The range is 0–10000.

Step 5

hardware rate-limiter fex packets [module module [port start end]]

Example:

switch(config)# hardware rate-limiter fex 500

Configures rate limits for supervisor-bound FEX traffic. The range is 0–10000.

Step 6

hardware rate-limiter layer-3 glean packets [module module [port start end]]

Example:

switch(config)# hardware rate-limiter layer-3 glean 500

Configures rate limits for Layer 3 glean packets. The range is 0–10000.

A node receiving traffic for a particular destination might be unable to forward traffic because it is unaware of the rewrite information or the physical layer interface behind which the destination resides. During this time, it is possible to install a glean entry in the data path for that destination. Because this might not be a pointer to the global punt adjacency, a reserved module or port value is used to punt such packets to the supervisor. This glean rate can be controlled using the given rate limiter.

Note

 
The CoPP policy controls the rate of glean packets that are forwarded to CPU due to hit of global punt adjacency. The Layer 3 glean hardware rate-limiter limits the number of glean packets that are redirected to CPU by sup-redirect acess-list. This is used in special cases such as, in the VXLAN environment when the packet is received from an unknown VTEP.

Step 7

hardware rate-limiter layer-3 multicast local-groups packets [module module [port start end]]

Example:

switch(config)# hardware rate-limiter layer-3 multicast local-groups 300

Configures rate limits for Layer 3 multicast data packets that are punted for initiating a shortest-path tree (SPT) join. The range is 0–10000.

Step 8

hardware rate-limiter span-egress rate [module module]

Example:

switch(config)# hardware rate-limiter span-egress 123

Configures rate limits for SPAN for egress traffic. The range is 0–100000000.

Note

 

You should not configure both sFlow and the SPAN egress rate-limiter.

Step 9

(Optional) show hardware rate-limiter [ access-list-log | bfd |exception | fex | layer-3 glean | layer-3 multicast local-groups | |module module]

Example:

switch# show hardware rate-limiter
(Optional)

Displays the rate limit configuration. The module range is 1–30.

Step 10

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Monitoring Rate Limits

You can monitor rate limits.

Procedure

Command or Action Purpose

show hardware rate-limiter [access-list-log | bfd | exception | fex | layer-3 glean | layer-3 multicast local-groups | span-egress | module module]

Example:

switch# show hardware rate-limiter access-list-log

Displays the rate limit statistics.

Clearing the Rate Limit Statistics

You can clear the rate limit statistics.

Procedure

Command or Action Purpose

clear hardware rate-limiter {all | access-list-log | bfd | exception | fex | layer-3 glean | layer-3 multicast local-groups | span-egress [module module] }

Example:

switch# clear hardware rate-limiter access-list-log

Clears the rate limit statistics.

Verifying the Rate Limit Configuration

To display the rate limit configuration information, perform the following tasks:

Command

Purpose

show hardware rate-limiter [access-list-log | bfd | exception | fex | layer-3 glean | layer-3 multicast local-groups | span-egress | module module]

Displays the rate limit configuration.

Configuration Examples for Rate Limits

The following example shows how to configure rate limits for packets copied to the supervisor module for access list logging:

switch(config)#	hardware rate-limiter access-list-log 
switch(config)# show hardware rate-limiter access-list-log
Units for Config: kilo bits per second
Allowed, Dropped & Total: aggregated since last clear counters


Module: 4
  R-L Class           Config           Allowed         Dropped            Total
 +------------------+--------+---------------+---------------+-----------------
+
  access-list-log         100               0               0                 0

  Port group with configuration same as default configuration
      Eth4/1-36

Module: 22
  R-L Class           Config           Allowed         Dropped            Total
 +------------------+--------+---------------+---------------+-----------------
+
  access-list-log         100               0               0                 0

  Port group with configuration same as default configuration
      Eth22/1-0

The following example shows how the SPAN egress rate limiter might be in conflict with sFlow:

switch(config)#	hardware rate-limiter span-egress 123
Warning: This span-egress rate-limiter might affect functionality of sFlow
switch(config)# show hardware rate-limiter span-egress
Units for Config: kilo bits per second 
Allowed, Dropped & Total: aggregated since Module: 1
R-L Class         Config            Allowed        Dropped           Total
+----------------+----------+--------------+--------------+----------------+
  L3 glean                 100             0              0               0
  L3 mcast loc-grp        3000             0              0               0
  access-list-log          100             0              0               0
  bfd                    10000             0              0               0
  exception                 50             0              0               0
  fex                     3000             0              0               0
  span                      50             0              0               0
  dpss                    6400             0              0               0
  span-egress              123             0              0               0
<<configured

Additional References for Rate Limits

This section includes additional information related to implementing rate limits.

Related Documents

Related Topic

Document Title

Cisco NX-OS licensing

Cisco NX-OS Licensing Guide