Subagents do not interact with the network manager directly. Instead, they communicate with the Master Agent. The management responsibility of the subagent can be offered to the Master Agent; however, it is up to the Master Agent to accept or ignore the offers.
After the subagents have registered with the Master Agent, they wait for the SNMP requests from the Master Agent. If a request is received, it sends the appropriate response. Additionally, the subagents can send SNMP traps.
The subagent is composed of four major components: the SNMP driver, Service API stack, subagent application, and MIB database. The Master Agent is responsible for receiving and sending the SNMP Protocol Data Units (PDUs). It also encodes and decodes the PDUs. The SP (Stack) dispatches the received requests appropriately or calls the applicable call back functions.
The system interface module is the implementation of the call back) of all the variables managed by the subagent. The MIB compiler automatically generates this information.
Except for the system dependent interface and the MIB database, the other components are reusable by other subagents and are provided in a library.
This step involves the effort by the subagents to announce their presence and describe how to communicate with them. The transport used is UDP. The port on which the subagents listen for the SNMP request is configurable, as mentioned in "4.4 Agents Access Control File" on "4.4 Agents Access Control File". This establishment can also be done dynamically through a handshaking protocol.
The subagent periodically checks for existence of the Master Agent. The dynamic subagents (not invoked by the Master Agent) periodically determine whether the Master Agent is active. The runtime library reregisters the subagent's subtree with the Master Agent in the event of any interruptions.