NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.44k stars 13.64k forks source link

Default network configurations fails on networks with DHCPv6 RA #126498

Open kouyk opened 3 years ago

kouyk commented 3 years ago

Describe the bug I could boot the installer ISO (GNOME version) for 21.05 without an issue, and within the live session I have a stable connection with properly assigned IPv4 and IPv6 addresses. Rebooting after the install, NetworkManager will repeatedly notify that the activation of the network has failed. Checking the logs of NetworkManager showed the following repeated lines:

device (eno2): failure to start DHCPv6: failed to start client: Address already in use
device (eno2): Activation: failed for connection 'Wired connection 1'

Checking the logs of dhcpcd also revealed repeated addition and removal of the same IPv4 and IPv6 addresses.

I found #72416 that is somewhat similar as well, except that NetworkManager has dhcp set to internal. By disabling dhcpcd, my network access is fully working without a problem. But enabling it even with NetworkManager's dhcp set to dhcpcd, the same issue occurs.

I first disabled DHCPv6, and the problem persisted. Then I realised that my router advertisements flags are set to M+O+A (Stateful DHCPv6 and SLAAC), whereby A only (SLAAC only) solves the problem entirely. So it is likely the RA flags that triggers the conflict between dhcpcd and NetworkManager.

To Reproduce Steps to reproduce the behavior:

  1. Install NixOS with minimal changes to the generated configs
  2. Reboot and see network issues on a network with DHCPv6 enabled

Expected behavior Since NetworkManager is enabled, I don't see a reason for dhcpcd to be running as well, it should default to being disabled especially when NetworkManager uses its internal library for DHCP.

Additional context My local network is dual stack with working global IPv6 addresses, with both DHCPv6 and SLAAC enabled.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.40, NixOS, 21.05.876.60cce7e5e1f (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.12`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
  networking.networkmanager
  networking.dhcpcd
stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info