サービスの改善にご協力お願いします。

お客様のご意見をお聞かせください。

アンケートの所要時間はおよそ 2 分です。

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
ネットワーク管理と監視ガイド
Table of Contents Expand all
list Table of Contents

この機械翻訳はお役に立ちましたでしょうか?

starstarstarstarstar
Go to English page
免責事項:

このページは、サードパーティー製機械翻訳ソフトウェアを使用して翻訳されます。質の高い翻訳を提供するために合理的な対応はされていますが、ジュニパーネットワークスがその正確性を保証することはできかねます。この翻訳に含まれる情報の正確性について疑問が生じた場合は、英語版を参照してください. ダウンロード可能なPDF (英語版のみ).

SNMPv3の設定

date_range 19-Jan-25

QFX3500スイッチは、SNMPバージョン3(SNMPv3)をサポートします。SNMPv3では、ユーザー認証とデータ暗号化をサポートしており、SNMPv1とSNMPv2cの機能が強化されています。SNMPv3では、ユーザーベースのセキュリティモデル(USM)を使用することでSNMPメッセージにセキュリティを提供し、ビューベースのアクセス制御モデル(VACM)を使用してユーザーアクセス制御を提供します。

SNMPv3の機能は次のとおりです:

  • USMを使用すると、SNMPマネージャとエージェント間のSNMPメッセージで、メッセージ ソースが認証され、データの整合性を確認することができます。USMは、タイムアウト制限を適用し、重複するメッセージ要求IDをチェックすることにより、メッセージングの遅延とメッセージの再生を削減します。

  • VACMは、エージェントにSNMPクエリーのユーザーアクセス制御を提供することで、USMを補完します。1 人以上のユーザーのグループに拡張するアクセス権を定義します。アクセス権は、セキュリティモデルパラメーター(usmv1、またはv2)とセキュリティレベルパラメーター(authenticationprivacy、またはnone)によって決定されます。各セキュリティレベルに対して、グループのMIBビューを1つ関連付ける必要があります。MIBビューをグループに関連付けることで、グループのMIBオブジェクトのセットに対する読み取り、書き込み、または通知のアクセス許可が付与されます。

  • ユーザー名、認証の種類と認証パスワード、プライバシーの種類とプライバシーパスワードなど、各ユーザーのセキュリティパラメーターを設定します。各ユーザーに与えられるユーザー名は、そのユーザーに対して構成されたセキュリティモデルに依存する形式です。

  • メッセージングのセキュリティを確保するために、セキュリティ名と呼ばれる別のタイプのユーザー名が、ローカルSNMPサーバーと送信先SNMPサーバー間に送信されるメッセージングデータに含まれます。各ユーザー名はセキュリティ名にマップされますが、セキュリティ名はセキュリティモデルには依存しない形式で作成されます。

  • SNMPv3のトラップエントリーは、通知、通知フィルター、ターゲットアドレス、およびターゲットパラメーターを設定することで作成されます。notifyステートメントは、通知のタイプ(トラップ)を指定し、トラップを受信するターゲットアドレスセットを定義する単一のタグが含まれます。通知フィルターは、トラップのオブジェクト識別子 (OID) の集合体へのアクセスを定義します。ターゲットアドレスは、SNMP管理アプリケーションのアドレスと、通知の送信に使用されるその他の属性を定義します。ターゲットパラメーターは、特定のターゲットに通知を送信するときに使用するメッセージ処理とセキュリティパラメーターを定義します。

SNMPv3 を設定するには、以下のタスクを実行します。

注:

SNMPv3は、認証キーと暗号化キーと共にUSMを使用することにより、SNMPメッセージのセキュリティを強化します。そのため、SNMPv3 を使用してルーターまたはスイッチにクエリを実行するときに、外部マシンを制限する必要はありません。そのため、Junos OSまたはJunos OS EvolvedでのSNMPv3設定は、アクセス制限のクライアントリストをサポートしていません。

しかしながら、SNMPv2はコミュニティ文字列ベースのアクセスに依存するため、特定のクライアントマシンがSNMPクエリーを送信できるようにするには、クライアントリストを使用する必要があります。

SNMPv3ユーザーを作成する

各 SNMPv3 ユーザーに対して、ユーザー名、認証タイプ、認証パスワード、プライバシ タイプ、プライバシ パスワードを指定できます。ユーザーがパスワードを入力すると、エンジンIDとパスワードに基づくキーが生成され、構成ファイルに書き込まれます。キーの生成後、この設定ファイルからパスワードを削除できます。

SNMPv3ユーザー1つにつき、暗号化タイプは1つだけ設定できます。

ユーザーを作成するには、[edit snmp v3 usm local-engine]階層レベルでuserステートメントを記述します。

ユーザー認証と暗号化を設定するには、[edit snmp v3 usm local-engine user username]階層レベルで次のステートメントを記述します。

Junos OS搭載デバイスにおけるSNMPv3の最小構成

SNMPv3を最小要件で設定するには、[edit snmp v3]および[edit snmp]階層レベルで次のステートメントを記述します。

[edit snmp view-name] 階層レベルで少なくとも1つのビュー(通知、読み取りまたは書き込み)を設定する必要があります。

  1. ユーザーを作成し、認証を設定します。
    user@host# set snmp v3 usm local-engine user superuser authentication-md5 authentication-password 12345678
    user@host#set snmp v3 usm local-engine user superuser privacy-aes128 privacy-password 12345678
  2. グループへのアクセス権限を設定します。
    user@host# set snmp v3 vacm access group supergroup default-context-prefix security-model usm security-level authentication context-match exact
    user@host# set snmp v3 vacm access group supergroup default-context-prefix security-model usm security-level authentication read-view readview
    user@host# set snmp v3 vacm access group supergroup default-context-prefix security-model usm security-level authentication write-view writeview
    user@host# set snmp v3 vacm access group supergroup default-context-prefix security-model usm security-level authentication notify-view notifyview
    user@host# set snmp v3 vacm security-to-group security-model usm security-name superuser group supergroup
  3. (オプション)トラップ通知が送信されるターゲットアドレスプロパティを設定します。
    user@host# set snmp v3 target-address TA address <nms-ipaddress> tag-list trap_recv target-parameters tp1
    user@host# set snmp v3 target-parameters tp1 parameters message-processing-model v3 security-model usm security-level authentication security-name superuser
    user@host# set snmp v3 target-parameters tp1 notify-filter nfilter1
    user@host# set snmp v3 notify-filter nfilter1 oid .1 include
    user@host# set snmp v3 notify notify1 type trap tag trap_recv
  4. snmpビューを設定して、MIBへのアクセスを読み書きおよび通知します。
    user@host# set snmp view readview oid .1 include
    user@host# set snmp view writeview oid .1 include
    user@host# set snmp view notifyview oid .1 include

例:SNMPv3 設定

SNMPv3 設定を定義します。

content_copy zoom_out_map
[edit snmp]
engine-id {
    use-mac-address;
}
view jnxAlarms {
    oid 1.3.6.1.4.1.2636.3.4 include;
}
view interfaces {
    oid 1.3.6.1.2.1.2 include;
}
view ping-mib {
    oid 1.3.6.1.2.1.80 include;
}
[edit snmp v3]
notify n1 {
    tag router1; # Identifies a set of target addresses
    type trap;# Defines type of notification
}
notify n2 {
    tag host1;
    type trap;
}
notify-filter nf1 {
    oid .1 include; # Defines which traps to send
} # In this case, includes all traps
notify-filter nf2 {
    oid 1.3.6.1.4.1 include; # Sends enterprise-specific traps only
}
notify-filter nf3 {
    oid 1.3.6.1.2.1.1.5 include; # Sends BGP traps only
}
snmp-community index1 {
    community-name "$9$JOZi.QF/AtOz3";  # SECRET-DATA
    security-name john; # Matches the security name at the target parameters
    tag host1; # Finds the addresses that are allowed to be used with
}
target-address ta1 {# Associates the target address with the group
                 # san-francisco.
    address 10.1.1.1;
    address-mask 255.255.255.0;  # Defines the range of addresses
    port 162;
    tag-list router1;
    target-parameters tp1;  # Applies configured target parameters
}
target-address ta2 {
    address 10.1.1.2;
    address-mask 255.255.255.0;
    port 162;
    tag-list host1;
    target-parameters tp2;
}
target-address ta3 {
    address 10.1.1.3;
    address-mask 255.255.255.0;
    port 162;
    tag-list “router1 host1”;
    target-parameters tp3;
}
target-parameters tp1 { # Defines the target parameters
    notify-filter nf1; # Specifies which notify filter to apply
    parameters {
        message-processing-model v1;
        security-model v1;
        security-level none;
        security-name john; # Matches the security name configured at the
    } # [edit snmp v3 snmp-community community-index hierarchy level.
}
target-parameters tp2 {
    notify-filter nf2;
    parameters {
        message-processing-model v1;
        security-model v1;
        security-level none;
        security-name john;
    }
}
target-parameters tp3 {
    notify-filter nf3;
    parameters {
        message-processing-model v1;
        security-model v1;
        security-level none;
        security-name john;
    }
}
usm {
    local-engine { # Defines authentication and encryption for SNMPv3 users
        user john { # security-name john is defined here
            authentication-md5 {
                authentication-password authentication-password;
            }
            privacy-des {
                privacy-password privacy-password;
            }
        }
        user bob { # security-name bob is defined here
            authentication-sha {
                authentication-password authentication-password;
            }
            privacy-none;
        }
        user julia { # security-name julia is defined here
            authentication-none;
            privacy-none;
        }
        user lauren { # security-name lauren is defined here
            authentication-sha {
                authentication-password authentication-password;
            }
            privacy-aes128 {
                privacy-password privacy-password;
            }
        }
        user richard { # security-name richard is defined here
            authentication-sha {
                authentication-password authentication-password;
            }
            privacy-none;
        }
    }
}
vacm {
    access {
        group san-francisco { #Defines the access privileges for the group
            default-context-prefix { # called san-francisco
                security-model v1 {
                    security-level none {
                        notify-view ping-mib;
                        read-view interfaces;
                        write-view jnxAlarms;
                    }
                }
            }
        }
    }
    security-to-group {
        security-model v1 {
            security-name john { # Assigns john to security group san-fancisco
                group san-francisco; 
            }
            security-name bob { # Assigns bob to security group new-york
                group new-york;
            }
            security-name julia {# Assigns julia to security group chicago
                group chicago;
            }
            security-name lauren {# Assigns lauren to security group paris
                group paris;
            }
            security-name richard {# Assigns richard to security group geneva
                group geneva;
            }
        }
    }
}
footer-navigation