| 13 Jun 2021 |
keithy | as expected | 14:11:21 |
Mic92 (Old) | your ip address is 10.11.12.2 and the subnet directly attached to your network interface is 10.11.12.0/24 | 14:11:58 |
keithy | anything wrong with that so far? | 14:12:33 |
keithy | network-setup works when I start it manually post reboot | 14:13:30 |
Mic92 (Old) | no, what is in your network-setup? | 14:17:33 |
Mic92 (Old) | systemctl cat network-setup.service | 14:17:34 |
Mic92 (Old) | and cat the ExecStart script in it. | 14:17:42 |
Mic92 (Old) | cc keithy | 14:17:56 |
keithy | nameserver 10.11.12.2
nameserver 10.11.12.3
nameserver 127.0.0.1 | 14:19:43 |
keithy | ip route replace default via "10.11.12.1" proto static | 14:19:49 |
Mic92 (Old) | keithy: it contains literally your nameserver lines? | 14:23:09 |
Mic92 (Old) | Do you get the network per dhcp? | 14:23:15 |
keithy | yes | 14:23:29 |
Mic92 (Old) | Ok. here is what happens... | 14:23:37 |
Mic92 (Old) | network-setup.service runs and fails to set the default gateway because 10.11.12.0/24 has been not yet assigned yet to enp0s10. Than your dhcp daemon gets a lease sets up your network + ip address and maybe also the default gateway. Than if you run network-setup.service manually the second time, it succeeds. | 14:25:03 |
keithy | k | 14:25:23 |
Mic92 (Old) | So have a look where you set the default gateway in your config and remove it. I don't think it is necessary. It is very likely that your dhcp server is already pushing this information. | 14:25:54 |
keithy | networking.defaultGateway = "10.11.12.1"; | 14:26:54 |
keithy | not needed? | 14:26:59 |
Mic92 (Old) | Right. Only in theory it could be the case that your dhcp server is not setting a default gateway but this is not very likely/common configuration. | 14:27:35 |
Mic92 (Old) | * Right. Only in theory it could be the case that your dhcp server is not setting a default gateway but this is not a very likely/common configuration. | 14:27:46 |
Mic92 (Old) | If this is the case your are better off doing the whole setup manually, which would also including setting your own ip address | 14:28:16 |
keithy | ok so now network-setup is basically emty and starts ok | 14:31:10 |
keithy | thanks! | 14:31:47 |
antifuchs | do you folks recommend running nixos with systemd-networkd yet? I have a system with a fairly complex networking configuration in which the scripts-based approach regularly gets wedged /: | 14:38:29 |
antifuchs | (but I also don't really dare activate systemd-networkd there because it is pretty complex) | 14:39:03 |
Andreas Schrägle | antifuchs: define fairly complex. we use systemd networkd on nixos for a router, with pppoe, a bunch of vlans and all that kind of stuff. | 15:20:21 |
antifuchs | It’s not a router, but has a bunch of vlans and several systemd containers with network interfaces on those vlans | 15:21:10 |
antifuchs | (Each with its very own special networking config to avoid having to use host networking, heh) | 15:21:37 |
antifuchs | It’s precisely those systemd Container child interfaces that have problems too: when you restart the container, there’s a 50:50 chance the interface will never again be configurable | 15:25:23 |