I know it's possible to create an agent and query an SNMP enabled device but i need to create an 2 or more SNMP listener in one PC on different ports so that one PC can have may SNMP listener. So that i can send my own message when an agnent queries. Wel as for my understanding SNMP uses UDP so listening UDP sockets on different ports can i receive requests ? Or are there any restrictions?
Asked
Active
Viewed 2,611 times
0
-
You've got your terminology muddled, which is not unusual when it comes to SNMP. The SNMP Agent is the "server", waiting to serve requests such as GET and SET from one or more Managers. Conversely, an SNMP Manager is the "client", making requests to the Agent. If you edit you question to only use the well-defined terms "agent" and "manager", and avoid terms like "listener" or "server", it will help us understand what you are asking. Also, you've got a few spelling mistakes in there. – Jolta May 22 '14 at 10:47
-
You could read http://www.ietf.org/rfc/rfc1905.txt (section 2.1) for the formal definition. – Jolta May 22 '14 at 10:48
1 Answers
0
If you scan the documentation of #SNMP carefully, you should note that under Lextm.SharpSnmpLib.Messaging
namespace, there is a class called ListenerBinding
,
http://help.sharpsnmp.com/html/N_Lextm_SharpSnmpLib_Messaging.htm
Thus, for a single Listener
instance, you can add multiple bindings, each mapping to an individual port as you wished. That's the quickest way to monitor multiple ports with a single Listener
.
Of course, you can create multiple Listener
instances or even multiple processes. Technically you get all the freedom. SNMP protocol does not restrict on which port should be used, though 161 is the default port number.

Lex Li
- 60,503
- 9
- 116
- 147
-
can we bypass the message as well according to what we want. say if i get a request for system details can i send a custom message? – Navin May 27 '14 at 09:40
-
What do you mean "bypassing" and "custom"? If possible, use the standard terms. – Lex Li Jul 26 '14 at 07:07