No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Typical Configuration Examples

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Using User-Defined ACLs to Filter the Specified Packets

Using User-Defined ACLs to Filter the Specified Packets

Applicable Products and Versions

This example applies to the CE12800/CE6800/CE5800 V100R001C00 or later.

This example applies to the CE7800 V100R003C00 or later.

This example applies to the CE8800 V100R006C00 or later.

This example applies to the CE12800E V200R002C50 or later.

Networking Requirements

As shown in Figure 2-58, users are connected to the Switch through 10GE1/0/1. The Switch needs to discard certain packets sent by users (four bytes behind the 14th byte in the packet match 0x0180C200).

Figure 2-58 Using user-defined ACLs to filter the specified packets

Configuration Roadmap

The following configurations are performed on the Switch. The configuration roadmap is as follows:

  1. Configure a user-defined ACL and an ACL-based traffic classifier to filter certain packets (four bytes behind the 14th byte in the packet match 0x0180C200).
  2. Configure a traffic behavior to discard the packets matching the ACL.
  3. Configure and apply a traffic policy to make the ACL and traffic behavior take effect.

Procedure

  1. Configure a user-defined ACL.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*Switch] acl 5000
    [*Switch-acl-user-5000] rule deny l2-head 0x0180C200 0xFFFFFFFF 14
    [*Switch-acl-user-5000] quit

  2. Creating a traffic classifier based on the user-defined ACL.

    [*Switch] traffic classifier tc1
    [*Switch-classifier-tc1] if-match acl 5000
    [*Switch-classifier-tc1] quit

  3. Configure the traffic behavior tb1 to reject packets.

    [*Switch] traffic behavior tb1
    [*Switch-behavior-tb1] deny
    [*Switch-behavior-tb1] quit

  4. Define the traffic policy and associate the traffic classifier and traffic behavior with the traffic policy.

    [*Switch] traffic policy tp1
    [*Switch-trafficpolicy-tp1] classifier tc1 behavior tb1
    [*Switch-trafficpolicy-tp1] quit

  5. Apply the traffic policy to an interface.

    [*Switch] interface 10ge 1/0/1
    [*Switch-10GE1/0/1] traffic-policy tp1 inbound
    [*Switch-10GE1/0/1] quit
    [*Switch] commit

Verifying the Configuration

  1. Check the configuration of the ACL.

    [~Switch] display acl 5000
    User ACL 5000, 1 rule
    ACL's step is 5
     rule 5 deny 0x0180c200 0xffffffff 14 (0 times matched)
  2. Check the configuration of the traffic classifier.

    [~Switch] display traffic classifier tc1
      Traffic Classifier Information:
        Classifier: tc1
          Type: OR
          Rule(s):
            if-match acl 5000
  3. Check the configuration of the traffic policy.

    [~Switch] display traffic policy tp1
      Traffic Policy Information:
        Policy: tp1
          Classifier: tc1
            Type: OR
          Behavior: tb1
            Deny

Configuration Files

Configuration file of the Switch

#
sysname Switch
#
acl number 5000
 rule 5 deny 0x0180c200 0xffffffff 14
#
traffic classifier tc1 type or
 if-match acl 5000
#
traffic behavior tb1
 deny
#
traffic policy tp1
 classifier tc1 behavior tb1 precedence 5
#
interface 10GE1/0/1
 traffic-policy tp1 inbound
#
return
Download
Updated: 2019-04-03

Document ID: EDOC1000039339

Views: 105603

Downloads: 7472

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next