blob: 38e13108fd5e48a67cebef238c17760946d92070 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
# Destroy existing interfaces
ifconfig lagg0 destroy
ifconfig wlan0 destroy
# Ethernet up
ifconfig em0 up
# Wireless create, up
# Note: use your ethernet device's MAC addr
ifconfig wlan0 create wlandev iwn0 wlanaddr 5c:26:0a:06:c1:d6
ifconfig wlan0 up
# Link aggregate create, up
# Creates a failover lagg that prefers em0 but uses wlan0 if em0 is unavailable
ifconfig lagg0 create laggproto failover laggport em0 laggport wlan0
ifconfig lagg0 up
# Use WPA supplicant to handle SSID/password wireless connection
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
# Grab an IP for lagg device
dhclient lagg0
|