Denial of Service Commands
Use these commands to configure Denial of Service (DoS) Control.
The switch provides support for classifying and blocking specific types of Denial of Service attacks. You can configure your system to monitor and block these types of attacks:
- SIP = DIP. Source IP address = Destination IP address.
- First Fragment. TCP Header size smaller than configured value.
- TCP Fragment. Allows the device to drop packets that have a TCP payload where the IP payload length minus the IP header size is less than the minimum allowed TCP header size.
- TCP Flag. TCP Flag SYN set and Source Port < 1024 or TCP Control Flags = 0 and TCP Sequence Number = 0 or TCP Flags FIN, URG, and PSH set and TCP Sequence Number = 0 or TCP Flags SYN and FIN set.
- L4 Port. Source TCP/UDP Port = Destination TCP/UDP Port.
- ICMP. Limiting the size of ICMP Ping packets.
- SMAC = DMAC. Source MAC address = Destination MAC address.
- TCP Port. Source TCP Port = Destination TCP Port.
- UDP Port. Source UDP Port = Destination UDP Port.
- TCP Flag & Sequence. TCP Flag SYN set and Source Port < 1024 or TCP Control Flags = 0 and TCP Sequence Number = 0 or TCP Flags FIN, URG, and PSH set and TCP Sequence Number = 0 or TCP Flags SYN and FIN set.
- TCP Offset. Allows the device to drop packets that have a TCP header Offset set to 1.
- TCP SYN. TCP Flag SYN set.
- TCP SYN & FIN. TCP Flags SYN and FIN set.
- TCP FIN & URG & PSH. TCP Flags FIN and URG and PSH set and TCP Sequence Number = 0.
- ICMP V6. Limiting the size of ICMPv6 Ping packets.
- ICMP Fragment. Checks for fragmented ICMP packets.
dos-control all
M4250
M4350
This command enables Denial of Service protection checks globally.
| Default | disabled |
| Format | dos-control all |
| Mode | Global Config |
no dos-control all
This command disables Denial of Service prevention checks globally.
| Format | no dos-control all |
| Mode | Global Config |
dos-control sipdip
M4250
M4350
This command enables Source IP address = Destination IP address (SIP = DIP) Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with SIP = DIP, the packets are dropped if the mode is enabled.
| Default | disabled |
| Format | dos-control sipdip |
| Mode | Global Config |
no dos-control sipdip
This command disables Source IP address = Destination IP address (SIP = DIP) Denial of Service prevention.
| Format | no dos-control sipdip |
| Mode | Global Config |
dos-control firstfrag
M4250
M4350
This command enables Minimum TCP Header Size Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with a TCP Header Size smaller than the configured value, the packets are dropped if the mode is enabled. The default is disabled. The range is 0–255. If you enable the dos-control firstfrag command but do not provide a minimum TCP header size, the switch sets the value to 20.
| Default | disabled (20) |
| Format | dos-control firstfrag [size] |
| Mode | Global Config |
no dos-control firstfrag
This command sets Minimum TCP Header Size Denial of Service protection to the default value of disabled.
| Format | no dos-control firstfrag |
| Mode | Global Config |
dos-control tcpfrag
M4250
M4350
This command enables TCP Fragment Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack and packets with a TCP payload in which the IP payload length minus the IP header size is less than the minimum allowed TCP header size are dropped.
| Default | disabled |
| Format | dos-control tcpfrag |
| Mode | Global Config |
no dos-control tcpfrag
This command disables TCP Fragment Denial of Service protection.
| Format | no dos-control tcpfrag |
| Mode | Global Config |
dos-control tcpflag
M4250
M4350
This command enables TCP Flag Denial of Service protections. If the mode is enabled, Denial of Service prevention is active for this type of attack.
If the mode is enabled, packets that ingress with one of the following conditions are dropped:
- The TCP Flag SYN is set and the source port number is lower than 1024
- The TCP Control Flag is set to 0 and the TCP Sequence Number is set to 0
- The TCP Flags FIN, URG, and PSH are set and the TCP Sequence Number is set to 0
- The TCP Flags SYN and FIN are both set
| Default | disabled |
| Format | dos-control tcpflag |
| Mode | Global Config |
no dos-control tcpflag
This command disables TCP Flag Denial of Service protections.
| Format | no dos-control tcpflag |
| Mode | Global Config |
dos-control l4port
M4250
M4350
This command enables L4 Port Denial of Service protections. If the mode with a Source TCP/UDP Port Number equal to the Destination TCP/UDP Port Number, the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control l4port |
| Mode | Global Config |
no dos-control l4port
This command disables L4 Port Denial of Service protections.
| Format | no dos-control l4port |
| Mode | Global Config |
dos-control port-ddisable
M4250
M4350
This command moves an interface that is under DoS attack to the D-Disable state. In the D-Disable state, the interface is not able to receive or send data packets. To use the interface again, manually reenable the port or configure auto-recovery.
| Default | Disabled |
| Format | dos-control port-ddisable |
| Mode | Global Config |
no dos-control port-ddisable
This command moves an interface that is or was under DoS attack out of the D-Disable state.
| Format | no dos-control port-ddisable |
| Mode | Global Config |
dos-control smacdmac
M4250
M4350
This command enables Source MAC address = Destination MAC address (SMAC = DMAC) Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with SMAC = DMAC, the packets are dropped if the mode is enabled.
| Default | disabled |
| Format | dos-control smacdmac |
| Mode | Global Config |
no dos-control smacdmac
This command disables Source MAC address = Destination MAC address (SMAC = DMAC) DoS protection.
| Format | no dos-control smacdmac |
| Mode | Global Config |
dos-control tcpport
M4250
M4350
This command enables TCP L4 source = destination port number (Source TCP Port = Destination TCP Port) Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with Source TCP Port = Destination TCP Port, the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control tcpport |
| Mode | Global Config |
no dos-control tcpport
This command disables TCP L4 source = destination port number (Source TCP Port = Destination TCP Port) Denial of Service protection.
| Format | no dos-control tcpport |
| Mode | Global Config |
dos-control udpport
M4250
M4350
This command enables UDP L4 source = destination port number (Source UDP Port = Destination UDP Port) DoS protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with Source UDP Port = Destination UDP Port, the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control udpport |
| Mode | Global Config |
no dos-control udpport
This command disables UDP L4 source = destination port number (Source UDP Port = Destination UDP Port) Denial of Service protection.
| Format | no dos-control udpport |
| Mode | Global Config |
dos-control tcpflagseq
M4250
M4350
This command enables TCP Flag and Sequence Denial of Service protections. If the mode is enabled, Denial of Service prevention is active for this type of attack.
If the mode is enabled, packets that ingress with one of the following conditions are dropped:
- The TCP Flag SYN is set and the source port number is lower than 1024
- The TCP Control Flag is set to 0 and the TCP Sequence Number is set to 0
- The TCP Flags FIN, URG, and PSH are set and the TCP Sequence Number is set to 0
- The TCP Flags SYN and FIN are both set
| Default | Disabled |
| Format | dos-control tcpflagseq |
| Mode | Global Config |
no dos-control tcpflagseq
This command disables TCP Flag and Sequence Denial of Service protection.
| Format | no dos-control tcpflagseq |
| Mode | Global Config |
dos-control tcpoffset
M4250
M4350
This command enables TCP Offset Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with the TCP Header Offset set equal to one (1), the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control tcpoffset |
| Mode | Global Config |
no dos-control tcpoffset
This command disables TCP Offset Denial of Service protection.
| Format | no dos-control tcpoffset |
| Mode | Global Config |
dos-control tcpsyn
M4250
M4350
This command enables TCP SYN and L4 source = 0-1023 Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with the TCP flag SYN set and an L4 source port from 0 to 1023, the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control tcpsyn |
| Mode | Global Config |
no dos-control tcpsyn
This command disables TCP SYN and L4 source = 0-1023 Denial of Service protection.
| Format | no dos-control tcpsyn |
| Mode | Global Config |
dos-control tcpsynfin
M4250
M4350
This command enables TCP SYN and FIN Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with the TCP flags SYN and FIN set, the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control tcpsynfin |
| Mode | Global Config |
no dos-control tcpsynfin
This command disables TCP SYN & FIN Denial of Service protection.
| Format | no dos-control tcpsynfin |
| Mode | Global Config |
dos-control tcpfinurgpsh
M4250
M4350
This command enables TCP FIN and URG and PSH and SEQ = 0 checking Denial of Service protections. If the mode is enabled, Denial of Service prevention is active for this type of attack. If packets ingress with the TCP FIN, URG, and PSH flags set and the TCP Sequence Number set to 0, the packets are dropped if the mode is enabled.
| Default | Disabled |
| Format | dos-control tcpfinurgpsh |
| Mode | Global Config |
no dos-control tcpfinurgpsh
This command disables TCP FIN and URG and PSH and SEQ = 0 checking Denial of Service protections.
| Format | no dos-control tcpfinurgpsh |
| Mode | Global Config |
dos-control icmpv4
M4250
M4350
This command enables Maximum ICMPv4 Packet Size Denial of Service protections. If the mode is enabled, Denial of Service prevention is active for this type of attack. If ICMPv4 Echo Request (PING) packets ingress with a size greater than the configured value, the packets are dropped if the mode is enabled. The value for the size is from 0–16376.
| Default | Disabled (512) |
| Format | dos-control icmpv4 [size] |
| Mode | Global Config |
no dos-control icmpv4
This command disables Maximum ICMP Packet Size Denial of Service protections.
| Format | no dos-control icmpv4 |
| Mode | Global Config |
dos-control icmpv6
M4250
M4350
This command enables Maximum ICMPv6 Packet Size Denial of Service protections. If the mode is enabled, Denial of Service prevention is active for this type of attack. If ICMPv6 Echo Request (PING) packets ingress with a size greater than the configured value, the packets are dropped if the mode is enabled. The value for the size is from 0–16376.
| Default | Disabled (512) |
| Format | dos-control icmpv6 [size] |
| Mode | Global Config |
no dos-control icmpv6
This command disables Maximum ICMP Packet Size Denial of Service protections.
| Format | no dos-control icmpv6 |
| Mode | Global Config |
dos-control icmpfrag
M4250
M4350
This command enables ICMP Fragment Denial of Service protection. If the mode is enabled, Denial of Service prevention is active for this type of attack. If fragmented ICMP packets ingress, the packets are dropped if the mode is enabled.
| Default | disabled |
| Format | dos-control icmpfrag |
| Mode | Global Config |
no dos-control icmpfrag
This command disables ICMP Fragment Denial of Service protection.
| Format | no dos-control icmpfrag |
| Mode | Global Config |
dos-control vlan0tagged-snap
M4250
M4350
This command enables the vlan0-tagged and snap mode to forward or drop vlan0-tagged packets and snap packets for security measures.
| Default | disabled |
| Format | dos-control vlan0tagged-snap |
| Mode | Global Config |
no dos-control vlan0tagged-snap
This command disables the vlan0-tagged and snap mode.
| Format | no dos-control vlan0tagged-snap |
| Mode | Global Config |
show dos-control
M4250
M4350
This command displays Denial of Service configuration information.
| Format | show dos-control |
| Mode |
Global Config Privileged EXEC |
| Term | Definition |
|---|---|
| Port D-disable mode | The port is administratively down. By default, this option is disabled. |
| First Fragment Mode | The administrative mode of First Fragment DoS prevention. If enabled, the switch drops packets that have a TCP header smaller than the configured Min TCP Hdr Size. |
| Min TCP Hdr Size | The minimum TCP header size that is accepted if First Fragment DoS prevention is enabled. |
| ICMPv4 Mode | The administrative mode of ICMPv4 DoS prevention. If enabled, the switch drops ICMP packets that have a type set to ECHO_REQ (ping) and a size greater than the configured ICMPv4 Payload Size. |
| Max ICMPv4 Payload Size | The maximum ICMPv4 payload size that is accepted if ICMPv4 DoS protection is enabled. |
| ICMPv6 Mode | The administrative mode of ICMPv6 DoS prevention. If enabled, the switch drops ICMP packets that have a type set to ECHO_REQ (ping) and a size greater than the configured ICMPv6 Payload Size. |
| Max ICMPv6 Payload Size | The maximum ICMPv6 payload size that is accepted if ICMPv6 DoS protection is enabled. |
| ICMPv4 Fragment Mode | The administrative mode of ICMPv4 Fragment DoS prevention. If enabled, the switch drops fragmented ICMPv4 packets. |
| TCP Port Mode | The administrative mode of TCP Port DoS prevention. If enabled, the switch drops packets that have the TCP source port equal to the TCP destination port. |
| UDP Port Mode | The administrative mode of UDP Port DoS prevention. If enabled, the switch drops packets that have the UDP source port equal to the UDP destination port. |
| SIPDIP Mode | The administrative mode of SIP=DIP DoS prevention. If enabled, the switch drops packets that have a source IP address equal to the destination IP address. |
| SMACDMAC Mode | The administrative mode of SMAC=DMAC DoS prevention. If enabled, the switch drops packets that have a source MAC address equal to the destination MAC address. |
| TCP FIN&URG& PSH Mode | The administrative mode of TCP FIN & URG & PSH DoS prevention. If enabled, the switch drops packets that have the TCP flags FIN, URG, and PSH set and TCP Sequence Number = 0. |
| TCP Flag & Sequence Mode | The administrative mode of TCP Flag DoS prevention. If enabled, the switch drops packets that have the TCP control flags set to 0 and TCP sequence number set to 0. |
| TCP SYN Mode | The administrative mode of TCP SYN DoS prevention. If enabled, the switch drops packets that have the TCP Flags SYN set. |
| TCP SYN & FIN Mode | The administrative mode of TCP SYN & FIN DoS prevention. If enabled, the switch drops packets that have the TCP Flags SYN and FIN set. |
| TCP Fragment Mode | The administrative mode of TCP Fragment DoS prevention. If enabled, the switch drops packets that have a TCP payload in which the IP payload length minus the IP header size is less than the minimum allowed TCP header size. |
| TCP Offset Mode | The administrative mode of TCP Offset DoS prevention. If enabled, the switch drops packets that have a TCP header Offset equal to 1. |
| Stacked VLAN0 tag drop mode | Packets are discarded if they contain stacked VLAN tags and the inner VLAN tag does not match an allowed list. By default, this option is disabled. |
auto-dos
M4250
M4350
This command enables Auto-DoS on the switch. By default, Auto-DoS is disabled.
When you enable Auto-DoS, all denial of service (DoS) checks are activated. If the switch detects a DoS attack, the offending packets are copied to the CPU and Auto-DoS shuts down the port and moves the port to the diagnostically disabled state. To use the port again, you must manually reenable the port.
| Format | auto-dos |
| Mode | Global Config |
no auto-dos
This command disables Auto-DoS on the switch.
| Format | no auto-dos |
| Mode | Global Config |
show auto-dos
M4250
M4350
The output of this command shows whether Auto-DoS is enabled on the switch.
| Format | show auto-dos |
| Mode |
Global Config Privileged EXEC |