config/c3d2: cleanup

This commit is contained in:
Astro 2021-11-13 02:47:57 +01:00
parent 84e166fc47
commit 8c31e2d643
1 changed files with 45 additions and 77 deletions

View File

@ -1,6 +1,9 @@
{ lib, ... }:
{ {
site.net.c3d2 = { site.net.c3d2 = {
dhcp = { dhcp = {
server = "c3d2-gw3";
start = "172.22.99.100";
end = "172.22.99.199"; end = "172.22.99.199";
fixed-hosts = { fixed-hosts = {
"172.22.99.96" = "08:00:27:bb:8c:b3"; "172.22.99.96" = "08:00:27:bb:8c:b3";
@ -49,14 +52,13 @@
"wormhole.hq.c3d2.de" = "00:23:c3:d2:00:76"; "wormhole.hq.c3d2.de" = "00:23:c3:d2:00:76";
"www1.hq.c3d2.de" = "aa:00:13:8b:03:47"; "www1.hq.c3d2.de" = "aa:00:13:8b:03:47";
}; };
time = 86400;
max-time = 2592000; max-time = 2592000;
router = "c3d2-anon"; router = "c3d2-anon";
server = "c3d2-gw3";
start = "172.22.99.100";
time = 86400;
}; };
domainName = "c3d2.zentralwerk.org"; domainName = "c3d2.zentralwerk.org";
dynamicDomain = true; dynamicDomain = true;
subnet4 = "172.22.99.0/24";
hosts4 = { hosts4 = {
bgp = "172.22.99.250"; bgp = "172.22.99.250";
c3d2-anon = "172.22.99.1"; c3d2-anon = "172.22.99.1";
@ -65,98 +67,64 @@
c3d2-gw3 = "172.22.99.4"; c3d2-gw3 = "172.22.99.4";
dn42 = "172.22.99.253"; dn42 = "172.22.99.253";
}; };
hosts6 = { hosts6.dn42 = {
dn42 = { bgp = "fd23:42:c3d2:523::c3d2:ff0b";
bgp = "fd23:42:c3d2:523::c3d2:ff0b"; c3d2-anon = "fd23:42:c3d2:523::c3d2:1";
c3d2-anon = "fd23:42:c3d2:523::c3d2:1"; c3d2-gw1 = "fd23:42:c3d2:523::c3d2:2";
c3d2-gw1 = "fd23:42:c3d2:523::c3d2:2"; c3d2-gw2 = "fd23:42:c3d2:523::c3d2:3";
c3d2-gw2 = "fd23:42:c3d2:523::c3d2:3"; c3d2-gw3 = "fd23:42:c3d2:523::c3d2:4";
c3d2-gw3 = "fd23:42:c3d2:523::c3d2:4"; };
}; hosts6.up4 = {
up4 = { bgp = "2a00:8180:2c00:223::c3d2:ff0b";
bgp = "2a00:8180:2c00:223::c3d2:ff0b"; c3d2-anon = "2a00:8180:2c00:223::c3d2:1";
c3d2-anon = "2a00:8180:2c00:223::c3d2:1"; c3d2-gw1 = "2a00:8180:2c00:223::c3d2:2";
c3d2-gw1 = "2a00:8180:2c00:223::c3d2:2"; c3d2-gw2 = "2a00:8180:2c00:223::c3d2:3";
c3d2-gw2 = "2a00:8180:2c00:223::c3d2:3"; c3d2-gw3 = "2a00:8180:2c00:223::c3d2:4";
c3d2-gw3 = "2a00:8180:2c00:223::c3d2:4";
};
}; };
subnet4 = "172.22.99.0/24";
subnet4Len = 24;
subnet4Net = "172.22.99.0";
subnets6 = { subnets6 = {
dn42 = "fd23:42:c3d2:523::/64"; dn42 = "fd23:42:c3d2:523::/64";
up4 = "2a00:8180:2c00:223::/64"; up4 = "2a00:8180:2c00:223::/64";
}; };
}; };
site.hosts = { site.hosts =
c3d2-anon = { let
makeGateway = lib.recursiveUpdate {
interfaces = {
c3d2.type = "veth";
core.type = "veth";
};
role = "container";
};
in
{
c3d2-anon = makeGateway {
interfaces = { interfaces = {
c3d2 = { c3d2.hwaddr = "0A:14:48:01:07:05";
hwaddr = "0A:14:48:01:07:05"; core.hwaddr = "0A:14:48:01:07:04";
type = "veth";
};
core = {
hwaddr = "0A:14:48:01:07:04";
type = "veth";
};
}; };
ospf = { ospf.allowedUpstreams = [ "anon1" "freifunk" ];
allowedUpstreams = [ "anon1" "freifunk" ];
};
role = "container";
}; };
c3d2-gw1 = { c3d2-gw1 = makeGateway {
interfaces = { interfaces = {
c3d2 = { c3d2.hwaddr = "0A:14:48:01:21:01";
hwaddr = "0A:14:48:01:21:01"; core.hwaddr = "0A:14:48:01:21:00";
type = "veth";
};
core = {
hwaddr = "0A:14:48:01:21:00";
type = "veth";
};
}; };
ospf = { ospf.allowedUpstreams = [ "upstream3" "upstream4" "upstream1" "anon1" "freifunk" ];
allowedUpstreams =
[ "upstream3" "upstream4" "upstream1" "anon1" "freifunk" ];
};
role = "container";
}; };
c3d2-gw2 = { c3d2-gw2 = makeGateway {
interfaces = { interfaces = {
c3d2 = { c3d2.hwaddr = "0A:14:48:01:21:03";
hwaddr = "0A:14:48:01:21:03"; core.hwaddr = "0A:14:48:01:21:02";
type = "veth";
};
core = {
hwaddr = "0A:14:48:01:21:02";
type = "veth";
};
}; };
ospf = { ospf.allowedUpstreams = [ "upstream1" "upstream3" "upstream4" "anon1" "freifunk" ];
allowedUpstreams =
[ "upstream1" "upstream3" "upstream4" "anon1" "freifunk" ];
};
role = "container";
}; };
c3d2-gw3 = { c3d2-gw3 = makeGateway {
interfaces = { interfaces = {
c3d2 = { c3d2.hwaddr = "0A:14:48:01:21:05";
hwaddr = "0A:14:48:01:21:05"; core.hwaddr = "0A:14:48:01:21:04";
type = "veth";
};
core = {
hwaddr = "0A:14:48:01:21:04";
type = "veth";
};
}; };
ospf = { ospf.allowedUpstreams = [ "upstream4" "upstream3" "upstream1" "anon1" "freifunk" ];
allowedUpstreams =
[ "upstream4" "upstream3" "upstream1" "anon1" "freifunk" ];
};
role = "container";
}; };
}; };
} }