Describe the bug
I have two interfaces that can reach the internet attached to my computer. NixOS is defaulting to setting the default IPv4 and IPv6 routes via the wrong interface so I found that I need to use the networking.defaultGateway and networking.defaultGateway6 options to properly define the routing metric on my interfaces. Unfortunately, the networking.defaultGateway.address and networking.defaultGateway6.address parameters are mandatory and setting them to "" results in my configuration applying but not doing anything at all. I want the ip addresses on these interfaces to be auto-configured via DHCP and RA.
Expected behavior
I would expect my default route to the internet via enp3s0.51 to have a routing metric of 10.
However, it retains the default routing metric of 204.
tristan@luna:~$ ip -6 route
[snip]
default via fe80::921b:eff:fe0c:e1b0 dev Management proto ra metric 203 pref medium
default via fe80::921b:eff:fe0c:e1b0 dev Home proto ra metric 204 pref medium
Describe the bug I have two interfaces that can reach the internet attached to my computer. NixOS is defaulting to setting the default IPv4 and IPv6 routes via the wrong interface so I found that I need to use the
networking.defaultGateway
andnetworking.defaultGateway6
options to properly define the routing metric on my interfaces. Unfortunately, thenetworking.defaultGateway.address
andnetworking.defaultGateway6.address
parameters are mandatory and setting them to "" results in my configuration applying but not doing anything at all. I want the ip addresses on these interfaces to be auto-configured via DHCP and RA.To Reproduce Steps to reproduce the behavior:
I set the following in my
configuration.nix
:Expected behavior I would expect my default route to the internet via
enp3s0.51
to have a routing metric of10
.However, it retains the default routing metric of
204
.Metadata