< Home

anti-ddos statistic sampling-fraction

Function

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.

Format

anti-ddos statistic sampling-fraction sampling-fraction

undo anti-ddos statistic sampling-fraction

Parameters

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.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

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.

Example

# Set the sampling ratio of global DDoS traffic statistics collection to 2:1.

<sysname> system-view
[sysname] anti-ddos statistic sampling-fraction 1
Info: The power for the sampling ratio is 1. The sampling ratio is 2 : 1. (2 = 2^1) 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >