SNMP Remote Operations Overview
A SNMP remote operation is any process on the router that can be controlled remotely using SNMP. JUNOS Software currently provides support for two SNMP remote operations: the Ping MIB and Traceroute MIB, defined in RFC 2925. Using these MIBs, an SNMP client in the network management system (NMS) can:
- Start a series of operations on a router
- Receive notification when the operations are complete
- Gather the results of each operation
JUNOS Software also provides extended functionality to these MIBs in the Juniper Networks enterprise-specific extensions jnxPingMIB and jnxTraceRouteMIB. For more information about jnxPingMIB and jnxTraceRouteMIB, see the PING MIB and Traceroute MIB topics in the JUNOS Software SNMP MIBs and Traps Reference.
This topic covers the following sections:
- SNMP Remote Operation Requirements
- Setting SNMP Views
- Setting Trap Notification for Remote Operations
- Using Variable-Length String Indexes
- Enabling Logging
SNMP Remote Operation Requirements
To use SNMP remote operations, you should be experienced with SNMP conventions. You must also configure JUNOS Software to allow the use of the remote operation MIBs.
Setting SNMP Views
All remote operation MIBs supported by JUNOS Software require that the SNMP clients have read-write privileges. The default SNMP configuration of JUNOS Software does not provide clients with a community string with such privileges.
To set read-write privileges for an SNMP community string, include the following statements at the [edit snmp] hierarchy level:
Example: Setting SNMP Views
To create a community named remote-community that grants SNMP clients read-write access to the Ping MIB, jnxPing MIB, Traceroute MIB, and jnxTraceRoute MIB, include the following statements at the [edit snmp] hierarchy level:
For more information about the community statement, see Configuring the SNMP Community String and community.
For more information about the view statement, see Configuring MIB Views, view (Associating a MIB View with a Community), and view (Configuring a MIB View).
Setting Trap Notification for Remote Operations
In addition to configuring the remote operations MIB for trap notification, you must also configure JUNOS Software. You must specify a target host for remote operations traps.
To configure trap notification for SNMP remote operations, include the categories and targets statements at the [edit snmp trap-group group-name] hierarchy level:
Example: Setting Trap Notification for Remote Operations
Specify 172.17.12.213 as a target host for all remote operation traps:
For more information about trap groups, see Configuring SNMP Trap Groups.
Using Variable-Length String Indexes
All tabular objects in the remote operations MIBs supported by JUNOS Software are indexed by two variables of type SnmpAdminString. For more information about SnmpAdminString, see RFC 2571.
JUNOS Software does not handle SnmpAdminString any differently from the octet string variable type. However, the indexes are defined as variable length. When a variable length string is used as an index, the length of the string must be included as part of the object identifier (OID).
Example: Set Variable-Length String Indexes
To reference the pingCtlTargetAddress variable of a row in pingCtlTable where pingCtlOwnerIndex is bob and pingCtlTestName is test, use the following object identifier (OID):
pingMIB.pingObjects.pingCtlTable.pingCtlEntry.pingCtlTargetAddress."bob"."test" 1.3.6.1.2.1.80.1.2.1.4.3.98.111.98.4.116.101.115.116
For more information about the definition of the Ping MIB, see RFC 2925.
Enabling Logging
The SNMP error code returned in response to SNMP requests can only provide a generic description of the problem. The error descriptions logged by the remote operations process can often provide more detailed information about the problem and help you to solve the problem faster. This logging is not enabled by default. To enable logging, include the flag general statement at the [edit snmp traceoptions] hierarchy level:
For more information about traceoptions, see Tracing SNMP Activity on a Device Running JUNOS Software.
If the remote operations process receives an SNMP request that it cannot accommodate, the error is logged in the /var/log/rmopd file. To monitor this log file, issue the monitor start rmopd command in operational mode of the command-line interface (CLI).