1

I have a Linux PC with the following physical network interfaces:

  1. Primary LAN/Ethernet port used for most traffic.
  2. Ethernet (from external device) to USB (into my PC), used to connect to a single external device that has a static IP. The PC's network interface is also given a static IP (as the external device doesn't have a DHCP server).

The reason for having the second interface is because the external device's IP address is static and typically conflicts with other similar devices running on our LAN. So we use these Ethernet-to-USB dongles to isolate these external devices to individual PCs.

Ideally the office LAN would be running on a different subnet to the external devices (which I think would mitigate the issue I'm having), but unfortunately it is infeasible for that to happen.

On Windows PCs, having two network interfaces with the same subnet seems to work relatively smoothly. In particular, when communicating with the external device (from the PC), I can see (using Wireshark) that ARP requests are initially sent out on the primary network interface and then Windows NT moves onto the secondary interface, where it finds the external device.

On my Linux PC, it seems that the Linux kernel doesn't follow the same behaviour of sending ARP requests down all network interfaces. The ARP requests only appear to ever be sent down the primary network interface. If I use the following command:

ping -I secondaryNetInterface staticIPOfExternalDevice

...the communication works as expected.

So my question is: Can I get the Linux kernel to behave in a similar way to Windows NT?

Just to make things super clear, here is my Linux PC's routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    100    0        0 eno2
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eno2
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 eno2
192.168.0.0     0.0.0.0         255.255.255.0   U     101    0        0 eno3

...where eno2 is the primary interface and eno3 is the secondary interface.

pleasedesktop
  • 201
  • 1
  • 4
  • 9
  • 2
    I suspect that Windows is misbehaving here and you won't find any way to get Linux to do this. Renumbering your network will probably be the easiest thing to do. – Michael Hampton Nov 03 '20 at 22:30
  • @MichaelHampton just to clarify, are you thinking that changing one of the subnets (so they don't overlap) is the only option? – pleasedesktop Nov 03 '20 at 22:33
  • 1
    That's correct. It's a bad idea to use such commonly used RFC1918 networks anyway, simply because there is a high probability of conflict. This should have been renumbered when it was first set up. – Michael Hampton Nov 03 '20 at 22:35

0 Answers0