Re: [v6ops] Flow Label Load Balancing

Tom Herbert <> Wed, 25 November 2020 19:35 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5C2C43A1BE1 for <>; Wed, 25 Nov 2020 11:35:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 8W8dV4ZGo8vU for <>; Wed, 25 Nov 2020 11:35:20 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4864:20::531]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 950663A1BDF for <>; Wed, 25 Nov 2020 11:35:20 -0800 (PST)
Received: by with SMTP id cq7so3792721edb.4 for <>; Wed, 25 Nov 2020 11:35:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iKRu8L6k2Wzc+EUc36nWFqtRrs07O1b+4cGtQZ2Jces=; b=1CvkNK/u5S1DLQfhdC2b/IBPyBXy52CQhbS5AFdaB3PGbNzGHFDnhEj1V95zZXxeFO ClJo5TU6yt5UiQSGBJ0xT4eEp4bMOClopYjjdLfXMdk+eOflH9Wj36QuSGb9L0l4swby rGf84txa/rjncjzUrbE9pdBJdEfWcBLndyjMKtQs9h02kQwwkbjwnU7PmB47Zq6FSzDx hB+B3cKSG+d50iHAPGMwzWfXZSOvlzjgdwcdr225s0xWZs8kPnBQ4sh+HVUTlr3fnmHW ee7hTPzwGCOb7LdvtLv81ltmKtCpmWgETwc/3xMc91NAZLpq8A5KEweGTNLoh9LJW4Tj reIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iKRu8L6k2Wzc+EUc36nWFqtRrs07O1b+4cGtQZ2Jces=; b=a+SJu50bxxQc1NKsb6js+4LToa0mIbId+ut6YiWOm8/FGjw4UJ9PuyNRhuHzPIUxq6 w+OwCY9WtIBHBwuBZhtmboz20XjWwwpWK/ZxyluvwmaJB/3Q+kRi2p2Spj6X9tPGboNV 9GxWqg6EUtHXOsUX0d0LdVwNEqXfFT9BVNOwOpo+ey+YMcEW/9V2Cz83NkTi82+gbVSD n6+KIKeg9aeGTxjdT62a/RgZ389xAGbK/5K0mqYOjxead+vCIFeb9xDsk1vHoLBOLSCz 8BxhiiZ5ZOlvFJRBAQvWAmygG9cABD7aWq1+101DovIjgrtKH4cLxg9N8NRkjlkUnE8u Do1A==
X-Gm-Message-State: AOAM53310yNEhcDbKniDLvcJ0OUsUlbYt2ojBB8i9GNQXNXHxU9RMaaI TGLaFtE+Rg0s+2Az6803fJgLXlXPhpJCOb0kQQ7Ieg==
X-Google-Smtp-Source: ABdhPJyZWH9g/uec0zdhtlFbmrH5jXXcQo/IL4Ps6aWcgsrIkDSWeqa0u+giKJ4nEDMo7jW1qe0ATkp6XJTJouXGM5Y=
X-Received: by 2002:a05:6402:114b:: with SMTP id g11mr5111616edw.228.1606332918541; Wed, 25 Nov 2020 11:35:18 -0800 (PST)
MIME-Version: 1.0
References: <> <> <> <>
In-Reply-To: <>
From: Tom Herbert <>
Date: Wed, 25 Nov 2020 12:35:07 -0700
Message-ID: <>
To: Fernando Gont <>
Cc: Alexander Azimov <>, tcpm <>, IPv6 Operations <>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <>
Subject: Re: [v6ops] Flow Label Load Balancing
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: v6ops discussion list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 25 Nov 2020 19:35:22 -0000

Hi Fernando, comments in line...

On Wed, Nov 25, 2020 at 12:13 AM Fernando Gont <> wrote:
> Hi, Tom,
> On 24/11/20 16:43, Tom Herbert wrote:
> [....]
> > Modulating the flow label is a means to affect the routing of packets
> > through the network that uses flow labels as input to the ECMP hash.
> What's the point?
> 1) You cannot tell *if* the FL is being used.
Generally true, but in a limited domain this information could be
discerned. I'd note that it's also generally true that we don't know
if there is a load balancer or stateful firewall in the path that
requires consistent routing, but in a limited domain we could know
that also.

> 2) Changing the FL does not necessarily mean that packets will employ a
> different link.

It's an opportunistic mechanism. If a connection is failing and we get
a better path that fixes it by simply changing the flow label then
what's the harm?

> 3) If the network is failing, shouldn't you handle this via routing?
Sure, but then that requires an out of band feedback loop from a TCP
implementation to the network infrastructure to indicate there is a
problem and then the network needs to respond. That's significant
infrastructure and higher reaction time than doing something in TCP
and IP. Think of modulating the flow label is an inexpensive form of
source routing within a limited domain that doesn't need any
infrastructure or heavyweight protocols or something like segment

> > The basic idea is that the flow label associated with a connection is
> > randomly changed when the stack observes that the connection is
> > failing (e.g. and an RTO). There is nothing in the specs that prevents
> > this since the source is at liberty to set the flow label as it sees
> > fit.
> The FL is expected to remain constant for the life of a flow. A
> retransmitted packet is part of the same flow as the
> originally-transmitted packet. So this seems to be contradicting the
> very specification of the FL.
> For instance, If a RTO for a flow causes the FL to change, then one may
> possibly argue that the FL is not naming/labeling what is said/expected
> to be anming/labeling.

Specifically, RFC6437 states:

"It is therefore RECOMMENDED that source hosts support the flow label
by setting the flow label field for all packets of a given flow to the
same value chosen from an approximation to a discrete uniform

So that is clearly a just recommendation, and not a requirement (and
definitely not a MUST). Furthermore, RFC6437 states:

"A forwarding node MUST either leave a non-zero flow label value
unchanged or change it only for compelling operational security
reasons as described in Section 6.1."

So there's no guarantee in the protocol specs that flow labels are
consistent for the life of the connection, which means that the
network cannot assume that and thus it would be incorrect if the
network tried to enforce flow label consistency as a protocol
requirement. As I said, it is prudent to try to be consistent with
flow labels and the default behavior in Linux should be changed,
however I do not believe there's a valid claim of non-conformance that
motivates removal of the feature that is already deployed.


> > The feature is useful in large datacenter networks, like
> > pparently Facebook where the patches originate, since information
> > discerned by TCP can opportunistically be applied to route selection.
> > The practical issue is that there are stateful devices like firewalls
> > that require consistent routing in the network in which case changing
> > the flow label can confuse them. As I mentioned, the original intent
> > was that the flow label randomization feature should be opt-in instead
> > of on by default.
> So... where is the "source" of the packet that would be "modulating" the FL?
> Thanks,
> --
> Fernando Gont
> e-mail: ||
> PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1