[SNMP4J] [BULK] SNMP port setting for pulling

Michael Yap michael at tecforte.com
Thu Sep 17 08:55:09 CEST 2009


I'm actually also facing this issue at the moment. It would seem that for
every GETNEXT that I send to the device (at port 161), the device will
respond to the port in which I was originally sending from. This means that
when I issue the request, the command will be sent thru any available ports
on my machine to port 161 of the device's machine. The device would then
respond with the necessary PDU to my IP and specifically the port which was
originally used to send the command.

Now the problem is that listeners are usually bound to specific ports to
listen for incoming traffic. Since the port originally used to send is
random, there's really no way to bind anything to listen to every
conceivable port. Was wondering if we can possibly specify the exact port to
use when issuing the command to the devices so we can listen for incoming
PDUs at that exact location ?

-Michael-


-----Original Message-----
From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On
Behalf Of Tan Yeu Ming
Sent: Wednesday, September 16, 2009 6:43 PM
To: snmp4j at agentpp.org
Subject: [BULK] [SNMP4J] SNMP port setting for pulling
Importance: Low

Dear Sir,

For SNMP4J, I can use it to send GETNEXT message to retrieve
information. Sender Port is from any available port (Source Port) to
Receiver port is (161).

My question is here, how to set the Source Port to desire port number?
Let say always send from source port 2000 to receiver port 161. So
that receiver can send back to the same port 2000.

-- 
Thanks and Regards,
Samuel Tan
tanym4 at gmail.com
_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j




More information about the SNMP4J mailing list