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

NE20E-S2 V800R010C10SPC500 Configuration Guide - IP Services 01

This is NE20E-S2 V800R010C10SPC500 Configuration Guide - IP Services
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).
Configuring an Interface-based ACL

Configuring an Interface-based ACL

An interface-based ACL defines rules to filter packets.

Usage Scenario

Figure 3-1 Configuring an interface-based ACL
NOTE:

Interfaces 1 through 2 in this example are GE 0/1/0, GE 0/2/0, respectively.



As shown in Figure 3-1, an ACL based on GE 0/1/0 is created on Device A to allow Device A to permit all packets sent from Network A to the Internet and deny all packets sent from Network B to the Internet.

Configuration Procedures

Figure 3-2 Flowchart for configuring an interface-based ACL

(Optional) Creating a Validity Period for an ACL Rule

You can create a validity period for an ACL rule to control network traffic in a specified period.

Context

To control certain types of traffic in a specified period, you can configure the validity period of an ACL rule to determine the time traffic passes through. For example, to ensure reliable transmission of video traffic at prime time at night, limit the volume of traffic for common online users.

After this configuration task is performed, a time range is created. Then you can specify the time range as the validity period when creating an ACL rule.

The validity period of an ACL rule can be either of the following types:

  • Absolute time range: The validity period is fixed.

  • Relative time range: The validity period is a periodic period, for example, each Monday.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run time-range time-name { start-time to end-time days &<1-7> | from time1 date1 [ to time2 date2 ] }

    A validity period is created.

    • You can configure up to 256 time ranges.
    • Up to 32 relative time ranges (periodic time ranges) and 12 absolute time ranges can share one time range name.

  3. Run commit

    The configuration is committed.

Creating an Interface-based ACL

You can create an interface-based ACL and configure parameters for the ACL.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run acl { name interface-based-acl-name { interface | [ interface ] number interface-based-acl-number } | [ number ] interface-based-acl-number } [ match-order { config | auto } ]

    An interface-based ACL is created.

    The interface-based ACL number ranges from 1000 to 1999.

  3. (Optional) Run step step

    An ACL step is set.

    You can use an ACL step to maintain ACL rules and add new ACL rules conveniently.
    NOTE:
    Assume that a user has created four rules numbered from 1 to 4 in an ACL. The user can reconfigure the ACL step, for example, to 2 by running the step 2 command in the ACL view. The original rule numbers 1, 2, 3, and 4 are renumbered as 2, 4, 6, and 8, respectively. After that, the user can run the rule 3 command to add a rule numbered 3 between the renumbered rules 2 and 4.

  4. (Optional) Run description text

    The ACL description is configured.

    The description command configures a description for an ACL in any of the following situations:

    • A large number of ACLs are configured, and their functions are difficult to identify.
    • An ACL is used at a long interval, and its function may be left forgotten.
    • Names of named ACLs cannot fully explain the ACLs' functions.

  5. Run commit

    The configuration is committed.

Configuring an Interface-based ACL Rule

Interface-based ACL rules are defined based on packets' inbound interfaces to filter packets.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run acl { name interface-based-acl-name { interface | [ interface ] number interface-based-acl-number } | [ number ] interface-based-acl-number }

    The interface-based ACL view is displayed.

  3. Run rule [ rule-id ] [ name rule-name ] { permit | deny } interface { interface-type interface-number | any } [ time-range time-name ] *

    A rule is configured for the interface-based ACL.

    • Adding new rules to an ACL will not affect the existing rules.

    • When an existing rule is edited and the edited contents conflict with the original contents, the edited contents take effect.

    NOTE:

    When you configure an interface-based ACL:

    • If an interface is specified by configuring interface, the system filters only packets received by this specified interface.

    • If all interfaces are specified by configuring any, the system does not check packets' inbound interfaces, and considers that all packets have matched the rule and directly takes an action (deny or permit) on the packets.

    • If a validity period is specified by configuring time-range, the time range name specified by time-name must already exist. Otherwise, the rule configuration fails.

  4. (Optional) Run rule description text

    The description for an ACL rule is configured.

    The description of an ACL rule can contain the functions of the ACL rule. Configuring a description for an ACL rule is recommended to prevent misuse of the rule in the following situations:
    • A large number of ACLs are configured, and their functions are difficult to identify.
    • An ACL is used at a long interval, and its function may be left forgotten.

  5. Run commit

    The configuration is committed.

Verifying the Configuration of an Interface-based ACL

After configuring an interface-based ACL, verify the configuration.

Prerequisites

An interface-based ACL has been configured.

Procedure

  • Run the display acl { acl-number | name acl-name | all } command to check interface-based ACL configurations.
  • Run the display time-range { time-name | all } command to check the configuration of a specified or all validity periods.

Example

Run the display acl command. The command output shows the ACL number, ACL rule number, ACL step, and rule contents.

<HUAWEI> display acl 1200
Interface Based ACL 1200,1 rule
ACL's step is 5
rule 5 permit interface GigabitEthernet0/1/0 (1 times matched)

Run the display time-range command. The command output shows validity period configurations.

<HUAWEI> display time-range time1
Current time is 2006-3-15 14:19:16 Wednesday

Time-range : time1 ( Inactive )
 10:00 to 12:00 daily
Translation
Download
Updated: 2019-01-02

Document ID: EDOC1100055376

Views: 17626

Downloads: 35

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