[systemd-devel] [PATCH] Added UFD (Uplink failure detection) support to networkd

Lennart Poettering lennart at poettering.net
Wed Jan 28 10:58:41 PST 2015

On Wed, 28.01.15 17:18, Rauta, Alin (alin.rauta at intel.com) wrote:

> Hi Lennart, Tom,
> We should also be able to add virtual devices to UFD groups, like
> Andrei mentioned in his email.  In this case, do you think
> "BindCarrier=" and "Tag=" in .network files would still work ?

Again, my latest proposal does away with the "Tag=" concept entirely.

I am not sure what a "virtual device" is supposed to be. If it has a
linux network interface, then it has a name and all I am saying is
that with a simple Concept like BindCarrier= taking a list of globs of
interface names I think that you can cover what you need.

> If we think about LAG (link aggregation) and if I am right, it's
> mapped to the kernel as a virtual device and contains multiple
> links. This way, it makes sense to have groups of links as
> netdevs. The only difference in case of UFD is that is not mapped to
> the kernel, but it's mapped inside networkd.

I networkd, there are:

  1) network interfaces created automatically by some kernel driver,
  because the hardware was discovered. To these we apply one .link
  file via udev, plus maybe a .network file, when we actually use it
  to connect to a network.

  2) network interfaces that have to be created explicitly, via some
  kernel API. These are configured via .netdev files. From the point
  on they are created by networkd they are like any other network
  interface, i.e. exactly like the ones described in #1, i.e. on top
  of the .netdev file a .link file is then applied, and finally maybe
  a .network file.

Now, all I am saying is that i think it would suffice if the .network
files for the downlinks for contain BindCarrier= globs referring to
their respective uplinks. And that should already suffice. TO make
this work nciely all that is necessary then is that the network
interfaces get pretty names, either right from the .netdev, or from
the .link files.

> Another thing is that maybe later on we want to provide some
> properties for an UFD group, maybe to change to way we consider an
> uplink as failing. This would be easy if we have a netdev for the
> UFD group. Also, defining a netdev, we don't lose the identity of
> the feature nor we mask it.

But this could also be another setting of the .network file of that is
applied to the downlink. Example: in the .network file of the downlink
we could have:


Or so, which could mean: bring the downlink up only if there's a
carrier on all network interfaces that match the glob "foo[1-7]". The
default for BindCarrierMode= would be "need-any" or so, which would
mean, that the carrier is propagated when at least one of the network
interfaces has a carrier. 

Wouldn't that cover your usecase?


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list