Lagg0 doesn't work properly after upgrade from FreeBSD 13.2 to 14.0

Hi Community, I need your help solving this issue.

I had lagg0 and other interfaces assigned in /etc/rc.conf as follows:

Code:
ifconfig_em0="ether 8c:70:5a:XX:XX:XX" ##MAC address of the wlan0
ifconfig_em0="up"
wlans_iwn0="wlan0"
create_args_wlan0="regdomain FCC country XX"
ifconfig_wlan0="up WPA"
cloned_interfaces="lagg0"
ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP"

This worked great in 13.2 (well I didn't know how to manually switch from WLAN0 active to em0 active after failover or should it be automatic, it didn't work, but this is not related here).
Since upgrading to 14.0 lagg0 interface is not getting IP address assigned from DHCP after reboot.

I am not sure if anything changed, but current documentation doesn't mention this. I only noticed that wlan0 now can connect to 5GHz network since the upgrade.
em0 and wlan0 work without problems if they are assigned individually with DHCP.
Manually creating lagg0 from command line also has issues. I can create the interface manually, but if I do dhclient lagg0 it complains dhclient is running already, so I kill this process. After I kill it, the lagg0 interface is destroyed and not available anymore.

Thanks
 
I have the same issue. It takes three restarts of netif to get it fully working.
On boot it won't even get the SSID setup for wlan0, after the first restart of netif a DHCP lease is given out and things are all setup, but the network is down when I try to ping anything.
Two more netif restarts and finally it all works as it should.

Setting it up for just the wlan0 works without a problem.

I noticed it first on my laptop, with a Intel onboard NIC and Intel 8265, but last night I was setting up a Raspberry Pi 4 with a Realtek based USB wifi dongle and exactly the same issues there.
 
I just discovered I had some mistakes in my /etc/rc.conf setup.
For one, I had SYNCDHCP in the ifconfig_wlan0, while also having DHCP in the ifconfig_lagg0 line.
No idea why. I've had this setup for years, so somehow it worked before 14.0...
But, it did mean wlan0 was used as the default gateway adapter instead of lagg0.


Second, and probably no relevant, I made a change in the past years to set the MAC of em0 to em0.
I know it was the MAC of iwm0 before since I have the original line in my DHCP config.
Probably some experiment I forgot about.

Either way, fixed the mistakes on both laptop and Rasapberry Pi 4 seems to have fixed the issues.

The only changes I see to Shabaz's config is I don't have "ifconfig_em0="up"" or the "up" in the ifconfig_wlan0 line.
 
Removing up or commenting the whole line doesn't work for me.

Can you please paste rc.conf?

Thanks
 
Code:
ifconfig_em0="ether 8c:70:5a:XX:XX:XX" ##MAC address of the wlan0 
ifconfig_em0="up"
This doesn't do what you think it does. Keep in mind that rc.conf is actually a shell script, a shell script that only contains variable assignments. That second ifconfig_em0 simply overwrites the value you had set with the first ifconfig_em0.
 
OK. Here is the latest findings;

I used the following link for a reference:
https://docs.freebsd.org/en/books/handbook/advanced-networking/

Here is my rc.conf networking parts:
Code:
ifconfig_em0="ether 8c:70:5a:xxx:xxx:xxx"
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA"
create_args_wlan0="regdomain FCC country CA"
cloned_interfaces="lagg0"
ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP"

Here is my ifconfig output:

Code:
em0: flags=8c02<BROADCAST,DRV_OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=800020<JUMBO_MTU,HWSTATS>
        ether 8c:70:5a:xxx.xxx.xxx.
        hwaddr f0:de:f1:xxx:xxx:xxx:
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=0
        ether 8c:70:5a:xxx.xxx.xxx
        groups: wlan
        ssid myssid-5ghz channel 149 (5745 MHz 11a ht/40+) bssid 78:98:e8:53:c7:03
        regdomain FCC country CA authmode WPA2/802.11i privacy ON
        deftxkey UNDEF TKIP 2:128-bit txpower 23 bmiss 10 mcastrate 6
        mgmtrate 6 scanvalid 60 ampdulimit 64k ampdudensity 4 -amsdutx amsdurx
        shortgi -stbc -ldpc -uapsd wme roaming MANUAL
        parent interface: iwn0
        media: IEEE 802.11 Wireless Ethernet MCS mode 11na
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lagg0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=0
        ether 8c:70:5a:xxx.xxx.xxx
        hwaddr 00:00:00:00:00:00
        inet 10.0.0.199 netmask 0xffffff00 broadcast 10.0.0.255
        laggproto failover lagghash l2,l3,l4
        laggport: em0 flags=1<MASTER>
        laggport: wlan0 flags=4<ACTIVE>
        groups: lagg
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Finally got something, but not fully working. wlan0 is the active interface not em0. em0 works no problems if I disable lagg0 and add DHCP on it.
I noticed with the current configuration when I reboot the computer em0 goes up and down while booting, but eventually comes up.

If I do ifconfig wlan0 down, the lagg0 doesn't activate em0

Thanks
 
But your ifconfig output says:

So where do you see that wlan0 is Master?
I didn't say it is or it should be. The master should be em0 and it should be active if available. ifconfig is showing the network is going through WLAN.
 
Back
Top