1
0

router: add net-audio and net-trabantenst

This commit is contained in:
clerie 2022-07-28 20:00:50 +02:00
parent b2676162e7
commit a8bf30238b
4 changed files with 123 additions and 1 deletions

View File

@ -0,0 +1,60 @@
{ config, pkgs, ...}:
{
networking.vlans."net-audio" = {
id = 215;
interface = "ens18";
};
networking.interfaces.net-audio.ipv6.addresses = [
{ address = "fe80::1"; prefixLength = 64; }
{ address = "fd00:10:42:215::1"; prefixLength = 64; }
];
networking.interfaces.net-audio.ipv4.addresses = [
{ address = "10.42.215.1"; prefixLength = 24; }
];
services.radvd.config = ''
interface net-audio {
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-audio" ];
};
subnet4 = [
{
id = 215;
subnet = "10.42.215.1/24";
pools = [
{
pool = "10.42.215.100 - 10.42.215.240";
}
];
option-data = [
{
name = "routers";
data = "10.42.215.1";
}
];
}
];
};
};
clerie.forward-filter.interfaces.net-audio.rules = [
{ incomingInterface = "net-ikt"; }
];
clerie.uplink-selector.interfaces.net-audio.uplink = "uplink-b";
}

View File

@ -0,0 +1,60 @@
{ config, pkgs, ...}:
{
networking.vlans."net-trabantenst" = {
id = 216;
interface = "ens18";
};
networking.interfaces.net-trabantenst.ipv6.addresses = [
{ address = "fe80::1"; prefixLength = 64; }
{ address = "fd00:10:42:216::1"; prefixLength = 64; }
];
networking.interfaces.net-trabantenst.ipv4.addresses = [
{ address = "10.42.216.1"; prefixLength = 24; }
];
services.radvd.config = ''
interface net-trabantenst {
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-trabantenst" ];
};
subnet4 = [
{
id = 216;
subnet = "10.42.216.1/24";
pools = [
{
pool = "10.42.216.100 - 10.42.216.240";
}
];
option-data = [
{
name = "routers";
data = "10.42.216.1";
}
];
}
];
};
};
clerie.forward-filter.interfaces.net-trabantenst.rules = [
{ incomingInterface = "net-ikt"; }
];
clerie.uplink-selector.interfaces.net-trabantenst.uplink = "uplink-b";
}

View File

@ -29,6 +29,8 @@
./212-net-open-office.nix ./212-net-open-office.nix
./213-net-fuf.nix ./213-net-fuf.nix
./214-net-mav.nix ./214-net-mav.nix
./215-net-audio.nix
./216-net-trabantenst.nix
]; ];
boot.loader.systemd-boot.enable = true; 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 ia_pd 1/::/56 net-hospital/203/64 net-zoll/204/64 net-leitstelle/205/64 net-verwaltung/206/64
interface ppp-uplink-b interface ppp-uplink-b
ipv6rs 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 net-fuf/213/64 net-mav/214/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 net-audio/215/64 net-trabantenst/216/64
''; '';
}; };
} }