4

I'm facing a problem that's about to drive me crazy. I'm running a Debian Linux distribution and currently trying to establish a connection to my wireless network (WPA2 security, wpa_supplicant already installed). The wireless dongle connects to the network, but it only responds to pings and lets me connect through SSH from another computer when the ethernet cable is plugged in. It is still reachable via wireless connection after unplugging the ethernet connection, but it won't work until a connection to a wired network had been created. I'm not sure if anything's wrong with my configuration here...

Output of 'ifconfig wlan0':

wlan0     IEEE 802.11bgn  ESSID:"*censored*"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.457 GHz  Access Point: *censored*  
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=89/100  Signal level=58/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Contents of /etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
    address 192.168.178.130
    netmask 255.255.255.0

allow-hotplug wlan0
iface wlan0 inet static
    wpa-ssid "*censored*"
    wpa-key-mgmt WPA-PSK
    wpa-group TKIP CCMP
    wpa-psk *censored*
    address 192.168.178.131
    netmask 255.255.255.0
    gateway 192.168.178.1
1

You shouldn't use the same network address for wlan0 and eth0 (in your case 192.168.178.0/24), this will confuse your routing, and most likely network scripts too. If both interfaces are connected to the same network you should setup a network bond (Debian documentation here, example here)

# apt-get install ifenslave

then in /etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-ssid "*censored*"
    wpa-key-mgmt WPA-PSK
    wpa-group TKIP CCMP
    wpa-psk *censored*
    wpa-bridge bond0 # fixes mac address of outgoing packets so that they are consistent
    bond-master bond0
    bond-mode active-backup 
    bond-miimon 100 # checks link status every 100 msec
    bond-give-a-chance 10 # when wlan comes up wait up to 10 seconds for it to 

allow-hotplug bond0
iface bond0 inet static
    address 192.168.178.130
    netmask 255.255.255.0
    gateway 192.168.178.1
    bond-slaves eth0 # automatically brings up eth0 and slaves it to this bond
    bond-mode active-backup # uses primary if available, otherwise fallback to other
    bond-primary eth0 # priority to use eth0 when available
    bond-miimon 100
  • Thanks for your reply, this solution worked like a charm. Saved me from a lot of wasted time. I didn't know that you shouldn't use the same network address for both interfaces, thanks for enlightening me about that ^^... – nguoy_tk Sep 2 '14 at 18:41
1

I was asked about a similar problem. I found the reason of this strange behaviour after long search. The wireless access point that was used was configured to use Isolation-Mode. So each wireless device connected to this access point is not able to see the other devices. Though the pc we were pinging from was only able to receive a signal when eth0 was plugged in, because the packets then simply took the route over eth0. So after turning off Isolation-Mode it was no problem. I hope that will help others to not search as long as me!

0

Just as an additional note if any of the suggested solutions don't work. Ensure the routing rules of your Router are not interfering.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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