When there is a network issue that prevents DNS names from being resolved, it can be difficult to troubleshoot. For example, last night, the Samba domain controller crashed, so *pyrocufflink.blue* names were unavailable. Furthermore, the domain controller VM was apparently locked up, so I could not SSH into it directly, and it needed to be rebooted. Since the VM host's name did not resolve, I could not find its address to log into it and reboot the VM. I resorted to scanning the SSH keys of every IP address on the network until I found the one that matched the cached key in ~/.ssh/known_hosts. This was cumbersome and annoying. Assigning DHCP reservations to the VM hosts will ensure that when a situation like this arises again, I can quickly connect to the correct VM host and manage its virtual machines, as its address is recorded in the configuration policy.
119 lines
2.9 KiB
YAML
119 lines
2.9 KiB
YAML
dhcp_ddns: true
|
|
|
|
dhcp_subnets:
|
|
# Management
|
|
- address: 172.30.0.240/28
|
|
pools:
|
|
- start: 172.30.0.245
|
|
end: 172.30.0.253
|
|
routers:
|
|
- 172.30.0.241
|
|
domain_name: pyrocufflink.blue
|
|
ddns_updates: false
|
|
dns_servers: '{{ dch_networks.mgmt.dns_servers_v4 }}'
|
|
ntp_servers: '{{ dch_networks.mgmt.ntp_servers }}'
|
|
unifi_address: ubnt.pyrocufflink.blue
|
|
|
|
# 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
|
|
|
|
|
|
dhcp_reservations:
|
|
# pyrocufflink.blue
|
|
- host: vpn0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.2
|
|
mac_addr: 52:54:00:db:54:e2
|
|
- host: dns1.pyrocufflink.blue
|
|
ip_addr: 172.30.0.3
|
|
mac_addr: b8:27:eb:1b:d9:23
|
|
- 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: web0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.6
|
|
mac_addr: 52:54:00:ef:16:ac
|
|
- 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: dc1.pyrocufflink.blue
|
|
ip_addr: 172.30.0.9
|
|
mac_addr: b8:27:eb:0d:db:19
|
|
- host: dc0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.10
|
|
mac_addr: 52:54:00:e0:fa:f9
|
|
- host: proxy0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.11
|
|
mac_addr: 52:54:00:88:e9:af
|
|
- host: smtp1.pyrocufflink.blue
|
|
ip_addr: 172.30.0.12
|
|
mac_addr: 52:54:00:48:29:d6
|
|
- host: diddy.pyrocufflink.blue
|
|
ip_addr: 172.30.0.13
|
|
mac_addr: 74:da:38:8f:94:4f
|
|
- host: serial0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.16
|
|
mac_addr: b8:27:eb:c4:34:be
|
|
- host: logs0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.17
|
|
mac_addr: 52:54:00:b1:84:98
|
|
- host: vmhost0.pyrocufflink.blue
|
|
ip_addr: 172.30.0.18
|
|
mac_addr: e0:d5:5e:a2:2e:1a
|
|
- host: vmhost1.pyrocufflink.blue
|
|
ip_addr: 172.30.0.19
|
|
mac_addr: e0:d5:5e:6e:ad:ac
|
|
|
|
# Management
|
|
- host: unifi0
|
|
mac_addr: 52:54:00:7c:26:8d
|
|
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: 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
|