Home arrow Journal arrow Failover Between Ethernet and WIFI in FreeBSD
Failover Between Ethernet and WIFI in FreeBSD PDF
Monday, 06 June 2011
If we have a laptop with FreeBSD installed and we want to automatically switch between Ethernet interface and WIFI interface we will use lagg.

Then idea is when Ethernet cable is plugged in to have Ethernet interface working and when is unplugged to have WIFI working. For that we will use a single IP that will be asigned to lagg interface.

In our case lagg is configured as failover between re0 and wlan0.

To do that we edit /etc/rc.conf and we add:

/etc/rc.conf
defaultrouter="10.0.0.1"
hostname="laptop"

ifconfig_re0="up"
ifconfig_re0_alias0="ether 00:10:e1:70:73:43"

wlans_iwn0="wlan0"
ifconfig_wlan0="WPA"

cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 10.0.0.2 netmask 255.255.255.0"

Notes:
--------
 - 00:10:e1:70:73:43 - is mac address of our WIFI interface. We configure our Ethernet interface with the same MAC, lagg will work only if we do that.
- when you have WIFI and Ethernet cards, always change your Ethernet MAC and not WIFI MAC (WIFI MAC change might not work);

 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?