L2 Bridge (eth0, wlan0): Why won't it work?
I'm currently pulling my hair out trying to setup a Layer 2 bridge between a USB wifi dongle (wlan0) and an ethernet port (eth0). The system is on a Cubieboard - it's an ARM board with embedded linux - it has an ethernet port plus two USB 2.0 ports. I'm currently running Debian Wheezy armhf with 3.4.43 kernel on it. I'm trying to set it up as an access point without NAT (no masquerading) - all clients should be on the same subnet as the ethernet network, and all devices should passively see each other.
Here's what I've done so far. The wifi dongle is a TP-Link TL-WN722N with an external antenna. The dongle definitely supports the master mode. The "iw list" command shows: Code:
Supported interface modes: Code:
brctl addbr br0 Code:
interface=wlan0 Code:
# hostapd -B /etc/hostapd.conf Code:
# brctl show Code:
# iptables -L Now here's the funny thing: If I setup this AP on my debian laptop using the SAME instructions and the SAME USB wifi dongle, everything works fine! All AP clients connect perfectly. The USB wifi dongle access point is working properly on the laptop so clearly this is not a hardware problem. I didn't have to setup any ebtables or iptables rules on the laptop, and all tables were flushed! Any ideas? |
Let's try with the easy stuff:
on the board and on one of the wireless "clients", give us the output of: Code:
ip link show |
Sorry for the late reply.
I had to rewire the device and configure some other things on it. Here's the data you requested: Code:
# ip link show |
How about on one of the wireless clients?
|
There, I repeated the whole experiment, and this time I used three machines. Machine A is the one I described in my first post - it is the cubieboard with the TP-Link wifi card. Machine B is also the laptop I described in the first post - it uses the same TP-Link USB wifi card that I removed from machine A after I was done testing. Machine C is a new laptop that I used to connect to both access points - it uses its own internal WiFi card, and can successfully get an IP address via DHCP on both AP's. The internet works when connected to machine B, but not on machine A.
Before I setup the access point on either machine (A or B) I enabled ip forwarding and disabled the filtering like this: Code:
echo 1 > /proc/sys/net/ipv4/ip_forward Finally, I started "hostapd -B /etc/hostapd.conf" with identical config (except for the wlan entry - the wifi card on laptop was wlan2) on A and then on B. While the AP was up I connected to the AP with laptop C, which was able to get an IP address via DHCP on both access points. The internet on laptop C was not working when C was connected to A, but worked normally when C was connected to B. Finally, I ran the commands you posted on all 3 machines. Here are the results: Machine A (while client C was connected to it): Code:
# ip link show Machine C (while it was connected to A, internet didn't work): Code:
root@neptune:/home/user# ip link show Machine B (while client C was connected to it): Code:
root@incursion:/etc# ip link show Machine C (while it was connected to B, internet works): Code:
root@neptune:/home/user# ip link show |
I've just tested the ARP on the network. Cubieboard (machine A) was setup as an access point, and laptop C was connected to it. Then both laptop B and machine A were connected to an internal switch via a CAT5e UTP cable (no wireless). I ran arping on both laptops against the ip address of machine A and the other laptop. Both laptops (B and C) were able to arping the IP of machine A. Laptop B was able to arping laptop C, but laptop C was unable to arping laptop B.
I've setup some packet logging on machine A like so: Code:
ebtables -t broute -A BROUTING --log-prefix "eb_brt_brt " Code:
<5>eb_nat_pre IN=eth0 OUT= MAC source = 00:12:79:bf:54:11 MAC dest = ff:ff:ff:ff:ff:ff proto = 0x0806[16029.260000] eb_nat_pre IN=eth0 OUT= MAC source = 00:12:79:bf:54:11 MAC dest = ff:ff:ff:ff:ff:ff proto = 0x0806 Code:
<5>eb_flt_inp IN=wlan0 OUT= MAC source = 00:15:af:6f:94:74 MAC dest = ff:ff:ff:ff:ff:ff proto = 0x0806[16274.510000] eb_flt_inp IN=wlan0 OUT= MAC source = 00:15:af:6f:94:74 MAC dest = ff:ff:ff:ff:ff:ff proto = 0x0806 Code:
/proc/sys/net/bridge# ll |
Hi, any news regarding this topic?
I have similar issue on Cubieboard, but I am afraid that it is a driver bug. I went trough all you mentioned above without any result. Then I bought an usb ethernet and it works like a charm... |
All times are GMT -5. The time now is 01:25 PM. |