SNMPについて

Simple Network Management Protocol
Q. 何のため?
Q. 何ができる?

登場人物

  • マネージャー
    • 監視サーバ
    • クライアントPC
  • エージェント
    • 監視したい機器

SNMPの種類

やり取り再送
SNMP v1平文でやり取り再送なし
SNMP v2v2cの方がメジャーなので今回は省略
SNMP v2c平文でやり取り再送あり
SNMP v3暗号化してやり取り再送あり

SNMPv1の機能

@startuml collections マネージャー participant エージェント マネージャー -> エージェント: Get Request note right: OID指定 エージェント --> マネージャー: Get Response note right: 返り値 @enduml


@startuml collections マネージャー participant エージェント マネージャー -> エージェント: GetNext Request note right: OID指定した次のOIDの結果を要求 @enduml

@startuml collections マネージャー participant エージェント マネージャー -> エージェント: Set Request note right: OID指定して機器を変更 @enduml

@startuml collections マネージャー participant エージェント エージェント -> マネージャー: TRAP note right: 危険を知らせる @enduml

SNMPv2, v2cの機能

v1の機能に加えて

@startuml collections マネージャー participant エージェント マネージャー -> エージェント: Get Bulk Request note right: OID全指定 @enduml


@startuml collections マネージャー participant エージェント エージェント -> マネージャー: Inform Request note right: 確認応答を要求 @enduml

SNMPv3の機能

v1, v2の機能に加えて

  • 認証機能
  • 暗号化(MD5とか)

コミュニティ名 (Community String)

  • パスワードみたいなもの
  • デフォルトはpublic
  • 絶対に変えろ!!11
    • ライセンス情報などが漏れる可能性
  • 人に教えるな!!11
  • Publicを使用している時(悪い人)「あれれ〜Juniperの脆弱性を持っているバージョンだぁ!! 攻撃しちゃえー!!」

OID

Tips

用途MIB indexOID
インタフェース名ifDescr.1.3.6.1.2.1.2.2.1.2
ホスト名SysName.1.3.6.1.2.1.1.5
インターフェースの状態ifOperStatus.1.3.6.1.2.1.2.2.1.8.x