The anti-ddos statistic sampling-fraction command configures the sampling ratio for global DDoS traffic statistics collection.
The undo anti-ddos statistic sampling-fraction command restores the sampling ratio for global DDoS traffic statistics collection to the default value.
anti-ddos statistic sampling-fraction sampling-fraction
undo anti-ddos statistic sampling-fraction
| Parameter | Description | Value |
|---|---|---|
sampling-fraction |
Specifies the sampling factor. |
The value is an integer ranging from 0 to 15. The default value is 7, namely, 128:1. |
After you run the anti-ddos flow-statistic enable command to enable traffic statistics collection on an interface, the device samples the traffic received by the interface to differentiate DDoS attack traffic from normal traffic.
If you set the sampling factor to sampling-fraction, the sampling ratio will be set to 2sampling-fraction:1 and the device performs the detection once on 2sampling-fraction packets. For example, if you set sampling-fraction to 2, the sampling ratio is set to 4:1 and the device performs the detection once on four received packets.
After global defense is enabled, you can run the anti-ddos statistic sampling-fraction sampling-fraction command to set the sampling ratio for traffic statistics collection.
After interface-based defense is enabled, you can run the anti-ddos statistic interface sampling-fraction sampling-fraction command to set the sampling ratio for traffic statistics collection.