lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

SNMP running with several IP address #458

Closed lextudio-support closed 4 hours ago

lextudio-support commented 4 hours ago

I'm developing an agent that receive request from several Manager. The machine where the agent will run has 10 IP Address, and then I'd like configure one different IP Address for each Manager.

Does someone know how can I get the current IP (to know which manger is connected) on the thread?

thanks

Original Reported Date: 2010-06-29T04:24:36.057-07:00 Original CodePlex Discussion Thread ID: 217708

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

Hi Doria,

I'm not sure I can understand. When your application runs, it should bind it's agent listeners to specific IP, so it's your choice what IP to use, no need to retrieve from Manager.

Could you explain better what are you trying to achieve?

Thank you,
Andrea

Original Posted Date: 2010-06-29T05:35:28.317-07:00

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

Thanks for your reply. Sorry for my bad English, I just speak Spanish and Portuguese.

I'll explain what i need.

I want to Run the Agent on an machine that is configured the following IPs:

192.168.1.20

192.168.1.21

192.168.1.22

192.168.1.23

192.168.1.24

We have also a several Monitor manager s at ip address 192.168.1.1. each manager can request the agent thought one IP at port 161.

When the Agent receive the request from one manager, I'd like that the Agent can identify which IP Address(on the agent) the manager connect to (192.168.1.20, 192.168.1.21, 192.168.1.22, 192.168.1.23, 192.168.1.24 or 192.168.1.25).

Because this agent like a bridge, that receive the request from the Manager , send commands to the MODEM on the COM port and send de MODEM response to the Manager. For exemple if the Magener request to the IP 192.168.1.20 the Agent must send the command to the COM port 12 , if use the 192.168.1.21 the Agent send command to the COM PORT 23.

Thanks.

Original Posted Date: 2010-06-29T09:54:15.58-07:00

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

Hola Doria,

I believe your situation is simply solved with 5 agent instances (one IP->one agent). Every instance listen to a particular IP available on server. So every agent can resolve it's mapping with COM port (probably in configuration file). Binding an agent to different IP at same time and coding its behavior on Source IP (which can be not reliable) doens't seem a rock solid solution to me.

Just my two cents,
Andrea

Original Posted Date: 2010-06-30T01:44:50.243-07:00

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

ok,

thanks.

Original Posted Date: 2010-07-01T02:33:10.147-07:00

lextudio-support commented 4 hours ago

Marked as Answer Date: 2013-10-06T05:02:13.78-07:00