• Portada
    • Recientes
    • Usuarios
    • Registrarse
    • Conectarse

    Double IP in Raspberry Pi network

    Programado Fijo Cerrado Movido Redes y almacenamiento
    2 Mensajes 2 Posters 1.7k Visitas
    Cargando más mensajes
    • Más antiguo a más nuevo
    • Más nuevo a más antiguo
    • Mayor número de Votos
    Responder
    • Responder como tema
    Accede para responder
    Este tema ha sido borrado. Solo los usuarios que tengan privilegios de administración de temas pueden verlo.
    • cobitoC Desconectado
      cobito Administrador
      Última edición por

      Yesterday I saw something I hadn't seen before: a network card with two simultaneous IPs. It seems to be a Raspbian bug that has been observed since 2015 but that still hasn't been fixed today. I noticed it because, despite having a static IP configured, there was an IP conflict with another device on the network.

      It turns out that even if you configure a static IP, once the system announces the IP via ARP, Raspbian makes a request via DHCP and assigns a second IP. After that, the Raspi responds to both addresses indiscriminately and in the router's ARP table you can see how both IPs correspond to the same MAC.

      Here there have actually been two faults: the one where Raspbian asks for IP from the DHCP server when it shouldn't and mine for having overlapped the DHCP IP range with the static IPs of the network.

      There are several solutions. One of the simple ones is to force the DHCP client to use a static IP by editing the /etc/dhcpcd.conf file with this:

      interface eth0 static ip_address=192.168.0.20/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1 

      The other option (the one I chose) is to disable the DHCP client with this:

      sudo update-rc.d -f dhcpcd remove 

      If you want to reactivate the DHCP client (useful in Wifi networks for example), type this:

      sudo update-rc.d dhcpcd defaults 

      Obviously, I have also corrected the range of automatic IPs, but that has been the classic problem of what's between the seat and the keyboard.

      Toda la actualidad en la portada de Hardlimit
      Mis cacharros

      hlbm signature

      1 Respuesta Última respuesta Responder Citar 2
      • rul3sR Desconectado
        rul3s Veteranos HL
        Última edición por

        Well, technically it's not an error, precisely it's something that I recently had to investigate at work and the solution was that, create a VIP (Virtual IP) to which also responds to requests.
        This can be done in both windows and linux and indeed it can be useful in certain scenarios.

        In my case, I had a gateway problem that I solved this way, let's take the example, 3 devices, A, B and C connected like this.

        A -- B -- C

        A and C can't see or route each other since they have different gateways and their network configuration can't be modified, so B has 2 IP's on each of its interfaces, let's say they are X.10 and X.20. When A communicates with B through X.10, the real recipient of the packet is B. When it does so through X.20, B takes those packets, and does an IPTABLES to C, in this way A thinks it's communicating with B but in reality it's communicating with C through this second IP that B has. And the same between B and C.

        I don't know if I've been understood.... it's something strange if haha.

        On the other hand, if you have a windows where you're changing IP's constantly, you can go to the adapter properties and put there several IP's that you want the computer to respond to, in this way, when changing networks you don't have to go modifying the IP's at each moment.

        They are rare cases but in which it can be useful.

        Regards.

        MAIN: Ryzen7 3800X + RTX2070Super + Asus x470 StrixF + KFA2 HOF 16GB DDR4 4000 + NVMe Samsung 970 EvoPlus 500GB + Samsung 850Pro 512GB + Samsung 860QVO 2TB + Asus Xonar STX + Phanteks Enthoo Pro M Se + Seasonic Focus+ 650W

        LAPTOP: Asus Strix G531GT Intel i5 9300H + GTX1650 4GB + 16GB DDR4 2666 (8x2) + NVMe 256GB + 1TB HDD

        hlbm signature

        1 Respuesta Última respuesta Responder Citar 1
        • 1 / 1
        • First post
          Last post

        Foreros conectados [Conectados hoy]

        0 usuarios activos (0 miembros y 0 invitados).
        febesin, pAtO,

        Estadísticas de Hardlimit

        Los hardlimitianos han creado un total de 543.5k posts en 62.9k hilos.
        Somos un total de 34.9k miembros registrados.
        roymendez ha sido nuestro último fichaje.
        El récord de usuarios en linea fue de 123 y se produjo el Thu Jan 15 2026.