SNMP の概要
簡易ネットワーク管理プロトコル(SNMP)は、SNMP マネージャとエージェント間の通信用メッセージ フォーマットを提供する、アプリケーションレイヤ プロトコルです。SNMP はネットワーク デバイスのモニタリングや管理のための標準化されたフレームワークと共通言語を提供します。
この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
簡易ネットワーク管理プロトコル(SNMP)は、SNMP マネージャとエージェント間の通信用メッセージ フォーマットを提供する、アプリケーションレイヤ プロトコルです。SNMP はネットワーク デバイスのモニタリングや管理のための標準化されたフレームワークと共通言語を提供します。
SNMP フレームワークは 3 つの部分で構成されます。
SNMP マネージャ:SNMP を使用してネットワーク デバイスのアクティビティを制御し、モニタリングするシステム。
SNMP エージェント: Cisco UCS 内のソフトウェア コンポーネント。 Cisco UCS のデータを維持し、必要に応じて SNMP マネージャにレポートします。Cisco UCS にはエージェントと MIB のコレクションが含まれます。SNMP エージェントを有効にしてマネージャとエージェント間のリレーションシップを作成するには、Cisco UCS Manager で SNMP を有効にして設定します。
Managed Information Base(MIB):SNMP エージェントの管理対象オブジェクトの集合。 Cisco UCS リリース 1.4(1) 以降では、それ以前のリリースより大量の MIB をサポートしています。
Cisco UCS は、SNMPv1、SNMPv2c、および SNMPv3 をサポートします。SNMPv1 および SNMPv2c はどちらも、コミュニティベース形式のセキュリティを使用します。SNMP は次のように定義されています。
RFC 3410(http://tools.ietf.org/html/rfc3410)
RFC 3411(http://tools.ietf.org/html/rfc3411)
RFC 3412(http://tools.ietf.org/html/rfc3412)
RFC 3413(http://tools.ietf.org/html/rfc3413)
RFC 3414(http://tools.ietf.org/html/rfc3414)
RFC 3415(http://tools.ietf.org/html/rfc3415)
RFC 3416(http://tools.ietf.org/html/rfc3416)
RFC 3417(http://tools.ietf.org/html/rfc3417)
RFC 3418(http://tools.ietf.org/html/rfc3418)
RFC 3584(http://tools.ietf.org/html/rfc3584)
SNMP の重要な機能の 1 つは、SNMP エージェントから通知を生成できることです。これらの通知では、要求を SNMP マネージャから送信する必要はありません。通知は、不正なユーザ認証、再起動、接続の切断、隣接ルータとの接続の切断、その他の重要なイベントを表示します。
Cisco UCS Manager は、トラップまたはインフォームとして SNMP 通知を生成します。SNMP マネージャはトラップ受信時に確認応答を送信せず、Cisco UCS Manager はトラップが受信されたかどうかを確認できないため、トラップの信頼性はインフォームよりも低くなります。インフォーム要求を受信する SNMP マネージャは、SNMP 応答プロトコル データ ユニット(PDU)でメッセージの受信を確認します。Cisco UCS Manager が PDU を受信しない場合、インフォーム要求を再送できます。
SNMPv1、SNMPv2c、および SNMPv3 はそれぞれ別のセキュリティ モデルを表します。セキュリティ モデルは選択されたセキュリティ レベルと組み合わされ、SNMP メッセージの処理中に適用されるセキュリティ メカニズムを決定します。
セキュリティ レベルは、SNMP トラップに関連付けられているメッセージを表示するために必要な権限を決定します。権限のレベルによって、メッセージが情報開示の保護を必要とするか、またはメッセージが認証されるかが決定されます。サポートされるセキュリティ レベルは、実装されているセキュリティ モデルによって異なります。SNMP セキュリティ レベルは、次の権限の 1 つ以上をサポートします。
noAuthNoPriv:認証なし、暗号化なし
authNoPriv:認証あり、暗号化なし
authPriv:認証あり、暗号化あり
SNMPv3 では、セキュリティ モデルとセキュリティ レベルの両方が提供されています。セキュリティ モデルは、ユーザおよびユーザが属するロールを設定する認証方式です。セキュリティ レベルとは、セキュリティ モデル内で許可されるセキュリティのレベルです。セキュリティ モデルとセキュリティ レベルの組み合わせにより、SNMP パケット処理中に採用されるセキュリティ メカニズムが決まります。
次の表に、セキュリティ モデルとレベルの組み合わせを示します。
モデル |
レベル |
認証 |
暗号化 |
結果 |
---|---|---|---|---|
v1 |
noAuthNoPriv |
コミュニティ ストリング |
未対応 |
コミュニティ ストリングの照合を使用して認証します。 |
v2c |
noAuthNoPriv |
コミュニティ ストリング |
未対応 |
コミュニティ ストリングの照合を使用して認証します。 |
v3 |
noAuthNoPriv |
ユーザ名 |
未対応 |
ユーザ名の照合を使用して認証します。 |
v3 |
authNoPriv |
HMAC-MD5 または HMAC-SHA |
未対応 |
Hash-Based Message Authentication Code(HMAC)メッセージ ダイジェスト 5(MD5)アルゴリズムまたは HMAC Secure Hash Algorithm(SHA)アルゴリズムに基づいて認証します。 |
v3 |
authPriv |
HMAC-MD5 または HMAC-SHA |
DES |
HMAC-MD5 アルゴリズムまたは HMAC-SHA アルゴリズムに基づいて認証します。データ暗号規格(DES)の 56 ビット暗号化、および暗号ブロック連鎖(CBC)DES(DES-56)標準に基づいた認証を提供します。 |
SNMPv3 は、ネットワーク経由のフレームの認証と暗号化を組み合わせることによって、デバイスへのセキュア アクセスを実現します。SNMPv3 は、管理操作および暗号化 SNMP メッセージを実行するために、設定されているユーザのみを承認します。SNMPv3 ユーザベース セキュリティ モデル(USM)は SNMP メッセージレベル セキュリティを参照し、次のサービスを提供します。
メッセージの完全性:メッセージが不正な方法で変更または破壊されていないこと、悪意なく起こり得る範囲を超えてデータ シーケンスが変更されていないことを保証します。
メッセージの発信元の認証:メッセージ送信者の ID を確認できることを保証します。
メッセージの機密性および暗号化:不正なユーザ、エンティティ、プロセスに対して情報を利用不可にしたり開示しないようにします。
Cisco UCS provides the following support for SNMP:
Cisco UCS supports read-only access to MIBs.
For information about the specific MIBs available for Cisco UCS and where you can obtain them, see the http://www.cisco.com/en/US/docs/unified_computing/ucs/sw/mib/b-series/b_UCS_MIBRef.html for B-series servers, and http://www.cisco.com/en/US/docs/unified_computing/ucs/sw/mib/c-series/b_UCS_Standalone_C-Series_MIBRef.html C-series servers.
Cisco UCS supports the following authentication protocols for SNMPv3 users:
HMAC-MD5-96 (MD5)
HMAC-SHA-96 (SHA)
Cisco UCS uses Advanced Encryption Standard (AES) as one of the privacy protocols for SNMPv3 message encryption and conforms with RFC 3826.
The privacy password, or priv option, offers a choice of DES or 128-bit AES encryption for SNMP security encryption. If you enable AES-128 configuration and include a privacy password for an SNMPv3 user, Cisco UCS Manager uses the privacy password to generate a 128-bit AES key. The AES privacy password can have a minimum of eight characters. If the passphrases are specified in clear text, you can specify a maximum of 64 characters.
Configuring SNMP
Cisco UCS ドメイン からの SNMP メッセージには、システム名ではなくファブリック インターコネクト名が表示されます。
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A# scope monitoring |
Enters monitoring mode. |
Step 2 |
UCS-A /monitoring # enable snmp |
Enables SNMP. |
Step 3 |
UCS-A /monitoring # set snmp community |
Enters snmp community mode. |
Step 4 |
UCS-A /monitoring # Enter a snmp community: community-name |
Specifies SNMP community. Use the community name as a password. The community name can be any alphanumeric string up to 32 characters. |
Step 5 |
UCS-A /monitoring # set snmp syscontact system-contact-name |
Specifies the system contact person responsible for the SNMP. The system contact name can be any alphanumeric string up to 255 characters, such as an email address or name and telephone number. |
Step 6 |
UCS-A /monitoring # set snmp syslocation system-location-name |
Specifies the location of the host on which the SNMP agent (server) runs. The system location name can be any alphanumeric string up to 512 characters. |
Step 7 |
UCS-A /monitoring # commit-buffer |
Commits the transaction to the system configuration. |
The following example enables SNMP, configures an SNMP community named SnmpCommSystem2, configures a system contact named contactperson, configures a contact location named systemlocation, and commits the transaction:
UCS-A# scope monitoring
UCS-A /monitoring # enable snmp
UCS-A /monitoring* # set snmp community
UCS-A /monitoring* # Enter a snmp community: SnmpCommSystem2
UCS-A /monitoring* # set snmp syscontact contactperson1
UCS-A /monitoring* # set snmp syslocation systemlocation
UCS-A /monitoring* # commit-buffer
UCS-A /monitoring #
Create SNMP traps and users.
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A# scope monitoring |
Enters monitoring mode. |
Step 2 |
UCS-A /monitoring # enable snmp |
Enables SNMP. |
Step 3 |
UCS-A /monitoring # create snmp-trap {hostname | ip-addr | ip6-addr} |
Creates an SNMP trap host with the specified host name, IPv4 address, or IPv6 address. The host name can be a fully qualified domain name of an IPv4 address. |
Step 4 |
UCS-A /monitoring/snmp-trap # set community community-name |
Specifies the SNMP community name to be used for the SNMP trap. |
Step 5 |
UCS-A /monitoring/snmp-trap # set port port-num |
Specifies the port to be used for the SNMP trap. |
Step 6 |
UCS-A /monitoring/snmp-trap # set version {v1 | v2c | v3} |
Specifies the SNMP version and model used for the trap. |
Step 7 |
(Optional) UCS-A /monitoring/snmp-trap # set notificationtype {traps | informs} |
(Optional)
The type of trap to send. If you select v2c or v3 for the version, this can be:
|
Step 8 |
(Optional) UCS-A /monitoring/snmp-trap # set v3 privilege {auth | noauth | priv} |
(Optional)
If you select v3 for the version, the privilege associated with the trap can be
|
Step 9 |
UCS-A /monitoring/snmp-trap # commit-buffer |
Commits the transaction to the system configuration. |
The following example enables SNMP, creates an SNMP trap using an IPv4 address, specifies that the trap will use the SnmpCommSystem2 community on port 2, sets the version to v3, sets the notification type to traps, sets the v3 privilege to priv, and commits the transaction:
UCS-A# scope monitoring
UCS-A /monitoring # enable snmp
UCS-A /monitoring* # create snmp-trap 100.10.111.112
UCS-A /monitoring/snmp-trap* # set community SnmpCommSystem2
UCS-A /monitoring/snmp-trap* # set port 2
UCS-A /monitoring/snmp-trap* # set version v3
UCS-A /monitoring/snmp-trap* # set notificationtype traps
UCS-A /monitoring/snmp-trap* # set v3 privilege priv
UCS-A /monitoring/snmp-trap* # commit-buffer
UCS-A /monitoring/snmp-trap #
The following example enables SNMP, creates an SNMP trap using an IPv6 address, specifies that the trap will use the SnmpCommSystem3 community on port 2, sets the version to v3, sets the notification type to traps, sets the v3 privilege to priv, and commits the transaction:
UCS-A# scope monitoring
UCS-A /monitoring # enable snmp
UCS-A /monitoring* # create snmp-trap 2001::1
UCS-A /monitoring/snmp-trap* # set community SnmpCommSystem3
UCS-A /monitoring/snmp-trap* # set port 2
UCS-A /monitoring/snmp-trap* # set version v3
UCS-A /monitoring/snmp-trap* # set notificationtype traps
UCS-A /monitoring/snmp-trap* # set v3 privilege priv
UCS-A /monitoring/snmp-trap* # commit-buffer
UCS-A /monitoring/snmp-trap #
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A# scope monitoring |
Enters monitoring mode. |
Step 2 |
UCS-A /monitoring # delete snmp-trap {hostname | ip-addr} |
Deletes the specified SNMP trap host with the specified hostname or IP address. |
Step 3 |
UCS-A /monitoring # commit-buffer |
Commits the transaction to the system configuration. |
The following example deletes the SNMP trap at IP address 192.168.100.112 and commits the transaction:
UCS-A# scope monitoring
UCS-A /monitoring # delete snmp-trap 192.168.100.112
UCS-A /monitoring* # commit-buffer
UCS-A /monitoring #
You can generate a test SNMP trap without making any software or physical configuration change to the system.
Command or Action | Purpose | |
---|---|---|
Step 1 |
connect nxos |
Connects to the NX-OS operating system software. |
Step 2 |
(nxos)# test pfm snmp test-trap ? |
Returns the list of test trap options. |
Step 3 |
(nxos)# test pfm snmp test-trap{fan | powersupply | temp_sensor} |
Generates a test SNMP trap.
|
While you run the NX-OS command, you can open another SSH session to the fabric interconnect and verify that SNMP packets are sent out from the fabric interconnect's management interface.
For complete packet:
(nxos)# ethanalyzer local interface mgmt capture-filter "udp port 162" limit-captured-frames 0 detail
To capture just packet headers
(nxos)# ethanalyzer local interface mgmt capture-filter "udp port 162" limit-captured-frames 0
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A# scope monitoring |
Enters monitoring mode. |
Step 2 |
UCS-A /monitoring # enable snmp |
Enables SNMP. |
Step 3 |
UCS-A /monitoring # create snmp-user user-name |
Creates the specified SNMPv3 user. An SNMP username cannot be the same as a local username. Choose an SNMP username that does not match a local username. |
Step 4 |
UCS-A /monitoring/snmp-user # set aes-128 {no | yes} |
Enables or disables the use of AES-128 encryption. |
Step 5 |
UCS-A /monitoring/snmp-user # set auth {md5 | sha} |
Specifies the use of MD5 or DHA authentication. |
Step 6 |
UCS-A /monitoring/snmp-user # set password |
Specifies the user password. After you enter the set password command, you are prompted to enter and confirm the password. |
Step 7 |
UCS-A /monitoring/snmp-user # set priv-password |
Specifies the user privacy password. After you enter the set priv-password command, you are prompted to enter and confirm the privacy password. |
Step 8 |
UCS-A /monitoring/snmp-user # commit-buffer |
Commits the transaction to the system configuration. |
The following example enables SNMP, creates an SNMPv3 user named snmp-user14, disables AES-128 encryption, specifies the use of MD5 authentication, sets the password and privacy password, and commits the transaction:
UCS-A# scope monitoring
UCS-A /monitoring # enable snmp
UCS-A /monitoring* # create snmp-user snmp-user14
UCS-A /monitoring/snmp-user* # set aes-128 no
UCS-A /monitoring/snmp-user* # set auth md5
UCS-A /monitoring/snmp-user* # set password
Enter a password:
Confirm the password:
UCS-A /monitoring/snmp-user* # set priv-password
Enter a password:
Confirm the password:
UCS-A /monitoring/snmp-user* # commit-buffer
UCS-A /monitoring/snmp-user #
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A# scope monitoring |
Enters monitoring mode. |
Step 2 |
UCS-A /monitoring # delete snmp-user user-name |
Deletes the specified SNMPv3 user. |
Step 3 |
UCS-A /monitoring # commit-buffer |
Commits the transaction to the system configuration. |
The following example deletes the SNMPv3 user named snmp-user14 and commits the transaction:
UCS-A# scope monitoring
UCS-A /monitoring # delete snmp-user snmp-user14
UCS-A /monitoring* # commit-buffer
UCS-A /monitoring #