Network problem since kernel-2.6.17

Bug #59331 reported by gneman
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux-source-2.6.17 (Ubuntu)
Fix Released
Undecided
Ben Collins
Nominated for Gutsy by Mosin
Nominated for Hardy by Mosin

Bug Description

Some changes made in kernel-2.6.17 makes it behave really strange for many users regarding their network connection. It's related to window_scaling and you can find more information here:

http://kerneltrap.org/node/6723

The result is that MANY users won't be able to access most sites on the net, including the Ubuntu repositories, unless they disable tcp_window_scaling. This can be done with the command "echo 0 > /proc/sys/net/ipv4/tcp_window_scaling" as root, or by adding the line "net.ipv4.tcp_window_scaling = 0" to /etc/sysctl.conf

Ok, here the problem: I'm one of those users (and in Spain there will be a whole lot of them) who can't access most sites. So when with Ubuntu Edgy (as live-cd) it happens that when I try to use that command with sudo I get permission denied. I can edit /etc/sysctl.conf though, but I'd need to reboot the computer which is useless as a live CD.

So when I try to install it, it freezes while scanning the mirror to configure apt and stays there forever (because it can't access the repository).

Conclusion: I can't use it as live-cd and I can't install it either to solve the problem.

Suggestions:

1 - Disable tcp_window_scaling by default in /etc/sysctl.conf. This is the most user-friendly but most technically intrusive one.

2- Allow users to run the command "sudo echo 0 > /proc/sys/net/ipv4/tcp_window_scaling" without getting permission denied. This is not very user friendly, but it should work.

3 - Set some tipe of time-out so that if during install it can't access the repository it will continue with the installation. Then the user can solve the problem after installing the system by adding that line to /etc/sysctl.conf. Not really user-friendly, but it could be a good option.

Revision history for this message
David Rasch (rasch) wrote :

I'm experiencing this problem connecting to a number of sites including my office. The supplied information attempts to fix the problem for the installer.

The site to which I'm trying to connect runs OpenBSD 3.8 as a router, and the actual machine is running Debian Sarge. I'm suprised, but not shocked to hear that one of these would have broken window scaling support.

Revision history for this message
FiereSebastien (sf) wrote :

I'm experiencing this problem with almost all sites.

Thanks a lot for the fix.

Revision history for this message
Ben Collins (ben-collins) wrote :

I've reverted GIT 7b4f4b5ebceab67ce440a61081a69f0265e17c2a, which is responsible for this problem. While I agree that this is just a bandaid over the real problem (broken systems on the internet), I think our users deserve to have systems that are reliable until these problems are fixed.

Changed in linux-source-2.6.17:
assignee: nobody → ben-collins
status: Unconfirmed → Fix Committed
Revision history for this message
David Rasch (rasch) wrote :

this resolves the symptom for me. thanks.

Revision history for this message
Michael Doube (michael-doube) wrote :

I have had this exact problem, solved as you describe, in Ubuntu Feisty:

uname -a
Linux doris 2.6.20-15-server #2 SMP Sun Apr 15 07:41:34 UTC 2007 i686 GNU/Linux

An alternative solution is to install Firestarter, which I think works by using this iptables line:

sudo iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

Revision history for this message
Fredrik (fredrk) wrote :

Open this up!

Fesity has this problem...

Revision history for this message
Fredrik (fredrk) wrote :

"2- Allow users to run the command "sudo echo 0 > /proc/sys/net/ipv4/tcp_window_scaling" without getting permission denied. This is not very user friendly, but it should work."

Uh?

You CAN run the command but I htink if you just write it like that things will be executed in the "wrong" order.
Using "sudo -s" and the the command works fine.

Revision history for this message
Ben Collins (ben-collins) wrote :

This isn't a bug in feisty, this is a bug in other implementations of window scaling. Fact is, they need to be fixed, and we should not penalize our users just because other systems are broken.

Revision history for this message
Fredrik (fredrk) wrote :

I know that it isn't a bug in Feisty.

BUT When 1 out of 10 pages does not respond you can't just igonre the fact that someting must be done until these other people fix their routers...

Changed in linux-source-2.6.17:
status: Fix Committed → Fix Released
Revision history for this message
Freestate (niviuk-1978) wrote :

Yes is a annoying and recursive bug !

Revision history for this message
Gruff (contact-pelham-projects) wrote :

Had this problem as well, and this fix worked! Thank you!

In my case I was installing Hardy Heron Ubuntu 8.04 and was able to connect to my Speedtouch 716 v5 WL router okay with limited internet connectivity. My windows PC on the same network was working fine, but my Ubuntu PC was not able to see all internet sites, just some of them.

For newish Linux users here is a complete idiots guide:

The goal is to edit file /etc/sysctl.conf to add the line net.ipv4.tcp_window_scaling=0

1. Open a terminal window from APPLICATIONS -> ACCESSORIES -> TERMINAL

2. You must then edit it as a super user as it is a system file, so type:
sudo gedit /etc/sysctl.conf

3. Enter your password when asked

4. Anywhere in the file start a new line and type:
net.ipv4.tcp_window_scaling = 0

5. Save the file.

6. Close down Ubuntu as normal.

7. Restart your PC.

And all should be well. If it isn't then you probably have a different problem, but it may be worth checking the file /etc/sysctl.conf to make sure you made the change correctly. For example it you try to edit it but are not logged on as superuser then it will not have been changed.

Revision history for this message
Neil Lall (nulall) wrote :

I just wanted to re-voice the importance of this issue. It was a huge problem for me with many major sites until I just recently discovered this fix. I'm not sure how, but installing Firestarter made it finally work properly.

Revision history for this message
deafpanda (will-evans) wrote :

Hi all,

I'm new to Linux, using ubuntu 8.04.

I have this problem, and it has not been solved by following the advice above:

I only seem to be able to connect to google. Other websites timeout. I can ping everything fine. Synaptic times out when it tries to get packages.

I've edited /etc/sysctl.conf, adding the line

net.ipv4.tcp_window_scaling = 0

There's no change, everything still times out.

Can anyone help a poor linux newbie who would just love to stop relying on windows?

Revision history for this message
Gruff (contact-pelham-projects) wrote : Re: [Bug 59331] Re: Network problem since kernel-2.6.17

I'm a new Linux user as well, so this may be obvious to everyone else
but I got caught out until I realised that Ubuntu overwrites changes
made to sysctl.conf when you reboot unless you use the correct command
to edit the file.

The command is:
sudo gedit /etc/sysctl.conf

If you just edit the file without 'sudo' then the changes will be
overwritten on reboot.

deafpanda wrote:
> Hi all,
>
> I'm new to Linux, using ubuntu 8.04.
>
> I have this problem, and it has not been solved by following the advice
> above:
>
> I only seem to be able to connect to google. Other websites timeout. I
> can ping everything fine. Synaptic times out when it tries to get
> packages.
>
> I've edited /etc/sysctl.conf, adding the line
>
> net.ipv4.tcp_window_scaling = 0
>
> There's no change, everything still times out.
>
> Can anyone help a poor linux newbie who would just love to stop relying
> on windows?
>
>

Revision history for this message
Gruff (contact-pelham-projects) wrote :

I'm a new Linux user as well, so this may be obvious to everyone else but I got caught out until I realised that Ubuntu overwrites changes made to sysctl.conf when you reboot unless you use the correct command to edit the file.

The command is:
sudo gedit /etc/sysctl.conf

If you just edit the file without 'sudo' then the changes will be overwritten on reboot.

Hope this helps!

Revision history for this message
Fredrik (fredrk) wrote :

No, you cannot edit the files in /etc/ wothout using sudo at all. Try to edit it and save (It will complain) and open it agan and you will see that the file is not changed.

Revision history for this message
Anton Salikhmetov (salikhmetov) wrote :

> I've edited /etc/sysctl.conf, adding the line
>
> net.ipv4.tcp_window_scaling = 0
>
> There's no change, everything still times out.

I tried to use the Firestarter application as suggested above, and it worked for me. Then, I saved its configuration files, purged Firestarter, restarted my system, and started to execute the commands from its /etc/firestarter/sysctl-tuning script in sequence, at each step checking "wget livejournal.com" to work. Executing the first two commands "echo 0 > /proc/sys/net/ipv4/ip_forward" and "echo 0 > /proc/sys/net/ipv4/conf/all/log_martians" did not help, since "wget livejournal.com" was still hanging. The third command, "echo 0 > /proc/sys/net/ipv4/tcp_timestamps", made "wget livejournal.com" working fine.

So I have written the only one command "net.ipv4.tcp_timestamps = 0" in my /etc/sysctl.conf file and am having the full internet connection, not a connection just to its part limited by google.com and some other sites.

I'm suggesting this workaround for this bug until Ubuntu's Linux kernel configuration is corrected - I'm using the latest Ubuntu Intrepid version updated now and this bug is being reproduced here.

Revision history for this message
Jullian Gafar (jullian) wrote :

I can also vouch that this bug also present in Intrepid.

Revision history for this message
indusboy (rlateefi) wrote :

I am struggling with this issue on Hardy Heron (8.04). Kernel version 2.6.24-23. Tried all the workarounds mentioned in the comments including adding the following lines to sysctl.conf:
net.ipv4.tcp_window_scaling=0
net.ipv4.tcp_wmem = 4096 16384 131072
net.ipv4.tcp_rmem = 4096 87380 174760

Turning off ipv6.

Nothing seems to help.

Revision history for this message
Anton Salikhmetov (salikhmetov) wrote :

> I am struggling with this issue on Hardy Heron (8.04). Kernel version 2.6.24-23. Tried all the workarounds mentioned in > the comments including adding the following lines to sysctl.conf:
> net.ipv4.tcp_window_scaling=0
> net.ipv4.tcp_wmem = 4096 16384 131072
> net.ipv4.tcp_rmem = 4096 87380 174760
>
> Turning off ipv6.
>
> Nothing seems to help.

As I wrote above, the "echo 0 > /proc/sys/net/ipv4/tcp_timestamps" command solved the problem for me, so I wrote the only one command "net.ipv4.tcp_timestamps = 0" in my /etc/sysctl.conf file. Didn't it help for you?

Revision history for this message
indusboy (rlateefi) wrote :

Nope the "net.ipv4.tcp_timestamps = 0" entry into sysctl.conf does not help either.

Revision history for this message
indusboy (rlateefi) wrote :

I resolved this problem by changing my router.

Revision history for this message
Iván Campaña (ivan-campana) wrote :

I had the same problem with a server serving as a proxy using hardy (8.04.2) and on my laptop using Jaunty (9.04), the same issue on both sides...

I solved it by using this in /etc/sysctl.conf:

net.ipv4.tcp_wmem = 4096 16384 512000
net.ipv4.tcp_rmem = 4096 87380 512000

and afterwards, to make changes efective without restarting:

sudo sysctl -p

Revision history for this message
luisaso (luisasolarf) wrote :

I have the same problem on 10.04. I can access a buch of sites but not luck with google, hotmail, and some other sites.

I already did pretty much of what i found it is possible to do. Nothing works.
I change DNS to open DNS, change sysctl.conf file, change resolv.conf file, turn off window scale, etc.

I got other ubuntu machine that runs pretty well all sites.
i have no idea how to fix this.

The only thing is left is to change the router. I probably gonna try that. I let you know if that works for me.

Revision history for this message
dhayfule (pravin) wrote :

Has this issue being fixed in 11.04 yet?

This is frustrating, I cannot ask my ISP to change their routers just because I do not use Windows. They keep saying my system is faulty as their other customers (using Windows) do not complain....

This is ridiculous....

Revision history for this message
Chau Duong (duongtamchau) wrote :

The status said the fix was released.
But I still have it in 11.04.

All these solution does not work for me.
In particular I cannot access this site from my Linux machine.
I cannot access any things from ubuntu.com
I cannot do updating, installing new apps (whereas I just decided to give up on games and switch to linux to focus on programming and studying linux today - great start I think Y_Y)
I cannot do anything with my machine now T_T.

I still can go to google, youtube, gmail... (some ppl reported not being able to connect to these sites)
I guessed the fix was not adequate.

Revision history for this message
Chau Duong (duongtamchau) wrote :

I went through all this...
https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide/Connections

None of these options available for me...
Some have no effects, some are not applicable.

Please help me...
This is really annoying >_<

Revision history for this message
pogorl (pogorl) wrote :

Hello there. It's Ubuntu 14.04 Kernel 3.13.0-34-generic

The problem still persist. Some sites could not be opened, or open partially with very long delay. High packet loss to those sites has been observed also. Disabling windows scaling does not resolve the issue.

A better solution would be greatly appreciated.

Revision history for this message
Kristjan Kristjansson (kristjanpk-d) wrote :

Hey,
This is also a problem for me. Ubuntu 14.04.2 LTS Kernel 3.13.0-32-generic

net.ipv4.tcp_window_scaling = 0
"fixes" the problem for me

also using these settings works but slows everything down:
net.ipv4.tcp_wmem = 4096 16384 512000
net.ipv4.tcp_rmem = 4096 87380 512000
net.ipv4.tcp_window_scaling = 1

A better and more out-of-the-box solution would be appreciated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.