Network dynamic failover does not work if IP address differs between ethernet and wifiHowto 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

Mac no longer boots

The work of mathematicians outside their professional environment

What are the limits on an impeached and not convicted president?

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

Dotted footnote rule

CMOS Flash vs SD: Can I put a Gamecube Memory Card in an SD reader?

How much Money Should I save in Order to Generate $1000/Month for the rest of my life?

What is /dev/null and why can't I use hx on it?

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

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

Power Adapter for Traveling to Scotland (I live in the US)

How to calculate Limit of this sequence

Can I pay off my mortgage with a new one?

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

Determine the Winner of a Game of Australian Football

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

Using 4K Skyrim Textures when running 1920 x 1080 display resolution?

Does Hogwarts have its own anthem?

What’s the BrE for “shotgun wedding”?

Why didn't the Universal Translator speak whale?

I've been fired, was allowed to announce it as if I quit and given extra notice, how to handle the questions?

Does the DOJ's declining to investigate the Trump-Zelensky call ruin the basis for impeachment?

Why is my vegetable stock bitter, but the chicken stock not?

Scorched receptacle



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

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її