router: switch to kea
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2024-02-07 23:09:06 +00:00
parent da8f4bb5a5
commit 26908c8b77

View File

@ -143,56 +143,92 @@
}; };
services = { services = {
dhcpd4 = { kea = {
enable = true; dhcp4 = {
interfaces = [ "eth1" "eth2" ]; enable = true;
extraConfig = ''
subnet 10.64.50.0 netmask 255.255.255.0 {
interface eth1;
option broadcast-address 10.64.50.255; settings = {
option routers 10.64.50.1; interfaces-config = {
range 10.64.50.64 10.64.50.254; interfaces = [ "eth1" "eth2" ];
};
option domain-name-servers 1.1.1.1, 8.8.8.8; lease-database = {
} type = "memfile";
persist = false;
subnet 10.239.19.0 netmask 255.255.255.0 { };
interface eth2; subnet4 = [
{
option broadcast-address 10.239.19.255; subnet = "10.64.50.0/24";
option routers 10.239.19.1; interface = "eth1";
range 10.239.19.64 10.239.19.254; pools = [{
pool = "10.64.50.64 - 10.64.50.254";
option domain-name-servers 1.1.1.1, 8.8.8.8; }];
} option-data = [
''; {
machines = [ name = "routers";
{ data = "10.64.50.1";
# tywin.storage.ts.hillion.co.uk }
ethernetAddress = "c8:7f:54:6d:e1:03"; {
ipAddress = "10.64.50.20"; name = "broadcast-address";
hostName = "tywin"; data = "10.64.50.255";
} }
{ {
# syncbox name = "domain-name-servers";
ethernetAddress = "00:1e:06:49:06:1e"; data = "1.1.1.1, 8.8.8.8";
ipAddress = "10.64.50.22"; }
hostName = "syncbox"; ];
} reservations = [
{ {
# bedroom-everything-presence-one # tywin.storage.ts.hillion.co.uk
ethernetAddress = "40:22:d8:e0:1d:50"; hw-address = "c8:7f:54:6d:e1:03";
ipAddress = "10.239.19.2"; ip-address = "10.64.50.20";
hostName = "bedroom-everything-presence-one"; hostname = "tywin";
} }
{ {
# living-room-everything-presence-one # syncbox
ethernetAddress = "40:22:d8:e0:0f:78"; hw-address = "00:1e:06:49:06:1e";
ipAddress = "10.239.19.3"; ip-address = "10.64.50.22";
hostName = "living-room-everything-presence-one"; hostname = "syncbox";
} }
]; ];
}
{
subnet = "10.239.19.0/24";
interface = "eth2";
pools = [{
pool = "10.239.19.64 - 10.239.19.254";
}];
option-data = [
{
name = "routers";
data = "10.239.19.1";
}
{
name = "broadcast-address";
data = "10.239.19.255";
}
{
name = "domain-name-servers";
data = "1.1.1.1, 8.8.8.8";
}
];
reservations = [
{
# bedroom-everything-presence-one
hw-address = "40:22:d8:e0:1d:50";
ip-address = "10.239.19.2";
hostname = "bedroom-everything-presence-one";
}
{
# living-room-everything-presence-one
hw-address = "40:22:d8:e0:0f:78";
ip-address = "10.239.19.3";
hostname = "living-room-everything-presence-one";
}
];
}
];
};
};
}; };
}; };