1

Has anyone successfully configured a bridge between wlan0 and wlan1?

On wlan1 I have an internet connection with subnet 192.168.107.xxx

At wlan0 I would like to have an internet connection available with the address in the 192.168.107.xxx subnet given by wlan1.

This is my /etc/network/interfaces:

auto lo
iface lo inet loopback

auto wlan1
iface wlan1 inet manual

allow-hotplug wlan0
iface wlan0 inet manual

auto br0
iface br0 inet static
        bridge_ports wlan1
        address 192.168.107.13
        netmask 255.255.255.0
        network 192.168.107.0
        broadcast 192.168.107.255

And in /etc/hostapd/hostapd.conf:

bridge=br0
interface=wlan0
driver=nl80211
ssid=blablabla
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

/etc/default/hostapd 

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

Can anyone show me how to run it and is it possible at all?

5

In addition to the answer from @Milliways you have to enable 4addr support on the wlan interfaces with sudo iw dev wlanX set 4addr on. But if you try to add such an interface to the bridge you will get the error message Operation not permitted. Raspberry Pi does not support OSI layer 2 bridging for client connections on wifi (an access point can be bridged). You have to use workarounds for "bridging" wifi. You may consider to use routing instead.

1

This is an exercise in futility. There are a number of problems.

  1. Any attempt to configure /etc/network/interfaces will only work if you disable dhcpcd

  2. Depending on what model Pi and what OS wlan0 and wlan1 are indeterminate.

You have not specified what you are actually attempting to achieve or what OS so your "question" is indeterminate.

It is certainly POSSIBLE to bridge interfaces, but not as described.

Access Point may help.

0

Change bridge_ports wlan1 to bridge_ports wlan0 wlan1to bind (or bridge) wlan0 and wlan1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.