Skip to main content

Stalling Wi-fi uploads on Mac OS X 10.5.2

I was sitting in my local wifi-enabled cafe in London for the first time yesterday, and was struck with a peculiar problem. I could attach to their Wi-fi network properly, and browsing webpages worked fine, but trying to scp a small file to one of the recoil.org servers was stalling at exactly 2064kB.

I had a quick glance around for the problem on Google, and a thread turned up on the Apple message board. These people were discussing the same symptoms as I was having; An scp would start out fine, but stall after a particular amount of data had transfered. Following lots of discussion about tuning net.inet.tcp.delayed_ack, I tried fiddling with all sort of sysctl and ifconfig settings for the best part of an hour, and eventually had success.

I had to drop the MTU of en1 down from 1500 all the way down to 1400 for the problems to go away. The more common settings you might find via Google such as 1492 didn’t resolve the issue. For those of you who might have arrived here looking at similar issues, type the following into a Terminal window:


 sudo ifconfig en1 mtu 1400

I’m not entirely sure what was going on, but Path MTU discovery is turned on by default on the Mac. By blocking ICMP packets on the Wifi network, it may cause issues with the discovery system. If people are more familiar with the networking circumstances here, drop me a comment/email.