Re: How to share port 161....?

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Wed, 13 Mar 1996 21:00:11 +0100

Hi!

"Richard Brooks" <rbrooks@ti.com> said:

Richard> Our agent monitors a single application on a machine
Richard> and we'd like to get information from it to an SNMP
Richard> management station which is monitoring a great many
Richard> machines. The management station uses the standard
Richard> SNMP port (161) to talk to all its agents and this
Richard> port is configurable only on a global basis--we can't
Richard> set it to just talk to our Scotty agent on, say, port
Richard> 171 without it wanting to talk to all its agents on
Richard> 171.

Richard> Question is: how do we integrate our Scotty agent with
Richard> the apparently standard snmpd which is already on the
Richard> machine (and in control of the standard SNMP ports on
Richard> that machine) where our agent will be running?

There are actually the following options:

1) Upgrade your management station so that it is able to talk to
multiple agents on one host (using different port numbers).

2) Check if the standard SNMP agent supports one of the extensibility
protocols (DPI, SMUX) and write an interface for this protocol.
(There is currently an IETF working group which will define a
standard agent extensibility protocol. But there is still a long
way to go so it won't help to solve your problem soon.)

3) Use a SNMP proxy agent. Either your standard SNMP agent supports
native SNMP proxy relationships (not very likely) or you have to
get a proxy that sits on port 161. You have to move your standard
agent to a different port (which also might not be possible).

You will find some more pointer about agent extensibility, proxies and
how it plays together in the slides of my presentation at the GUUG
(German Unix Users Group) workshop (yes, they are written in English):

ftp://ftp.ibr.cs.tu-bs.de/pub/local/papers/guugws-96.slides.ps.gz

SNMPv1 PDU multiplexing is actually not that difficult if your manager
allows to use different community strings to talk to an agent. All you
need to do is to write some code that extracts the community string,
and the request id and forwards the UDP packet to the appropriate
port. Responses or traps received from the one of the proxied agents
are simply forwarded to the manager (you will need to examine the
request id here to find out which response belongs to which manager).
Things get complicated if you are doing some sort of secure SNMP.

Note, if your manager does not allow to use different community
strings for one agent, you should consider 1) as the best solution.

Juergen