Using SNMP to Retrieve Information from JUNOSe Routers
Some scripts in the SDX software use SNMP to get information from the router. For example, the poolPublisher router initialization script uses SNMP to read the IP pools.
- On the router, you can configure access to the router's SNMP server. See Configuring the SNMP Server on the JUNOSe Router.
- On the SAE, you can configure global default SNMP communities that are used for read and write access to the router. See Configuring Global SNMP Communities in the SDX Software.
- In the directory, you can specify SNMP communities for each virtual router. We recommend that you specify communities for each virtual router instead of global communities. See Adding Virtual Routers Individually.
Configuring the SNMP Server on the JUNOSe Router
Access to the SNMP server on the router by an SNMP client is governed by a proprietary SNMP community table. This table identifies communities that have read-only, read-write, or administrative permission to the SNMP Management Information Base (MIB) stored on a particular server.
When an SNMP server receives a request, the server extracts the client's IP address and the community name. The SNMP server searches the community table for a matching community.
- If the access list name is null, the IP address is accepted.
- If an invalid IP address results, an SNMP authentication error is sent to the SNMP client.
To configure the SNMP agent on the JUNOSe router:
- Switch to the virtual router for which you want to create an SDX client.
host1#(config)virtual-router <vrName>- Enable the SNMP agent.
host1:<vrName>#(config)snmp-server- Configure at least one authorized SNMP read-write community (SNMPv1/v2c), which provides SNMP client access.
host1:<vrName>(config)#snmp-server community boston rw- (Optional) Configure a read-only community.
host1:<vrName>#(config)snmp-server public roConfiguring Global SNMP Communities in the SDX Software
You can configure global default SNMP communities that are used if a VR does not exist on the router or the community strings have not been configured for the VR. To use SDX Configuration Editor to configure global default SNMP communities:
- In the navigation pane, select a configuration file for the SAE that you want to configure.
- Select the Router tab, and expand the SNMP section.
![]()
- Edit or accept the default values in the fields.
See Global SNMP Community Fields.
- Select File > Save.
- Right-click the configuration file, select SDX System Configuration > Export to LDAP Directory.
Global SNMP Community Fields
In SDX Configuration Editor, you can edit the following fields in the Router pane in an SAE configuration file.
Read-Only Community String
- Default SNMP community string used for read access to the router.
- Value—SNMP community string that matches a read-only community string configured on the router
- Default—Public
- Property name—Router.read-only.community.string
Read-Write Community String