cp-rate-limit enhance

Function

The cp-rate-limit enhance command restricts the rate at which specific packets on an interface are sent to the CPU.

The undo cp-rate-limit enhance command cancels the rate at which specific packets on an interface are sent to the CPU.

By default, the rate at which protocol packets are sent to the CPU is not limited.

Format

cp-rate-limit enhance { port | { dhcp | dhcpv6 | icmp | icmpv6 } } cir cir-value [ cbs cbs-value ]

undo cp-rate-limit enhance { port | { dhcp | dhcpv6 | icmp | icmpv6 } } [ cir cir-value [ cbs cbs-value ] ]

Parameters

Parameter Description Value
port

Indicates that the rate at which an interface sends packets of a specific protocol to the CPU is restricted.

-

dhcp

Indicates that the rate at which an interface sends DHCP packets to the CPU is restricted.

-

dhcpv6

Indicates that the rate at which an interface sends DHCPv6 packets to the CPU is restricted.

-

icmp

Indicates that the rate at which an interface sends ICMP packets to the CPU is restricted.

-

icmpv6

Indicates that the rate at which an interface sends ICMPv6 packets to the CPU is restricted.

-

cir cir-value

Specifies the CIR.

The value is an integer ranging from 32 to 1000000, in packet/s.

If an interface is configured with the port-vlan-car and igmp-vlan-car, it is recommended that the bandwidth of the port-vlan-car be greater than that of the igmp-vlan-car. If the bandwidth of the port-vlan-car is smaller than that of the igmp-vlan-car, the igmp-vlan-car configuration becomes invalid.

cbs cbs-value

Specifies the committed burst size (CBS), that is, the depth of the token bucket indicating the peak size of packets that can pass through at a burst.

The value is an integer ranging from 100 to 33554432, in bytes. It is recommended that the CBS be set to a value greater than 10 times the packet length. The default CBS value is equal to cir-value.

The

cbs-value that takes effect is at least 187 times the cir-value.

  • If the configured cbs-value is less than 187 times the cir-value, the cbs-value that takes effect is 187 times the cir-value.
  • If the configured cbs-value is greater than 187 times the cir-value, the configured cbs-value takes effect.
enhance

Indicates the port-vlan-car level-2 CAR.

-

Views

Layer 2 100GE interface view, 100GE interface view, 10G LAN interface view, 10G WAN interface view, Layer 2 40GE interface view, 40GE interface view, Layer 2 Eth-Trunk interface view, Eth-Trunk interface view, Layer 2 GE interface view, GE optical interface view, GE electrical interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
soc write

Usage Guidelines

Usage Scenario

To restrict the rate at which packets of a specific protocol are sent to the CPU, run the cp-rate-limit enhance command.

Rate limiting does not apply to the following packets to be sent to the CPU:

  • Link Aggregation Control Protocol (LACP)
  • Bridge protocol data unit (BPDU)
  • Reverse Address Resolution Protocol (RARP)
  • CHDLC_KEEPALIVE
  • IPv6_Neighbor Advertisement (IPV6_NA)
  • Two-Way Active Measurement Protocol (TWAMP)
  • Data communication network (DCN)
  • PPP_LLDP
  • IPV6MC_PIM
  • IPv6_Router Advertisement (IPV6_RA)
  • IPv6_Router Solicitation (IPV6_RS)
  • Hierarchy VLAN Register Protocol (HVRP)
  • IPv4_Virtual eXtensible Local Area Network (IPV4_VXLAN)
  • IPv6_Neighbor Solicitation (IPV6_NS)

Configuration Impact

The rate of the packets on the abnormal ports will be limited, with other packets not being affected.

Precautions

  • Interface-based CAR is configured on an interface and restricts the overall rate at which packets on the interface and its sub-interfaces are sent to the CPU.
  • Interface-based CAR applies to all VLANs on an interface.

Example

# Set the CIR of DHCP packets to be sent to the CPU to 1000 packet/s and the CBS to 2000 bytes on GE 0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[*HUAWEI-GigabitEthernet0/1/1] cp-rate-limit enhance port cir 1000 cbs 2000
# Set the CIR of ICMP packets to be sent to the CPU to 200 packet/s and the CBS to 2000 bytes.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/0
[*HUAWEI-GigabitEthernet0/1/0] cp-rate-limit enhance icmp cir 200 cbs 2000
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >