Subject: [Isms] ssh window adjustments

From: Juergen Schoenwaelder <[email-masked]>
Date: Mon, 15 May 2006 23:51:02 +0200

Hi,

I have a question concerning the SSH windowing mechanism. RFC 4254
says:

   The window size specifies how many bytes the other party can send
   before it must wait for the window to be adjusted.  Both parties use
   the following message to adjust the window.

The document then explains the window adjust message but it does not
really say when window adjustments are generated. (There are no real
elements of procedure in RFC 4254 as far as I can tell.)

The reasons I am asking this question is a surprising behaviour of the
SSH library we are using in our SNMP over SSH prototype. In a
nutshell, a getnext/response SNMP interaction comes out as follows in
terms of SSH connection protocol messages:

  C: SSH_MSG_CHANNEL_DATA
  S: SSH_MSG_CHANNEL_WINDOW_ADJUST
  S: SSH_MSG_CHANNEL_DATA
  C: SSH_MSG_CHANNEL_WINDOW_ADJUST

The SSH library likes to send a window adjustment whenever it has
received data. While the adjustment message itself is small (9 bytes),
it gets padded, encrypted, hmac'ed, wrapped and the result is notable
larger than 9 bytes (typically 52 bytes). Furthermore, while TCP ACK
piggybacking works nicely, these window adjustments basically double
the TCP messages we are seeing. We have been playing with openssh to
produce a similar interaction pattern and we did not see the same
behaviour so we kind of believe these frequent window adjustments are
a "feature" of the SSH library we are using.

But since we found RFC 4254 not particular clear on this subject, I
thought I better ask here for some advice from the SSH experts before
studying several implementations.

/js

P.S. There might be a larger issue how we deal with TCP layer buffers,
     SSH channel buffers and SNMP engine buffers in a useful way.

-- 
Juergen Schoenwaelder		    International University Bremen
<http://www.eecs.iu-bremen.de/>	    P.O. Box 750 561, 28725 Bremen, Germany

_______________________________________________
Isms mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/isms