Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to make a DIY wireless repeater using old hardware and Debian, but I'm encountering some difficulties (more details below).

Hardware:

EeePC 900 w/Atheros wireless card (kernel driver ath5k) External wireless card D-Link DWL-0122 (Ralink chip, kernel driver rt73-usb)

Setup:

One wireless AP (auth using WPA-PSK)

Configuration:

/etc/network/interfaces

 auto lo br0
 iface lo inet loopback

 # The primary network interface
 # This is unused
 allow-hotplug eth0
 iface eth0 inet dhcp

 iface wlan0 inet manual
         wpa-ssid myessid
         wpa-psk mypass

 iface wlan1 inet manual
         # To prevent clashes with main AP
         pre-up iwconfig wlan1 mode managed essid "repeater" channel 4

 iface br0 inet static
         address 192.168.10.3
         netmask 255.255.255.0
         network 192.168.10.0
         broadcast 192.168.10.255
         gateway 192.168.10.1
         dns-nameservers 192.168.10.1
         dns-search lan
         bridge_hw 00:1f:c6:8f:15:4e # Same HW address as wlan0
         bridge_ports wlan0 wlan1

The actual repeating is handled by hostapd. However, the problem is that I cannot reach the network. Once the bridge is up, even before hostapd is started, I cannot reach any internal host, let alone external. All pings to the gateway end up in "Destination Host unreachable". What's the best course of action in this case?

I also ensured that the "main" interface, wlan0, is also working properly when non bridged (gets an IP if configured via DHCP, accesses the network). I'm also forced to use bridging since neither of the two interfaces supports master mode.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Are you sure that you have in fact managed to insert wlan0 (the one that connects to the existing AP) into the bridge? Because the problem is, this is simply not possible. Running brctl show should confirm that the bridging did not succeed. (the link says it's not possible to bridge wireless client interfaces to wired interfaces, but it's true for bridging to any interface, including wireless AP interfaces)

The alternative is to make the "repeater" act as a NAT router. However this has the usual problems that NAT brings (e.g. need for port forwarding, inability to discover hosts on the other side). The link provided explains how to set up NAT.

share|improve this answer
    
brctl show shows both wlan0 and wlan1 in the interfaces. –  Einar Apr 29 '12 at 9:23
    
I suppose the reason why brctl doesn't fail is that you're using an old kernel (2.4?) which doesn't yet prohibit such bridging - but it still won't work (it never worked, which is why the kernel developers prohibited the bridging). –  Ambroz Bizjak Apr 29 '12 at 9:26
    
It's Debian Squeeze, 2.6.32. –  Einar Apr 29 '12 at 9:29
    
@Einar yes, that makes sense, since this bridging was prohibited only in 2.6.33, according to this kerneltrap.org/mailarchive/linux-ath5k-devel/2010/3/21/6871553 Again, it won't work, regardless if you manage to put it in the bridge or not. –  Ambroz Bizjak Apr 29 '12 at 9:50
    
I can confirm that it does indeed "work" with old kernels--and at least in some configurations. I've been using wireless and wired bridging for years (and am using it right now, as we speak). Not that this invalidates your answer. –  Flimzy May 1 '12 at 20:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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