MIB Support for JET Applications
In Junos OS, the SNMP functionality is implemented as a distributed agent using RFC 2741, Agent Extensibility (AgentX) Protocol Version 1. The AgentX protocol allows a master agent to be extended by independent subagents, so you can have many subagents, and the communication between master agent and subagents is through the AgentX protocol. In Junos OS, the master agent process (snmpd) listens for external requests on a standard port.
An SNMP MIB is a collection of information organized hierarchically. MIBs define the managed objects that an SNMP manager monitors on SNMP agent or subagents. When an SNMP manager requests information from an SNMP agent, the SNMP agent retrieves the current value of the requested information from the MIB.
Object identifiers (OIDs) uniquely identify manged objects in a MIB hierarchy.
Whenever a request for a given OID is received, the master agent
forwards the request to the connected subagent that is responsible
for the given OID. For example, if a
get-next is received for an OID (let
bgpPeerLocalAddr, for example),
on receiving the request, snmpd forwards the request to the Routing
process (rpd) subagent to get the value for the OID. After receiving
the value, snmpd sends the response with the standard response protocol
data unit (PDU) to the network management system.
SNMP agent functionality is supported for JET applications as well, by extension. The JET agent application can run as a SNMP subagent, and it can register its own MIB OIDs with snmpd. Whenever there is a request for the application-hosted OID, the request will be forwarded to the application through the AgentX protocol, and the application then has to respond back with the value requested.
You can also create a JET subagent as an offbox agent application.
To implement MIB handlers, you must follow open source net-snmp subagent guidelines.
To implement a JET subagent as an offbox agent application:
- Download the open source net-snmp from
- Build the open source net-snmp to the required native machine.
- Write the MIB and the subagent method handlers as per the net-snmp specification.
- Build the application.
- Add the configuration on the device running Junos OS to
allow external SNMP subagent connections. usser@host# set snmp subagent tcp routing-instance default
- Run the application to register the OIDs being served.
After the application registration is successful, the application’s registered OIDs can be polled similar to how other Junos OS supported OIDs are polled.