Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Run Snmpwalk from an NMS System to a Juniper Router



Snmpwalk is an SNMP application that you can use to query a MIB for information about the functioning of a router in your network. Snmpwalk uses GetNext requests to retrieve the specified information. Object identifiers (OIDs) are used to query the MIB. If the OID argument is not present, Snmpwalk searches MIB-2.


To run Snmpwalk for a specific OID, from a management station that has access to the router, and using a tool such as Snmpwalk, enter the following command:

Sample Output


The sample output shows that the user is on a network management station (user-nms %) that has access to the router, tp1. In the command, the following options are used:

  • Os—Deletes all but the last symbolic part of the OID sysUpTime.0. For example, Timeticks: (14096763) 1 day, 15:09:27.63.

  • -M—Compiles the MIB and gives a path or location to the MIBs.

  • -m—Uses the files in the directory pointed to by the -M option.

  • all—Uses all the files in the directory pointed to by the -M option.

In addition, the command includes the hostname tp1, the community string public, and the OID .

The OID in this example is from RFC 2096, IP Forwarding Table MIB, which displays multipath IP routes that have the same network number but different network masks.

Before you can retrieve SNMP information from a router, you must have the minimum SNMP configuration for that router. Following is the minimum SNMP configuration required:

With this configuration, the system responds to SNMP Get, GetNext, and GetBulk commands that contain the community string public.

For more detailed information on configuring SNMP on a router, see the Junos Network Management Configuration Guide.