Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I asked this on NET-SNMP mailing list:

https://sourceforge.net/mailarchive/message.php?msg_id=28692398

But unfortunatelly I haven't got any answer up to now.

I need to forward SNMP requests (not traps) from the outside world down to a number of nodes in a subnetwork.

Those nodes aren't directly reachable from the outside, but, instead, they are seen as a single network address (IP) and have different table instances in their OID's. The request is catch by a single node (a "proxy") that knows about the subnetwork configuration and is ought to repass it accordingly.

Is it possible to configure snmpd.conf so that snmpd can forward requests without having to implement a custom agent that checks the index, repacks the PDU's and manually sync's it to the target nodes?

NOTE: My MIB has several tables, all of them indexed by the same index and I need to be able to forward all of the requests based on the given index.

Really thanks.

share|improve this question
    
Can you give an example of a snmp-request that comes in, what you expect to forward and how to send back the answer? –  Nils Feb 1 '12 at 21:37
    
Using the snippet given in net-snmp forum, I could issue a GET on elementFeature1 for node 3 with OID 1.3.6.1.4.1.a.b.c.d.1.1.1.2.3. The agent must forward the request internally after retrieving the internal node IP address (using a getNodeIP( 3 ) function that is available on the "gateway" node). The request is sent from outside to the gateway on IP 10.0.0.100, and forwarded to the node on 192.168.0.3 in the masked network. Is this what you expected as an example? –  fljx Feb 1 '12 at 22:32
    
I think I understand that you do not want to modify the SNMP-request - just "forward" it. How should the gateway know what the supposed target-node is (where does that information come from - seen from the gateways point of view)? –  Nils Feb 2 '12 at 21:30
    
The target node is located from a local function, getNodeIP( node_index ), in my example. The gateway node knows about the internal IPs and can get this information based on the OID index sent. This gateway must keep the topology invisible to the outside, answering as a single device with multiple "features". –  fljx Feb 2 '12 at 22:35
add comment

1 Answer

I am starting to think that ipvsadm might be used for your purposes.

Look at the LVS-NAT approach. Basically you are "load-balancing" the incoming requests (on port snmp/udp) to your nodes. The answer back will go back through the LB, which will send it to the "right" client again.

What I am still missing is how the load-balancer can choose which node to target for the incoming request.

share|improve this answer
    
I don't know either how I should translate the index sent in an SNMP OID using another server that is not SNMP. I am starting to think that I'll not be able to hide from receiving a request through a custom SNMPd agent and manually forwarding it to the target node (building a new PDU). I'll think a bit more on choices like yours, anyway. Thanks! –  fljx Feb 2 '12 at 22:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.