Re: [Tsvwg] WGLC for Port Randomization starts now (April 1st)

"Anantha Ramaiah (ananth)" <ananth@cisco.com> Thu, 28 May 2009 06:28 UTC

Return-Path: <ananth@cisco.com>
X-Original-To: tsvwg@core3.amsl.com
Delivered-To: tsvwg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 91A3E3A6846 for <tsvwg@core3.amsl.com>; Wed, 27 May 2009 23:28:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.974
X-Spam-Level:
X-Spam-Status: No, score=-5.974 tagged_above=-999 required=5 tests=[AWL=-0.575, BAYES_00=-2.599, J_CHICKENPOX_15=0.6, J_CHICKENPOX_17=0.6, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lbgcQNEBOAi2 for <tsvwg@core3.amsl.com>; Wed, 27 May 2009 23:28:27 -0700 (PDT)
Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by core3.amsl.com (Postfix) with ESMTP id C89853A694C for <tsvwg@ietf.org>; Wed, 27 May 2009 23:28:27 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.41,263,1241395200"; d="scan'208";a="312063797"
Received: from sj-dkim-4.cisco.com ([171.71.179.196]) by sj-iport-6.cisco.com with ESMTP; 28 May 2009 06:30:10 +0000
Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-4.cisco.com (8.12.11/8.12.11) with ESMTP id n4S6UAgf028435; Wed, 27 May 2009 23:30:10 -0700
Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-2.cisco.com (8.13.8/8.13.8) with ESMTP id n4S6UApH007692; Thu, 28 May 2009 06:30:10 GMT
Received: from xmb-sjc-21c.amer.cisco.com ([171.70.151.176]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 27 May 2009 23:30:10 -0700
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 27 May 2009 23:30:09 -0700
Message-ID: <0C53DCFB700D144284A584F54711EC5807563754@xmb-sjc-21c.amer.cisco.com>
In-Reply-To: <4A1E0FBD.8080308@isi.edu>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [Tsvwg] WGLC for Port Randomization starts now (April 1st)
thread-index: AcnfSuEtXzh/2zwlSomguDZFVfAV0AADidqA
References: <20090415033307.F00C0CD585E@lawyers.icir.org> <4A037030.6040107@isi.edu> <0C53DCFB700D144284A584F54711EC58074EEED6@xmb-sjc-21c.amer.cisco.com> <4A1AB6EE.5080900@gont.com.ar> <0C53DCFB700D144284A584F54711EC58074EEF11@xmb-sjc-21c.amer.cisco.com> <4A1BF56D.3020709@isi.edu> <0C53DCFB700D144284A584F54711EC58074EF74C@xmb-sjc-21c.amer.cisco.com> <4A1D6F4E.2080005@isi.edu> <0C53DCFB700D144284A584F54711EC58075636B3@xmb-sjc-21c.amer.cisco.com> <D3F996EE-AF45-4E38-8DA8-5C43E98A3112@lakerest.net> <4A1E0FBD.8080308@isi.edu>
From: "Anantha Ramaiah (ananth)" <ananth@cisco.com>
To: Joe Touch <touch@ISI.EDU>, Randy Stewart <randall@lakerest.net>
X-OriginalArrivalTime: 28 May 2009 06:30:10.0410 (UTC) FILETIME=[C01194A0:01C9DF5D]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=7017; t=1243492210; x=1244356210; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=ananth@cisco.com; z=From:=20=22Anantha=20Ramaiah=20(ananth)=22=20<ananth@cisco .com> |Subject:=20RE=3A=20[Tsvwg]=20WGLC=20for=20Port=20Randomiza tion=20starts=20now=20(April=201st) |Sender:=20; bh=uRWvnh7z7MDQoPiW40u9a167bVjODZ35jXlzoUzaFfQ=; b=BTq5NwMig3C94D5yLyIMK06/wNZbUP7sscF2PQKcJLyoQ4V4PvBzhO3U6c LE2kC1DhsfDcqJLtou4U9iF/fhvFf2rYxPeIjBVwgxO8WIBKM0eoe3ptBNTN JIePy33XOr;
Authentication-Results: sj-dkim-4; header.From=ananth@cisco.com; dkim=pass ( sig from cisco.com/sjdkim4002 verified; );
Cc: "James Polk (jmpolk)" <jmpolk@cisco.com>, mallman@icir.org, tsvwg <tsvwg@ietf.org>, Fernando Gont <fernando@gont.com.ar>
Subject: Re: [Tsvwg] WGLC for Port Randomization starts now (April 1st)
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tsvwg>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 May 2009 06:28:35 -0000

> -----Original Message-----
> From: Joe Touch [mailto:touch@ISI.EDU] 
> Sent: Wednesday, May 27, 2009 9:15 PM
> To: Randy Stewart
> Cc: Anantha Ramaiah (ananth); tsvwg; James Polk (jmpolk); 
> Fernando Gont; mallman@icir.org
> Subject: Re: [Tsvwg] WGLC for Port Randomization starts now 
> (April 1st)
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Randy Stewart wrote:
> > Not getting into the details of vtags.. I think you hit 
> upon the key 
> > point. If you are doing time-wait.. you are doing time-wait on 
> > vtags... aka: 32 bit numbers.
> > 
> > An IP address/Port is NEVER blocked from re-use right away 
> like it can 
> > be in TCP due to time-wait. This was always one of the most 
> irritating 
> > things I did not like in TCP.
> 
> Sorry, maybe I'm missing this.
> 
> Let A=srcIP, X=srcport, B=dstIP, Y=dstport.
> 
> In TCP, if I use A,X->B,Y, then close the connection, I 
> cannot use it for another 2 minutes.
> 
> In SCTP, if I use A,X->B,Y with Vtag Q, then close the 
> connection, clearly I cannot use A,X->B,Y with Vtag Q again 
> for some (unspecified, AFAICT, in the specs) period of time.
> 
> You appear to be claiming that what SCTP does is block Vtag Q 
> for that period of time _for all_ socket pairs. That's 
> strictly worse than TCP was doing.

What do you mean by "all socket pairs", at any given time there is only
*one* association with a given socket pair S. Also *every* vtag that is
generated is put into time-wait (of course only in some implementations)
What you say would have made sense if the connection qualifier for SCTP
happens to include vtag, but that is not the case. See below.

> 
> E.g., TCP has 32 + 16 + 32 + 16 bits to play with for 
> connections as a whole, i.e., 96 bits. SCTP would have only 
> 32. A large server with a lot of short connections could 
> easily have vtag collisions in that situation.

Why are you simply adding these bits? We are talking about port reuse
and not IP addr reuse, the src port is the one generated under the
jurisdiction of transport protocol code. 

> 
> > I
> > understand the need for it.. but I have been known (in past
> > lives) while testing things (in a lab) to reboot a machine 
> to get out 
> > of time-wait (due to frustration ;-D)
> 
> Sure - and what I'm claiming is that not having (or not 
> holding) true time-wait in SCTP puts you in the same boat as 
> you were in TCP when you spin the MSL timer down. In both 
> cases you're betting that old packets won't come into the new 
> connection - and, as I noted, with routers stalling to handle 
> interruptions - things are getting worse along those lines, 
> not better.

The vtag is like a 32 bit signature (hash), which would detect old
duplicates sine the vtag wouldn't match (yes we assuming wraparound of
vtag takes a lot of time) Ok, let me ask you this question : lets assume
that timestamps option is mandated for every TCP connection, the
timestamp is monotonically increasing number acts like a verification
mechanism to detect old segments (PAWS), so question is : do you still
think 2MSL (which is an overkill for modern networks) wait is better
than having timestamps, the answer is if the wraparound of a 32 bit
number happens slower than 2MSL, which is typically the case, then
timestamps definetely helps in preventing old segments getting injected
into the data stream. Now in case of SCTP the "timestamp" (vtag) is
generated once per association and it is an identifer which is used to
uniquely identify a particular association, hence vtags help in
rejecting old duplicates, TCP doesn't have anything to reject anything
extra to make this decision ( obviously I am talking about the case
where the seq# falls in the window, else TCP input processing rules
would drop the segment)

-Anantha
> 
> Joe
> 
> > On May 27, 2009, at 9:20 PM, Anantha Ramaiah (ananth) wrote:
> > 
> >> Joe,
> >>
> >>>
> >>>>>> It needs to be pointed out at that, other transport
> >>> protocols like
> >>>>>> SCTP doesn't have the TIME-WAIT requirement since the protocol 
> >>>>>> supports in-built mechanisms to deal with the need for 
> the same.
> >>>>> SCTP has a TIME WAIT state for its connection IDs (socket
> >>>>
> >>>> TCB is gone, only the vtag can be in time-wait (some
> >>> implementations
> >>>> do it). TIME-WAIT state doesn't exist in the SCTP 
> protocol. Pl see 
> >>>> Randy's and my responses.
> >>>
> >>> While I agree that the term "TIME-WAIT" does not appear in
> >>
> >> Term, huh? TIME-WAIT is a state in TCP state machine, SCTP doesn't 
> >> have it. Period. As far as SCTP goes the 4 tuple (socket-pair) is 
> >> never held in TIME-WAIT unlike TCP, i.e, you don't have to 
> hold the 
> >> TCB hanging in there for about 2MSL. Now, as Randy 
> explained the vtag 
> >> alone CAN be held in some timewait(again not mandated by the 
> >> protocol). This is not specified in SCTP RFC, nor is the timewait 
> >> value. SCTP is robust against time-wait hazards because of 
> the vtag 
> >> facility and that is what I meant when I said the protocol has 
> >> "inbuilt mechanisms" for dealing with data corruption from an old 
> >> incarnation (your crash ;-)
> >>
> >>> RFC 2690, there is a note:
> >>
> >> FWIW, RFC 2690 is obselete. Pl refer RFC 4960.
> >>
> >>>
> >>> " A new Verification Tag value MUST be used each time the
> >>>   endpoint tears-down and then re-establishes an 
> association to the
> >>>   same peer."
> >>>
> >>> Can you explain how you know that the tag is new unless 
> you hold it 
> >>> for some period of time?
> >>
> >> Well, this is purely implementation specific, some imp. 
> can simply be 
> >> ok having a sequential allocation for vtags. Agreed 
> everything isn't 
> >> infinite and there is a wrap up coming into play which can 
> happen if 
> >> a host is trying to make bajillions of connections 
> (open/close), yes 
> >> you can dream up such similar scenarios. The SCTP RFC doesn't say 
> >> that vtag generation needs to be sequential/random (rightfully so, 
> >> since it is all implementation details). The Key point is TCP 
> >> mandates keeping state (active closer) needs to wait for 
> 2MSL whereas 
> >> SCTP the TCB can be freed, and vtag time-wait is optional, 
> and SCTP 
> >> does not suffer from time-wait hazards since vtag protects it.
> >>
> >> -Anantha
> >>
> > 
> > -----
> > Randall Stewart
> > randall@lakerest.net
> > 
> > 
> > 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkoeD70ACgkQE5f5cImnZruySACfdm9p30W0GcuKaBUJ6rKoXxBL
> lm4AoNrFpWuRY8BCMw6R8/5wtyPfztOv
> =5uhf
> -----END PGP SIGNATURE-----
>