Scenario
IP Address: 192.168.1.88, UDP Port: 162
Version: v2c
Community String: support
Firmware: ES3510MA v1.5.2.7
MIB requirement: SNMP-NOTIFICATION-MIB, SNMP-TARGET-MIB
ASCII Table reference: http://www.asciitable.com/
A. Configure "snmpNotifyTable"
SNMPSET command format:
snmpset -v 2c -c private <switch ip> < snmpNotifyRowStatus | snmpNotifyTag | snmpNotifyType | snmpNotifyStorageType >.<snmpNotifyName> < INTEGER | STRING > <value>
===Note===
snmpNotifyName index 110.111.116.105.102.121.49(notify1)
*Notify Name: notify1
snmpNotifyRowStatus = active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
snmpNotifyType = trap(1), inform(2)
snmpNotifyStorageType = other(1), volatile(2), nonVolatile(3), permanent(4), readOnly(5)
(1) snmpNotifyRowStatus(Integer 5: createAndWait)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.13.1.1.1.5.110.111.116.105.102.121.49 i 5 SNMP-NOTIFICATION-MIB::snmpNotifyRowStatus.'notify1' = INTEGER: createAndWait(5)
(2) snmpNotifyTag(String "trap")
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.13.1.1.1.2.110.111.116.105.102.121.49 s trap SNMP-NOTIFICATION-MIB::snmpNotifyTag.'notify1' = STRING: trap
(3) snmpNotifyType(Integer 1: trap)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.13.1.1.1.3.110.111.116.105.102.121.49 i 1 SNMP-NOTIFICATION-MIB::snmpNotifyType.'notify1' = INTEGER: trap(1)
(4) snmpNotifyStorageType(Integer 3: nonVolatile)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.13.1.1.1.4.110.111.116.105.102.121.49 i 3 SNMP-NOTIFICATION-MIB::snmpNotifyStorageType.'notify1' = INTEGER: nonVolatile(3)
(5) snmpNotifyRowStatus(Integer 1: active)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.13.1.1.1.5.110.111.116.105.102.121.49 i 1 SNMP-NOTIFICATION-MIB::snmpNotifyRowStatus.'notify1' = INTEGER: active(1)
B. Configure "snmpTargetParamsTable"
SNMPSET command format:
snmpset -v 2c -c private <switch ip> < snmpTargetParamsRowStatus | snmpTargetParamsMPModel | snmpTargetParamsSecurityModel | snmpTargetParamsSecurityName | snmpTargetParamsSecurityLevel | snmpTargetParamsStorageType >.<snmpTargetParamsName> < INTEGER | STRING > <value>
===Note===
snmpTargetParamsName index 112.97.114.97.109.115.49(params1)
*Target Parameter Name: params1
snmpTargetParamsRowStatus = active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
snmpTargetParamsMPModel = SNMPv1(0), SNMPv2c(1), SNMPv2u(2), SNMPv3(3), SNMPv2p(256)
snmpTargetParamsSecurityModel = ANY(0), SNMPv1(1), SNMPv2c(2), USM(3), SNMPv2p(256)
snmpTargetParamsSecurityLevel = noAuthNoPriv(1), authNoPriv(2), authPriv(3)
snmpTargetParamsStorageType = other(1), volatile(2), nonVolatile(3), permanent(4), readOnly(5)
(1) snmpTargetParamsRowStatus(Integer 5: createAndWait)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.7.112.97.114.97.109.115.49 i 5 SNMP-TARGET-MIB::snmpTargetParamsRowStatus.'params1' = INTEGER: createAndWait(5)
(2) snmpTargetParamsMPModel(Integer 1: SNMPv2c)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.2.112.97.114.97.109.115.49 i 1 SNMP-TARGET-MIB::snmpTargetParamsMPModel.'params1' = INTEGER: 1
(3) snmpTargetParamsSecurityModel(Integer 2: SNMPv2c)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.3.112.97.114.97.109.115.49 i 2 SNMP-TARGET-MIB::snmpTargetParamsSecurityModel.'params1' = INTEGER: 2
(4) snmpTargetParamsSecurityName(String "support")
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.4.112.97.114.97.109.115.49 s support SNMP-TARGET-MIB::snmpTargetParamsSecurityName.'params1' = STRING: support
(5) snmpTargetParamsSecurityLevel(Integer 1: noAuthNoPriv)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.5.112.97.114.97.109.115.49 i 1 SNMP-TARGET-MIB::snmpTargetParamsSecurityLevel.'params1' = INTEGER: noAuthNoPriv(1)
(6) snmpTargetParamsStorageType(Integer 3: nonVolatile)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.6.112.97.114.97.109.115.49 i 3 SNMP-TARGET-MIB::snmpTargetParamsStorageType.'params1' = INTEGER: nonVolatile(3)
(7) snmpTargetParamsRowStatus(Integer 1: active)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.3.1.7.112.97.114.97.109.115.49 i 1 SNMP-TARGET-MIB::snmpTargetParamsRowStatus.'params1' = INTEGER: active(1)
C. Configure "snmpTargetAddrTable"
SNMPSET command format:
snmpset -v 2c -c private <switch ip> < snmpTargetAddrRowStatus | snmpTargetAddrTDomain | snmpTargetAddrTAddress | snmpTargetAddrTagList | snmpTargetAddrParams | snmpTargetAddrStorageType >.<snmpTargetAddrName> < INTEGER | OBJID | HEX STRING | STRING > <value>
===Note===
snmpTargetAddrName index 116.97.114.103.101.116.49(target1)
*Target Address Name: target1
snmpTargetAddrRowStatus = active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
snmpTargetAddrTDomain = (1.3.6.1.6.1.1: UDP Domain), (1.3.6.1.6.1.2: CLNS Domain), (1.3.6.1.6.1.3: CONS Domain), (1.3.6.1.6.1.4: DDP Domain), (1.3.6.1.6.1.5: IPX Domain)
snmpTargetAddrTagList = snmpNotifyTag(trap)
snmpTargetAddrParams = snmpTargetParamsName(params1)
snmpTargetAddrStorageType = other(1), volatile(2), nonVolatile(3), permanent(4), readOnly(5)
(1) snmpTargetAddrRowStatus(Integer 5: createAndWait)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.9.116.97.114.103.101.116.49 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'target1' = INTEGER: createAndWait(5)
(2) snmpTargetAddrTDomain(OBJID 1.3.6.1.6.1.1: UDP Domain)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.2.116.97.114.103.101.116.49 o 1.3.6.1.6.1.1 SNMP-TARGET-MIB::snmpTargetAddrTDomain.'target1' = OID: SNMPv2-TM::snmpUDPDomain
(3) snmpTargetAddrTAddress(Hex: C0A8015800A2)
-> C0A80158(192.168.1.88) is IP Address of trap server, 00A2(162) is UDP Port
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.3.116.97.114.103.101.116.49 x C0A8015800A2 SNMP-TARGET-MIB::snmpTargetAddrTAddress.'target1' = Hex-STRING: C0 A8 01 58 00 A2
(4) snmpTargetAddrTagList(String "trap")
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.6.116.97.114.103.101.116.49 s trap SNMP-TARGET-MIB::snmpTargetAddrTagList.'target1' = STRING: trap
(5) snmpTargetAddrParams(String "params1")
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.7.116.97.114.103.101.116.49 s params1 SNMP-TARGET-MIB::snmpTargetAddrParams.'target1' = STRING: params1
(6) snmpTargetAddrStorageType(Integer 3: nonVolatile)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.8.116.97.114.103.101.116.49 i 3 SNMP-TARGET-MIB::snmpTargetAddrStorageType.'target1' = INTEGER: nonVolatile(3)
(7) snmpTargetAddrRowStatus(Integer 1: active)
C:\>snmpset -v 2c -c private 192.168.1.10 1.3.6.1.6.3.12.1.2.1.9.116.97.114.103.101.116.49 i 1 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'target1' = INTEGER: active(1)
Check the configuration on switch.
Console#show snmp SNMP Logging: Enabled Logging to 192.168.1.88 support version 2c udp-port 162