From c16aa3619936cf53809823a5e18b7706fe39734d Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Sat, 18 Sep 2021 19:03:50 +0100 Subject: [PATCH] Set the right nameserver for each vlan/subnet. --- dhcpd.conf.head | 5 +++-- netbox-dhcp.sh | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dhcpd.conf.head b/dhcpd.conf.head index f6ccce7..1965670 100755 --- a/dhcpd.conf.head +++ b/dhcpd.conf.head @@ -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; - +} diff --git a/netbox-dhcp.sh b/netbox-dhcp.sh index ac289ba..e8da843 100755 --- a/netbox-dhcp.sh +++ b/netbox-dhcp.sh @@ -16,11 +16,10 @@ while read name ip owner do mac=$(do_curl $owner | jq -r '.mac_address') cat<