FreeBSD : simple lagg usage

The link aggregation and link failover interface, lagg(4) device, first appeared in FreeBSD 6.3. It as the name suggested allows aggregation of multiple network interfaces as one virtual lagg(4) interface for the purpose of providing fault-tolerance and high-speed links. The driver currently supports the aggregation protocols such as failover, fec, lacp, loadbalance, roundrobin, and none by detecting child interface link state.
This is useful in large enterprise environment. Nonetheless, you can use it to set up roaming between wired and wireless network. The lagg(4) manpage provides simple example. However, it states that
WPA security does not currently work correctly with a wireless interface added to the lagg port.
Well, it is easy to overcome the issue by use of wpa_supplicant(8). Just set up /etc/wpa_supplicant.conf as normal. Please refer to wpa_supplicant.conf manpage for detailed setup. Here is my example.
/etc/wpa_supplicant.conf :-
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
network={
ssid="MY_WPA_WIFI"
scan_ssid=1
key_mgmt=WPA-PSK
psk="verysecretpassword"
}
/etc/rc.conf :-
ifconfig_nfe0="DHCP" ifconfig_ndis0="WPA DHCP" cloned_interfaces="lagg0" ifconfig_lagg0="laggproto failover laggport ndis0 laggport nfe0 DHCP"
Relevant ifconfig output :-
ndis0: flags=8843 metric 0 mtu 1500
ether 00:1a:73:73:92:34
media: IEEE 802.11 Wireless Ethernet autoselect
status: associated
ssid "MY_WPA_WIFI" channel 1 (2412 Mhz 11b)
authmode OPEN privacy OFF bmiss 7 scanvalid 60 roaming MANUAL
bintval 0
lagg: laggdev lagg0
nfe0: flags=8843 metric 0 mtu 1500
options=8
ether 00:1a:73:73:92:34
media: Ethernet autoselect (none)
status: no carrier
lagg: laggdev lagg0
lagg0: flags=8843 metric 0 mtu 1500
ether 00:1a:73:73:92:34
inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect
status: active
laggproto failover
laggport: nfe0 flags=0<>
laggport: ndis0 flags=5
tun0: flags=8010 metric 0 mtu 1500
It is that easy. Your laptop will auto roam between wired and wireless connection.



