217
Chapter 15: Advanced Configuration
noauth
snmpwalk -Oa –v3 –l noAuthNoPriv –u readonlyusername -M .:/usr/share/snmp/mibs b095 STATUS-MIB::Status
auth
snmpwalk -Oa –v3 –l authNoPriv –u readonlyusername –a SHA –A “authpassword” -M .:/usr/share/snmp/mibs b095 STATUS-
MIB::ogStatus
priv
snmpwalk -Oa –v3 –l authNoPriv –u readonlyusername –a SHA –A “authpassword” –x DES –X “privpassword” -M .:/usr/share/
snmp/mibs b095 STATUS-MIB::ogStatus
-l SecurityLevel
-u SecurityNameorReadOnlyUsername
-a AuthenticationProtocol–SHAorMD5
-A AuthenticationPassword
-x PrivacyProtocol–DESorAES
-X PrivacyPassword
A mib browser may be used to explore the enterprise MIB structure.
15.5.4 /etc/config/snmpd.conf
The net-snmpdisanextensibleSNMPwhichincludesbuilt-insupportforawiderangeofMIBinformationmodules,andcan
beextendedusingdynamicallyloadedmodules,externalscriptsandcommands.snmpd when enabled should run with a
default configuration. Its behavior can be customized via the options in /etc/config/snmpd.conf.
Note:IftheSNMPServiceisenabledthroughtheWebBasedManagementConsolethiscongurationlewillbeoveridden
and you will lose any customization.
Changingstandardsysteminformationsuchassystemcontact,nameandlocationcanbeachievedbyediting
/etc/config/snmpd.conf file and locating the following lines:
sysdescr "tripplite"
syscontact root <root@localhost>(configure /etc/default/snmpd.conf)
sysname Not defined (edit /etc/default/snmpd.conf)
syslocation Not defined (edit /etc/default/snmpd.conf)
Simply change the values of sysdescr,syscontact,sysname and syslocation to the desired settings and restart snmpd.
The snmpd.confprovidesisextremelypowerfulandtooexibletocompletelycoverhere.Thecongurationleitselfis
commentedextensivelyandgooddocumentationisavailableatthenet-snmpwebsitehttp://www.net-snmp.org,specically:
ManPage: http://www.net-snmp.org/docs/man/snmpd.conf.html
FAQ: http://www.net-snmp.org/docs/FAQ.html
Net-SNMPDTutorial: http://www.net-snmp.org/tutorial/tutorial-5/demon/snmpd.html