What can I do to enable automatic switching to a backup network when there is packet loss?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















If I create a connection using network bonding (using the mode active-backup), then although automatic switching to the backup network occurs if I pull out the network cable, it does not occur when the problem is no packets getting through.



What can I do to enable automatic switching to the backup network when there is packet loss on the primary with switching back when the primary is working properly (much like how network bonding with mode active-backup seamlessly switches between primary and backup and back when pulling out and plugging back in the network cable)?










share|improve this question
























  • @RuiFRibeiro I am interested in a solution that deals with failover (which need not use network bonding).

    – mcarans
    Mar 6 at 14:44












  • @RuiFRibeiro this is incorrect. Bonding manages failover, there is even a mode that does nothing but failover, active-backup.

    – wazoox
    Mar 6 at 15:22











  • If I understand your question correctly, you'd like to detect the absence of network traffic on a determined interface? This isn't in the realm of failover and bonding. You must provide more information on what you are trying to achieve.

    – wazoox
    Mar 6 at 15:25











  • @wazoox I have completed reworded it. Is it clearer now?

    – mcarans
    Mar 6 at 15:37











  • @mcarans Yes I got it :) I'm writing an answer.

    – wazoox
    Mar 6 at 15:43















0















If I create a connection using network bonding (using the mode active-backup), then although automatic switching to the backup network occurs if I pull out the network cable, it does not occur when the problem is no packets getting through.



What can I do to enable automatic switching to the backup network when there is packet loss on the primary with switching back when the primary is working properly (much like how network bonding with mode active-backup seamlessly switches between primary and backup and back when pulling out and plugging back in the network cable)?










share|improve this question
























  • @RuiFRibeiro I am interested in a solution that deals with failover (which need not use network bonding).

    – mcarans
    Mar 6 at 14:44












  • @RuiFRibeiro this is incorrect. Bonding manages failover, there is even a mode that does nothing but failover, active-backup.

    – wazoox
    Mar 6 at 15:22











  • If I understand your question correctly, you'd like to detect the absence of network traffic on a determined interface? This isn't in the realm of failover and bonding. You must provide more information on what you are trying to achieve.

    – wazoox
    Mar 6 at 15:25











  • @wazoox I have completed reworded it. Is it clearer now?

    – mcarans
    Mar 6 at 15:37











  • @mcarans Yes I got it :) I'm writing an answer.

    – wazoox
    Mar 6 at 15:43













0












0








0








If I create a connection using network bonding (using the mode active-backup), then although automatic switching to the backup network occurs if I pull out the network cable, it does not occur when the problem is no packets getting through.



What can I do to enable automatic switching to the backup network when there is packet loss on the primary with switching back when the primary is working properly (much like how network bonding with mode active-backup seamlessly switches between primary and backup and back when pulling out and plugging back in the network cable)?










share|improve this question
















If I create a connection using network bonding (using the mode active-backup), then although automatic switching to the backup network occurs if I pull out the network cable, it does not occur when the problem is no packets getting through.



What can I do to enable automatic switching to the backup network when there is packet loss on the primary with switching back when the primary is working properly (much like how network bonding with mode active-backup seamlessly switches between primary and backup and back when pulling out and plugging back in the network cable)?







networking network-interface bonding failover






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 15:36







mcarans

















asked Mar 6 at 14:24









mcaransmcarans

18018




18018












  • @RuiFRibeiro I am interested in a solution that deals with failover (which need not use network bonding).

    – mcarans
    Mar 6 at 14:44












  • @RuiFRibeiro this is incorrect. Bonding manages failover, there is even a mode that does nothing but failover, active-backup.

    – wazoox
    Mar 6 at 15:22











  • If I understand your question correctly, you'd like to detect the absence of network traffic on a determined interface? This isn't in the realm of failover and bonding. You must provide more information on what you are trying to achieve.

    – wazoox
    Mar 6 at 15:25











  • @wazoox I have completed reworded it. Is it clearer now?

    – mcarans
    Mar 6 at 15:37











  • @mcarans Yes I got it :) I'm writing an answer.

    – wazoox
    Mar 6 at 15:43

















  • @RuiFRibeiro I am interested in a solution that deals with failover (which need not use network bonding).

    – mcarans
    Mar 6 at 14:44












  • @RuiFRibeiro this is incorrect. Bonding manages failover, there is even a mode that does nothing but failover, active-backup.

    – wazoox
    Mar 6 at 15:22











  • If I understand your question correctly, you'd like to detect the absence of network traffic on a determined interface? This isn't in the realm of failover and bonding. You must provide more information on what you are trying to achieve.

    – wazoox
    Mar 6 at 15:25











  • @wazoox I have completed reworded it. Is it clearer now?

    – mcarans
    Mar 6 at 15:37











  • @mcarans Yes I got it :) I'm writing an answer.

    – wazoox
    Mar 6 at 15:43
















@RuiFRibeiro I am interested in a solution that deals with failover (which need not use network bonding).

– mcarans
Mar 6 at 14:44






@RuiFRibeiro I am interested in a solution that deals with failover (which need not use network bonding).

– mcarans
Mar 6 at 14:44














@RuiFRibeiro this is incorrect. Bonding manages failover, there is even a mode that does nothing but failover, active-backup.

– wazoox
Mar 6 at 15:22





@RuiFRibeiro this is incorrect. Bonding manages failover, there is even a mode that does nothing but failover, active-backup.

– wazoox
Mar 6 at 15:22













If I understand your question correctly, you'd like to detect the absence of network traffic on a determined interface? This isn't in the realm of failover and bonding. You must provide more information on what you are trying to achieve.

– wazoox
Mar 6 at 15:25





If I understand your question correctly, you'd like to detect the absence of network traffic on a determined interface? This isn't in the realm of failover and bonding. You must provide more information on what you are trying to achieve.

– wazoox
Mar 6 at 15:25













@wazoox I have completed reworded it. Is it clearer now?

– mcarans
Mar 6 at 15:37





@wazoox I have completed reworded it. Is it clearer now?

– mcarans
Mar 6 at 15:37













@mcarans Yes I got it :) I'm writing an answer.

– wazoox
Mar 6 at 15:43





@mcarans Yes I got it :) I'm writing an answer.

– wazoox
Mar 6 at 15:43










1 Answer
1






active

oldest

votes


















1














By default (AFAIK), the bonding driver uses only mii monitoring to test for interface availability, i.e. carrier presence.



However you may want to use ARP monitoring, eventually for only some specific targets (for instance your main router) to test for incoming arp packets instead.



The process is described in the Linux bonding documentation.



Basically you may monitor a target (up to 16 overall) this way:



echo +192.168.1.1 > /sys/class/net/bond0/bonding/arp_ip_target


Generally you'll want to set a correct value (not too long, not too short, to be tested in operation) for the arp monitoring interval (in ms):



echo 100 > /sys/class/net/bond0/bonding/arp_interval





share|improve this answer


















  • 1





    This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

    – mcarans
    Mar 6 at 16:10











  • @mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

    – wazoox
    Mar 6 at 17:07











  • Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

    – mcarans
    Mar 7 at 8:24












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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/3.0/"u003ecc by-sa 3.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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504726%2fwhat-can-i-do-to-enable-automatic-switching-to-a-backup-network-when-there-is-pa%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














By default (AFAIK), the bonding driver uses only mii monitoring to test for interface availability, i.e. carrier presence.



However you may want to use ARP monitoring, eventually for only some specific targets (for instance your main router) to test for incoming arp packets instead.



The process is described in the Linux bonding documentation.



Basically you may monitor a target (up to 16 overall) this way:



echo +192.168.1.1 > /sys/class/net/bond0/bonding/arp_ip_target


Generally you'll want to set a correct value (not too long, not too short, to be tested in operation) for the arp monitoring interval (in ms):



echo 100 > /sys/class/net/bond0/bonding/arp_interval





share|improve this answer


















  • 1





    This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

    – mcarans
    Mar 6 at 16:10











  • @mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

    – wazoox
    Mar 6 at 17:07











  • Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

    – mcarans
    Mar 7 at 8:24
















1














By default (AFAIK), the bonding driver uses only mii monitoring to test for interface availability, i.e. carrier presence.



However you may want to use ARP monitoring, eventually for only some specific targets (for instance your main router) to test for incoming arp packets instead.



The process is described in the Linux bonding documentation.



Basically you may monitor a target (up to 16 overall) this way:



echo +192.168.1.1 > /sys/class/net/bond0/bonding/arp_ip_target


Generally you'll want to set a correct value (not too long, not too short, to be tested in operation) for the arp monitoring interval (in ms):



echo 100 > /sys/class/net/bond0/bonding/arp_interval





share|improve this answer


















  • 1





    This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

    – mcarans
    Mar 6 at 16:10











  • @mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

    – wazoox
    Mar 6 at 17:07











  • Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

    – mcarans
    Mar 7 at 8:24














1












1








1







By default (AFAIK), the bonding driver uses only mii monitoring to test for interface availability, i.e. carrier presence.



However you may want to use ARP monitoring, eventually for only some specific targets (for instance your main router) to test for incoming arp packets instead.



The process is described in the Linux bonding documentation.



Basically you may monitor a target (up to 16 overall) this way:



echo +192.168.1.1 > /sys/class/net/bond0/bonding/arp_ip_target


Generally you'll want to set a correct value (not too long, not too short, to be tested in operation) for the arp monitoring interval (in ms):



echo 100 > /sys/class/net/bond0/bonding/arp_interval





share|improve this answer













By default (AFAIK), the bonding driver uses only mii monitoring to test for interface availability, i.e. carrier presence.



However you may want to use ARP monitoring, eventually for only some specific targets (for instance your main router) to test for incoming arp packets instead.



The process is described in the Linux bonding documentation.



Basically you may monitor a target (up to 16 overall) this way:



echo +192.168.1.1 > /sys/class/net/bond0/bonding/arp_ip_target


Generally you'll want to set a correct value (not too long, not too short, to be tested in operation) for the arp monitoring interval (in ms):



echo 100 > /sys/class/net/bond0/bonding/arp_interval






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 6 at 15:56









wazooxwazoox

1,102913




1,102913







  • 1





    This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

    – mcarans
    Mar 6 at 16:10











  • @mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

    – wazoox
    Mar 6 at 17:07











  • Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

    – mcarans
    Mar 7 at 8:24













  • 1





    This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

    – mcarans
    Mar 6 at 16:10











  • @mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

    – wazoox
    Mar 6 at 17:07











  • Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

    – mcarans
    Mar 7 at 8:24








1




1





This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

– mcarans
Mar 6 at 16:10





This sounds promising. So using nmcli I guess I would do: nmcli con add type bond con-name bond ifname bond0 mode active-backup primary myeth0 +bond.options "fail_over_mac=active,arp_interval=100,arp_ip_target=192.168.1.1,primary_reselect=always,updelay=200" right?

– mcarans
Mar 6 at 16:10













@mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

– wazoox
Mar 6 at 17:07





@mcarans seems right, well, unless your router IP isn't 192.168.1.1 of course :)

– wazoox
Mar 6 at 17:07













Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

– mcarans
Mar 7 at 8:24






Thanks, I will test this for a few days to make sure it works without issue and also because the problem that causes the packet loss and required me to ask this question is intermittent.

– mcarans
Mar 7 at 8:24


















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux 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%2funix.stackexchange.com%2fquestions%2f504726%2fwhat-can-i-do-to-enable-automatic-switching-to-a-backup-network-when-there-is-pa%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

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?