Skip to content

Commit

Permalink
dns options for dhcpd
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmim committed May 7, 2022
1 parent f05fe04 commit 180f9a4
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 95 deletions.
2 changes: 2 additions & 0 deletions client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func main() {
Min: "10.10.11.6",
Max: "10.10.11.255",
Network: "10.10.11.0",
DnsServer: "10.10.11.3",

}
Networks = append(Networks, &net)

Expand Down
5 changes: 5 additions & 0 deletions dhcp/dhcpd.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ subnet {{.Network}} netmask 255.255.255.0 {
range {{.Min}} {{.Max}};
option subnet-mask 255.255.255.0;
option routers {{.Router}};
option domain-name-servers {{.dnsserverIP}}
}
{{end}}

Expand All @@ -14,5 +15,9 @@ host {{.Name}} {
hardware ethernet {{.MacAddress}};
fixed-address {{.Address}};
max-lease-time 84600;
option routers {{.Router}};
option domain-name-servers {{.dnsserverIP}};
option domain-name {{.Domain}};

}
{{end}}
Loading

0 comments on commit 180f9a4

Please sign in to comment.