Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-29-2008, 05:57 AM   #1
LQ Newbie
Registered: Aug 2007
Posts: 15

Rep: Reputation: 10
Angry TCP timeout problem similar to the window scaling issue

Hi all,

I am building a Source Mage system on a laptop (kernel v2.6.22), and am having a bit of frustration with the TCP protocol. I have a SiS191 ethernet card; to get that to work, I followed this excellent howto on altering the driver, and the card does seem to be working fine.

I can ping sites, my DNS is working, and I can sometimes visit certain websites: Google,, and a few other big ones. However, when I try to visit other sites (or use the Source Mage equivalent of 'wget' to download package files to continue building my system), I get messages like:

'HTTP request sent; awaiting response...'

And then a timeout. Every time. FTP gives similar issues.

Now, this sounds awfully like the window scaling problem which was brought into the open with kernel 2.6.17. One thing that might be different in my case is that the window scaling problem seems to affect only a handful of websites which are sitting behind broken routers, whereas my problem is with almost every website, except, perhaps, ones that are cached somewhere already (Google, BBC)...but that could just mean that the broken router is only a step or two upstream from me - however I'm fairly confident it's not the household one.

I have tried the following suggested fixes for that problem:
  • setting /proc/sys/net/ipv4/tcp_window_scaling to 0
  • setting wmem and rmem values to the pre-2.6.17 ones
  • various other, similar suggested fixes for window scaling - all the ones that come up in general Google searches, which are basically variations on the themes of the above
  • and done those in various ways (not that it should matter): echoing directly to the file, putting the new values in sysctl.conf etc.

None of these have worked.

Is this a window scaling issue? If so, does anyone know of any other fixes (I'm not scared to try 'complex' things); if not, does anyone know what else it could be?

(I can try to get tcpdumps if someone thinks that's necessary for troubleshooting...I've just avoided it thus far because it is a pain, given the minimal system I have and my inability to download packages, as I don't have tcpdump on the system!)

Thanks for any help/advice anyone can offer.
Old 05-29-2008, 07:39 AM   #2
Senior Member
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Did you try:

and see the list returned? Do that for websites which you can't get to and websites which you can reach and see if there's any pattern there.

Another issue that often comes up is if you have IPv6 up and running, many tools will attempt to send IPv6 packets and sometimes fall back to IPv4 after a long wait (the name resolver does this). Unfortunately that wait for the name resolution usually causes the program that initiated the name resolution to time out and give up. In such a case, remove anything to do with IPv6. The internet in general is still extremely hostile to IPv6, especially since a very popular defective OS which can't run IPv6 dominates the home computer world. A lot of people insist they see no clear reason to buy new switches etc. with v6/v4 bridges when so many people simply don't use IPv6.
Old 05-29-2008, 09:40 AM   #3
LQ Newbie
Registered: Aug 2007
Posts: 15

Original Poster
Rep: Reputation: 10
Originally Posted by pinniped View Post
Did you try:
I hadn't tried that, but now I have. There's no particular pattern that I can discern: certainly, no matter what site I run it on, there is no trouble returning the information. DNS lookup and that side of things seems to be quite fine.

Another issue that often comes up is if you have IPv6 up and running
I had thought that was an issue, but since I have stripped the kernel down to the bare minimum I need, I don't even have IPv6, since unfortunately the whole thing seems to be something of a fiasco at the moment.

What I have done is run a tcpdump, and the issue does seem to be one of window tcpdump was similar in all essential respects to the one posted here, which I reproduce below:

root@mymachine:~# tcpdump -ni eth0 port 80
tcpdump: listening on eth0 > S 0:0 win 5840 <mss 1460,sackOK,timestamp 94318 0,nop,wscale 6> (DF) > S 0:0(0) ack 1 win 5840<mss 1460,nop,wscale 2> (DF) > . ack 1 win 92 (DF) > P 1:352(351) ack 1 win 92 (DF)
Even my window sizes were the same (5800 odd being transformed to 92, because of a box somewhere in the middle disregarding the 'wscale 6').

I tried the fix which that chap mentioned, namely setting

echo "4096 16384 131072" > /proc/sys/net/ipv4/tcp_wmem
echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem
and I put the equivalent commands in sysctl.conf, rebooting, restarting network, etc., but to no avail.

Does anyone know of any other way to fix this issue, now that at least it is certain that it is window scaling that's the culprit?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set TCP Timeout xenomage Linux - Networking 5 11-23-2009 04:08 PM
LXer: Linux: Window Scaling on the Internet LXer Syndicated Linux News 0 06-15-2006 04:03 PM
AMD 64 frequency scaling issue - everything runs too fast! gracecourt Linux - Software 8 08-21-2005 06:49 PM
VNC Windows Scaling Issue ALPHATWIN Linux - Software 4 08-17-2005 10:27 PM
Similar problem, different issue. karl0s Linux - Software 2 10-24-2003 03:06 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration