[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Run Snmpwalk from an NMS System to a Juniper Router

Purpose

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.

Action

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:

user-nms# snmpwalk [common arguments] hostname community object-id

Sample Output

user-nms %  snmpwalk -Os -M /volume/~/mibs -m all tp1 public .1.3.6.1.2.1.4
ipForwarding.0 = forwarding(1)
ipDefaultTTL.0 = 64
ipInReceives.0 = Counter32: 9262713
ipInHdrErrors.0 = Counter32: 0
ipInAddrErrors.0 = Counter32: 0
ipForwDatagrams.0 = Counter32: 614171
ipInUnknownProtos.0 = Counter32: 0
ipInDiscards.0 = Counter32: 0
ipInDelivers.0 = Counter32: 8648408
ipOutRequests.0 = Counter32: 1226483
ipOutDiscards.0 = Counter32: 0
ipOutNoRoutes.0 = Counter32: 0
ipReasmTimeout.0 = 60
ipReasmReqds.0 = Counter32: 0
ipReasmOKs.0 = Counter32: 0
ipReasmFails.0 = Counter32: 0
ipFragOKs.0 = Counter32: 0
ipFragFails.0 = Counter32: 0
ipFragCreates.0 = Counter32: 0
ipAdEntAddr.10.0.0.1 = IpAddress: 10.0.0.1
ipAdEntAddr.10.1.12.1 = IpAddress: 10.1.12.1
ipAdEntAddr.10.1.15.1 = IpAddress: 10.1.15.1
ipAdEntAddr.10.168.70.143 = IpAddress: 10.168.70.143
[...Output truncated...]

Meaning

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:

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

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.


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]