How to configure SNMP on network devices?
I’ve been often asked how do you configure SNMP across the variety of network equipment and thought to include a listing here with the use of Variables to define the various inputs that go into an SNMP configuration for the various versions.
Variable Definitions
${Read Community String} = SNMP Read-Only ${Write Community String} = SNMP Read-Write ${NMS IP Address} = IP address of Network Management Server ${SNMP Version(v1 | v2c)} = SNMP version Only two choices, v1 and v2c ${ACL} = Access-list only allowing SNMP traffic from specificed sources ${AuthPasswd} = Password for Integrity ${PrivPasswd} = Password for Privacy ${User} = SNMPv3 user ${Group} = SNMPv3 group
SNMPv1/2c
PROCURVE
snmp-server enable snmp-server community ${Read Community String} operator restricted snmp-server community ${Write Community String} manager unrestricted snmp-server trap-source snmp-server host ${NMS IP Address} community ${Write Community String} trap-level all
CISCO
snmp-server host ${NMS IP Address} verion ${SNMP Version(v1 | v2c)} snmp-server community ${Read Community String} ro ${ACL} snmp-server community ${Write Community String} rw ${ACL} snmp-server enable traps snmp-server source-interface traps ${Interface}
COMWARE
snmp-agent snmp-agent sys-info version ${SNMP Version(v1 | v2c)} snmp-agent community read ${Read Community String} acl ${ACL} snmp-agent community write ${Write Community String} acl ${ACL} snmp-agent trap enable snmp-agent trap source ${Interface} snmp-agent target-host trap address udp-domain ${NMS IP Address} udp-port 161 params securityname ${Write Community String}
SNMPv3
PROCURVE
snmpv3 enable snmpv3 user ${User} auth sha ${AuthPasswd} priv aes128 ${PrivPasswd} snmpv3 group managerpriv ${User} ${Group} sec-model ver3
CISCO
snmp-server group ${Group} v3 priv read ${Readv3} write ${Writev3} snmp-server view v3read iso included snmp-server view v3write iso included snmp-server host ${NMS IP Adress} version 3 priv ${User} snmp-server user ${User} ${Group} v3 auth sha ${AuthPasswd} priv ${PrivPasswd} snmp enable traps
COMWARE
snmp-agent snmp-agent sys-info version v3 snmp-agent group v3 ${Group} privacy snmp-agent usm-user v3 ${User} ${Group} authentication-mode sha ${AuthPasswd} privacy-mode aes128 ${PrivPasswd} snmp-agent group v3 ${Group} privacy write-view ViewDefault
Other References:
why is it when i configure SNMP community on HP 8212 Core the snmp runs 99%