Systemd-networkd ethernet setup show as "failed"

I’m trying to setup systemd-networkd instead of NetworkManager simply because I prefer it as a network management system.

I have the following setup in my configuration.nix: = true;"10-lan" = {
    matchConfig.Name = "enp2s0";
    ##DHCP Config
    networkConfig = {
      # start a DHCP Client for IPv4 Addressing/Routing
      DHCP = "ipv4";
      # accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC)
      IPv6AcceptRA = true;
    # make the routes on this interface a dependency for
    linkConfig.RequiredForOnline = "yes";

The network starts well enough and is running, but, for some reason, when I run networkctl I get:

1 lo loopback carrier unmanaged
2 enp2s0 ether routable failed

It’s quite possible that, since networking is actually working and the machine is online, this doesn’t matter at all, but it bugs me to have something that looks so much like an error and I’d rather fix it than leave it like that just because it works.

Does journalctl -b -u systemd-networkd.service show any errors?

I sometimes find it helpful when troubleshooting to add the following to my config to make networkd logs more verbose. = "debug";

Ah - yes it does:

enp2s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use

Edit: It also says:

Could not set hostname: Access denied

But the hostname seems to be set without problems - presumably somewhere else.

Edit: 2 Adding “IPv6AcceptRA = false;” to the networkConfig seems to have fixed it. I must admit, I though I’d tried that, but obviously not.

1 Like