< Home

acl (upgrade-compatible command)

Function

The acl command creates an ACL and enters the ACL view.

The undo acl command deletes a specified ACL.

Format

acl [ number ] acl-number [ name acl-name ]

undo acl { all | [ number ] acl-number | name acl-name }

Parameters

Parameter

Description

Value

number acl-number

Indicates the ID of an ACL.

The value of acl-number is an integer that ranges from 2000 to 5999.
  • ACLs numbered from 2000 to 2999 are basic ACLs.

  • ACLs numbered from 3000 to 3999 are advanced ACLs.

  • ACLs numbered from 4000 to 4999 are Layer 2 ACLs.

  • ACLs numbered from 5000 to 5999 are customized ACLs.

name acl-name

Specifies a named ACL.

The value of acl-name is a string of 1 to 32 case-sensitive characters without spaces. The name starts with a letter (case-sensitive) and can contain letters, digits, and symbols such as the number sign (#), percentage symbol (%), and hyphen (-).

all

Deletes all ACLs.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

An ACL consists of a list of rules. Each rule contains a permit or deny clause. Before creating an ACL rule, you must create an ACL.

Example

# Create an ACL named test and numbered 3100.

<HUAWEI> system-view
[HUAWEI] acl number 3100 name test
[HUAWEI-acl-adv-test]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >