The handbook shows setting up wifi/ethernet failover like this: > ifconfig_bge0="up" > ifconfig_iwn0="ether 00:21:70:da:ae:37" > wlans_iwn0="wlan0" > ifconfig_wlan0="WPA" > cloned_interfaces="lagg0" > ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP" As of FreeBSD 11, this no longer works. The correct way is like this: > ifconfig_bge0="up" > create_args_wlan0="wlanaddr 00:21:70:da:ae:37" > wlans_iwn0="wlan0" > ifconfig_wlan0="WPA" > cloned_interfaces="lagg0" > ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP" The relevant section is 30.7, example 30.3. https://www.freebsd.org/doc/handbook/network-aggregation.html Relevant discussion on the mailing list: https://docs.freebsd.org/cgi/getmsg.cgi?fetch=638990+0+current/freebsd-current
According to this discussion/patch (https://lists.freebsd.org/pipermail/freebsd-current/2015-September/057403.html) it is better to change the MAC address of the Ethernet card instead of the wireless device. As an added bonus this should work for FreeBSD 9 and 10, too.
Ah, thanks for the link. In that case, I think the correct example should be this: > ifconfig_bge0="ether 00:21:70:da:ae:37 up" > wlans_iwn0="wlan0" > ifconfig_wlan0="WPA" > cloned_interfaces="lagg0" > ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP"
Neither the prescribed method for 11.x nor using the MAC of the wireless interface is working for me with 11.0-RELEASE. The Ethernet interface works, but wireless failover does not connect: Oct 17 08:59:09 oyster kernel: wlan0: link state changed to UP Oct 17 08:59:09 oyster kernel: lagg0: link state changed to UP Oct 17 08:59:09 oyster wpa_supplicant[21944]: wlan0: Associated with b0:7f:b9:01:aa:3b Oct 17 08:59:09 oyster dhclient[22096]: send_packet: No buffer space available Oct 17 08:59:14 oyster last message repeated 2 times Oct 17 08:59:17 oyster wpa_supplicant[21944]: wlan0: CTRL-EVENT-DISCONNECTED bssid=b0:7f:b9:01:aa:3b reason=0 Oct 17 08:59:17 oyster kernel: wlan0: link state changed to DOWN Oct 17 08:59:17 oyster kernel: lagg0: link state changed to DOWN Oct 17 08:59:17 oyster wpa_supplicant[21944]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=1 ssid="MARITIME" auth_failures=2 duration=20 reason=CONN_FAILED Oct 17 08:59:26 oyster dhclient[22096]: send_packet: Network is down Both interfaces work fine without lagg, with the following config: ifconfig_re0="DHCP" wlans_urtwn0="wlan0" ifconfig_wlan0="WPA DHCP" This lagg config was working fine on 10.1: ifconfig_re0="up" ifconfig_urtwn0="ether e8:9a:8f:21:67:d3" wlans_urtwn0="wlan0" ifconfig_wlan0="WPA" cloned_interfaces="lagg0" ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP" I've tried this config, tried switching to create_args_wlan0="wlanaddr e8:9a:8f:21:67:d3" and tried ifconfig_re0="ether 80:1f:02:b6:a8:3e up" instead of ifconfig_urtwn0="ether e8:9a:8f:21:67:d3" Any other suggestions? Thanks, Jason
(In reply to Jason Bacon from comment #3) Jason, was this in a fresh install or one with prior configurations? I have a ThinkPad T520 running FreeBSD 11.0-RELEASE-p2. Today I decided I wanted to set up failover link aggregation between the wired and wireless interfaces and I struggled a lot. It was first when I realized that I had previous configuration for one of the interfaces in /etc/rc.conf.local in addition to the configuration I had for the other interface in /etc/rc.conf. I suggest you grep -R re0 /etc/ and grep -R urtwn0 /etc/ and perhaps even grep -R wlan0 /etc/ on your computer to make sure that you don't have any other network configuration that interferes with the lagg0. My working configuration is this: - Given wired em0 real MAC aa:aa:aa:aa:aa:aa, and - given wireless iwn0 real MAC bb:bb:bb:bb:bb:bb I put the following in /etc/rc.conf: ifconfig_em0="ether bb:bb:bb:bb:bb:bb up" wlans_iwn0="wlan0" ifconfig_wlan0="WPA country NO" cloned_interfaces="lagg0" ifconfig_lagg0="laggproto failover laggport em0 laggport wlan0 DHCP" I live in Norway, so obviously use your country code in place of mine. No other interface config should be present, or it might interfere. In addition to this, I have my standard /etc/wpa_supplicant.conf from before unmodified. I still have to manually service netif restart lagg0 in order for the routing tables to update, and I might also have to service dhclient restart lagg0 both of these because the networks I usually are separate for wired and wireless. I wish to find a solution for that also but this bug is not the right place for me to talk about that, I just wanted to mention it for completeness.
God dag Erik, Thanks for your reply. This is a fresh installation. I never use upgrade tools on any system. I'd rather improve my speed and proficiency with fresh installs, to avoid bit rot and other surprises, and to be ready to respond to quickly catastrophic hardware failures. Hence sysutils/desktop-installer and sysutils/auto-admin. I looked over your info and still no luck. Your working config looks exactly like my original config, in fact. I think we'll just have to wait until this issue is fixed upstream. Cheers, Jason
(In reply to Jason Bacon from comment #5) Sorry to hear that it didn't work. I hope it will get fixed so that it works for you some time in the not too distant future. Meanwhile, in case you are willing to go through some extra trouble, I suggest that you consider buying an external USB WiFi module with a chipset that has good driver support in FreeBSD. This might be more hassle than it's worth, though? Also, having a WiFi module sticking out from your laptop on the move puts you at risk of destroying the module and the port if you or somebody else accidentally bump into it. Besides it could also be that the link aggregation problems are caused by the ethernet interface, who knows. You might try an USB ethernet interface as well, perhaps? At that point it gets quite ridiculous with the amount of extra cables and modules I suppose. Maybe it's not the best idea. Just something I came to think of.(In reply to Jason Bacon from comment #5)
I'm actually already using a USB wifi dongle, an Edimax EW-7811. It only protrudes about 1cm and works pretty well. The built-in chipset is RTL8188CE, for which there is no open source driver as of last time I checked. I tried NDIS a while back, but it caused a kernel panic. I know someone using the closed source Linux driver with some issues. I installed 10.3-RELEASE and lagg failover is now working fine. So we know it's limited to 11.0. Thanks again for the suggestions.
(In reply to Jason W. Bacon from comment #3) > Neither the prescribed method for 11.x nor using the MAC of the wireless interface is working for me with 11.0-RELEASE. Trying to move this forward, as using the wireless MAC address on the Ethernet NIC works for me on 12.1 whereas the method described in the handbook didn't: are you still having problems using this method with a supported release, 11.3 or 12.x?
This is currently working on my ThinkPad, using the MAC of the Ethernet interface: ifconfig_em0="up" wlans_iwn0="wlan0" ifconfig_wlan0="WPA" create_args_wlan0="wlanaddr xx:xx:xx:xx:xx:xx" cloned_interfaces="lagg0" ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP" ifconfig_lagg0_ipv6="inet6 accept_rtadv" The same setup has worked on 11.2, 12.0, and 12.1. This was generated by auto-wifi-failover, part of sysutils/auto-admin.
(In reply to Jason W. Bacon from comment #9) > wlans_iwn0="wlan0" As https://lists.freebsd.org/pipermail/freebsd-current/2015-September/057403.html explains, setting the MAC address doesn't work on all wifi adapters. For example, it didn't work on my ath0, whereas setting the ethernet MAC address as suggested in comment 4 works for me. From my /etc/rc.conf: # Link aggregation, re0+wlan0 -> lagg0 ifconfig_re0="ether b8:ee:65:5b:32:59" wlans_ath0="wlan0" ifconfig_wlan0="WPA" create_args_wlan0="country FR" cloned_interfaces="lagg0" ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP" ifconfig_lagg0_ipv6="inet6 accept_rtadv" Can you test whether setting the ethernet MAC address works for you as well so I can submit a doc patch either describing both methods (less than ideal IMO) or giving only the method setting the ethernet MAC address (if it works with all supported FreeBSD versions)?
Yes, setting em0 to use the wifi MAC address also works for me. I'll update auto-wifi-failover accordingly.
Using the wireless MAC fixed lagg on my Toshiba Satellite as well (with atheros and re). lagg didn't work when I did the install and I didn't have time to investigate, so I just disabled it until now.
Created attachment 209155 [details] Fix the Ethernet+WiFi example - Swap the procedure around to change the Ethernet interface address instead of the wireless interface. - Change the Ethernet and wireless interface names and MAC addresses to mine (re0 and ath0 instead of bge0 and iwn0). - Tweak some markup and wording while I'm here. Tested with lynx.
A commit references this bug: Author: jwb Date: Sun Dec 29 15:13:40 UTC 2019 New revision: 53718 URL: https://svnweb.freebsd.org/changeset/doc/53718 Log: Update WiFi failover example in advanced-networking. Some wireless interfaces do not support changing their MAC address, so explicitly instruct the reader to change the Ethernet MAC instead. PR: docs/211436 Submitted by: pauamma@gundo.com Reviewed by: crees, bcr, jwb Approved by: crees Differential Revision: https://reviews.freebsd.org/D22708 Changes: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
Thanks!