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?

  • atk007@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    9 hours ago

    I don’t know how it’s working for you because I just tried on my PC and got an IP address conflict on my router.

    • ReluctantMuskrat@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      32 minutes ago

      You will need to make sure the IP you assign the adapter isn’t an IP the router will try to assign to another machine or device. The dhcp services don’t assign this IP address and it’s manually assigned in the adapter config so I guess the router doesn’t know or care.

      I am kind of curious how traffic destined for this address doesn’t have issues though, like being received twice. Maybe I haven’t tested enough from a mix of devices on the network.

      • LordCrom@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        I’m at a loss as to how this would work consistently. If 2 interfaces share an IP without bonding, then only 1 would answer the ARP request from anothet host trying to establish a connection. If your system allows same static on 2 devices on same land, then other hosts talk to whoever establishes a session or answers the ARP request.

        I’m curious why you would want this at all?

        • ReluctantMuskrat@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          20 minutes ago

          In terms of why, all I really want is for the machine to have the same, consistent ip address. Since it’s one of my networks dns and dhcp servers, I want it always available with the same ip. It’s hard-wired but has wifi, so in theory if the eth connection or switch it’s attached to dies, the wifi connection can kick in and it can still serve the network if it still has the same ip address, otherwise the wifi connection is no benefit.

          Since I didn’t know I could assign both connections the same ip address and still be functional, I originally setup a script that monitors network status and disables the wifi if eth is active and then re-enables the wifi if the eth connection drops. This works well on my two servers with one exception… my dvr scheduling/recording services don’t work properly when the wifi adapter is disabled. Not sure why but that’s how I stumbled on this setup with both active with the same ip and realized everything just seemed to work.¯\_(ツ)_/¯

      • atk007@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        There is no DHCP, it’s all static addresses, but there is an ARP table maintained at the router, and modern routers protect against ARP poisoning, meaning the same IP cannot have two mac addresses, and they will churn out errors. It’s also a security nightmare because many low level packet tracing tools will not work or give out false positives. I still don’t know how it’s working for you, because by all accounts, it shouldn’t.