snmp-server group authgroup v3 auth
snmp-server user authuser authgroup v3 auth sha authpass
snmp-server host 192.168.1.6 version 3 auth authuser
snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart
SNMPエージェント(Cisco機器)での実行コマンド・実行結果
SNMPエージェントで下記のコマンドを実行します。
interface Gi0/3
shutdown
Router1(config-if)#interface Gi0/3
Router1(config-if)#shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
デバッグ確認
SNMPエージェント(Cisco機器)のデバッグログを確認します。
クリックしてデバッグログを表示する
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
*Aug 13 02:22:31.726: SNMP: Queuing packet to 192.168.1.6Sr_send_trap: trap sent to 192.168.1.6:162
*Aug 13 02:22:31.727:
Outgoing SNMP packet
*Aug 13 02:22:31.727: v3 packet security model: v3 security level: auth
*Aug 13 02:22:31.728: username: authuser
*Aug 13 02:22:31.729: snmpEngineID: 8000000903005254001DD983
*Aug 13 02:22:31.730: snmpEngineBoots: 5 snmpEngineTime: 8921
*Aug 13 02:22:31.730: SNMP: V2 Trap, reqid 10, errstat 0, erridx 0
sysUpTime.0 = 957401
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
SrV2GenerateNotification:Function has reached clean up routine.
*Aug 13 02:22:31.977: SNMP: Packet sent via UDP to 192.168.1.6
Router1(config-if)#interface Gi0/3
Router1(config-if)#shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
デバッグ確認
SNMPエージェント(Cisco機器)のデバッグログを確認します。
クリックしてデバッグログを表示する
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
*Aug 13 02:31:56.134: SNMP: Queuing packet to 192.168.1.6Sr_send_trap: trap sent to 192.168.1.6:162
*Aug 13 02:31:56.135:
Outgoing SNMP packet
*Aug 13 02:31:56.136: v3 packet security model: v3 security level: priv
*Aug 13 02:31:56.136: username: authuser
*Aug 13 02:31:56.137: snmpEngineID: 8000000903005254001DD983
*Aug 13 02:31:56.138: snmpEngineBoots: 5 snmpEngineTime: 9485
*Aug 13 02:31:56.138: SNMP: V2 Trap, reqid 11, errstat 0, erridx 0
sysUpTime.0 = 1013842
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
SrV2GenerateNotification:Function has reached clean up routine.
*Aug 13 02:31:56.385: SNMP: Packet sent via UDP to 192.168.1.6
Router1(config-if)#interface Gi0/3
Router1(config-if)#shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
デバッグ確認
SNMPエージェント(Cisco機器)のデバッグログを確認します。
クリックしてデバッグログを表示する
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
*Aug 13 02:58:14.873:
Outgoing SNMP packet
*Aug 13 02:58:14.873: v3 packet security model: v3 security level: auth
*Aug 13 02:58:14.875: username: authuser
*Aug 13 02:58:14.876: snmpEngineID: 8000000903005254001DD983
*Aug 13 02:58:14.876: snmpEngineBoots: 5 snmpEngineTime: 11064
*Aug 13 02:58:14.876: SNMP: Inform request, reqid 1, errstat 0, erridx 0
sysUpTime.0 = 1171716
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 02:58:14.883: SNMP: Packet sent via UDP to 192.168.1.6.162
SrV2GenerateNotification:Function has reached clean up routine.
*Aug 13 02:58:14.913: SNMP: Packet received via UDP from 192.168.1.6 on GigabitEthernet0/0SrParseV3SnmpMessage: Failed.
*Aug 13 02:58:14.918: SNMP: Response, reqid 1, errstat 0, erridx 0
sysUpTime.0 = 1171716
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 02:58:14.927:
Incoming SNMP packet
*Aug 13 02:58:14.927: v3 packet security model: v3 security level: auth
*Aug 13 02:58:14.928: username: authuser
*Aug 13 02:58:14.929: snmpEngineID: 8000000903005254001DD983
*Aug 13 02:58:14.930: snmpEngineBoots: 0 snmpEngineTime: 0
*Aug 13 02:58:14.930: SNMP: Response, reqid 1, errstat 0, erridx 0
sysUpTime.0 = 1171716
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
Router1(config-if)#interface Gi0/3
Router1(config-if)#shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
デバッグ確認
SNMPエージェント(Cisco機器)のデバッグログを確認します。
クリックしてデバッグログを表示する
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
*Aug 13 03:25:26.438:
Outgoing SNMP packet
*Aug 13 03:25:26.439: v3 packet security model: v3 security level: auth
*Aug 13 03:25:26.440: username: authuser
*Aug 13 03:25:26.441: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:25:26.441: snmpEngineBoots: 5 snmpEngineTime: 12695
*Aug 13 03:25:26.441: SNMP: Inform request, reqid 5, errstat 0, erridx 0
sysUpTime.0 = 1334872
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:25:26.446: SNMP: Packet sent via UDP to 192.168.1.6.162
SrV2GenerateNotification:Function has reached clean up routine.
*Aug 13 03:25:41.449:
Outgoing SNMP packet
*Aug 13 03:25:41.449: v3 packet security model: v3 security level: auth
*Aug 13 03:25:41.450: username: authuser
*Aug 13 03:25:41.451: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:25:41.451: snmpEngineBoots: 5 snmpEngineTime: 12710
*Aug 13 03:25:41.452: SNMP: Inform request, reqid 6, errstat 0, erridx 0
sysUpTime.0 = 1334872
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:25:41.454: SNMP: Packet sent via UDP to 192.168.1.6.162
*Aug 13 03:26:11.455:
Outgoing SNMP packet
*Aug 13 03:26:11.455: v3 packet security model: v3 security level: auth
*Aug 13 03:26:11.456: username: authuser
*Aug 13 03:26:11.457: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:26:11.458: snmpEngineBoots: 5 snmpEngineTime: 12740
*Aug 13 03:26:11.458: SNMP: Inform request, reqid 7, errstat 0, erridx 0
sysUpTime.0 = 1334872
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:26:11.465: SNMP: Packet sent via UDP to 192.168.1.6.162
*Aug 13 03:27:11.468:
Outgoing SNMP packet
*Aug 13 03:27:11.468: v3 packet security model: v3 security level: auth
*Aug 13 03:27:11.469: username: authuser
*Aug 13 03:27:11.470: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:27:11.471: snmpEngineBoots: 5 snmpEngineTime: 12800
*Aug 13 03:27:11.471: SNMP: Inform request, reqid 8, errstat 0, erridx 0
sysUpTime.0 = 1334872
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:27:11.477: SNMP: Packet sent via UDP to 192.168.1.6.162
Router1(config-if)#interface Gi0/3
Router1(config-if)#shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
デバッグ確認
SNMPエージェント(Cisco機器)のデバッグログを確認します。
クリックしてデバッグログを表示する
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
*Aug 13 03:04:36.800:
Outgoing SNMP packet
*Aug 13 03:04:36.800: v3 packet security model: v3 security level: priv
*Aug 13 03:04:36.802: username: authuser
*Aug 13 03:04:36.802: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:04:36.803: snmpEngineBoots: 5 snmpEngineTime: 11446
*Aug 13 03:04:36.804: SNMP: Inform request, reqid 3, errstat 0, erridx 0
sysUpTime.0 = 1209908
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:04:36.810: SNMP: Packet sent via UDP to 192.168.1.6.162
SrV2GenerateNotification:Function has reached clean up routine.
*Aug 13 03:04:36.822: SNMP: Packet received via UDP from 192.168.1.6 on GigabitEthernet0/0SrParseV3SnmpMessage: Failed.
*Aug 13 03:04:36.833: SNMP: Response, reqid 3, errstat 0, erridx 0
sysUpTime.0 = 1209908
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:04:36.845:
Incoming SNMP packet
*Aug 13 03:04:36.846: v3 packet security model: v3 security level: priv
*Aug 13 03:04:36.847: username: authuser
*Aug 13 03:04:36.848: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:04:36.849: snmpEngineBoots: 0 snmpEngineTime: 0
*Aug 13 03:04:36.849: SNMP: Response, reqid 3, errstat 0, erridx 0
sysUpTime.0 = 1209908
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
Router1(config-if)#interface Gi0/3
Router1(config-if)#shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
デバッグ確認
SNMPエージェント(Cisco機器)のデバッグログを確認します。
クリックしてデバッグログを表示する
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
CheckMIBView: OID is in MIB view.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
SrCheckNotificationFilter: OID is included.
*Aug 13 03:30:28.678:
Outgoing SNMP packet
*Aug 13 03:30:28.679: v3 packet security model: v3 security level: priv
*Aug 13 03:30:28.680: username: authuser
*Aug 13 03:30:28.681: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:30:28.681: snmpEngineBoots: 5 snmpEngineTime: 12997
*Aug 13 03:30:28.681: SNMP: Inform request, reqid 9, errstat 0, erridx 0
sysUpTime.0 = 1365096
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:30:28.687: SNMP: Packet sent via UDP to 192.168.1.6.162
SrV2GenerateNotification:Function has reached clean up routine.
*Aug 13 03:30:43.689:
Outgoing SNMP packet
*Aug 13 03:30:43.689: v3 packet security model: v3 security level: priv
*Aug 13 03:30:43.690: username: authuser
*Aug 13 03:30:43.691: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:30:43.692: snmpEngineBoots: 5 snmpEngineTime: 13012
*Aug 13 03:30:43.692: SNMP: Inform request, reqid 10, errstat 0, erridx 0
sysUpTime.0 = 1365096
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:30:43.698: SNMP: Packet sent via UDP to 192.168.1.6.162
*Aug 13 03:31:13.700:
Outgoing SNMP packet
*Aug 13 03:31:13.700: v3 packet security model: v3 security level: priv
*Aug 13 03:31:13.701: username: authuser
*Aug 13 03:31:13.702: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:31:13.703: snmpEngineBoots: 5 snmpEngineTime: 13042
*Aug 13 03:31:13.703: SNMP: Inform request, reqid 11, errstat 0, erridx 0
sysUpTime.0 = 1365096
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:31:13.710: SNMP: Packet sent via UDP to 192.168.1.6.162
*Aug 13 03:32:13.713:
Outgoing SNMP packet
*Aug 13 03:32:13.714: v3 packet security model: v3 security level: priv
*Aug 13 03:32:13.715: username: authuser
*Aug 13 03:32:13.716: snmpEngineID: 8000000903005254001DD983
*Aug 13 03:32:13.716: snmpEngineBoots: 5 snmpEngineTime: 13103
*Aug 13 03:32:13.717: SNMP: Inform request, reqid 12, errstat 0, erridx 0
sysUpTime.0 = 1365096
snmpTrapOID.0 = snmpTraps.3
ifIndex.4 = 4
ifDescr.4 = GigabitEthernet0/3
ifType.4 = 6
lifEntry.20.4 = administratively down
*Aug 13 03:32:13.723: SNMP: Packet sent via UDP to 192.168.1.6.162