Guide: Bridge LAN and Wifi interface on Raspberry Pi

Posted by crimsonpisang on   0 comments   0 trackback

I was pleased with the wifi working well on my rPi. So, I've decided to extend internet connectivity to the LAN port. This is useful for using it as a wireless bridge.
Continuing for the previous post Configuring WPA2 on rPi

1# Install bridge utility

~$ sudo apt-get install bridge-utils

2# Edit network interface file

~$ sudo nano /etc/network/interfaces
auto lo

iface lo inet loopback

iface eth0 inet manual

auto wlan0
iface wlan0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports wlan0 eth0
bridge_stp off
bridge_maxwait 5

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

2a# If u want set static IP on the rPi. Change the "iface br0 inet dhcp" to static and add the following lines.

auto br0
iface br0 inet static

Set DNS server on /etc/resolv.conf
~$ nano /etc/resolv.conf

Reboot the rPi. After that issue the 'ifconfig' command and check that br0 is issued with an IP address. Ping to check for internet connectivity and we're done!

Post comment

Only the blog author may view the comment.