Network dynamic failover does not work if IP address differs between ethernet and wifiHowto migrate from...

Would houseruling two or more instances of resistance to the same element as immunity be overly unbalanced?

Maintaining distance

Can someone identify this old round connector?

Would Great Old Ones care about the Blood War?

How to prove (A v B), (A → C), (B → D) therefore (C v D)

Conveying the idea of "down the road" (i.e. in the future)

Is insurance company’s preferred auto shop biased?

Has Boris Johnson ever referred to any of his opponents as "traitors"?

No interest ever. Just a fee for my end,

how would i use rm to delete all files without certain wildcard?

Was there an autocomplete utility in MS-DOS?

Is negative resistance possible?

Does python reuse repeated calculation results?

Proof of bound on optimal TSP tour length in rectangular region

Mac no longer boots

Could quantum computing help resolve some computability problems like p vs np or the halting problem?

What are the most important factors in determining how fast technology progresses?

Found a minor bug, affecting 1% of users. What should QA do?

Should I hang doors before or after drywall?

Object Oriented Design: Where to place behavior that pertains to more than one type of object?

What is the origin of the minced oath “Jiminy”?

Anonymous reviewer disclosed his identity. Should I thank him by name?

How do you pronounce a D at the end of a word followed by a word starting with D?

Can 35 mm film which went through a washing machine still be developed?



Network dynamic failover does not work if IP address differs between ethernet and wifi


Howto migrate from networking to systemd-networkd with dynamic failoverAccess point as WiFi router/repeater, optional with bridgeFacing issue in ethernet configuration for RaspbianRouting traffic with 2 VPN Gateways on RaspberryPisystemd-networkd: Bond Ethernet and Wifi (USB Dongle), AP with Raspi 3b+ on board Wifi






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








2















after reading this answer for how to setup dynamic network failover I am having a question.
First of all thanks a lot to @Ingo posting this manual how to setup bonding/dynamic network failover. It was very easy to setup and works fine for me if my ethernet and wlan network IP address are the same!



However, if my wifi connection is a phone/cellular hotspot that uses a different internet IP address (for example 172.20.10.2 instead of 192.168.2.105 on the ethernet connection), the failover is not working! It looks to me like the bonding interface sticks with the old 192.168.2.105 IP address and then the new connection on the wifi does not work. Do you have any idea what could be the reason?



I have tried to setup the ethernet and wifi interface with static ips, however that didn't help. The bonding interface (still on DHCP) sticks with the IP address from the ethernet interface, even though that one is down.



Any help is appreciated!!










share|improve this question







New contributor



Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




























    2















    after reading this answer for how to setup dynamic network failover I am having a question.
    First of all thanks a lot to @Ingo posting this manual how to setup bonding/dynamic network failover. It was very easy to setup and works fine for me if my ethernet and wlan network IP address are the same!



    However, if my wifi connection is a phone/cellular hotspot that uses a different internet IP address (for example 172.20.10.2 instead of 192.168.2.105 on the ethernet connection), the failover is not working! It looks to me like the bonding interface sticks with the old 192.168.2.105 IP address and then the new connection on the wifi does not work. Do you have any idea what could be the reason?



    I have tried to setup the ethernet and wifi interface with static ips, however that didn't help. The bonding interface (still on DHCP) sticks with the IP address from the ethernet interface, even though that one is down.



    Any help is appreciated!!










    share|improve this question







    New contributor



    Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      2












      2








      2








      after reading this answer for how to setup dynamic network failover I am having a question.
      First of all thanks a lot to @Ingo posting this manual how to setup bonding/dynamic network failover. It was very easy to setup and works fine for me if my ethernet and wlan network IP address are the same!



      However, if my wifi connection is a phone/cellular hotspot that uses a different internet IP address (for example 172.20.10.2 instead of 192.168.2.105 on the ethernet connection), the failover is not working! It looks to me like the bonding interface sticks with the old 192.168.2.105 IP address and then the new connection on the wifi does not work. Do you have any idea what could be the reason?



      I have tried to setup the ethernet and wifi interface with static ips, however that didn't help. The bonding interface (still on DHCP) sticks with the IP address from the ethernet interface, even though that one is down.



      Any help is appreciated!!










      share|improve this question







      New contributor



      Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      after reading this answer for how to setup dynamic network failover I am having a question.
      First of all thanks a lot to @Ingo posting this manual how to setup bonding/dynamic network failover. It was very easy to setup and works fine for me if my ethernet and wlan network IP address are the same!



      However, if my wifi connection is a phone/cellular hotspot that uses a different internet IP address (for example 172.20.10.2 instead of 192.168.2.105 on the ethernet connection), the failover is not working! It looks to me like the bonding interface sticks with the old 192.168.2.105 IP address and then the new connection on the wifi does not work. Do you have any idea what could be the reason?



      I have tried to setup the ethernet and wifi interface with static ips, however that didn't help. The bonding interface (still on DHCP) sticks with the IP address from the ethernet interface, even though that one is down.



      Any help is appreciated!!







      systemd-networkd






      share|improve this question







      New contributor



      Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      Peter H.Peter H.

      112 bronze badges




      112 bronze badges




      New contributor



      Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Peter H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          2 Answers
          2






          active

          oldest

          votes


















          1
















          The simple answer is that you can't use that as a failover for existing connections.



          If you have short connections or can reconnect after a failure, the next connection will use the other interface. But an existing connection is always tied to a specific IP address pair.



          Even if you could convince the kernel to move the connection to the other local address, it wouldn't work because the other end doesn't expect packets for the connection to suddenly come from a different IP address.



          IPv6 has some support for failover, and you can do something similar with IPv4, but both sides must support it, so you can't use that for standard connections.



          If you really want a failover for existing connections, you can set up two links to a server configured to allow that. All connections to the outside will seem to come from this server.






          share|improve this answer


























          • I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

            – tlfong01
            5 hours ago



















          1
















          The goal of bonding is that the ip address on an interface does not change no matter what connection is used. The interface is connected to a subnet with a defined ip address range. It can only direct connect to devices on the same subnet. If it want to connect to devices on other subnets there is a router needed that sends packets from one subnet to the next.



          Your internet router uses subnet 192.168.2.0/24 and the DHCP server on this subnet gives ip address 192.168.2.105 to the RasPi. The cell phone uses subnet 172.16.0.0/12 and the DHCP server on this subnet gives ip address 172.20.10.2 to the RasPi. With DHCP enabled on the RasPi you will get different ip addresses on the bond0 interface. That breaks bonding by definition.



          First of all you have to determine what subnet to use, maybe that private subnet from the cell phone 172.16.0.0/12. Then you can give bond0 a static ip address, e.g. 172.20.10.200/12. Now you have to configure the internet router for the wired connection to use the same subnet so all devices are on this subnet.



          But as you see, a cell phone is a device for personal use and not very suitable to improve stability of a network.






          share|improve this answer



























            Your Answer






            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("schematics", function () {
            StackExchange.schematics.init();
            });
            }, "cicuitlab");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "447"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });







            Peter H. is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded
















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f104083%2fnetwork-dynamic-failover-does-not-work-if-ip-address-differs-between-ethernet-an%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1
















            The simple answer is that you can't use that as a failover for existing connections.



            If you have short connections or can reconnect after a failure, the next connection will use the other interface. But an existing connection is always tied to a specific IP address pair.



            Even if you could convince the kernel to move the connection to the other local address, it wouldn't work because the other end doesn't expect packets for the connection to suddenly come from a different IP address.



            IPv6 has some support for failover, and you can do something similar with IPv4, but both sides must support it, so you can't use that for standard connections.



            If you really want a failover for existing connections, you can set up two links to a server configured to allow that. All connections to the outside will seem to come from this server.






            share|improve this answer


























            • I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

              – tlfong01
              5 hours ago
















            1
















            The simple answer is that you can't use that as a failover for existing connections.



            If you have short connections or can reconnect after a failure, the next connection will use the other interface. But an existing connection is always tied to a specific IP address pair.



            Even if you could convince the kernel to move the connection to the other local address, it wouldn't work because the other end doesn't expect packets for the connection to suddenly come from a different IP address.



            IPv6 has some support for failover, and you can do something similar with IPv4, but both sides must support it, so you can't use that for standard connections.



            If you really want a failover for existing connections, you can set up two links to a server configured to allow that. All connections to the outside will seem to come from this server.






            share|improve this answer


























            • I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

              – tlfong01
              5 hours ago














            1














            1










            1









            The simple answer is that you can't use that as a failover for existing connections.



            If you have short connections or can reconnect after a failure, the next connection will use the other interface. But an existing connection is always tied to a specific IP address pair.



            Even if you could convince the kernel to move the connection to the other local address, it wouldn't work because the other end doesn't expect packets for the connection to suddenly come from a different IP address.



            IPv6 has some support for failover, and you can do something similar with IPv4, but both sides must support it, so you can't use that for standard connections.



            If you really want a failover for existing connections, you can set up two links to a server configured to allow that. All connections to the outside will seem to come from this server.






            share|improve this answer













            The simple answer is that you can't use that as a failover for existing connections.



            If you have short connections or can reconnect after a failure, the next connection will use the other interface. But an existing connection is always tied to a specific IP address pair.



            Even if you could convince the kernel to move the connection to the other local address, it wouldn't work because the other end doesn't expect packets for the connection to suddenly come from a different IP address.



            IPv6 has some support for failover, and you can do something similar with IPv4, but both sides must support it, so you can't use that for standard connections.



            If you really want a failover for existing connections, you can set up two links to a server configured to allow that. All connections to the outside will seem to come from this server.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 6 hours ago









            RalfFriedlRalfFriedl

            1,7892 gold badges5 silver badges10 bronze badges




            1,7892 gold badges5 silver badges10 bronze badges
















            • I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

              – tlfong01
              5 hours ago



















            • I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

              – tlfong01
              5 hours ago

















            I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

            – tlfong01
            5 hours ago





            I am glad to hear that IPv6 support more things. I don't know what is going on the discussion here, but I think when IPv6 and 5G arrive, all network problems wiil disappear, just like glass fiber wire replacing copper wire, and 1/23/4/5G mobile phones replace land line phones and the stupid "0.5G pagers.

            – tlfong01
            5 hours ago













            1
















            The goal of bonding is that the ip address on an interface does not change no matter what connection is used. The interface is connected to a subnet with a defined ip address range. It can only direct connect to devices on the same subnet. If it want to connect to devices on other subnets there is a router needed that sends packets from one subnet to the next.



            Your internet router uses subnet 192.168.2.0/24 and the DHCP server on this subnet gives ip address 192.168.2.105 to the RasPi. The cell phone uses subnet 172.16.0.0/12 and the DHCP server on this subnet gives ip address 172.20.10.2 to the RasPi. With DHCP enabled on the RasPi you will get different ip addresses on the bond0 interface. That breaks bonding by definition.



            First of all you have to determine what subnet to use, maybe that private subnet from the cell phone 172.16.0.0/12. Then you can give bond0 a static ip address, e.g. 172.20.10.200/12. Now you have to configure the internet router for the wired connection to use the same subnet so all devices are on this subnet.



            But as you see, a cell phone is a device for personal use and not very suitable to improve stability of a network.






            share|improve this answer






























              1
















              The goal of bonding is that the ip address on an interface does not change no matter what connection is used. The interface is connected to a subnet with a defined ip address range. It can only direct connect to devices on the same subnet. If it want to connect to devices on other subnets there is a router needed that sends packets from one subnet to the next.



              Your internet router uses subnet 192.168.2.0/24 and the DHCP server on this subnet gives ip address 192.168.2.105 to the RasPi. The cell phone uses subnet 172.16.0.0/12 and the DHCP server on this subnet gives ip address 172.20.10.2 to the RasPi. With DHCP enabled on the RasPi you will get different ip addresses on the bond0 interface. That breaks bonding by definition.



              First of all you have to determine what subnet to use, maybe that private subnet from the cell phone 172.16.0.0/12. Then you can give bond0 a static ip address, e.g. 172.20.10.200/12. Now you have to configure the internet router for the wired connection to use the same subnet so all devices are on this subnet.



              But as you see, a cell phone is a device for personal use and not very suitable to improve stability of a network.






              share|improve this answer




























                1














                1










                1









                The goal of bonding is that the ip address on an interface does not change no matter what connection is used. The interface is connected to a subnet with a defined ip address range. It can only direct connect to devices on the same subnet. If it want to connect to devices on other subnets there is a router needed that sends packets from one subnet to the next.



                Your internet router uses subnet 192.168.2.0/24 and the DHCP server on this subnet gives ip address 192.168.2.105 to the RasPi. The cell phone uses subnet 172.16.0.0/12 and the DHCP server on this subnet gives ip address 172.20.10.2 to the RasPi. With DHCP enabled on the RasPi you will get different ip addresses on the bond0 interface. That breaks bonding by definition.



                First of all you have to determine what subnet to use, maybe that private subnet from the cell phone 172.16.0.0/12. Then you can give bond0 a static ip address, e.g. 172.20.10.200/12. Now you have to configure the internet router for the wired connection to use the same subnet so all devices are on this subnet.



                But as you see, a cell phone is a device for personal use and not very suitable to improve stability of a network.






                share|improve this answer













                The goal of bonding is that the ip address on an interface does not change no matter what connection is used. The interface is connected to a subnet with a defined ip address range. It can only direct connect to devices on the same subnet. If it want to connect to devices on other subnets there is a router needed that sends packets from one subnet to the next.



                Your internet router uses subnet 192.168.2.0/24 and the DHCP server on this subnet gives ip address 192.168.2.105 to the RasPi. The cell phone uses subnet 172.16.0.0/12 and the DHCP server on this subnet gives ip address 172.20.10.2 to the RasPi. With DHCP enabled on the RasPi you will get different ip addresses on the bond0 interface. That breaks bonding by definition.



                First of all you have to determine what subnet to use, maybe that private subnet from the cell phone 172.16.0.0/12. Then you can give bond0 a static ip address, e.g. 172.20.10.200/12. Now you have to configure the internet router for the wired connection to use the same subnet so all devices are on this subnet.



                But as you see, a cell phone is a device for personal use and not very suitable to improve stability of a network.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 5 hours ago









                IngoIngo

                15.1k5 gold badges20 silver badges75 bronze badges




                15.1k5 gold badges20 silver badges75 bronze badges


























                    Peter H. is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded

















                    Peter H. is a new contributor. Be nice, and check out our Code of Conduct.













                    Peter H. is a new contributor. Be nice, and check out our Code of Conduct.












                    Peter H. is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Raspberry Pi Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f104083%2fnetwork-dynamic-failover-does-not-work-if-ip-address-differs-between-ethernet-an%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                    Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                    Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...