Re: Pseudorandom Flow Labels

Fernando Gont <fernando@gont.com.ar> Wed, 06 April 2011 18:32 UTC

Return-Path: <fernando.gont.netbook.win@gmail.com>
X-Original-To: ipv6@core3.amsl.com
Delivered-To: ipv6@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 5A0FF3A690A for <ipv6@core3.amsl.com>; Wed, 6 Apr 2011 11:32:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 0M11ZT10tqzS for <ipv6@core3.amsl.com>; Wed, 6 Apr 2011 11:32:41 -0700 (PDT)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 8DE733A68B9 for <ipv6@ietf.org>; Wed, 6 Apr 2011 11:32:41 -0700 (PDT)
Received: by yxk30 with SMTP id 30so811758yxk.31 for <ipv6@ietf.org>; Wed, 06 Apr 2011 11:34:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=EMIPNH3b7sRoWoA0zen0Zs0MtHXfXgZNMvAVwUIJwv8=; b=XzZGz1lMiXch+jSZ9jYfSXDCKeQ81RbQQdTbjhGskgI3AQ5O4B99xvAP0k6siczPIZ uDtAREQbJhRoHAUkaW/lOIpV6j2qOhE/pOR+0KgcLsLZ46b/wpwJLrP79HotcE3bsfnn nUa7aDQNPTaqIZ2y+4M686jSCDS1CMjrrPsmg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=CGKmOG5KkA/M+ih3aQRPvMejHhqpHiE6OyHsE8SmaXUiYXHzojOQffi5FwQp23nGIT RZTJ8tvsfhq8BX5S5d1ZCQ2fbetYaHhgpdCT/mpnbxJuaJZ0ZsROYgUaePurnnv2fzSX W5an62ZstrEElpYuScTnj74f2TgUKDVZPmG5I=
Received: by 10.236.103.72 with SMTP id e48mr839086yhg.458.1302114865387; Wed, 06 Apr 2011 11:34:25 -0700 (PDT)
Received: from [192.168.123.101] ([190.48.201.131]) by mx.google.com with ESMTPS id h63sm287457yhm.86.2011.04.06.11.34.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2011 11:34:24 -0700 (PDT)
Sender: Fernando Gont <fernando.gont.netbook.win@gmail.com>
Message-ID: <4D9CB22B.8010707@gont.com.ar>
Date: Wed, 06 Apr 2011 15:34:19 -0300
From: Fernando Gont <fernando@gont.com.ar>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: Shane Amante <shane@castlepoint.net>
Subject: Re: Pseudorandom Flow Labels
References: <BD901061-96AC-4915-B7CE-2BC1F70861A5@castlepoint.net> <201104051958.p35JwaJP019044@cichlid.raleigh.ibm.com> <92DAE8F3-471F-4331-8882-3788631959F5@castlepoint.net>
In-Reply-To: <92DAE8F3-471F-4331-8882-3788631959F5@castlepoint.net>
X-Enigmail-Version: 1.1.1
OpenPGP: id=D076FFF1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: Thomas Narten <narten@us.ibm.com>, 6man List <ipv6@ietf.org>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipv6>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Apr 2011 18:32:42 -0000

Shane,

On 05/04/2011 06:23 p.m., Shane Amante wrote:
> As I pointed out below, we already have pseudorandom distribution of
> flows today, given that most host implementations use RFC 6056 and
> (IPv4) load-balancing routers/switches use the 5-tuple as input-keys
> ... included in those input-keys is a "pseudorandom ephemeral port".

Note that e.g. Linux implements the hash-based algorithm in RFC 6056,
rather than the random()-based algorithms. -- FWIW, see my response to
Thomas wrt the terminology that we are using.



>> I think we can assume that if we use both the src/dst, we will get
>> a good degree of distribution in the values. Adding the Flow Label
>> gives more. I am just not convinced that to get good distribution
>> we need to *require* (or strongly suggest) psuedo randomness in the
>> Flow Lable. We know that by simply incrementing the Flow Label by 1
>> for each flow, we get sufficient distribution. That is *way* easier
>> to implement than something else.
> 
> Unfortunately, if: a)  All hosts at a site start off selecting "1"
> for their flow-labels; 

We should have already learned the lesson that this is a really bad choice.


> or, b)  Don't cycle through the full-range of
> flow-label values; 

This would be an implementation bug.


> or, c)  a [large] set of hosts experience
> synchronization of flow-label values; 

Given that the FL field is large enough, and that the offset itself is
random, I deem this as *very* unlikely. Also, for synchronization to
occur, all those hosts would need to have the same frequency of
flows/time. -- and since the src IP would be also used for ECMP/LAG,
then I don't think that this would be a big deal, either.


> or, d)  Reset back to
> flow-label "1" after some short time period ... 

This would be a really dumb thing to do, btw.

Note: I'm not arguing that a random()-based algorithm would be a bad
idea. I'm arguing that such an algorithm is not necessarily the only
possible one, and not necessarily the best possible option, either.

Thanks,
-- 
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@acm.org
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1