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
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
=====================================================

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


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

Post comment

Only the blog author may view the comment.

Trackback

trackbackURL:http://hwjunkie.blog138.fc2.com/tb.php/11-5ec02343