[systemd-devel] Systemd-networkd, default route and multiple interfaces

Tom Gundersen teg at jklm.no
Mon Jun 2 12:02:44 PDT 2014


On Mon, Jun 2, 2014 at 8:47 PM, Reventlov
<contact+systemd+ml at volcanis.me> wrote:
> Since network files are applied to links whenever the links
> appear, how do systemd manage the "disappearance" of a default route ?

You can have several default routes, so we just configure them all and
let the kernel handle it for us. We probably should improve the config
options to make it possible to override the priority of the routes.

> For example, let's say i have one wireless interface and one ethernet
> interface that are both up, with the route default using the wireless
> interface, and systemd-networkd managing the ethernet interface with
> dhcp enabled.
> Since the ethernet interface is up, systemd has already
> "applied" the configuration of the network file.
> If the wireless interface is set down, the default route will
> disappear, and it will leave the system without a default route (so no
> internet acces in my case).
>
> Is there a workaround to always get a default route available ?

This _should_ just work, but there may of course be a bug here. Could
you paste your .network files for both your interfaces and the output
of

# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd

?

Oh, and are you using v213?

Cheers,

Tom


More information about the systemd-devel mailing list