Setting the Packet Sampling Ratio for Attack Source Tracing
Context
Attack source tracing identifies attacks by sampling received packets. A proper packet sampling ratio can reduce the errors in attack packet identification and packet rate calculation. A small sampling ratio makes the attack source tracing result accurate, but increases CPU usage.
For example, when the sampling ratio is set to 1, the attack source tracing result is accurate, but the CPU usage is high because every packet is analyzed. Therefore, balance between the attack defense precision and CPU usage when setting a sampling ratio.
Procedure
- Run system-view
The system view is displayed.
- Run cpu-defend policy policy-name
The attack defense policy view is displayed.
- Run auto-defend enable
Attack source tracing is enabled.
By default, attack source tracing is disabled.
- Run auto-defend attack-packet sample sample-value
The sampling ratio for attack source tracing is set.
By default, the packet sampling ratio is 8.
- Run commit
The configuration is committed.