Set the right nameserver for each vlan/subnet.

This commit is contained in:
2021-09-18 19:03:50 +01:00
parent 7b68f9d170
commit c16aa36199
2 changed files with 8 additions and 8 deletions

View File

@@ -8,8 +8,9 @@ subnet 10.0.10.0 netmask 255.255.255.0 {
}
subnet 10.0.20.0 netmask 255.255.255.0 {
option routers 10.0.20.2;
option routers 10.0.20.1;
option domain-name-servers 10.0.20.1;
option domain-name "home.paler.net";
range 10.0.20.100 10.0.20.200;
}
@@ -18,4 +19,4 @@ subnet 192.168.1.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.1.1;
option domain-name "home.paler.net";
range 192.168.1.100 192.168.1.200;
}

View File

@@ -16,11 +16,10 @@ while read name ip owner
do
mac=$(do_curl $owner | jq -r '.mac_address')
cat<<EOF
host $name {
fixed-address ${ip};
hardware ethernet ${mac};
}
host $name {
fixed-address ${ip};
hardware ethernet ${mac};
}
EOF
done
echo "}"