Prove in DHCP

This commit is contained in:
pazpi 2024-07-17 16:28:23 +02:00
parent da66650a9f
commit bb38b1b852

View file

@ -3,20 +3,22 @@
networking = {
useDHCP = true;
# If you prefer DHCP
# interfaces.eth0.useDHCP = true;
interfaces.eth0.useDHCP = true;
# We don't use DHCP, so we configure it statically.
interfaces.eth0.ipv4.addresses = [{
address = "10.42.135.101";
prefixLength = 24;
}];
# interfaces.eth0.ipv4.addresses = [{
# address = "10.42.135.101";
# prefixLength = 24;
# }];
# We can access the internet through this interface.
defaultGateway = {
address = "10.42.135.1";
interface = "eth0";
};
# # We can access the internet through this interface.
# defaultGateway = {
# address = "10.42.135.1";
# interface = "eth0";
# };
# Since we don't use DHCP, we need to set our own nameservers.
nameservers = [ "1.1.1.1" "1.0.0.1" ];