# lagg failover config problem using wlan and a static ip address.



## aikiPupil (Feb 14, 2010)

I am unable to get the Link Aggregation and Link failover interface (LAGG) configured correctly.

I need to be able to use this interface with a static ip address. The following are the config settings I am using:


```
cat /boot/loader.conf

bwi_v3_ucode_load="YES"
if_bwi_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
if_vlan_load="YES"
if_lagg_load="YES"
```


```
cat /etc/rc.conf
hostname=mob-ss1771
sshd_enable="YES"
hald_enable="YES"
dbus_enable="YES"
tcp_extensions="YES"
wpa_supplicant_enable="YES"
wpa_supplicant_conf_file="/etc/wpa_supplicant.conf"
#Set the bwi wireless adapters MAC address to the bfe mac address for use in the lagg failover interface
ifconfig_bwi0="ether 00:0d:56:33:99:c8"
vaps_bwi0="wlan0"
wlans_bwi0="wlan0"
ifconfig_wlan0="WPA"
ifconfig_bfe0="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport bfe0 laggport wlan0 inet 192.168.0.10 netmask 255.255.255.0"
#ifconfig_lagg0_ipv4="192.168.0.10"
#ipv4_addrs_lagg0="192.168.0.10"
defaultrouter=192.168.0.1
network_interfaces=lagg0
```


```
ifconfig

bfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:0d:56:33:99:c8
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

bwi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:0d:56:33:99:c8
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated

lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:0d:56:33:99:c8
        media: Ethernet autoselect
        status: active
        laggproto failover
        laggport: bfe0 flags=5<MASTER,ACTIVE>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0d:56:33:99:c8
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 10 (2457 Mhz 11g)
        country US authmode WPA1+WPA2/802.11i privacy ON deftxkey UNDEF
        txpower 0 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250
        roam:rssi 7 roam:rate 5 protmode CTS roaming MANUAL bintval 0
```


A couple interesting things I see above:
1.) wlan0 shows status: no carrier
2.) There is not a second laggport declaration for the wlan0

Is there something obviously wrong with my configuration here or is there a known issue with this type of setup?

Thanks in advance for any help on this.


----------



## arondiehl (Aug 15, 2010)

I used to have the same problem.

I followed the steps described in the handbook.

The entry in my /etc/rc.conf looks like this:

```
# network settings
ifconfig_wpi0="ether xx:xx:xx:xx:xx:xx"
wlans_wpi0="wlan0"
ifconfig_wlan0="WPA"
ifconfig_re0="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"
```

`$ ifconfig`
showed that an interface named lagg0 was created, but it only had re0 (ethernet) as a laggport.

The wlan0 interface was up and connected, however. Maybe wlan0 is being created after lagg0.

After executing
`# ifconfig lagg0 laggport wlan0`
both interfaces showed up as laggports under lagg0 and provided failover functionality as expected.

Maybe wlan0 is created after lagg0 and thus not recognized.

To have this working right after booting my laptop I added the following to /etc/crontab:

```
@reboot root    /sbin/ifconfig lagg0 laggport wlan0
```

This is only a workaround, but until someone comes up with a better (read: cleaner) solution this works for me.


----------



## loop (Aug 16, 2010)

This works for me:

```
# Setup auto failover between wired and wireless
ifconfig_em0="UP"
ifconfig_iwi0="ether 00:11:25:49:ff:60"
wlans_iwi0="wlan0"
ifconfig_wlan0="WPA"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport em0 laggport wlan0 DHCP up"
```


----------

