snmp manager usage

manager install (snmp)manager install (snmp)

apt install snmp snmp-mibs-downloader
#apropos snmp
dpkg -L snmp-mibs-downloader
download-mibs cisco

ls -lF /usr/share/snmp/mibs/

cp -pi /etc/snmp/snmp.conf /etc/snmp/snmp.conf.dist
vi /etc/snmp/snmp.conf

COMMENT OUT

#mibs :

usageusage

walk through all the objects

snmpwalk -v1 -c public snmp-agent

grab specific objects

snmpget -v1 -c public snmp-agent DISMAN-EVENT-MIB::sysUpTimeInstance
snmpget -v1 -c public snmp-agent HOST-RESOURCES-MIB::hrSystemUptime.0
snmpget -v1 -c public snmp-agent HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0
# -Os for short version

acl acceptanceacl acceptance

only the specific snmp-manager host (as defined with static name resolution) should be able to reach the service

additional notesadditional notes

com2sec ACLs

not much success with that one (FAIL)

#rocommunity public sec1
#com2sec sec1 10.1.0.0/16 public

mibs

translate OIDs

snmptranslate -Of .1.3.6.1.2.1.1.3.0
snmptranslate .1.3.6.1.2.1.1.3.0

show full entry name

snmptranslate -Of -IR ipAddrTable

v3

draft

snmpwalk: No securityName specified

  -u USER-NAME      set security name (e.g. bert)

  -l LEVEL      set security level (noAuthNoPriv|authNoPriv|authPriv)

layout formats

snmpget -v1 -c public snmp-agent ipAddrTable

as a tree

snmptranslate -Tp -IR ipAddrTable
snmptranslate -Tp -IR system

as a table

snmptable -v2c -c public snmp-agent ipAddrTable

junpier

grab the temperature on Juniper SRX

snmpget -v2c -c PASSWORD @ip-device .1.3.6.1.4.1.2636.3.1.13.1.7

resourcesresources

troubles

https://askubuntu.com/questions/346165/how-to-make-snmp-agent-accept-connections-from-other-hosts-in-the-network ==> quick & dirty ACL

https://unix.stackexchange.com/questions/268959/how-to-properly-configure-snmpd


https://enterprise-support.nvidia.com/s/article/howto-enable-snmp-server--snmpd--on-linux

https://fasthandle.net/os/linux/set/etc/etc_snmp_snmpd.conf


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Licensed under MIT