May 16, 2013 by James

Raspberry PI as a wireless bridge..

I'm using a RPi with an Edimax usb wireless controller to bridge the home wireless network into a switch with some kit connected that I would rather not cable up to.   Once you've got the wireless set up (using the wpa_gui or any number of cli variants the rest is nice and easy – if you install bridge-utils !  For reference:

apt-get update
apt-get install bridge-utils

Then I just replaced my /etc/network/interfaces with something like this – I'm fixing the PI's address on the LAN so that I can get to it.

auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
auto br0
iface br0 inet static
    address 192.168.16.100
    netmask 255.255.255.0
    gateway 192.168.16.254
   bridge_ports wlan0 eth0
   bridge_stp off
   bridge_maxwait 5

wpa-iface wlan0
wpa-bridge br0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

And thats it !!  I can then add devices to the wired side of the PI and as far as the network is concerned they're directly connected.