Skip to main content
Cluster and storage switches
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

配置SNMPv3

贡献者

按照此操作步骤配置SNMPv3、此SNMPv3支持以太网交换机运行状况监控(CSHM)。

关于此任务

以下命令可在Broadcom BES-53248交换机上配置SNMPv3用户名:

  • 对于*no authentication (无身份验证)*: snmp-server user SNMPv3UserNoAuth NETWORK-OPERATOR noauth

  • 对于*MD5/SHA身份验证*: snmp-server user SNMPv3UserAuth NETWORK-OPERATOR [auth-md5|auth-sha]

  • 对于采用AES/DES加密的*MD5/SHA身份验证*: snmp-server user SNMPv3UserAuthEncrypt NETWORK-OPERATOR [auth-md5|auth-sha] [priv-aes128|priv-des]

以下命令会在ONTAP 端配置SNMPv3用户名:cluster1:::*> security login create -user-or-group-name SNMPv3用户-application snmp -authentication-method USM -remote-switch-ipaddress address

以下命令将使用CSHM建立SNMPv3用户名: cluster1::*> system switch ethernet modify -device DEVICE -snmp-version SNMPv3 -community-or-username SNMPv3_USER

步骤
  1. 在交换机上设置SNMPv3用户以使用身份验证和加密:

    show snmp status

    显示示例
    (sw1)(Config)# snmp-server user <username> network-admin auth-md5 <password> priv-aes128 <password>
    
    (cs1)(Config)# show snmp user snmp
    
         Name            Group Name      Auth Priv
                                         Meth Meth    Remote Engine ID
    ----------------- ------------------ ---- ------ -------------------------
    <username>        network-admin      MD5  AES128 8000113d03d8c497710bee
  2. 在ONTAP 端设置SNMPv3用户:

    security login create -user-or-group-name <username> -application snmp -authentication-method usm -remote-switch-ipaddress 10.231.80.212

    显示示例
    cluster1::*> security login create -user-or-group-name <username> -application snmp -authentication-method usm -remote-switch-ipaddress 10.231.80.212
    
    Enter the authoritative entity's EngineID [remote EngineID]:
    
    Which authentication protocol do you want to choose (none, md5, sha, sha2-256)
    [none]: md5
    
    Enter the authentication protocol password (minimum 8 characters long):
    
    Enter the authentication protocol password again:
    
    Which privacy protocol do you want to choose (none, des, aes128) [none]: aes128
    
    Enter privacy protocol password (minimum 8 characters long):
    Enter privacy protocol password again:
  3. 将CSHM配置为使用新SNMPv3用户进行监控:

    system switch ethernet show-all -device "sw1" -instance

    显示示例
    cluster1::*> system switch ethernet show-all -device "sw1 (b8:59:9f:09:7c:22)" -instance
    
                                       Device Name: sw1
                                        IP Address: 10.228.136.24
                                      SNMP Version: SNMPv2c
                                     Is Discovered: true
    DEPRECATED-Community String or SNMPv3 Username: -
               Community String or SNMPv3 Username: cshm1!
                                      Model Number: BES-53248
                                    Switch Network: cluster-network
                                  Software Version: 3.9.0.2
                         Reason For Not Monitoring: None  <---- should display this if SNMP settings are valid
                          Source Of Switch Version: CDP/ISDP
                                    Is Monitored ?: true
                       Serial Number of the Device: QTFCU3826001C
                                       RCF Version: v1.8X2 for Cluster/HA/RDMA
    
    cluster1::*>
    cluster1::*> system switch ethernet modify -device "sw1" -snmp-version SNMPv3 -community-or-username <username>
  4. 确认要使用新创建的SNMPv3用户查询的序列号与CSHM轮询周期完成后上一步中详述的序列号相同。

    system switch ethernet polling-interval show

    显示示例
    cluster1::*> system switch ethernet polling-interval show
             Polling Interval (in minutes): 5
    
    cluster1::*> system switch ethernet show-all -device "sw1" -instance
                                       Device Name: sw1
                                        IP Address: 10.228.136.24
                                      SNMP Version: SNMPv3
                                     Is Discovered: true
    DEPRECATED-Community String or SNMPv3 Username: -
               Community String or SNMPv3 Username: <username>
                                      Model Number: BES-53248
                                    Switch Network: cluster-network
                                  Software Version: 3.9.0.2
                         Reason For Not Monitoring: None  <---- should display this if SNMP settings are valid
                          Source Of Switch Version: CDP/ISDP
                                    Is Monitored ?: true
                       Serial Number of the Device: QTFCU3826001C
                                       RCF Version: v1.8X2 for Cluster/HA/RDMA