Re: Pseudorandom Flow Labels

Fernando Gont <> Thu, 07 April 2011 17:11 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id EBBCF28C164 for <>; Thu, 7 Apr 2011 10:11:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.532
X-Spam-Status: No, score=-3.532 tagged_above=-999 required=5 tests=[AWL=-0.533, BAYES_00=-2.599, J_CHICKENPOX_43=0.6, RCVD_IN_DNSWL_LOW=-1]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id KnGQbq+G5eg9 for <>; Thu, 7 Apr 2011 10:11:51 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id DE27828C168 for <>; Thu, 7 Apr 2011 10:11:50 -0700 (PDT)
Received: by yic13 with SMTP id 13so1326140yic.31 for <>; Thu, 07 Apr 2011 10:13:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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=2JsVspisUKu4qUAD8QAoBkTW3/ovkQAlO7Cz3rEEIPc=; b=AE50A5+06WEgKW3joUeLA5/MJ1o1RcXFlbuve5WBvTjqe+jjisbdHHggyUP0zzf/Dj C6mZfENEj/V9M4pc7cT/7jEDradnXLC2y99e0DsRsrUwuXLe7a7rHaG6NlcLKRIfIuXm G1BJKPGXwItl0P+5KxQa9UJnp4TjyFzJix+i4=
DomainKey-Signature: a=rsa-sha1; c=nofws;; 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=nC7IB0YMOLNPuS7a7cJ0dhYEH9QSeMxM/ILgT1rWcFttWcYJgAPL0Ag4UoFBn1Wccf UVUZaRSe1Qjw5csJi5f9rDVvh3vr1HtyUwPYtpFGjO9BQouDaRv1uHKXT8FGSkLC9VBn /5AJsT3xKTZclrb0IPmK5RIpn/WaMxGgo+4xU=
Received: by with SMTP id x37mr898589ann.22.1302196415398; Thu, 07 Apr 2011 10:13:35 -0700 (PDT)
Received: from [] ([]) by with ESMTPS id k16sm2010638anb.11.2011. (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Apr 2011 10:13:34 -0700 (PDT)
Sender: Fernando Gont <>
Message-ID: <>
Date: Thu, 07 Apr 2011 14:13:29 -0300
From: Fernando Gont <>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: Fernando Gont <>
Subject: Re: Pseudorandom Flow Labels
References: <> <> <>
In-Reply-To: <>
X-Enigmail-Version: 1.1.1
OpenPGP: id=D076FFF1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Cc: Thomas Narten <>, 6man List <>
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 07 Apr 2011 17:11:52 -0000

On 06/04/2011 03:01 p.m., Fernando Gont wrote:

>> 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.
> What we want is unpredictable flow numbers, with a low frequency of FL
> reuse. A typical call to random() would be just *one*¨way to do it. But,
> as noted, there are others.
> For hash-based algorithms, you only compute the hash once for each flow.
> Then you simply increment the FL for each packet you send for that flow.

Sorry. Please let me correct myself:

The hash is computed only once for each flow. And every time a new flow
is created, a global counter is incremented.

When a new flow is created, the FL is selected by the expresion:
FL = hash(src ip, dst ip) + counter
and the counter is incremented

So, the FL of successive Flow Labels between the same set of IPv6
addresses will have monotonically-increasing FLs.

The table in
illustrates this much better.

Fernando Gont
e-mail: ||
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1