Introduction

The snmpwalk command is designed to perform a sequence of chained GETNEXT requests automatically, rather than having to issue the necessary snmpgetnext requests by hand.

This will guide you through SNMPWALK commands, which will help you to get all supported OIDs from any SNMP enabled device for following SNMP versions

Basically SNMP support will be available in Network devices (like Switches, Routers, Firewalls, Load balancer etc), Storage devices, Windows/Linux desktops/servers.

Note: SNMPWALK data is collected from either the OpsRamp gateway or any Linux/Windows system with Net-SNMP, as long as it’s reachable from the target device.

SNMPv1

Syntax

snmpwalk -v<version> -c <community> <Ip_Address> <OID> -t <timeout> -r <retry_count> -Cc >> walk.txt

Note: Replace all fields which are enclosed in <>.

  • Below mentioned fields are mandatory:
Field NameDescription
versionv1/v2/v2c/v3
communityThe type of read community.
Ip_AddressIP Address of the device.
OIDSpecify an object ID to return all SNMP objects below it. If NULL then the root of the SNMP objects is taken as the object_id.
  • Below mentioned fields are optional:
Field NameDescription
-t TIMEOUTSet the request timeout (in seconds)
-r RETRIESSet the number of retries.
-CcUse this option to ignore number not increasing error.

Full walk example

snmpwalk -v1 -c public 10.197.10.10 .1 -t 10 -r 3 -Cc >> fullwalk.txt

Note:

  • Following is the confirmation message that is displayed once the full walk is completed:

SNMP-COMMUNITY-MIB::snmpTargetAddrMMS.'destination#7' = No more variables left in this MIB View (It is past the end of the MIB tree)

  • Generally, SNMP full walk execution takes 2-3 minutes. However, for a few devices it may take more than 10-15 minutes, in such cases, we recommend user to stop the Full walk command and execute the Enterprise and Standard walk commands separately.

Enterprise walk example

snmpwalk -v1 -c public 10.197.10.10 enterprises -t 10 -r 3 -Cc >> enterprises_walk.txt

Standard walk example

snmpwalk -v1 -c public 10.197.10.10 -t 10 -r 3 -Cc >> standardwalk.txt

System walk example

snmpwalk -v1 -c public 10.197.10.10 system -t 10 -r 3 -Cc >> system_walk.txt

Entity walk example

snmpwalk -v1 -c public 10.197.10.10 1.3.6.1.2.1.47.1.1.1.1 -t 10 -r 3 -Cc >> entity_walk.txt

SNMPv2c

Syntax

snmpwalk -v<version> -c <community> <Ip_Address> <OID> -t <timeout> -r <retry_count> -Cc >> walk.txt

Note: Replace all fields which are enclosed in <>.

  • Below mentioned fields are mandatory:
Field NameDescription
versionv1/v2/v2c/v3
communityThe type of reading community.
Ip_AddressIP Address of the device.
OIDSpecify an object ID to return all SNMP objects below it. If
NULL then the root of the SNMP objects is taken as the object_id.
  • Below mentioned fields are optional:
Field NameDescription
-t TIMEOUTSet the request timeout (in seconds)
-r RETRIESSet the number of retries.
-CcUse this option to ignore number not increasing error.

Full walk example

snmpwalk -v2c -c public 10.197.10.10 .1 -t 10 -r 3 -Cc >> fullwalk.txt

Note:

  • Below is the confirmation message that is displayed once the full walk is completed:

    SNMP-COMMUNITY-MIB::snmpTargetAddrMMS.‘destination#7’ = No more variables left in this MIB View (It is past the end of the MIB tree)

  • Generally, SNMP full walk execution takes 2-3 minutes. However, for a few devices it may take more than 10-15 minutes, in such cases, we recommend user to stop the Full walk command and execute the Enterprise and Standard walk commands separately.

Enterprise walk example

snmpwalk -v2c -c public 10.197.10.10 enterprises -t 10 -r 3 -Cc >> enterprises_walk.txt

Standard walk example

snmpwalk -v2c -c public 10.197.10.10 -t 10 -r 3 -Cc >> standardwalk.txt

System walk example

snmpwalk -v2c -c public 10.197.10.10 system -t 10 -r 3 -Cc >> system_walk.txt 

Entity walk example

snmpwalk -v2c -c public 10.197.10.10 1.3.6.1.2.1.47.1.1.1.1 -t 10 -r 3 -Cc >> entity_walk.txt

SNMPv3

Note: Choose the right syntax or example based on target device SNMP V3 configuration.

Below are different authentication and/or encryption types:

SYNTAX (authentication, but no encryption)

snmpwalk -v3 -l authNoPriv -u [user name] -a MD5/SHA -A [MD5 hash of user password] [IP address of host] [OID]-t <timeout> -r <retry_count> -Cc >> walk.txt

SYNTAX (authentication and encryption)

snmpwalk -v3 -l authPriv -u [user name] -a MD5/SHA -A [user password] -x DES -X [DES password] [IP address of host] [OID]-t <timeout> -r <retry_count> -Cc >> walk.txt

SYNTAX (no authentication, no encryption)

snmpwalk -v3 -l noAuthNoPriv -u [User name] [IP address of the host] [OID]-t <timeout> -r <retry_count> -Cc >> walk.txt

Full walk example (authentication and encryption)

snmpwalk -v3 -l authPriv -u user1 -a SHA -A 12345678 -x DES -X 123456789 10.197.10.10 .1 -t 10 -r 3 -Cc >> fullwalk.txt

Enterprise walk example (authentication and encryption)

snmpwalk -v3 -l authPriv -u user1 -a SHA -A 12345678 -x DES -X 123456789 10.197.10.10 enterprises -t 10 -r 3 -Cc >> enterprises_walk.txt

System walk example (authentication and encryption)

snmpwalk -v3 -l authPriv -u user1 -a SHA -A 12345678 -x DES -X 123456789 10.197.10.10 system -t 10 -r 3 -Cc >> system_walk.txt

Entity walk example (authentication and encryption)

snmpwalk -v3 -l authPriv -u user1 -a SHA -A 12345678 -x DES -X 123456789 10.197.10.10 1.3.6.1.2.1.47.1.1.1.1 -t 10 -r 3 -Cc >> entity_walk.txt

Full walk example(no authentication and no encryption)

snmpwalk -v3 -l noAuthNoPriv -u user1 10.197.10.10 .1 -t 10 -r 3 -Cc >> fullwalk.txt

Enterprise walk example(no authentication and no encryption)

snmpwalk -v3 -l noAuthNoPriv -u user1 10.197.10.10 enterprises -t 10 -r 3 -Cc >> enterprises_walk.txt

System walk example(no authentication and no encryption)

snmpwalk -v3 -l noAuthNoPriv -u user1 10.197.10.10 system -t 10 -r 3 -Cc >> system_walk.txt

Entity walk example(no authentication and no encryption):

snmpwalk -v3 -l noAuthNoPriv -u user1 10.197.10.10 1.3.6.1.2.1.47.1.1.1.1 -t 10 -r 3 -Cc >> entity_walk.txt

Full walk example(authentication and no encryption):

snmpwalk -v3 -l authNoPriv -u user1 -a SHA -A 12345678 10.197.10.10 .1 -t 10 -r 3 -Cc >> fullwalk.txt

Enterprise walk example(authentication and no encryption):

snmpwalk -v3 -l authNoPriv -u user1 -a SHA -A 12345678 10.197.10.10 enterprises -t 10 -r 3 -Cc >> enterprises_walk.txt

System walk example(no authentication and no encryption):

snmpwalk -v3 -l authNoPriv -u user1 -a SHA -A 12345678 10.197.10.10 system -t 10 -r 3 -Cc >> system_walk.txt

Entity walk example(authentication and no encryption):

snmpwalk -v3 -l authNoPriv -u user1 -a SHA -A 12345678 10.197.10.10 1.3.6.1.2.1.47.1.1.1.1 -t 10 -r 3 -Cc >> entity_walk.txt