Add iot network

This commit is contained in:
Jakob Lechner 2023-11-22 14:50:09 +00:00
parent 99c7bae840
commit a9cd396dec
No known key found for this signature in database
GPG key ID: 996082EFB5906C10
2 changed files with 18 additions and 2 deletions

View file

@ -46,11 +46,21 @@ with lib; {
useDHCP = false;
networkmanager.enable = false;
vlans = {
iot = {
id = 20;
interface = "enp2s4";
};
};
interfaces = {
enp2s4.ipv4.addresses = [{
address = "192.168.42.1";
prefixLength = 24;
}];
iot.ipv4.addresses = [{
address = "10.20.0.1";
prefixLength = 20;
}];
enp3s5 = {
useDHCP = true;
};

View file

@ -7,11 +7,17 @@ in
services.dnsmasq = {
enable = true;
settings = {
listen-address = "192.168.42.1";
listen-address = [
"192.168.42.1"
"10.20.0.1"
];
interface = "lo";
expand-hosts = true;
domain = "lan.bw.jalr.de";
dhcp-range = "192.168.42.20,192.168.42.254,4h";
dhcp-range = [
"192.168.42.20,192.168.42.254,4h"
"10.20.0.20,10.20.3.254,12h"
];
cache-size = 10000;
dns-forward-max = 1000;
no-hosts = true;