!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

906 Members
Declaratively manage your switching, routing, wireless, tunneling and more.271 Servers

Load older messages


SenderMessageTime
13 Jun 2021
@keithy:matrix.orgkeithynameserver 10.11.12.2 nameserver 10.11.12.3 nameserver 127.0.0.114:19:43
@keithy:matrix.orgkeithyip route replace default via "10.11.12.1" proto static14:19:49
@joerg:bethselamin.deMic92 keithy: it contains literally your nameserver lines? 14:23:09
@joerg:bethselamin.deMic92Do you get the network per dhcp?14:23:15
@keithy:matrix.orgkeithyyes14:23:29
@joerg:bethselamin.deMic92Ok. here is what happens...14:23:37
@joerg:bethselamin.deMic92network-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:matrix.orgkeithyk14:25:23
@joerg:bethselamin.deMic92So 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:matrix.orgkeithynetworking.defaultGateway = "10.11.12.1";14:26:54
@keithy:matrix.orgkeithynot needed?14:26:59
@joerg:bethselamin.deMic92Right. 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
@joerg:bethselamin.deMic92 * 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
@joerg:bethselamin.deMic92If this is the case your are better off doing the whole setup manually, which would also including setting your own ip address14:28:16
@keithy:matrix.orgkeithyok so now network-setup is basically emty and starts ok14:31:10
@keithy:matrix.orgkeithythanks!14:31:47
@antifuchs:asf.computerantifuchsdo 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:asf.computerantifuchs(but I also don't really dare activate systemd-networkd there because it is pretty complex)14:39:03
@andreas.schraegle:helsinki-systems.deAndreas 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:asf.computerantifuchsIt’s not a router, but has a bunch of vlans and several systemd containers with network interfaces on those vlans15:21:10
@antifuchs:asf.computerantifuchs(Each with its very own special networking config to avoid having to use host networking, heh)15:21:37
@antifuchs:asf.computerantifuchsIt’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 configurable15:25:23
@joerg:bethselamin.deMic92antifuchs: let me put it this way you can do basically configure anything with networkd that can be configured via netlink. I thing the only thing that is not supported is openvswitch.16:11:10
@joerg:bethselamin.deMic92It's not the best solution if you need dynamic configuration i.e. if you have a laptop for servers its fine.16:12:15
@antifuchs:asf.computerantifuchsthen that sounds great - this is kinda a server. I remember there were some limitations back when I last looked, but maybe it's worth another go16:13:07
@joerg:bethselamin.deMic92check man systemd.network 16:28:16
@joerg:bethselamin.deMic92and man systemd.link16:28:29
@joerg:bethselamin.deMic92Everything should be there16:28:33
14 Jun 2021
@hpfr:matrix.orghpfr I followed the wireguard page on the wiki to connect a nixos client to my LAN (point-to-site), but I had to go to the arch wiki to find ip route add 192.168.35.0/24 dev wg0 (where the CIDR is the LAN subnet) to get it to work. is there a nixos configuration value for this? 07:54:25
@n0emis:noemis.men0emis
In reply to @hpfr:matrix.org
I followed the wireguard page on the wiki to connect a nixos client to my LAN (point-to-site), but I had to go to the arch wiki to find ip route add 192.168.35.0/24 dev wg0 (where the CIDR is the LAN subnet) to get it to work. is there a nixos configuration value for this?
if you have networking.wireguard.interfaces.<name>.allowedIPsAsRoutes set to true, you can just add the subnet to networking.wireguard.interfaces.<name>.peers.*.allowedIPs
08:09:55

Show newer messages


Back to Room ListRoom Version: 6