I've seen lots of examples that turn the bridging machine into another router with its own DHCP server, etc. But I want to use a wired device as if it were connected directly to the original router. The bridging machine has no trouble connecting to the WiFi on its own.
This answer seems to be close to what I want, but it also says, The wlan0 interface also has to be condigured to connect to your remote AP so this configuration is not be used verbatim.
True to the warning, it doesn't work on its own - can't find the WiFi adapter, so it can't connect - but it doesn't say how to reestablish the original, working connection. How do I do that?
/etc/wpa_supplicant/wpa_supplicant.conf
is:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="MyNetwork"
psk="MyPassword"
key_mgmt=WPA-PSK
}
When the WiFi works, /etc/network/interfaces
is the default:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
And the result of ifconfig
:
pi@FCC-FOH:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:4c:6c:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.35 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 fe80::c39b:c8ac:86c9:1f0e prefixlen 64 scopeid 0x20<link>
inet6 2600:100a:b02f:8196:b8ae:3d20:c4d0:817c prefixlen 64 scopeid 0x0<global>
ether 00:f0:00:36:1f:1a txqueuelen 1000 (Ethernet)
RX packets 17 bytes 1955 (1.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52 bytes 7956 (7.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
pi@FCC-FOH:~ $
When I try to enable the bridge, /etc/network/interfaces
is:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto eth0
allow-hotplug eth0
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
And the result of ifconfig
:
pi@FCC-FOH:~ $ ifconfig
br0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:4c:6c:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:4c:6c:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:f0:00:36:1f:1a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
pi@FCC-FOH:~ $
you can't bridge WLAN STA to LAN
, which begs the questions,Why not?
andWhat's STA?