Bootstrap router interfaces
This commit is contained in:
parent
61fc84ba36
commit
527c55ba6b
8
hosts/router/101-net-uplink-a.nix
Normal file
8
hosts/router/101-net-uplink-a.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-uplink-a" = {
|
||||
id = 101;
|
||||
interface = "ens18";
|
||||
};
|
||||
}
|
8
hosts/router/102-net-uplink-b.nix
Normal file
8
hosts/router/102-net-uplink-b.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-uplink-b" = {
|
||||
id = 102;
|
||||
interface = "ens18";
|
||||
};
|
||||
}
|
37
hosts/router/151-net-technik-iot.nix
Normal file
37
hosts/router/151-net-technik-iot.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-technik-iot" = {
|
||||
id = 151;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-technik-iot.ipv4.addresses = [
|
||||
{ address = "10.42.151.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-technik-iot" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 151;
|
||||
subnet = "10.42.151.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.151.100 - 10.42.151.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.151.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/201-net-ikt.nix
Normal file
50
hosts/router/201-net-ikt.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-ikt" = {
|
||||
id = 201;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-ikt.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:201::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-ikt.ipv4.addresses = [
|
||||
{ address = "10.42.201.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-ikt {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:201::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-ikt" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 201;
|
||||
subnet = "10.42.201.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.201.100 - 10.42.201.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.201.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/202-net-technik.nix
Normal file
50
hosts/router/202-net-technik.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-technik" = {
|
||||
id = 202;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-technik.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:202::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-technik.ipv4.addresses = [
|
||||
{ address = "10.42.202.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-technik {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:202::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-technik" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 202;
|
||||
subnet = "10.42.202.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.202.100 - 10.42.202.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.202.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/203-net-hospital.nix
Normal file
50
hosts/router/203-net-hospital.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-hospital" = {
|
||||
id = 203;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-hospital.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:203::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-hospital.ipv4.addresses = [
|
||||
{ address = "10.42.203.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-hospital {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:203::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-hospital" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 203;
|
||||
subnet = "10.42.203.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.203.100 - 10.42.203.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.203.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/204-net-zoll.nix
Normal file
50
hosts/router/204-net-zoll.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-zoll" = {
|
||||
id = 204;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-zoll.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:204::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-zoll.ipv4.addresses = [
|
||||
{ address = "10.42.204.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-zoll {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:204::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-zoll" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 204;
|
||||
subnet = "10.42.204.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.204.100 - 10.42.204.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.204.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/205-net-leitstelle.nix
Normal file
50
hosts/router/205-net-leitstelle.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-leitstelle" = {
|
||||
id = 205;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-leitstelle.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:205::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-leitstelle.ipv4.addresses = [
|
||||
{ address = "10.42.205.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-leitstelle {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:205::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-leitstelle" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 205;
|
||||
subnet = "10.42.205.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.205.100 - 10.42.205.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.205.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/206-net-verwaltung.nix
Normal file
50
hosts/router/206-net-verwaltung.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-verwaltung" = {
|
||||
id = 206;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-verwaltung.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:206::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-verwaltung.ipv4.addresses = [
|
||||
{ address = "10.42.206.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-verwaltung {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:206::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-verwaltung" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 206;
|
||||
subnet = "10.42.206.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.206.100 - 10.42.206.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.206.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/208-net-yolo.nix
Normal file
50
hosts/router/208-net-yolo.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-yolo" = {
|
||||
id = 208;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-yolo.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:208::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-yolo.ipv4.addresses = [
|
||||
{ address = "10.42.208.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-yolo {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:208::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-yolo" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 208;
|
||||
subnet = "10.42.208.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.208.100 - 10.42.208.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.208.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/209-net-infojurte.nix
Normal file
50
hosts/router/209-net-infojurte.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-infojurte" = {
|
||||
id = 209;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-infojurte.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:209::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-infojurte.ipv4.addresses = [
|
||||
{ address = "10.42.209.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-infojurte {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:209::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-infojurte" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 209;
|
||||
subnet = "10.42.209.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.209.100 - 10.42.209.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.209.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/210-net-internation.nix
Normal file
50
hosts/router/210-net-internation.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-internation" = {
|
||||
id = 210;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-internation.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:210::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-internation.ipv4.addresses = [
|
||||
{ address = "10.42.210.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-internation {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:210::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-internation" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 210;
|
||||
subnet = "10.42.210.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.210.100 - 10.42.210.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.210.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/211-net-programmtre.nix
Normal file
50
hosts/router/211-net-programmtre.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-programmtre" = {
|
||||
id = 211;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-programmtre.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:211::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-programmtre.ipv4.addresses = [
|
||||
{ address = "10.42.211.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-programmtre {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:211::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-programmtre" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 211;
|
||||
subnet = "10.42.211.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.211.100 - 10.42.211.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.211.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
50
hosts/router/212-net-open-office.nix
Normal file
50
hosts/router/212-net-open-office.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-open-office" = {
|
||||
id = 212;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-open-office.ipv6.addresses = [
|
||||
{ address = "fe80::1"; prefixLength = 64; }
|
||||
{ address = "fd00:10:42:212::1"; prefixLength = 64; }
|
||||
];
|
||||
networking.interfaces.net-open-office.ipv4.addresses = [
|
||||
{ address = "10.42.212.1"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.radvd.config = ''
|
||||
interface net-open-office {
|
||||
AdvSendAdvert on;
|
||||
prefix fd00:10:42:212::/64 {};
|
||||
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||||
DNSSL bula22.de {};
|
||||
};
|
||||
'';
|
||||
|
||||
services.kea.dhcp4 = {
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ "net-open-office" ];
|
||||
};
|
||||
subnet4 = [
|
||||
{
|
||||
id = 212;
|
||||
subnet = "10.42.212.1/24";
|
||||
pools = [
|
||||
{
|
||||
pool = "10.42.212.100 - 10.42.212.240";
|
||||
}
|
||||
];
|
||||
option-data = [
|
||||
{
|
||||
name = "routers";
|
||||
data = "10.42.212.1";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
12
hosts/router/42-net-management.nix
Normal file
12
hosts/router/42-net-management.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
networking.vlans."net-management" = {
|
||||
id = 42;
|
||||
interface = "ens18";
|
||||
};
|
||||
|
||||
networking.interfaces.net-management.ipv4.addresses = [
|
||||
{ address = "10.42.42.1"; prefixLength = 24; }
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user