配置举例1. 组网需求
仅允许来自10.110.100.52和10.110.100.46的SNMP用户访问交换机。
2. 组网图
图3-3 对Switch的SNMP用户进行ACL控制
3. 配置步骤
# 定义基本访问控制列表和子规则。
system-view
System View: return to User View with Ctrl+Z.
[H3C] acl number 2000 match-order config
[H3C-acl-baisc-2000] rule 1 permit source 10.110.100.52 0
[H3C-acl-baisc-2000] rule 2 permit source 10.110.100.46 0
[H3C-acl-basic-2000] rule 3 deny source any
[H3C-acl-baisc-2000] quit
# 引用访问控制列表。
[H3C] snmp-agent community read H3C acl 2000
[H3C] snmp-agent group v3 H3Cgroup acl 2000
[H3C] snmp-agent usm-user v3 H3Cuser H3Cgroup acl 2000