Configuring a Blacklist
Context
A blacklist is a group of users with particular characteristics. The device discards packets from users in the blacklist. You can apply an ACL to a blacklist.
- Basic ACL: source, time-range
- Advanced ACL: protocol, source, time-range, ttl-expired, source-port, destination-port
- Layer 2 ACL: source-mac, time-range, type, vlan
- Basic ACL6: source, time-range
- Advanced ACL6: protocol, source, time-range, source-port, icmp6-type, destination-port
- Basic ACL: vpn-instance
- Advanced ACL: vpn-instance, icmp-type, and igmp-type
- Layer 2 ACL: 802.3
- Basic ACL6: vpn-instance
- Advanced ACL6: destination, vpn-instance, and icmpv6-type
- Basic ACL: vpn-instance
- Advanced ACL: vpn-instance
- Layer 2 ACL: 802.3
- Basic ACL6: vpn-instance
- Advanced ACL6: destination, dscp, and vpn-instance
For the CE12800 running V200R002C50 and later versions, the blacklist no longer supports advanced ACLs with the source port number and TCP flag as matching rules. If a blacklist using the source port number or TCP flag as a matching rule is configured on a switch running a version earlier than V200R002C50, the blacklist becomes invalid after the switch is upgraded to V200R002C50 or a later version.
Procedure
- Run system-view
The system view is displayed.
- Run cpu-defend policy policy-name
The attack defense policy view is displayed.
- Run blacklist blacklist-id acl { acl-number | ipv6 acl6-number } [ interface { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-8> ] [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-8> ]
A blacklist is created.
A maximum of eight blacklists can be configured on the device.
The ACL applied to a blacklist can be a basic ACL, an advanced ACL, an ARP-based ACL, a basic ACL6, an advanced ACL6, or a Layer 2 ACL. For details on how to create an ACL, see ACL Configuration.
By default, no blacklist is configured on the device.
During configuration restoration, the blacklists are restored in the ascending order of blacklist IDs (blacklist-id).
For CE12800, the ACL applied to a blacklist cannot be an ARP-based ACL.
- Run commit
The configuration is committed.