I'm in the middle of setting up my Raspberry Pi running Raspbian as a bridge between my university's wireless network (which requires WPA2-Enterprise authentication) and my private wireless router (via its WAN port).
I've received some amazing help here: How can I most simply transparently bridge traffic between wlan0 and eth0?
For the most part my setup is now working as intended. The only problem is that, if I set eth0 to auto or allow-hotplug on my Raspberry Pi (as I'd like to do, so that everything comes up headlessly on boot), it seems as though all internet traffic is routed through eth0. This is incorrect; my internet connection is on wlan0, and eth0 shares that connection out to my private router.
I can overcome this issue by not having eth0 come up automatically. If I leave auto or allow-hotplug for eth0 out of /etc/network/interfaces, allow the Raspberry Pi to boot, and then manually run "ifup eth0", I get behaviour as expected.
Is there a way to either ensure that wlan0 has been fully brought up before bringing up eth0 on boot (even though eth0 is the faster interface to bring up)? Or, failing that, how can I force internet traffic (noting that this comes from eth0) through wlan0 only?
Edit: For now, as a work-around, I'm running a script to bring up eth0 on start-up with a thirty second delay to allow wlan0 to come up first. This solution is neither elegant nor reliable (what if wlan0 authentication takes longer than thirty seconds?), but it does seem to be doing the trick for now. I'm still looking for a better solution, though!
wlan0
network, and then bring upeth0
only after the ping succeeds (indicating thatwlan0
is up)? – G-Man Says 'Reinstate Monica' Aug 4 '15 at 3:25