You are not logged in.

#1 2023-05-08 09:21:57

Moviuro
Member
Registered: 2012-06-03
Posts: 73

WiFi interface in bond receiving packets when primary is connected

Hi,

In addition to my previous issue with bonds, my two archlinux machines are experiencing the same unexpected behavior: packet loss when pinging from my router to the archlinux boxes.

https://wiki.linuxfoundation.org/networking/bonding wrote:

mode -> active-backup or 1

Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. [...]

root@toxoplasmosis / # ip a
4: enp4s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8a:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff permaddr 70:...
5: wlp5s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc noqueue master bond0 state UP group default qlen 1000
    link/ether 8a:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff permaddr 34:...
7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8a:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.111/24 metric 1024 brd 192.168.1.255 scope global dynamic bond0
       valid_lft 25777sec preferred_lft 25777sec
    [ipv6 setup... NYOB]

I unplug then plug my ethernet cable back in, wait a few minutes.

Ethernet Channel Bonding Driver: v6.2.11-1-clear

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

[...]
root@toxoplasmosis / # tcpdump -nei wlp5s0 icmp # should be empty, right?
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wlp5s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
11:10:02.926061 98:xx:xx:xx:xx:xx > 8a:yy:yy:yy:yy:yy, ethertype IPv4 (0x0800), length 66: 185.XX.XX.XX.443 > 192.168.1.111.39328: Flags [.], ack 9215, win 503, options [nop,nop,TS val 3124802758 ecr 4247132757], length 0 # HTTPS traffic I guess?
11:10:02.926480 98:xx:xx:xx:xx:xx > 8a:yy:yy:yy:yy:yy, ethertype IPv4 (0x0800), length 570: AA.AA.AA.AA.51820 > 192.168.1.111.60927: UDP, length 528 # Wireguard VPN
11:10:04.635794 98:xx:xx:xx:xx:xx > 8a:yy:yy:yy:yy:yy, ethertype IPv4 (0x0800), length 330: AA.AA.AA.AA.51820 > 192.168.1.111.60927: UDP, length 288
11:10:10.946487 d0:xx:xx:xx:xx:xx > 8a:yy:yy:yy:yy:yy, ethertype IPv4 (0x0800), length 70: 192.168.1.21.42123 > 192.168.1.111.3478: UDP, length 28 # Ubiquiti devices at home connecting to the aur/unifi software
[...]
11:14:05.489611 98:xx:xx:xx:xx > 8a:yy:yy:yy:yy, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.111: ICMP echo request, id 15601, seq 923, length 64 # lost (?) ping from router to my machine

My home network works as follows:

192.168.1/24
router .1 --- USW-24-PoE .30 --- U6 Lite .21 (WAP)
                   \ 1Gbps eth        / WiFi6 chan40
                    ` my machine .111 

What would cause this issue and how can I fix it?


bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

#2 2023-07-28 15:27:14

Moviuro
Member
Registered: 2012-06-03
Posts: 73

Re: WiFi interface in bond receiving packets when primary is connected

I'm bumping this subject as it has received no answers either here or on the netdev mailing list sad The issue keeps happening on LTS, zen and regular linux kernel.

See also https://lore.kernel.org/netdev/ZGzGngNh … 49d74c1e90


bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

#3 2023-08-01 07:06:35

-thc
Member
Registered: 2017-03-15
Posts: 516

Re: WiFi interface in bond receiving packets when primary is connected

I have read your posts but I fail to understand the reason behind that bond. WiFi as a backup for a failed Ethernet port?

Offline

#4 2023-08-01 08:28:07

Moviuro
Member
Registered: 2012-06-03
Posts: 73

Re: WiFi interface in bond receiving packets when primary is connected

Yes, WiFi as a backup, and common setup across all my machines (desktops, and laptops that would be (un)plugged randomly).


bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

#5 2023-08-01 11:02:56

-thc
Member
Registered: 2017-03-15
Posts: 516

Re: WiFi interface in bond receiving packets when primary is connected

So this is my version of what I think happens:

The bond with it's MAC is registered via Ethernet on the pSwitch. You disconnect the Ethernet cable.

The pSwitch immediately realizes the port is no longer in use and stops advertising it's address via ARP.

The bond switches to WiFi and registers it's MAC with the AP. All ARP traffic regarding your IP (.111) should now arrive at the AP and answered from there.

You plug the Ethernet cable back in. The bond switches back to the Ethernet port and the pSwitch should now serve ARP requests for .111 again.

The AP has no way of "knowing" that your WiFi should be disconnected and will be substituted by other means. You may be simply out of reach for a short while. The AP still answers to ARP requests for .111.

This ARP collision is AFAIK intrinsic to this setup and I can't think of a simple solution. In theory the firmware in both upstream devices has to be "mixed-bond"-aware and should somehow communicate the hand-over.

Last edited by -thc (2023-08-01 11:03:34)

Offline

Board footer

Powered by FluxBB