Eric Stewart: Running Off At The Mouth

FTP – really, TCP Window Scaling

by Eric Stewart on Aug.11, 2009, under Computers, Networking, Technology

This is written up here in the hopes that, if someone else tries to find a solution to what I encountered via Google, that they’ll actually be able to use this as a resolution.  I ended up having to go to the network expert several steps above me for this to be figured out.  Hopefully you get here before you bang your head on the concept that there’s a firewall or iptables problem somewhere …

I ran into an issue this week where one of my more technically knowledgeable users (former boss, actually) wanted to FTP to a server that had the header line:

220-TCPIPFTP IBM FTP CS V1R9 ...

The thing was, she could successfully log in from a Mac and a PC … but not a Red Hat Enterprise Linux box, which would hang just after reporting the first “Connected … ” line.  FTP would work everywhere (platform-wise) else.

After giving a coworker with a bigger brain than mine some time (and packet captures) to look at it, he determined that it was due to TCP Window Scaling being active on the RHEL machine … and not on the suspected ancient IBM system on the other end.

The solution is to tweak the window scaling setting in the kernel.  One method involved using a command prompt as root:

echo "0" > /proc/sys/net/ipv4/tcp_window_scaling

But alas, that on this system just returned:

/proc/sys/net/ipv4/tcp_window_scaling: File exists.

So, I had to Google for alternative solutions.  In short, there were two:

First, so that setting survives a reboot, edit /etc/sysctl.conf and add a line (the comment, of course, is optional):

# Disable TCP window scaling
net.ipv4.tcp_window_scaling=0

But to change the setting in the running kernel:

sysctl -w net.ipv4.tcp_window_scaling=0

You can even more/cat/less/vi /proc/sys/net/ipv4/tcp_window_scaling to verify the change.  And that’s the solution for this issue.

:,

Hi! Did you get all the way down here and not find an answer to your question? The two preferred options for contacting me are:
  • Twitter: Just start your Twitter message with @BotFodder and I'll respond to it when I see it.
  • Reply to the post: Register (if you haven't already) on the site, submit your question as a comment to the blog post, and I'll reply as a comment.

Leave a Reply

You must be logged in to post a comment.