Skip to content

Instantly share code, notes, and snippets.

@endreszabo
Created September 10, 2012 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save endreszabo/3693135 to your computer and use it in GitHub Desktop.
Save endreszabo/3693135 to your computer and use it in GitHub Desktop.
wifi+ethernet bonding
#!/bin/sh
ip link set eth0 down
ip link set wlan0 down
ip link set bond0 down
modprobe bonding mode=1 miimon=100 downdelay=20 updelay=20 use_carrier=1 primary=eth0
dhcpcd -C resolv.conf --noarp --denyinterfaces 'eth0 wlan0' --background
ip link set eth0 up
ip link set wlan0 up
ip link set bond0 up
ifenslave bond0 eth0 wlan0
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -Dwext \
-b bond0 &
# ^^^^^^^^ this '-b' option is what most of the
# network managers do not support. :(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment