snmp-agent acl

Function

The snmp-agent acl command configures an ACL at SNMP protocol level.

The undo snmp-agent acl command deletes the ACL configuration at SNMP protocol level.

By default, no ACL is configured at SNMP protocol level.

Format

snmp-agent acl { acl-number | aclName }

undo snmp-agent acl

Parameters

Parameter Description Value
acl-number

Specifies a basic ACL number.

ACL number is an integer ranging from 2000 to 3999.

aclName

Specifies an ACL name.

If no matching rule is configured for the referenced ACL, the matching rule is permit by default.

The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive).

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
snmp write

Usage Guidelines

Usage Scenario

To improve security, run the snmp-agent acl command to allow only SNMP users included in ACL to access a specific device.

Configuration Impact

The snmp-agent acl command applies to both IPv4 and IPv6 packets.

Example

# Set an ACL rule numbered 2000.
<HUAWEI> system-view
[~HUAWEI] acl 2000
[*HUAWEI-acl4-basic-2000] quit
[*HUAWEI] snmp-agent acl 2000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >