-1

What I want to achieve is described in the following figure and below:

enter image description here The device answering to SNMP is a "gateway" to N devices (that don't implement SNMP) and the gateway must manage SNMP informations for each of these machines. The N devices in the back end are identical and the informations for each are described in the same MIB: as a consequence the gateway must have N agents (answering on different ports) and N instances of the same sub-agent implementing the target MIB. Each subagent will be then configured to connect to its own back end device to retrieve informations.

I have some experience with Microsoft WinCE SNMP agent and I'm new to net-snmp. What I am trying to achieve is not feasible using WinCE SNMP agent and AFAIK also in Win desktop environment: there you have one agent and N extension agents managing each a different MIB.

Is it possible to achieve this setup by using net-snmp? Is it so uncommon that it is going to be a hell?

Thanks everybody

salvolds
  • 201
  • 2
  • 14
  • You *just* rewrite all the existing modules that retrieve the data locally so that it retrieves the data remotely; then configure a master agent per target system that will retrieve the data and relay it through to the requesting client. The simpler alternative is run an individual snmp agent on each of the target machines and configure NAT on the gateway machine to relay the requests to the target machine based on port. – Anya Shenanigans Jul 11 '17 at 10:11
  • Hi Petesh, thanks for your comment. I'm not sure I got what you mean. I added a picture to show my target architecture. Can you explain your comment in reference to that figure? – salvolds Jul 11 '17 at 12:24
  • What I mean is that code written for net-snmp sub-agents generally runs on the local system; querying local data and exposing the data over SNMP via the master. That's what the net-snmp construct offers you. Everything behind the 'expose the data over SNMP' is implementation detail, which is programming your 'custom TCP' and querying code on the 'device not supporting SNMP'. the net-snmp library isn't going to help you with that piece; you'll have to figure out that part yourself. Running multiple agents on the system is trivial (just point them to different configs binding on different ports) – Anya Shenanigans Jul 11 '17 at 12:43
  • The problem here is that the question isn't anything specific that someone can help you with; you're just going to have to create the MIB-X subagent yourself. There is nothing about this that's SNMP specific, or a question about the protocol - It's relaying, you just need to have the relevant middleware for this. – Anya Shenanigans Jul 11 '17 at 12:47
  • I think instead that my question is quite specific and in fact you were able to answer me. I was not asking about the custom development part obviously. I was asking about net-snmp capabilities. _"Running multiple agents on the system is trivial (just point them to different configs binding on different ports)"_: this is the first answer I was looking for. I'm new to net-snmp and I didn't know if there was some constraint. Thanks – salvolds Jul 11 '17 at 13:57

2 Answers2

0

This certainly seems achievable with net-snmp or ANY SNMP framework, if you consider your problem as just multiplying your "proxy agent" times N.

It is straightforward to write the proxy agent for the MIB-X to one of your devices, configure it to accept SNMP on some port, eg. 2000, and forward requests to device at IP 1. Then configure a second instance (ie. process) to accept on some other port, eg. 2001, and forward requests to device with IP 2, etc.

No need to make it complicated.

Gambit Support
  • 1,432
  • 1
  • 7
  • 17
  • Ok thanks. Is there any other alternative framework to net-snmp that you would suggest? – salvolds Jul 11 '17 at 14:25
  • Sorry, there are literally more than a dozen other frameworks (SNMP++, SNMP4J, PYSNMP, etc), both open source and commercial, and I really cannot recommend one over the other, specially since I don't know your requirements / skills / budget / etc. – Gambit Support Jul 11 '17 at 16:30
0

I would use different IP addresses by IP aliasing instead of different UDP ports. It will make it possible to display remote devices as different nodes on an SNMP Manager.