Skip to main content
Cluster and storage switches
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

設定 SNMPv3

貢獻者

請遵循此程序來設定支援乙太網路交換器健全狀況監控( CSHM )的 SNMPv3 。

關於這項工作

下列命令可在 Cisco 92300YC 交換器上設定 SNMPv3 使用者名稱:

  • 若為 * 無驗證 * : snmp-server user SNMPv3_USER NoAuth

  • 對於 *MD5/SHA 驗證 * : snmp-server user SNMPv3_USER auth [md5|sha] AUTH-PASSWORD

  • 對於採用 AES/DES 加密的 * MD5/SHA 驗證 * : snmp-server user SNMPv3_USER AuthEncrypt auth [md5|sha] AUTH-PASSWORD priv aes-128 PRIV-PASSWORD

下列命令可在ONTAP Sfeside上設定一個v3使用者名稱:「cluster1::*>安全登入create -user-or group name MPv2_user-applicationSNMP -imize-method USM -reme-switch-ipaddress_address_」

下列命令會使用 CSHM 建立 SNMPv3 使用者名稱: cluster1::*> system switch ethernet modify -device DEVICE -snmp-version SNMPv3 -community-or-username SNMPv3_USER

步驟
  1. 設定交換器上的v3使用者使用驗證和加密:

    show snmp user

    顯示範例
    (sw1)(Config)# snmp-server user SNMPv3User auth md5 <auth_password> priv aes-128 <priv_password>
    
    (sw1)(Config)# show snmp user
    
    -----------------------------------------------------------------------------
                                  SNMP USERS
    -----------------------------------------------------------------------------
    
    User              Auth            Priv(enforce)   Groups          acl_filter
    ----------------- --------------- --------------- --------------- -----------
    admin             md5             des(no)         network-admin
    SNMPv3User        md5             aes-128(no)     network-operator
    
    -----------------------------------------------------------------------------
         NOTIFICATION TARGET USERS (configured  for sending V3 Inform)
    -----------------------------------------------------------------------------
    
    User              Auth               Priv
    ----------------- ------------------ ------------
    
    (sw1)(Config)#
  2. 設定位在邊上的v3使用者ONTAP :

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

    顯示範例
    cluster1::*> system switch ethernet modify -device "sw1 (b8:59:9f:09:7c:22)" -is-monitoring-enabled-admin true
    
    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" -instance
    
                                       Device Name: sw1
                                        IP Address: 10.231.80.212
                                      SNMP Version: SNMPv2c
                                     Is Discovered: true
       SNMPv2c Community String or SNMPv3 Username: cshm1!
                                      Model Number: N9K-C92300YC
                                    Switch Network: cluster-network
                                  Software Version: Cisco Nexus Operating System (NX-OS) Software, Version 9.3(7)
                         Reason For Not Monitoring: None  <---- displays when 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>
    cluster1::*>
  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.231.80.212
                                      SNMP Version: SNMPv3
                                     Is Discovered: true
       SNMPv2c Community String or SNMPv3 Username: SNMPv3User
                                      Model Number: N9K-C92300YC
                                    Switch Network: cluster-network
                                  Software Version: Cisco Nexus Operating System (NX-OS) Software, Version 9.3(7)
                         Reason For Not Monitoring: None  <---- displays when 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::*>