Move DHCP service to dns1.p.b

The DHCP server on the UniFi Security Gateway is pretty limited; it
cannot manage static leases (reservations), and does not offer any way
to build dynamic values for e.g. hostname or boot filename. Rather than
give up these features, I decided to just move the DHCP server to one of
the Raspberry Pis; the DNS server made the most sense.

To facilitate this move, I created the *pyrocufflink-dhcp* host group,
and moved the DHCP configuration variables there. Thus, it was a simple
matter of adding *dns1.pyrocufflink.blue* to this group to relocate the
service.

Of course, to serve clients on the other subnets, the gateway needs to
have DHCP relay enabled and pointing to the new server.
This commit is contained in:
2018-10-07 11:56:58 -05:00
parent 36675d0523
commit 9f32f94780
2 changed files with 16 additions and 9 deletions

View File

@@ -1,143 +0,0 @@
dhcp_ddns: true
dhcp_subnets:
# pyrocufflink.jazz
- address: 172.31.0.1/27
pools:
- start: 172.31.0.11
end: 172.31.0.30
routers:
- 172.31.0.1
dns_servers: '{{ dch_networks.jazz.dns_servers_v4 }}'
domain_name: pyrocufflink.jazz
domain_search: pyrocufflink.jazz
ntp_servers: '{{ dch_networks.jazz.ntp_servers }}'
# Management
- address: 172.30.0.240/28
pools:
- start: 172.30.0.245
end: 172.30.0.253
routers:
- 172.30.0.241
ntp_servers: '{{ dch_networks.mgmt.ntp_servers }}'
# pyrocufflink.blue
- address: 172.30.0.0/26
pools:
- start: 172.30.0.20
end: 172.30.0.59
routers:
- 172.30.0.1
dns_servers: '{{ dch_networks.blue.dns_servers_v4 }}'
domain_name: pyrocufflink.blue
domain_search: pyrocufflink.blue
ntp_servers: '{{ dch_networks.blue.ntp_servers }}'
ddns_updates: false
# pyrocufflink.red
- address: 172.31.1.0/24
pools:
- start: 172.31.1.2
end: 172.31.1.254
routers:
- 172.31.1.1
dns_servers: '{{ dch_networks.red.dns_servers_v4 }}'
domain_name: pyrocufflink.red
domain_search: pyrocufflink.red pyrocufflink.blue pyrocufflink.jazz
ntp_servers: '{{ dch_networks.red.ntp_servers }}'
dynamic_hostnames: true
default_lease: 3600
max_lease: 28800
# tachyglossus.net (Guest)
- address: 172.24.100.0/24
pools:
- start: 172.24.100.2
end: 172.24.100.254
routers:
- 172.24.100.1
dns_servers:
- 208.67.222.222
- 208.67.220.220
ntp_servers:
- 0.fedora.pool.ntp.org
- 1.fedora.pool.ntp.org
- 2.fedora.pool.ntp.org
- 3.fedora.pool.ntp.org
dhcp_reservations:
# pyrocufflink.jazz
- host: odette.pyrocufflink.jazz
ip_addr: 172.31.0.2
mac_addr: 52:54:00:a5:8f:59
- host: GSS108E.pyrocufflink.jazz
ip_addr: 172.31.0.3
mac_addr: c0:ff:d4:c9:80:a4
- host: tyrande.pyrocufflink.jazz
ip_addr: 172.31.0.4
mac_addr: 52:54:00:8d:58:c9
- host: caithe.pyrocufflink.jazz
ip_addr: 172.31.0.5
mac_addr: 52:54:00:a0:22:a0
- host: myala.pyrocufflink.jazz
ip_addr: 172.31.0.6
mac_addr: 52:54:00:49:55:9a
- host: jaina.pyrocufflink.jazz
ip_addr: 172.31.0.8
mac_addr: 08:62:66:2b:a6:eb
- host: malfurion.pyrocufflink.jazz
ip_addr: 172.31.0.10
mac_addr: 52:54:00:aa:5c:01
# pyrocufflink.blue
- host: dc0.pyrocufflink.blue
ip_addr: 172.30.0.10
mac_addr: 52:54:00:e0:fa:f9
- host: dc1.pyrocufflink.blue
ip_addr: 172.30.0.9
mac_addr: b8:27:eb:0d:db:19
- host: dns0.pyrocufflink.blue
ip_addr: 172.30.0.4
mac_addr: 52:54:00:b8:8b:64
- host: file0.pyrocufflink.blue
ip_addr: 172.30.0.5
mac_addr: 52:54:00:2a:9b:7e
- host: rprx0.pyrocufflink.blue
ip_addr: 172.30.0.6
mac_addr: 52:54:00:03:af:e5
- host: zbx0.pyrocufflink.blue
ip_addr: 172.30.0.7
duid: ff:4a:0e:44:56:00:02:00:00:ab:11:ef:11:04:5c:28:85:54:96
- host: diddy.pyrocufflink.blue
ip_addr: 172.30.0.13
mac_addr: 74:da:38:8f:94:4f
# Management
- host: unifi0
mac_addr: b8:27:eb:62:59:1a
ip_addr: 172.30.0.242
- host: Downstairs-AP
ip_addr: 172.30.0.243
mac_addr: 80:2a:a8:90:ed:d6
- host: Upstairs-AP
ip_addr: 172.30.0.244
mac_addr: f0:9f:c2:cb:b9:b0
dhcp_ddns_keys:
- name: dhcp-ddns
secret: +0zVSpY8oFrxl2F1qB8tT2HMgbuD31JurL9w4zilNCg=
dhcp_ddns_zones:
- zone: pyrocufflink.jazz
primary: 172.31.0.4
- zone: 0.31.0.172.in-addr.arpa
primary: 172.31.0.4
- zone: pyrocufflink.red
primary: 172.30.0.4
key: dhcp-ddns
- zone: 1.31.172.in-addr.arpa
primary: 172.30.0.4
key: dhcp-ddns