跳转到主内容

如何在集群模式 Data ONTAP 中启用 SNMP v3

Views:
164
Visibility:
Public
Votes:
0
Category:
clustered-data-ontap-8
Specialty:
CORE
Last Updated:

适用于

  • 集群模式 Data ONTAP 8.3
  • 集群模式 Data ONTAP 8.2
  • 集群模式 Data ONTAP 8.1
  • 集群模式 Data ONTAP 8

说明

本文包含在集群模式下启用和配置 SNMP v3 以及让 DFM 在集群模式 Data ONTAP 中识别 SNMP v3 的说明。

操作步骤

How to enable SNMP v3 in clustered Data ONTAP

按照下面的步骤进行操作:

1.为 SNMP 创建用户。角色可以是"只读"、"无"或"管理员"。

对于无密码

filer::*> security login create -username snmp -application snmp -authmethod usm -role admin

Please enter the authoritative entity's EngineID [local EngineID]:

Please choose an authentication protocol (none, md5, sha) [none]:

要使用 MD5 或 SHA 实现密码

filer::*> security login create -username md5 -application snmp -authmethod usm -role admin

Please enter the authoritative entity's EngineID [local EngineID]:

Please choose an authentication protocol (none, md5, sha) [none]: md5

Please enter authentication protocol password (minimum 8 characters long):

Please enter authentication protocol password again:

Please choose a privacy protocol (none, des) [none]:

要使用 DES 加密

filer::*> security login create -username des -application snmp -authmethod usm -role admin

Please enter the authoritative entity's EngineID [local EngineID]:

Please choose an authentication protocol (none, md5, sha) [none]: md5

Please enter authentication protocol password (minimum 8 characters long):

Please enter authentication protocol password again:

Please choose a privacy protocol (none, des) [none]: des

Please enter privacy protocol password (minimum 8 characters long):

Please enter privacy protocol password again:

注意:当 SNMP 主机的身份验证类型与为上面创建的 Enabled SNMPv3 用户帐户选择的类型 ( -authmethod) 不匹配时,将发生以下错误:

%Received a report pdu from remote host: Authentication failure (SNMPv3)

2.  验证用户已创建:

filer::*> security snmpusers -instance

User Name: des

Authentication Method: usm

Engine Id: 8000014603000000000000

Authentication Protocol: md5

Privacy Protocol: des

Security Group: readwrite

 

User Name: md5

Authentication Method: usm

Engine Id: 8000014603000000000000

Authentication Protocol: md5

Privacy Protocol: none

Security Group: readwrite

 

User Name: public

Authentication Method: community

Engine Id: 8000014603000000000000

Authentication Protocol: -

Privacy Protocol: -

Security Group: readonly

 

User Name: snmp

Authentication Method: usm

Engine Id: 8000014603000000000000

Authentication Protocol: none

Privacy Protocol: none

Security Group: readwrite

4 entries were displayed

 

3.  运行 snmpwalk  测试连通性:

注意:点击此处下载要运行的实用程序    SNMPWalk

使用 md5 或 sha 在 v3 上测试 snmpwalk 且不加密的语法:

snmpwalk -v [version] -a [auth_protocol] -A [password] -u [username] [hostname|IP]

例如:

snmpwalk -v 3 -a md5 -u md5 -A password21 10.10.10.10

使用 MD5 或 SHA 和 DES 加密测试 snmpwalk 的语法:

snmpwalk -v [version] -a [auth_protocol] -A [protocol_password] -u [username] -x [encryption] -A [encryption_password] [hostname|IP]

例如:

snmpwalk -v 3 -a MD5 -A password21 -l authNoPriv -u des -x DES -X password21 10.10.10.10

注意:在集群模式 Data ONTAP 8.1.1 及更高版本中,snmpwalk 命令需要     -l    选项。有关详细信息,请参见 BUG 498423

 

4.按照下面的步骤将集群添加到 DFM 中:

  • 按集群 IP 添加存储系统(通常为集群管理 IP):

dfm host add [IP_of_Cluster]

可以在此处获取对象 ID

  • 更改首选 SNMP 版本:

# dfm host get -q [ID_of_cluster]

host=cluster

hostLogin=

hostPassword=

hostPrimaryAddress=10.10.10.10

cpuTooBusyThreshold=95

cpuBusyThresholdInterval=00:15:00

hostAdminTransport=http

hostAdminPort=80

prefsnmpVersion=1 <-- set this

processHostIP=

autoClientStatEnabled=No

要设置选项:

dfm host set [ID_of_Cluster] optionname=[value]

例如:

# dfm host set 7553 prefsnmpVersion=3

主机群集 (7553) 的首选 SNMP 版本更改为 3。

为了使 XML 正常工作,请确保为具有登录功能的用户设置了 'hostlogin' 和 'hostpassword'。

  • 设置 SNMP v3 登录名和密码

# dfm snmp add -v 3 -U md5 -P password21 10.61.76.140/24

注意: DFM 中的 SNMP v3 需要带有密码的用户名(长度为八个字符)。不支持空白密码。

  • 测试 SNMP v3 与 DFM 的交互

# dfm host diag [ID_of_cluster}

例如:

# dfm host diag 7553

Network Connectivity

IP Address 10.10.10.10

Network (discovery disabled)

DNS Aliases Failed <--dependent on DNS

DNS Addresses Failed <--dependent on DNS

SNMPv1 Failed: No community name given for SNMPv1 communication <--this needs to be set separately if using SNMPv1

SNMP Community

SNMPv3 Passed (132 ms) <-this should pass

SNMPv3 Auth Protocol MDS

SNMPv3 Privacy Enabled No

SNMPv3 Username md5

SNMPsysName br3040c

SNMP sysObjectID .1.3.6.1.4.1.789.2.5 (Cluster)

ICMP Echo Passed (0 ms)

HTTP Passed (0 ms)

NDMP (login not set) Skipped

RSH timed out

SSH Passed (9702 ms)

RLM Skipped (hostRLMAddress is empty) XML (http port 80) Passed (28 ms)

 

追加信息

追加信息_text

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.