---
title: Collecting data for troubleshooting with the 'snmpwalk' utility
source: https://docs.newrelic.com/docs/network-performance-monitoring/troubleshooting/snmp-walk
---

## Problem [#problem]

You are having trouble collecting SNMP metrics from your device or you need to see what specific Object Identifiers (OIDs) your device supports.

## Solution [#solution]

The [snmpwalk](https://helpmanual.io/help/snmpwalk/) utility is a useful tool for troubleshooting various SNMP challenges you may encounter. Because `ktranslate` runs on the host network of the Linux host that Docker is running on top of, it is an accurate measurement of whether or not your devices are responding to SNMP requests and what specifically they are responding with.

> #### 💡 TIP
>
> Most systems will have `snmpwalk` installed, but if necessary, you can load it yourself by running `apt-get install snmp` or `yum install net-snmp-utils`.

### Connectivity testing [#connectivity-testing]

You can test connectivity to your SNMP devices with a basic test to gather the System Object Identifier (SysOID) of the device. If it's successful, the configuration of SNMP on the device and the network connectivity between the Docker host and the device are working well. If it fails, you'll need to validate the settings in your internal network.

Run one of the following depending on your SNMP device version:

**SNMP v2c example**

````bash
snmpwalk -v 2c -On -c $COMMUNITY $IP_ADDRESS .1.3.6.1.2.1.1.2.0
```

Where `$COMMUNITY` is your SNMP community string and `$IP_ADDRESS` is the target device IP.

````

**SNMP v3 example**

````bash
snmpwalk -v 3 -l $LEVEL -u $USERNAME -a $AUTH_PROTOCOL -A $AUTH_PASSPHRASE -x $PRIV_PROTOCOL -X $PRIV_PASSPHRASE -ObentU -Cc $IP_ADDRESS .1.3.6.1.2.1.1.2.0
```

Replacing the following settings as necessary:

```bash
$LEVEL == noAuthNoPriv | authNoPriv | authPriv
$USERNAME == SNMP v3 User
$AUTH_PROTOCOL == MD5 | SHA
$AUTH_PASSPHRASE == Authentication passphrase
$PRIV_PROTOCOL == DES | AES
$PRIV_PASSPHRASE == Privacy passphrase
$IP_ADDRESS == target device IP
```

````

The following is an example of the expected output after running `snmpwalk`:

```bash
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.9.1.46
```

### Capturing full SNMP walk [#capturing-snmpwalk]

You may want to capture the output of walking every OID available on your devices. This output is used when creating new SNMP profiles for `ktranslate`, and it's a requirement to [open a profile request on GitHub](https://github.com/kentik/snmp-profiles/issues/new/choose).

The primary differences in your command for this are changing the target to a root `.`, and redirecting the output to a file that you can gather data from later.

**SNMP v2 example**

```bash
snmpwalk -v 2c -On -c $COMMUNITY $IP_ADDRESS . >> snmpwalk.out
```

**SNMP v3 example**

```bash
snmpwalk -v 3 -l $LEVEL -u $USERNAME -a $AUTH_PROTOCOL -A $AUTH_PASSPHRASE -x $PRIV_PROTOCOL -X $PRIV_PASSPHRASE -ObentU -Cc $IP_ADDRESS . >> snmpwalk.out
```

The output of this command will be a file named `snmpwalk.out`, that lists every OID that the device responds to.

> #### 💡 TIP
>
> On devices with a large number of interfaces, this SNMP walk can take more than 10 minutes to complete.
