11-24-2013 01:46 PM
set snmp community
set snmp community traptestThe community name needs to be associated to a group. This example will use the default group of groupRW. Another group could be specified. The command for this is:
set snmp group user security-model v1
set snmp group groupRW user traptest security-model v1The group created above needs to be given access for read, write and notify (trap). The command for this is:
set snmp access security-model v1 read write notify
set snmp access groupRW security-model v1 read All write All notify AllThe View 'All' is predefined. This allows access to the entire MIB tree structure. A set of parameters needs to be setup for sending SNMP messages (traps). The command for this is:
set snmp targetparams user traptest security-model v1 message-processing v1
set snmp targetparams v1traps user traptest security-model v1 message-processing v1A target needs to be defined to send traps to. The command for this is:
set snmp targetaddr param taglist
set snmp targetaddr mystation 172.26.192.50 param v1traps taglist snmpv1trapThe last step is to tell the device to actually send the traps. The command for this is:
set snmp notify tag
set snmp notify trap1 tag snmpv1trap
set snmp access groupRW security-model v1 read All write All notify All
set snmp access groupRW security-model v2c read All write All notify All
set snmp community public
set snmp community traptest
set snmp group groupRW user public security-model v1
set snmp group groupRW user traptest security-model v1
set snmp group groupRW user public security-model v2c
set snmp notify trap1 tag snmpv1trap
set snmp targetaddr mystation 172.26.192.50 param v1traps taglist snmpv1trap
set snmp targetparams v1traps user traptest security-model v1 message-processing v1
set snmp view viewname All subtree 1
set snmp view viewname All subtree 0.0See also: 5245, 5390, and 7158.