To reduce the number of packets sent to the CPU and prevent interference between the packets of different types, the switch limits the rate of packets sent to the CPU in different modes, including rate limiting for protocol packets and rate limiting for packets after ALP is enabled. ALP packet rate limiting has the highest priority.
The default CPCAR values are recommended.
BGP, BGP4+, ISIS, OSPF, OSPFv3 are disabled when the configuration is initialized. When the protocols are enabled but connections are not set up, the switch sends packets with the CAR values set using the car command. When connections are set up and ALP is enabled, the switch sends packets with the CAR values set using the linkup-car command.
On the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI, CIR value for packets sent to the CPU is expressed in kilobits per second (kbps), but the system limits the rate of packets in packets per second (pps). The kbps rate is converted to the pps rate using the following formula: pps = kbps x 1024/(packet_length + 20)/8, where packet_length indicates the length of packets sent to the CPU.
The system view is displayed.
Run cpu-defend policy policy-name
The attack defense policy view is displayed.
Configure a rate limit for protocol packets or a rate limit after ALP is enabled in the attack defense policy view.
Configure rate limits for protocol packets.
The action to be performed on protocol packets sent to the CPU can be car or deny. When you configure the action to be performed on packets of the same protocol, the latest configuration takes effect.
Run car { packet-type packet-type | user-defined-flow flow-id } cir cir-value [ cbs cbs-value ]
The CIR and CBS values for packets sent to the CPU are set.
By default, the CIR value for user-defined flows is 64 kbit/s. You can run the display cpu-defend configuration command to check the CAR values for protocol packets.
Run deny { packet-type packet-type | user-defined-flow flow-id }
The action taken for the packets sent to the CPU is set to deny.
By default, the switch does not discard packets sent to the CPU. Instead, the switch limits the rate of user-defined flows and packets sent to the CPU based on the default rate. You can run the display cpu-defend configuration command to check the CAR values of each type of packets.
Configure a rate limit after ALP is enabled.
Run linkup-car packet-type { bgp | bgp4plus | ftp | ftpv6 | http | https | ike | ip-cloud | ipsec-esp | isis | ospf | ospfv3 | ssh | telnet | tftp } cir cir-value [ cbs cbs-value ]
The CAR values for protocol packets, including the CIR and CBS values, are set.
Table 1 lists the default CIR and CBS values for the setup of BGP, BGP4+, FTP, IPv6 FTP, HTTP, HTTPS, IKE, IPSEC-ESP, ISIS, OSPF, OSPFv3, SSH, TELNET, and TFTP connections; the CIR and CBS for sending packets of IP-CLOUD connections are 2048 kbit/s and 385024 bytes respectively.
Product |
CIR |
CBS |
---|---|---|
S5720-LI, S5720S-LI, S6720-LI, S6720S-LI |
|
|
S5720-SI, S5720I-SI, S5720S-SI |
|
|
S5735-L, S5735S-L, S5735S-L-M |
|
|
S5735-S, S5735S-S, S5735-S-I |
|
|
S2720-EI |
|
|
S5730-SI, S5730S-EI, S6720-SI, S6720S-SI |
|
|
S5720-EI, S6720-EI, S6720S-EI |
|
|
S5720-HI, S5730-HI, S5731-H, S5731S-H, S5731-S, S5731S-S, S6720-HI, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S |
|
|
Run quit
Return to the system view.
Run cpu-defend application-apperceive enable
Globally ALP is enabled.
By default, globally ALP is enabled.
Run cpu-defend application-apperceive { bgp | bgp4plus | ftp | ftpv6 | http | https | ike | ip-cloud | ipsec-esp | isis | ospf | ospfv3 | ssh | telnet | tftp } enable
ALP of protocol packets is enabled.
By default, ALP is enabled on FTP, IPv6 FTP, HTTP, HTTPS, IP-CLOUD, IKE, IPSEC-ESP, SSH, TELNET, and TFTP packets and disabled on BGP, BGP4+, ISIS, OSPF, and OSPFv3 packets.
After ALP is enabled for HTTPS, the CIR value (transmission rate) is automatically increased to ensure high-speed file transmission between the Web NMS and switch.