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

Fat AP and Cloud AP V200R010C00 Command Reference

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).
traffic-filter (Interface view)

traffic-filter (Interface view)

Function

The traffic-filter command applies an ACL to an interface to filter packets on the interface.

The undo traffic-filter command cancels the configuration.

By default, no ACL is applied to an interface to filter packets on the interface.

Format

traffic-filter { inbound | outbound } acl { acl-number | name acl-name }

undo traffic-filter { inbound | outbound } acl { acl-number | name acl-name }

Parameters

Parameter

Description

Value

inbound

Configures ACL-based packet filtering in the inbound direction on an interface.

-

outbound

Configures ACL-based packet filtering in the outbound direction on an interface.

-

acl

Filters packets based on the IPv4 ACL.

-

acl-number

Specifies the number of an ACL.

The IPv4 ACL number ranges from 2000 to 4999 or 6000 to 6999,
  • The value of a basic ACL ranges from 2000 to 2999.
  • The value of an advanced ACL ranges from 3000 to 3999.
  • The value of a Layer 2 ACL ranges from 4000 to 4999.

    Layer 2 ACLs are not supported when this function is configured in the dialer interface view.

  • The value of a user defined ACL ranges from 6000 to 6999.

name acl-name

Filters packets based on a specified named ACL. acl-name specifies the name of the ACL.

The ACL name must exist.

The value range is the same as that of the acl-number parameter.

Views

VLANIF interface view, FE interface view, GE interface view, MultiGE interface view, Dialer interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the traffic-filter command is executed on an interface, the device filters packets matching ACL rules:

  • If the action in an ACL rule is deny, the device discards packets matching the rule.
  • If the action in an ACL rule is permit, the device forwards packets matching the rule.
  • If no rule is matched, packets are allowed to pass through.

Prerequisites

A named ACL has been created using the acl name command.

Precautions

The AD9431DN-24X does not support ACL-based packet filtering in the VLANIF interface view.

The traffic-filter command can reference an ACL with no rule configured. You can configure a rule for the ACL after running this command.

At most eight ACL rules can be configured for packet filtering in one direction. The rules take effect in the sequence in which they are configured. To improve match efficiency, you are advised to configure an ACL rule with a high match probability for packet filtering. When configuring each ACL rule, set a small ID for the rule with a high match probability, reducing the number of times ACL rules are matched and saving resources. To change the sequence in which packets are filtered based on ACLs, delete all related configurations and reconfigure ACL-based packet filtering.

Example

# On the VLANIF 100, configure packet filtering based on the ACL that permits packets with source IP address 192.168.0.2/32.
<Huawei> system-view
[Huawei] acl 3000
[Huawei-acl-adv-3000] rule 5 permit ip source 192.168.0.2 0
[Huawei-acl-adv-3000] quit
[Huawei] interface vlanif 100
[Huawei-Vlanif100] traffic-filter inbound acl 3000
Translation
Download
Updated: 2019-11-21

Document ID: EDOC1100064352

Views: 209268

Downloads: 122

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