home.router: upgrade to bookworm and switch to kea-dhcp-server

This commit is contained in:
Franzi 2023-09-10 22:02:14 +02:00
parent aaf67f1a3d
commit 9bde0d9410
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 20 additions and 14 deletions

View file

@ -5,8 +5,6 @@ kea_config = {
'interfaces': sorted(node.metadata.get('kea-dhcp-server/subnets', {}).keys()),
},
'subnet4': [],
},
'Server': {
'loggers': [{
'name': 'kea-dhcp4',
'output_options': [{
@ -39,4 +37,16 @@ for iface, config in sorted(node.metadata.get('kea-dhcp-server/subnets', {}).ite
]
})
# TODO deploy config
files['/etc/kea/kea-dhcp4.conf'] = {
'content': repo.libs.faults.dict_as_json(kea_config),
'triggers': {
'svc_systemd:kea-dhcp4-server:restart',
},
}
svc_systemd['kea-dhcp4-server'] = {
'needs': {
'file:/etc/kea/kea-dhcp4.conf',
'pkg_apt:kea-dhcp4-server',
},
}

View file

@ -2,7 +2,7 @@ nodes['home.router'] = {
'hostname': '172.19.138.1',
'bundles': {
'bird',
'dhcpd',
'kea-dhcp-server',
'nginx',
'pppd',
'radvd',
@ -12,7 +12,7 @@ nodes['home.router'] = {
'wireguard',
},
'groups': {
'debian-bullseye',
'debian-bookworm',
},
'metadata': {
'interfaces': {
@ -45,30 +45,26 @@ nodes['home.router'] = {
'restart_pppd': '23 2 * * * root systemctl restart pppoe && date -u +\%s > /var/tmp/pppd-last-restart.status',
},
},
'dhcpd': {
'kea-dhcp-server': {
'subnets': {
'enp1s0.1138': {
'range_lower': '172.19.138.100',
'range_higher': '172.19.138.250',
'lower': '172.19.138.100',
'higher': '172.19.138.250',
'subnet': '172.19.138.0/24',
'options': {
'broadcast-address': '172.19.138.255',
'domain-name': 'franzi-home.kunbox.net',
'domain-name-servers': '172.19.138.1',
'domain-search': 'home.kunbox.net',
'routers': '172.19.138.1',
'subnet-mask': '255.255.255.0',
},
},
'enp1s0.1139': {
'range_lower': '172.19.139.200',
'range_higher': '172.19.139.250',
'lower': '172.19.139.200',
'higher': '172.19.139.250',
'subnet': '172.19.139.0/24',
'options': {
'broadcast-address': '172.19.139.255',
'domain-name-servers': '172.19.139.1',
'routers': '172.19.139.1',
'subnet-mask': '255.255.255.0',
},
},
},