Subject: Re: rlogin connections closed with -current.
To: None <M.Drochner@fz-juelich.de>
From: Michael Graff <explorer@flame.org>
List: current-users
Date: 07/26/1999 14:17:29
I just tried this after getting disconnects every 2 hours or so.
Now I get them every 2 minutes or so.  Sure looks like a bug to me.
:)

Here's the TCP dump:

14:10:06.478358 poofball.flame.org.ssh > naptha.rc.vix.com.65463: P 64:244(180) ack 1 win 17520 <nop,nop,timestamp 222066 1031294> [tos 0x10]
14:10:06.487594 poofball.flame.org.ssh > naptha.rc.vix.com.65463: P 244:288(44) ack 1 win 17520 <nop,nop,timestamp 222066 1031294> [tos 0x10]
14:10:06.487876 naptha.rc.vix.com.65463 > poofball.flame.org.ssh: . ack 288 win 17476 <nop,nop,timestamp 1031298 222066> [tos 0x10]
14:12:06.329004 poofball.flame.org.ssh > naptha.rc.vix.com.65463: R 218478084:218478084(0) ack 3852297685 win 17520 [tos 0x10]

And here's the TCP state just before and just after the reset:

TCP Protocol Control Block at 0xf074335c:

Timers:
        REXMT: 0        PERSIST: 0      KEEP: 111273    2MSL: 0

State: ESTABLISHED, flags 0x39e4, inpcb 0xf0732a80

rxtshift 0, rxtcur 2, dupacks 0
peermss 1460, ourmss 1460, segsz 1448

snd_una 218478084, snd_nxt 218478084, snd_up 218477860
snd_wl1 3852297685, snd_wl2 218478084, iss 218477096, snd_wnd 17476

rcv_wnd 17520, rcv_nxt 3852297685, rcv_up 3852297685, irs 3852296929

rcv_adv 3852315205, snd_max 218478084, snd_cwnd 4344, snd_ssthresh 1073725440
idle 478, rtt 0, rtseq 218477860, srtt 0, rttvar 0, rttmin 2, max_sndwnd 17520

oobflags 0, iobc 0, softerror 0

snd_scale 0, rcv_scale 0, req_r_scale 0, req_s_scale 0
ts_recent 1031294, ts_regent_age 222064, last_ack_sent 3852297685



TCP Protocol Control Block at 0xf074335c:

Timers:
        REXMT: 4034150092       PERSIST: 0      KEEP: 0 2MSL: 0

State: CLOSED, flags 0x39e4, inpcb 0xf0732a80

rxtshift 0, rxtcur 2, dupacks 0
peermss 1460, ourmss 1460, segsz 1448

snd_una 218478084, snd_nxt 218478084, snd_up 218478084
snd_wl1 3852297685, snd_wl2 218478084, iss 218477096, snd_wnd 17476

rcv_wnd 17520, rcv_nxt 3852297685, rcv_up 3852297685, irs 3852296929

rcv_adv 3852315205, snd_max 218478084, snd_cwnd 1448, snd_ssthresh 1073725440
idle 478, rtt 0, rtseq 218477860, srtt 0, rttvar 0, rttmin 2, max_sndwnd 17520

oobflags 0, iobc 0, softerror 0

snd_scale 0, rcv_scale 0, req_r_scale 0, req_s_scale 0
ts_recent 1031294, ts_regent_age 222064, last_ack_sent 3852297685


Matthias Drochner <drochner@zel459.zel.kfa-juelich.de> writes:

> It doesn't happen for me, didn't try ssh however.
> To track it down easier, you could shorten the keppalive timeout.
> I've used
> sysctl -w net.inet.tcp.keepidle=240
> sysctl -w net.inet.tcp.keepintvl=15
> sysctl -w net.inet.tcp.keepcnt=2
> This will start to send keepalives after 2 minutes instead of
> 2 hours, try only 2 times and wait 7 seconds for a reply.
> 
> Further you could watch the keepalives with tcpdump, and
> have a look at the tcp statistics ("netstat -p tcp", the 3
> "keepalive" items).
> 
> best regards
> Matthias