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 { 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-servers 10.0.20.1;
option domain-name "home.paler.net";
range 10.0.20.100 10.0.20.200; 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-servers 192.168.1.1;
option domain-name "home.paler.net"; option domain-name "home.paler.net";
range 192.168.1.100 192.168.1.200; range 192.168.1.100 192.168.1.200;
}

View File

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