1
0

router: add net-fuf and net-mav

This commit is contained in:
clerie 2022-07-26 21:48:33 +02:00
parent 6021663fde
commit 70761b0962
4 changed files with 123 additions and 1 deletions

View File

@ -0,0 +1,60 @@
{ config, pkgs, ...}:
{
networking.vlans."net-fuf" = {
id = 213;
interface = "ens18";
};
networking.interfaces.net-fuf.ipv6.addresses = [
{ address = "fe80::1"; prefixLength = 64; }
{ address = "fd00:10:42:213::1"; prefixLength = 64; }
];
networking.interfaces.net-fuf.ipv4.addresses = [
{ address = "10.42.213.1"; prefixLength = 24; }
];
services.radvd.config = ''
interface net-fuf {
AdvSendAdvert on;
MaxRtrAdvInterval 30;
prefix ::/64 {
AdvValidLifetime 60;
AdvPreferredLifetime 30;
};
RDNSS 2a01:4f8:1c0c:8221::8 {};
DNSSL bula22.de {};
};
'';
services.kea.dhcp4 = {
settings = {
interfaces-config = {
interfaces = [ "net-fuf" ];
};
subnet4 = [
{
id = 213;
subnet = "10.42.213.1/24";
pools = [
{
pool = "10.42.213.100 - 10.42.213.240";
}
];
option-data = [
{
name = "routers";
data = "10.42.213.1";
}
];
}
];
};
};
clerie.forward-filter.interfaces.net-fuf.rules = [
{ incomingInterface = "net-ikt"; }
];
clerie.uplink-selector.interfaces.net-fuf.uplink = "uplink-b";
}

View File

@ -0,0 +1,60 @@
{ config, pkgs, ...}:
{
networking.vlans."net-mav" = {
id = 214;
interface = "ens18";
};
networking.interfaces.net-mav.ipv6.addresses = [
{ address = "fe80::1"; prefixLength = 64; }
{ address = "fd00:10:42:214::1"; prefixLength = 64; }
];
networking.interfaces.net-mav.ipv4.addresses = [
{ address = "10.42.214.1"; prefixLength = 24; }
];
services.radvd.config = ''
interface net-mav {
AdvSendAdvert on;
MaxRtrAdvInterval 30;
prefix ::/64 {
AdvValidLifetime 60;
AdvPreferredLifetime 30;
};
RDNSS 2a01:4f8:1c0c:8221::8 {};
DNSSL bula22.de {};
};
'';
services.kea.dhcp4 = {
settings = {
interfaces-config = {
interfaces = [ "net-mav" ];
};
subnet4 = [
{
id = 214;
subnet = "10.42.214.1/24";
pools = [
{
pool = "10.42.214.100 - 10.42.214.240";
}
];
option-data = [
{
name = "routers";
data = "10.42.214.1";
}
];
}
];
};
};
clerie.forward-filter.interfaces.net-mav.rules = [
{ incomingInterface = "net-ikt"; }
];
clerie.uplink-selector.interfaces.net-mav.uplink = "uplink-b";
}

View File

@ -27,6 +27,8 @@
./210-net-internation.nix
./211-net-programmtre.nix
./212-net-open-office.nix
./213-net-fuf.nix
./214-net-mav.nix
];
boot.loader.systemd-boot.enable = true;

View File

@ -28,7 +28,7 @@
ia_pd 1/::/56 net-hospital/203/64 net-zoll/204/64 net-leitstelle/205/64 net-verwaltung/206/64
interface ppp-uplink-b
ipv6rs
ia_pd 1/::/56 net-technik-iot/151/64 net-technik-iot/152/64 net-ikt/201/64 net-technik/202/64 net-yolo/208/64 net-infojurte/209/64 net-internation/210/64 net-programmtre/211/64 net-open-office/212/64
ia_pd 1/::/56 net-technik-iot/151/64 net-technik-iot/152/64 net-ikt/201/64 net-technik/202/64 net-yolo/208/64 net-infojurte/209/64 net-internation/210/64 net-programmtre/211/64 net-open-office/212/64 net-fuf/213/64 net-mav/214/64
'';
};
}