Skip to main content

Snmpwalk Commands Example


Do you know what is snmp? if you have not any idea about SNMP then go-through our blog what is snmp command.


In this blog, We will show you quick and clear examples on how you can use snmpwalk command



SNMPWALK command


Snmpwalk uses the “SNMP GETNEXT” message type to collect multiple information from a network device in a single SNMP query.



snmpwalk v3 example


Examples


# snmpwalk v3 example with authentication and encryption


snmpwalk -v3 -l authPriv -u UserMe -a SHA -A AuthPass1 -x AES -X PrivPass2 192.168.1.1:161 1.3.6.1.2.1.1


# snmpwalk v3 example with authentication, but no encryption


snmpwalk -v3 -l authPriv -u UserMe -a SHA -A AuthPass1 192.168.1.1:161 1.3.6.1.2.1.1


# snmpwalk v3 example with no authentication and no encryption but you still needs a username


snmpwalk -v3 -l noAuthNoPriv -u UserMe 192.168.1.1:161 1.3.6.1.2.1.1


# Using OID dot1dTpFdbAddress and SNMPv3 context name to get mac addresses in VLAN 32


snmpwalk -v3 -l authNoPriv -u UserMe -a MD5 -A AuthPass1 -n vlan-32 192.168.1.1 dot1dTpFdbAddress


Syntax:


snmpwalk -v3 -l <noAuthNoPriv|authNoPriv|authPriv> -u <username> [-a <MD5|SHA>] [-A <authphrase>]

[-x <DES|AES>] [-X <privaphrase>] <ipaddress>[:<dest_port>] [oid]



snmpwalk v2c example


Examples


# Using OID system (1.3.6.1.2.1.1) to get basic system information about host

snmpwalk -v2c -c public 192.168.1.1:161 1.3.6.1.2.1.1


Syntax:


snmpwalk -v2c -c <community> <ipaddress>[:<dest_port>] [oid]


SNMPGET command


A snmpget command is same as snmpwalk, just replace “snmpwalk” with “snmpget” when you run the command like this:


# Using OID sysDescr (1.3.6.1.2.1.1.1) to get system description


snmpget -v3 -l authPriv -u UserMe -a SHA -A AuthPass1 -x AES -X PrivPass2 10.1.1.1 1.3.6.1.2.1.1.0

Comments