# ssh freezes on "TCP Previous Segment Lost" [SOLVED

## Beanalby

SSH connections to my gentoo box will lag, and occasionally "freeze", which can be remedied by reconnecting to my screen session.  Any keyboard events I send go through properly (as I can see the result when I reconnect), but no display information comes back.  No other connection type seems to have this problem.

Sniffing the traffic, I see a correlation between lots of "TCP Previous Segment Lost" and "TCP Retransmission" when I'm lagging.  Whenever it freezes, there's a "TCP Previous Segment Lost" without the corresponding retransmission.  I still get a ACK for every request packet sent after the "freezing", but nothing ever comes back.

This is a link to an Ethereal dump:

http://68.170.209.128:88/packet_capture

The client is 192.168.0.100, my Gentoo host is 68.170.209.128.  There's about 20 seconds of normal traffic, and then this:

 *Quote:*   

>     578 20.422313   68.170.209.128        192.168.0.100         SSH      Encrypted response packet len=1460
> 
>     579 20.422539   192.168.0.100         68.170.209.128        SSH      Encrypted request packet len=52
> 
>     580 20.422698   192.168.0.100         68.170.209.128        SSH      Encrypted request packet len=52
> ...

 

For the next 25 or so seconds, it continues capturing requests with ACKs, but no traffic coming back.

I freshly reinstalled this machine in the trouble shooting.  It's running gentoo-sources (2.4.26-gentoo-r9).  I tried changing the network card - it originally had a Linksys LNE100TX, now running with a Netgear FA311.  Tried changing network cable, and port on switch, still have the problem.

Anybody know what could be causing this? :-\  Final testing step is trying another distro, but I'd like to stick with Gentoo.Last edited by Beanalby on Thu Sep 30, 2004 2:26 pm; edited 1 time in total

----------

## sigSEGV2003

It sounds like it could be a buggy firewall.  I'm assuming you're behind some sort of NAT device by your IP address.  Have you tried it from a raw internet connection to see if you have the same problem?

----------

## Beanalby

Yup, that's it.  Both these machines are physically connected to the same router (D-Link DI-614+), and I was just using the external IP out of habit.  SSHing to the internal IP for the gentoo box (and bypassing the firewall) produces no problems whatsoever.

I'll be taking this up with D-Link.  Thanks!

----------

