I’m running Linux Mint on a home server that happens to run pihole. Since it’s both a dhcp and dns server for my network, it has a static ip address. It has an ethernet connection as well as wifi and it’s always been my understanding that you can’t have two network interfaces sharing the same IP address, so I’ve been looking into ways to have one network adapter enabled and the other disabled and then if the network connection of the active device is lost, the other re-enables with the same IP address and disables the other device. This mostly work.
However while debugging one bit of software that seems to have a problem with me disabling my wifi adapter, I inadvertently enabled both the eth and wifi connections while each have the same, manually assigned ip address and everything so far just seems to work. I didn’t think this was possible and I’m wondering, should I expect problems? I can connect to the machine remotely fine, pihole and dvr services installed on the box work. Is there any reason to believe this won’t work?


The “metric 600” on your Wi-Fi adapter indicates to the system that it is a higher cost route than your Ethernet one. So the IP stack will prefer sending packets out via the Ethernet port.
Local devices who haven’t heard from you lately will send to whatever device gives them a response to their ARP (“who has IP address X?”) request first, and seeing as Ethernet is lower latency than WiFi, they will mostly use your Ethernet adapter as their target when sending data to you.
Devices that have received data from you already will have the MAC address of your Ethernet adapter in their ARP table, so they’ll just send packets to that without bothering to issue an ARP request.
Devices off your subnet talk to your router, so they don’t care about your MAC address, they’ll just use IP to talk to your router, who will then do the ARP request and hand the packets on to your computer via whatever interface answers first.
Thanks for the detailed explanation. Has this always been possible though? Was I just imagining that manually assigning to network adapters the same ip address wasn’t possible?
It’s often not possible on other operating systems. Especially the consumer versions of a certain operating system starting with “W”, that system will refuse to have duplicate IPs.
But essentially it’s always been possible (but, probably not preferred these days) to have redundant routes/paths on Unix systems. The way you have it now is more of a side effect of being able to do more complex network setups, like using different interfaces to talk to different subnets, or using a slow link as a backup to a fast link.
With your current setup you should get a slow failover ability, for example if you ping some other device and then unplug your Ethernet cable, you’ll have a bit of a pause in replies and then they will start again as the stack switches to the other link.