Configuring TC Protection on a Switching Device
Context
If attackers send pseudo TC BPDUs to attack a switching device, the device receives a large number of TC BPDUs within a short time and frequently deletes MAC address entries and ARP entries. This wastes resources on the switching device and threatens network stability.
To suppress TC BPDUs, enable TC protection on a switching device and set the maximum number of TC BPDUs that the device can process within a given time period. If the number of TC BPDUs that the switching device receives within a given time period exceeds the specified threshold, the switching device processes only the specified number of TC BPDUs. After the specified time period expires, the switching devices process all the excess TC BPDUs together. This function prevents the switching device from frequently deleting MAC entries and ARP entries, protecting the switching device from being overburdened.
Procedure
- Run system-view
The system view is displayed.
- Run stp tc-protection
TC protection is enabled for the switching device.
By default, TC protection is disabled on the switching device.
- Run either
or both of the following commands to configure TC protection parameters.
To set the time period during which the device processes the maximum number of TC BPDUs, run stp tc-protection interval interval-value command.
By default, the time period is the Hello Time.
To set the maximum number of TC BPDUs that the device processes within a specified period, run stp tc-protection threshold threshold.
By default, a device processes one TC BPDU within a specified period.
There are two TC protection parameters: time period during which the device processes the maximum number of TC BPDUs and the maximum number of TC BPDUs processed within the time period. For example, if the time period is set to 10 seconds and the maximum number of TC BPDUs is set to 5, the device processes only the first five TC BPDUs within 10 seconds and processes the other TC BPDUs together 10 seconds later.
The device processes only the maximum number of TC BPDUs configured by the stp tc-protection threshold command within the time period configured by the stp tc-protection interval command. Other packets are processed after a delay, so spanning tree convergence speed may slow down.
- Run commit
The configuration is committed.