How to forward a Trap received by LoriotPro to another SNMP Manager

This HowTo explain what are the capabilities of LoriotPro to behave as a Trap forwarder. A SNMP Trap in version 1 contains the IP agent source address in the SNMP V1 PDU and as any IP/UDP packet the  IP agent source address in the IP packet.

When LoriotPro reroute (forward) the received V1 Trap as an action of a standard filter (see screenshot below), the SNMP V1 PDU is not changed (the IP agent source is not removed) but  the IP source address in the IP packet is replaced by the IP source adress of the LoriotPro server.

For security reason, LoriotPro doesn't spoof the IP packet source address and thus cannot be used to simulate another device.

Example of action that forward the TRAP


Here the trap have the IP agent address but is send by If you reroute this trap to another device the IP address of the SNMP Agent is not changed.

With V2 TRAP the IP agent source address is not included in the SNMP PDU, this implies that when LoriotPro forward the V2 trap, the IP agent source address is lost and there is no way to figure out what is the device that sent the Trap initially.

One solution :

With the Extended Edition of LoriotPro, it is possible to launch a LUA script as an action of a filter on a received Trap. In this case, it is possible to build a new V1 trap and to include the IP SNMP agent source adrress, but the IP source of the sending packet is still not spoofed and stays the IP source address of the LoriotPro server.

If the MIB file defining the Trap is present in the LoriotPro MIB database, it is possible to forward, using the LUA scripting (Extended Edition), a received V2 trap as a V1 trap including the IP agent source address in its PDU.

Here under a trap received in SNMP V2


The LUA source code that builds a V1 trap using the V1 or V2 parameter received.


--  Start of your program ------------------------------------------


-- TODO: Add your message handler code here and/or call default



if T_H_Version==2 then

                for i=2,table.getn(T_P_TableName) do



                --lp.SendSyslog(ipdest," "..T_H_IP..T_H_Community..T_T_Trap..Oidstr);

                lp.SendExternEvent(ipdest,5001,100000,4,T_H_IP,"", T_T_String);



                for i=0,table.getn(T_P_TableName) do



                --lp.SendSyslog(ipdest," "..T_P_Number.." "..T_H_IP..T_H_Community..T_T_Trap..Oidstr);

                lp.SendExternEvent(ipdest,5001,100000,4,T_H_IP,"", T_T_String);



in this script, the trap is converted to another and the parameter is converted in Octet String

How to use that :


Select Run script :


And use the following script and store it in : bin/config/script/


A new Trap filter is added using this script as an action. The script is simply stored in a queue that the "Event/trap Script Queue Manager" plugin takes care of.


 To use this feature, it is mandatory to load in the Service workspace the Event/trap Script Queue Manager plugin.


And set the timer of the interval at which the plugin will execute the scripts in the queue.


When you receive this trap it is routed in V1 to your other Manager with the IP agent source.


This solution allows to translate V2 or V1 trap in other form (TRAP syslog Event etc) and pass the IP SNMP agent Source Address in the new packet.

If you have a lot of TRAP to translate this solution is perhaps not very performant, but for few filtered trap this is a working solution.

The other way is to translate locally the trap in LoriotPro Event and send to the other LoriotPro the trap already filtered, with the correct parameter.


The best way is to use the option available in standard Edition  : Send event to other LoriotPro


Set the parameter :


And customize your message :


This method doesn't use a specific service and it is faster :


Here under all the advanced trap functions available with LoriotPro Extended Edition

SNMP Trap functions

lp_AckTrapFilter - Acknowledge SNMP Traps by type

lp_AckEventFilterAction - Acknowledge a SNMP Trap filter counter

lp.ClearIPTrapCounter - Perform a reset of the counter of SNMP TRAPs received by a host

lp.GetEventFilterGlobalStatus - Retreives the enabled status of a LoriotPro event filter

lp.GetEventInformation - Retrieve statistics information of an event and its filter

lp.GetTrapFilterActionList - Retrieve the list of filters attached to a TRAP

GetTrapFilterActionInformation - Retrieves the information of a Trap filter.

lp.GetTrapFilterGlobalStatus - Retrieve the global enable/disable status of a Trap filters

lp.GetTrapFilterInformation - Retrieve the information attached to a a Trap filter

lp.GetTrapFilterList - Retrieve a list of trap that have known filter statistics

lp.SendTrapV1 - Send a SNMP Trap in V1 format to a Trap receiver

lp.SendTrapV2 - Sends a SNMP Trap in V2C format

lp.SetTrapFilterActionDisable - Enable/disable the action of a TRAP filter

lp.SetTrapFilterDisable - Enable/disable all the actions of a TRAP filter

lp.SetTrapFilterGlobalStatus - Enable or disable all the TRAP filters

lp.GetTrapCacheInformation  LoriotPro V7 feature - Get technical information on the Trap receiver cache system

This link is a summary of what feature provides LoriotPro