Open Wulfsta opened 2 years ago
@grahamc Not sure who to ping about networking stuff, but I want to at least alert someone.
the network-setup.service
should set it on boot
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/network-interfaces-scripted.nix#L91
does the entry get made if you restart the service manually sudo systemctl restart network-setup.service
and check the status of the service before and after systemctl status network-setup.service
I agree, it should set it on boot, but something is happening such that it is not. Looking at the status after boot, it appears the script has been run without detected failures (the script has sensible commands in it as well), but the entry is not in the table. Restarting the service as you suggested does properly add the entry to the routing table. I wonder if the targets are somehow wrong, and another networking component is removing the entry?
after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];
before = [ "network.target" "shutdown.target" ];
wants = [ "network.target" ];
# exclude bridges from the partOf relationship to fix container networking bug #47210
partOf = map (i: "network-addresses-${i.name}.service") (filter (i: !(hasAttr i.name cfg.bridges)) interfaces);
conflicts = [ "shutdown.target" ];
wantedBy = [ "multi-user.target" ] ++ optional hasDefaultGatewaySet "network-online.target";
the ++ optional hasDefault...
was added in b1799084147b
if you would like to work on this then clone nixpkgs and follow the instructions here to use the edited module in your config https://nixos.wiki/wiki/Nixpkgs/Reviewing_changes#Modules
Yes, I already looked at that, and am aware of how to work in this repo.
I marked this as stale due to inactivity. → More info
I'm not sure whether it's the same cause or not (I think it's likely to be related at the very least) but I've also noticed that if you disable IPv6 with networking.enableIPv6 = false;
(at least on an RPi4, haven't tested anything else) and reboot then it'll be enabled again. The only way I've found to redisable it is to rebuild with IPv6 enabled and then rebuild again with it disabled (there's probably a systemd unit I could run but I haven't had been able to figure out which one).
Describe the bug
Adding
to the NixOS config and running
nixos-rebuild switch
results in anetstat -6 -rn -f inet6
entry,that does not persist after a reboot. In my case in particular this causes IPv6 to stop working on my machine.
Expected behavior
netstat
entry remains and IPv6 continues to work across boots.