SNMP and SNMPWALK are related, but they are not the same thing. What is snmpwalk? snmpwalk is a Net-SNMP command-line tool that sequentially queries all values beneath a specific OID on an SNMP agent. It is a cornerstone for device discovery, monitoring deployment, and troubleshooting processes.
snmpwalk is a Net-SNMP command-line utility that sequentially queries all values starting from a specified OID on an SNMP agent. Unlike snmpget, which reads a single value, snmpwalk lists multi-row data such as a device's interfaces, hardware inventory, disk, and memory status in a single command. It is the go-to tool for network device discovery, monitoring setup, and SNMP troubleshooting.
What is SNMP? The Importance of SNMP in Network Monitoring
snmpwalk takes a starting OID and repeatedly asks the agent, "What is the next value after this?" As the agent returns the next object in the OID tree, the command continues until it reaches the end of the specified subtree. From a user perspective, this looks like walking through a tree structure.
If no OID is provided, snmpwalk starts from the agent's default starting point (usually .1.3.6.1.2.1, which is MIB-2). On a large device, this can generate thousands of lines, so a target OID is usually specified in the field.
snmpwalk is not a standalone program; it is part of the Net-SNMP package.
# Debian / Ubuntu
sudo apt install snmp
# RHEL / Rocky / AlmaLinux
sudo dnf install net-snmp-utils
# macOS (Homebrew)
brew install net-snmp
On Windows, you can install the Net-SNMP Windows package or use the Linux version via WSL. After installation, verify the version with the following command:
snmpwalk -V
Tip: On Debian-based systems, default installations may not include MIB files, resulting in numeric OIDs instead of names in the output. To enable name resolution, install the corresponding MIB package or specify the MIB directory using -m ALL -M +/path/to/mibs parameters.
snmpwalk [options] target_device [OID]
| Parameter | Description |
|---|---|
-v 1 | 2c | 3 |
SNMP version |
-c community |
Community string (v1 and v2c) |
-l level |
v3 security level: noAuthNoPriv, authNoPriv, authPriv |
-u user |
v3 username |
-a / -A |
v3 authentication protocol (e.g., SHA) and password |
-x / -X |
v3 encryption protocol (e.g., AES) and password |
-On |
Show OIDs numerically instead of names |
-Oq / -Ov |
Quiet output / values only |
-t / -r |
Timeout (seconds) / retry count |
-Cc |
Disable checking whether OIDs are increasing |
-Cr N |
Max-repetitions value for GETBULK |
-m ALL |
Load all MIB modules |
snmpwalk -v2c -c public 192.168.1.1 systemsnmpwalk -v2c -c public -On 192.168.1.1 .1.3.6.1.2.1.1snmpwalk -v2c -c public 192.168.1.1 ifDescrsnmpwalk -v2c -c public 192.168.1.1 ifHCInOctetssnmpwalk -v3 -l authPriv -u monitoring_user -a SHA -A "auth_pass" -x AES -X "priv_pass" 192.168.1.1 system| Information | MIB Object | OID |
|---|---|---|
| Device description | sysDescr | .1.3.6.1.2.1.1.1 |
| Uptime | sysUpTime | .1.3.6.1.2.1.1.3 |
| Device name | sysName | .1.3.6.1.2.1.1.5 |
| Interface table | ifTable | .1.3.6.1.2.1.2.2 |
| Extended interface (64-bit) | ifXTable | .1.3.6.1.2.1.31.1.1 |
| Disk / memory | hrStorageTable | .1.3.6.1.2.1.25.2.3 |
| Physical hardware inventory | entPhysicalTable | .1.3.6.1.2.1.47.1.1.1 |
IF-MIB::ifDescr.1 = STRING: GigabitEthernet0/1
IF-MIB::ifDescr.2 = STRING: GigabitEthernet0/2
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
Counter32, Counter64, Gauge32, Timeticks.-Cc parameter.snmpwalk sequentially queries all values starting from a specified OID on an SNMP agent. It is used to quickly list device interfaces, hardware info, resource usage, and uptime with a single command.
snmpget returns the value of a single OID. snmpwalk traverses the entire subtree under the given OID and lists multiple values together.
snmpwalk sends queries to the target device's UDP port 161. Access to this port must be open through the firewall.
The most common reasons are an incorrect community string or SNMP v3 user info, blocked UDP 161 access, a disabled SNMP service on the device, or the querying IP not being on the device's permit list.
Move beyond manual command-line queries and contact our experts to centrally and continuously monitor your entire network infrastructure.
Contact Us →