< Home

snmp-agent acl

Function

The snmp-agent acl command configures an SNMP ACL.

The undo snmp-agent acl command deletes the configured SNMP ACL.

By default, no SNMP ACL is configured.

Format

snmp-agent acl acl-number

snmp-agent acl-ipv4 acl-number [ acl-ipv6 acl-number ]

snmp-agent acl-ipv6 acl-number

undo snmp-agent acl

Parameters

Parameter Description Value

acl-number

Specifies the basic or advanced standard access list.

The value is an integer ranging from 2000 to 3999.

acl-ipv4

Indicates a basic or advanced IPv4 ACL.

-

acl-ipv6

Indicates a basic or advanced IPv6 ACL.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When using the NMS to manage devices, you can run the snmp-agent acl command to configure an SNMP ACL on the devices and restrict the NMS's access to the devices to enhance network security.

Precautions

The SNMP ACLs take precedence over ACLs based on SNMP community names, SNMP groups, and SNMP users.

The ACL configured by the snmp-agent acl command takes effect on both IPv4 and IPv6 networks.

Precautions

The SNMP ACLs take precedence over ACLs based on SNMP community names, SNMP groups, and SNMP users.

If acl-ipv4 or acl-ipv6 is not specified, the configured ACL takes effect on both IPv4 and IPv6 networks.

To specify the same ACL on IPv4 and IPv6 networks, you can only run the snmp-agent acl acl-number command.

If the snmp-agent acl command is run more than once, the latest configuration overrides the previous one.

Example

# Configure SNMP ACL 2000 to allow NM stations that match rules defined in ACL 2000 to access the device using SNMP.

<sysname> system-view
[sysname] snmp-agent acl 2000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >