5

I have a PI with WiFi dongle and I would like to make my PI additional WiFi Access Point. I’ve already had WiFi AccessPoint, but there are some places in my house where signal is very poor. Fortunately, my Pi is working just near this place, so I have idea to make PI as additional Access Point.

Facts:

  • PI connected to wired network (somewhere in the network there is gateway, DNS, DHCP and all other stuff)
  • WiFi dongle is plugged into PI, already configured with SSID (ABC123)
  • Somewhere in the house, there is another AccessPoint with the same SSID (ABC123) – channels are not interfering

I want to make my PI as another WiFi AccessPoint with exactly the same SSID, and connected to the same LAN network. So, device switching from regular AccessPoint to PI Point will not receive a new IP address (DHCP not from PI, but from LAN), but it will just change AccessPoint. All traffic from WiFi will be bridged to LAN, and all LAN traffic will be directed to WiFi (except this directed to PI).

At the same time, I would like to use my PI as before - PI has its services visible in LAN network. I thought to configure bridge, but I have no idea how to do this.

Could you help and introduce some concept?

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Max
  • 173
  • 2
  • 6

3 Answers3

9

You'll need the brutils package to setup the bridge that you need to do this

You'll need to setup hostapd with the same SSID and security as your existing wireless network.

Assuming you're using Raspbian -

apt-get install hostapd to install it
Then modify /etc/default/hostapd and add the configuration file path to the DAEMON_CONF line e.g.

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Then create the configuration file at that location above.
You'll also need to add the line bridge=br0 to /etc/hostapd/hostapd.conf

And then modify /etc/network/interfaces and add these lines

auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
pre-up ifconfig eth0 0.0.0.0 up
pre-up ifconfig wlan0 0.0.0.0 up
pre-up brctl addbr br0
pre-up brctl addif br0 eth0
post-down ifconfig wlan0 0.0.0.0 down
post-down ifconfig eth0 0.0.0.0 down
post-down brctl delif br0 eth0
post-down brctl delbr br0

Reboot, and it should bridge wlan0 to eth0, and then anything connected to wifi would automatically get bridged to ethernet and act as if it were just connected via ethernet cable.

Reference (my blog)
http://sirlagz.net/2012/08/09/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-1/ (ignore the bit about dnsmasq)
http://sirlagz.net/2012/08/10/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-2/

Lawrence
  • 2,672
  • 14
  • 14
4

Sometime after this post was written, the name of the package containing the binaries in brutils changed.

It's now called bridge-utils on Raspbian.

So run sudo apt-get install bridge-utils to install bridging on your Pi.

DMT
  • 41
  • 1
2

You are looking for brutils package, you can create bridged interfaces with it. Just make sure there is only one DHCP server in the bridged network and that all IPs are different. Brutils works as a software switch, eg. on layer 2.

drws
  • 121
  • 1