How can i Bridge wlan0 to eth0 ?


5 posts
by GODz » Tue Apr 02, 2013 5:30 pm
Hi,

can give a hand for configure it ?

Router first flour OK

wifi usb + Pi second flour OK (i ve wpa and ip static)

now can use eth0 from Pi for share internet to pc desktop.

it's possible this bridge wlan0 to eth0?

thx a lot for attention.
Posts: 3
Joined: Fri Mar 29, 2013 4:57 pm
by RichardBronosky » Tue Apr 02, 2013 6:35 pm
This is not a Raspbian or Raspberry Pi specific question once you get your wifi connection working. Just about any Debian or Ubuntu resource should help you.

Hear are some starting points:
http://wiki.debian.org/BridgeNetworkConnections
http://serverfault.com/questions/151230 ... interfaces
http://www.linuxquestions.org/questions ... es-369455/
-- Richard Bronosky
2x Raspberry Pi 512MB
User avatar
Posts: 58
Joined: Thu Feb 14, 2013 5:38 pm
Location: Atlanta, GA, USA
by GODz » Wed Apr 03, 2013 7:30 am
thx for the suggestion.

first
Code: Select all
sudo cp /etc/network/interfaces /etc/network/interfaces.bak


after i create this configuration
Code: Select all
sudo nano /etc/network/interfaces

Code: Select all
# Set up the local loopback interface
auto lo
iface lo inet loopback

# Set up the external interface
#
# Don't forget to change eth0 to the proper name of the external
# interface if applicable.
#
auto wlan0
iface wlan0 inet static
        address 192.168.1.5
        netmask 255.255.255.0
        gateway 192.168.1.1

iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf


# Set up the internal wired network
#
# Don't forget to change eth0 to the proper name of the internal
# wired network interface if applicable.
#
auto eth0
iface eth0 inet static
    address 192.168.0.1
    network 192.168.0.0
    netmask 255.255.255.0

# Set up the internal wired network
#
# It's not necessary to bring this interface up as the bridge
# we are about to create does this. Leave these lines commented.
#
#auto eth1
#iface eth1 inet manual


# Set up the internal wireless/wired network bridge
#
# Don't forget to change wlan0 and eth1 to the proper name of
# the internal wired and wireless interfaces if applicable.
#
auto br0
iface br0 inet static
    address 192.168.0.1
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
    bridge-ports wlan0 eth0




so install the necessary tools to create a network bridge
Code: Select all
sudo apt-get install bridge-utils


but when reload the network configuration for test connectivity
Code: Select all
sudo /etc/init.d/networking restart


Pi give me this error

can't add wlan0 to brideg br0


why?


thx for attention
Posts: 3
Joined: Fri Mar 29, 2013 4:57 pm
by SirLagz » Mon Apr 08, 2013 8:11 am
You can try the instructions on my blog, follow Part 1 and Part 2 here -
http://sirlagz.net/2012/08/09/how-to-us ... er-part-1/
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by GODz » Mon Apr 08, 2013 8:32 am
SirLagz wrote:You can try the instructions on my blog, follow Part 1 and Part 2 here -
http://sirlagz.net/2012/08/09/how-to-us ... er-part-1/


wow very good site and posts..

thx you.
Posts: 3
Joined: Fri Mar 29, 2013 4:57 pm