I have a Linux PC with the following physical network interfaces:
- Primary LAN/Ethernet port used for most traffic.
- 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.