I have a small LAN. there are:

  • One linux PC with IP x.x.x.10
  • an unmanaged switch
  • two different devices that share the same IP (x.x.x.1) (lets call them device 1 and device 2).

The idea is to power up device 1, then linux PC connects to it using modbus tcp/ip protocol, then disconnects and the device is powered down.

Next step is that device 2 is powered up. linux PC connects to it with modbus tcp/ip, changes its IP address to (x.x.x.2) then disconnects and after that device 2 is powered down.

So I end up with two devices with different IPs that can work simultaneously.

My problem is that when I try to connect to device 2 it takes more than one minute to establish the connection. I think the problem is MAC learning. Is there any way to overcome this?

  • Unfortunately, you have an unmanaged switch, which is off-topic here as there is nothing to configure, and your PCs are off-topic, as is Modbus on TCP because it is a protocol above OSI layer-4. As Zac explains, it is a host problem with ARP, not a network problem.
    – Ron Maupin
    Jul 13 at 12:39

MAC learning on the switch happens 'instantly' - as soon as the first frame is received by the switch. I don't think that is a problem, especially since multiple MAC addresses on a single port are no problem generally.

But: any device trying to send to the duplicate IP address is likely to have the previous MAC in its ARP cache though - make sure you delete that entry/clear the cache to force an update and then reconfigure the device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.