Wifi connected but no data transfer: "ping: sendmsg: No buffer space available"

Myself and many others (according to my Google searches) are having this same problem with Ubuntu 11.10, whereas for me also I never had any trouble with network drivers in 10.x or even 11.04.

EDIT: Cause of problem NOT resolved, after all :'(. The following might still be involved in some way, so I'll leave it here for others to reference. But it turned out NOT to solve the problem. Neither did reverting to a 2.6.x kernel.


My system is using the r8169 driver for my Realtek 8168 chip Ethernet port (on the motherboard in my case. Note: 8168 -- not 8169!)

I finally got onto this issue when I found this post. I quickly confirmed that my 8168 card was using the r8169 driver by running ...

sudo lshw -class network

..., which takes a while -- just be patient. :-)

You can see the driver being used in the configuration: line ... Example: ...

configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.026.00-NAPI ...

Then I mostly followed the instructions in this post to install and activate the correct driver, changing specific paths as required to match my system. Note that the driver download site does not mention the v3.x.x kernel (only 2.4.x and 2.6.x) But it works just fine anyway.

If you have only one network interface, then you should be all set by this stage.

Unfortunately, it wasn't quite that simple for me, because I also had a second card installed, which did have an actual 8169 chip on it! :-/ So, I couldn't just leave the r8169 driver disabled.

To fix this, I renamed the /lib/module/your-kernel-version/drivers/net/r8169.bak file (the autorun.sh driver installer script renamed it) back to r8169.ko and edited /etc/modules as follows ...

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

loop
lp
r8168
r8169

... [last two lines added] hoping that this would force the modules to be loaded in that same order, thus avoiding modprobe picking up the r8169 driver for the wrong card. It worked!

To the OP ... I'm updating this for the benefit of other people searching for a solution, because it comes up pretty high in Google results. Hope you don't mind.


  1. Maybe it's a duplicate IP address?

  2. It maybe another software affecting your connection, try to stop Ubuntu firewall.

    sudo service ufw stop

  3. Check the log.

    cat /var/log/syslog | less

  4. Try to tune the buffer size.

    echo 83886080 |sudo tee /proc/sys/net/core/wmem_max

  5. The problem is in the router.


I have seen this with a Centrino Ultimate-N 6300 8086:4238 wireless interface (on a Thinkpad X201). As best as I can tell, this is a known bug in the wireless driver or its firmware, probably the same as Bug #836250. I have asked what the message actually means at "What does “ping: sendmsg: No buffer space available” mean?".

Workarounds

  • Since I only get this intermittently, a workaround is to completely reset the wireless network whenever the issue occurs:

    sudo modprobe -r iwlwifi
    sudo modprobe iwlwifi
    
  • Another possible workaround is to switch your router to 802.11g-only mode (I think the issue only occurs when connecting to an n network)