Categories
Cellphone Unix

SSH/SCP times out on cellular network

I have a centos box I use when travelling and use an AT&T cellular USB modem on it for connectivity. I ran into an interesting problem when connecting in Las Vegas — I could get SSH sessions working fine up to a point, but when a lot of text was being outputted, the session would freeze and the connection would timeout.

This would happen when running “top”, or even if you started a “vi” session!

This looked like an issue with packet sizes, so I tried SCP’ing different file sizes and found that it would break at 1375 bytes when sending a file. After setting my MTU to 1370 the problem went away. The MTU was set to the default of 1500 prior.

So I must conclude that AT&T’s network in Las Vegas has a different network/routing setup than they use in other areas, because I have not see this problem before in California or a number of other states across the country.

For reference, the steps to fix this are:

ifconfig ppp0 mtu 1370

and then you can edit the config file, in my case “/etc/sysconfig/network-scripts/ifcfg-ppp0” and add:

MTU=1370

to the entries there.