[Wylug-discuss] Using vi over SSH over VPN over 3G connection.

Paul Brook paul at codesourcery.com
Thu Mar 10 16:18:09 UTC 2011


> The VPN connection works fine and I can SSH to my remote laptop
> computer using the DHCP issued IP from my local LAN.
> However when I try and run vi in the terminal window it looks like it
> freezes and I'm not able to do anything apart from kill the terminal
> window and reconnect. vi works fine if I bring the computer to my
> local network and connect locally.
> If I run nano in ssh  this works OK.
> 
> Any ideas?

My guess is this is an MTU issue.  Typical symptoms are that initially tings 
work fine, but TCP connections block once large blocks of data are 
transferred.  Ethernet usually has an MTU of 1500 bytes. The average terminal 
displays about 2000 characters, so vim "instantly" printing a screenful of 
data on startup is probably sufficient to trigger this.

In theory the TCP connection should automatically accommodate network segments 
(e.g. VPN tunnels) with a lower MTU[1]. However it's common for firewalls to 
interfere with this process by blocking ICMP messages.

Try manually reducing the MTU on the 3G and/or VPN interfaces. If this 
confirms the above diagnosis then you have a few options: Beat the 
router/firewall with a clue stick until PMTU discovery works, have linux hack 
round the problem for you by enabling TCP MSS clamping, or live with the 
manual MTU hacks.

Paul

[1] http://en.wikipedia.org/wiki/Path_MTU_Discovery



More information about the Wylug-discuss mailing list