Configuring SNMP with a Configuration Editor
To configure SNMP on a services router, you must perform the following tasks marked (Required). For information about using the J-Web and CLI configuration editors, see User Interface Overview.
- Defining System Identification Information (Required)
- Configuring SNMP Agents and Communities (Required)
- Managing SNMP Trap Groups (Required)
- Controlling Access to MIBs (Optional)
Defining System Identification Information (Required)
Basic system identification information for a services router can be configured with SNMP and stored in various MIBs. This information can be accessed through SNMP requests and either queried or reset. Table 31 identifies types of basic system identification and the MIB object into which each type is stored.
Table 31: System Identification Information and Corresponding MIB Objects
System Information | MIB |
|---|---|
Contact | sysContact |
System location | sysLocation |
System description | sysDescr |
System name override | sysName |
To configure basic system identification for SNMP:
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- To configure basic system information using SNMP, perform the configuration tasks described in Table 32.
- If you are finished configuring the network, commit the configuration.
- To check the configuration, see Verifying the SNMP Configuration.
Table 32: Configuring Basic System Identification
Task | J-Web Configuration Editor | CLI Configuration Editor |
|---|---|---|
Navigate to the SNMP level in the configuration hierarchy. |
| From the [edit] hierarchy level, enter edit snmp |
Configure the system contact information (such as a name and phone number). | In the Contact box, type the contact information as a free-form text string. | Set the contact information: set contact “contact-information” |
Configure the system location information (such as a lab name and a rack name). | In the Location box, type the location information as a free-form text string. | Set the location information: set location “location-information” |
Configure the system description (J4350 with 4 PIMs, for example). | In the Description box, type the description information as a free-form text string. | Set the description information: set description “description-information” |
Configure a system name to override the system hostname defined in the Getting Started Guide for your device. | In the System Name box, type the system name as a free-form text string. | Set the system name: set name name |
Configure the local engine ID to use the MAC address of Ethernet management port 0 as the engine ID suffix. |
| Set the engine ID to use the MAC address: set engine-id use-mac-address |
Configuring SNMP Agents and Communities (Required)
To configure the SNMP agent, you must enable and authorize the network management system access to the services router, by configuring one or more communities. Each community has a community name, an authorization, which determines the kind of access the network management system has to the device, and, when applicable, a list of valid clients that can access the device.
To configure SNMP communities:
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- To configure SNMP communities, perform the configuration tasks described in Table 33.
- If you are finished configuring the network, commit the configuration.
- To check the configuration, see Verifying the SNMP Configuration.
Table 33: Configuring SNMP Agents and Communities
Task | J-Web Configuration Editor | CLI Configuration Editor |
|---|---|---|
Navigate to the SNMP level in the configuration hierarchy. |
| From the [edit] hierarchy level, enter edit snmp |
Create and name a community. |
| Create a community: set community community-name |
Grant read-write access to the community. | In the Authorization box, select read-write from the list. | Set the authorization to read-write: set community community-name authorization read-write |
Allow community access to a client at a particular IP address—for example, at IP address 10.10.10.10. |
| Configure client access for the IP address 10.10.10.10: set community community-name clients 10.10.10.10 |
Allow community access to a group of clients—for example, all addresses within the 10.10.10.0/24 prefix, except those within the 10.10.10.10/29 prefix. |
|
|
Managing SNMP Trap Groups (Required)
SNMP traps are unsolicited notifications that are generated by conditions on the services router. When events trigger a trap, a notification is sent to the configured clients for that particular trap group. To manage a trap group, you must create the group, specify the types of traps that are included in the group, and define one or more targets to receive the trap notifications.
To configure SNMP trap groups:
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- To configure SNMP trap groups, perform the configuration tasks described in Table 34.
- If you are finished configuring the network, commit the configuration.
- To check the configuration, see Verifying the SNMP Configuration.
Table 34: Configuring SNMP Trap Groups
Task | J-Web Configuration Editor | CLI Configuration Editor |
|---|---|---|
Navigate to the SNMP level in the configuration hierarchy. |
| From the [edit] hierarchy level, enter edit snmp |
Create a trap group. |
| Create a community: set trap-group trap-group-name |
Configure the trap group to send all trap notifications to a target IP address—for example, to the IP address 192.174.6.6. |
| Set the trap-group target to 192.174.6.6: set trap-group trap-group-name targets 192.174.6.6 |
Configure the trap group to generate SNMP notifications on authentication failures, environment alarms, and changes in link state for any of the interfaces. |
| Configure the trap group categories: set trap-group trap-group-name categories authentication chassis link |
Controlling Access to MIBs (Optional)
By default, an SNMP community is granted access to all MIBs. To control the MIBs to which a particular community has access, configure SNMP views that include the MIBs you want to explicitly grant or deny access to.
To configure SNMP views:
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- To configure SNMP views, perform the configuration tasks described in Table 35.
- If you are finished configuring the network, commit the configuration.
- To check the configuration, see Verifying the SNMP Configuration.
Table 35: Configuring SNMP Views
Task | J-Web Configuration Editor | CLI Configuration Editor |
|---|---|---|
Navigate to the SNMP level in the configuration hierarchy. |
| From the [edit] hierarchy level, enter edit snmp |
Create a view. |
| Create a view: set view view-name |
Configure the view to include a MIB—for example, pingMIB. |
| Set the pingMIB OID value and mark it for inclusion: set view view-name oid 1.3.6.1.2.1.80 include |
Configure the view to exclude a MIB—for example, jnxPingMIB. |
| Set the jnxPingMIB OID value and mark it for exclusion: set view view-name oid jnxPingMIB exclude |
Associate the view with a community. |
| Set the community view: set community community-name view view-name |
Hide Navigation Pane
Show Navigation Pane
Download
SHA1