My machine has two ethernet ports, end0 and end1. I am attempting to configure end0 for a static address, while leaving end1 to DHCP.
The issue is that none of my configurations make both ports properly work. While both get an IP address statically (end0) and via DHCP (end1), traffic doesn’t flow over the ports in the same subnet.
I assume that, since both interfaces are in the same subnet, the OS favours end0, which, after all, does have an IP address connected while being unconnected.
Here is my configuration:
{
networking = {
nameservers = [ "1.1.1.1" "9.9.9.9" ];
defaultGateway = {
address = "192.168.36.1";
interface = "end0";
};
interfaces = {
end0 = {
ipv4 = {
addresses = [
{
address = "192.168.36.251";
prefixLength = 24;
}
];
};
};
};
};
}
I attemped removing the defaultGateway configuration, and also setting the default gateway to end1, but nothing worked so far…