You are not logged in.

#1 2019-02-14 16:49:42

redtux
Member
Registered: 2019-02-14
Posts: 3

Bonding Interface goes down when eth0 disconnected

Hi
I am trying to setup failover networking as per https://wiki.archlinux.org/index.php/ne … s_failover

It seems to setup correctly, however does not work with switching

/etc/netctl/failover
Description='A wired connection with failover to wireless'
Interface='bond0'
Connection=bond
BindsToInterfaces=('eth0' 'wlan0')
IP='dhcp'
cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup) (fail_over_mac active)
Primary Slave: eth0 (primary_reselect always)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: b6:c3:97:ff:13:a8
Slave queue ID: 0

Slave Interface: wlan0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: e8:2a:44:e3:05:d7
Slave queue ID: 0
ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: wlan0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc noqueue master bond0 state UP mode DORMANT group default qlen 1000
    link/ether e8:2a:44:e3:05:d7 brd ff:ff:ff:ff:ff:ff
5: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether b6:c3:97:ff:13:a8 brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether b6:c3:97:ff:13:a8 brd ff:ff:ff:ff:ff:ff

All seems good right?

Wrong, when I pull the eth0 cable out (its via usb if that makes any difference) bonding interface dissappears and of course no wireless ie:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether e8:2a:44:e3:05:d7 brd ff:ff:ff:ff:ff:ff
cat /proc/net/bonding/bond0 
cat: /proc/net/bonding/bond0: No such file or directory

and then plugging the network cable gives

: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether e8:2a:44:e3:05:d7 brd ff:ff:ff:ff:ff:ff
7: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether b6:c3:97:ff:13:a8 brd ff:ff:ff:ff:ff:ff

I have to restart /etc/netctl/failover to get any network back

thanks

Mike

Last edited by redtux (2019-02-14 23:31:28)

Offline

#2 2019-02-14 16:52:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Bonding Interface goes down when eth0 disconnected

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-02-14 22:40:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Bonding Interface goes down when eth0 disconnected

redtux, there is an "Edit" button on your post. Please use that to add your code tags. I've deleted your repost.

EDIT:

redtux wrote:

Wrong, when I pull the eth0 cable out

Pull the ethernet cable out, or the USB cable out?  Judging by the following output you're pulling the USB cable. bonding isn't meant to deal with interfaces going missing, only link state changes.

Last edited by fukawi2 (2019-02-14 22:43:14)

Offline

#4 2019-02-14 23:26:49

redtux
Member
Registered: 2019-02-14
Posts: 3

Re: Bonding Interface goes down when eth0 disconnected

New fangled laptop so ethernet cable is plugged into a usb dongle (no dedicated lan port)

Offline

#5 2019-02-15 14:38:03

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Bonding Interface goes down when eth0 disconnected

But are you unplugging the dongle from the laptop, or unplugging the network cable from the dongle?

I have an old USB to ethernet adapter and the interface doesn't disappear when the link goes down.

Last edited by alphaniner (2019-02-15 14:38:35)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB