3

I have a Raspi successfully connected over WiFi, and I want to connect some wired devices to the same network through it. My AP already provides a DHCP server, so I basically want something to bridge the ethernet. I'm running debian (wheezy). Thoughts?


P.S. It seems bridging is the way to go, but following this tutorial makes the Raspi WiFi connection drop.

4
  • did you properly identify your wireless connection and your ethernet connection... and bridge them in the proper order? (wifi to ethernet) as opposed to doing it in the opposite direction?
    – Bon Gart
    Aug 24, 2012 at 22:47
  • Yes... I'm trying this to broadcast IPTV through WiFi. It seems I got it working, but I only get about 5 seconds of video, before it freezes, and looses the connection. Maybe there's something that is preventing this to act as a pure bridge? Aug 24, 2012 at 23:06
  • 1
    You may suffer from power loss on the USB port where you have the Wifi dongle connected. You can try shorting out the polyfuses next to the USB ports to get more current. raspi.tv/wp-content/uploads/2012/09/polyfuse.jpg
    – dimme
    Sep 12, 2012 at 20:41
  • This sounds like a power issue. Try using a powered hub or get rid of the Raspberry Pi and use Powerline Networking. Sep 18, 2012 at 14:32

2 Answers 2

1

I think this can be usefull: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=45&t=14284 You can use an "Y" cable to get more power for usb dongle.

1
  • what are you even talking about? OP wanted to share his WiFi through Rpi's eth. YOu've linked to a thread which talks about finding a WiFi dongle/adapter for RPi. May 22, 2014 at 11:20
1

I was also having problems with setting up a wifi to wired bridge and found the following site. There is an install script or you can follow the steps outlined. It worked perfectly for me. http://hackhappy.org/uncategorized/how-to-use-a-raspberry-pi-to-create-a-wireless-to-wired-network-bridge/

Basically you're going to need DHCP and iptables setup and configured. DHCP is setup so install iptables with:

apt-get install iptables

Now configure your eth0 with a static ip and your wlan0 for DHCP. Add the following line to the end of /etc/network/interfaces:

up iptables-restore > /etc/iptables.ipv4.nat

Configure DHCP conf file, here is my sample /etc/dhcp/dhcpd.conf:

option domain-name "[Domain]";
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    subnet [Subnet] netmask [Netmask] {
    range [IP Range Start] [IP Range End];
option routers [IP];

To finish up execute the following commands to restart DHCP with new settings and setup IP forwarding:

 echo "INTERFACES=\"eth0\"" > /etc/default/isc-dhcp-server
 service isc-dhcp-server restart
 update-rc.d isc-dhcp-server enable
 echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
 echo "1" > /proc/sys/net/ipv4/ip_forward
 iptables -t nat -A POSTROUTING -o [wlan0] -j MASQUERADE
 iptables -A FORWARD -i $wifid -o [eth0] -m state --state RELATED,ESTABLISHED -j ACCEPT
 iptables -A FORWARD -i [eth0] -o [wlan0] -j ACCEPT
 iptables-save > /etc/iptables.ipv4.nat
 /etc/init.d/networking restart
1
  • 1
    Please post all relevant information to your answer in your answer to avoid link rot
    – 50-3
    Sep 12, 2013 at 22:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .