Netconf-Module/netconf-hive.nix

215 lines
4.5 KiB
Nix
Raw Normal View History

2024-04-06 23:11:39 +02:00
let
2024-04-30 20:08:07 +02:00
vlansPlan = {
"uplink-cri".id = 223;
2024-04-06 23:11:39 +02:00
"admin-core" = {
2024-04-30 20:08:07 +02:00
id = 3000;
l3-interface = "irb.0";
2024-04-06 23:11:39 +02:00
};
2024-04-30 20:08:07 +02:00
"admin-ap".id = 3001;
"users".id-list = [
2024-04-28 11:47:10 +02:00
{
begin = 3045;
end = 4094;
}
];
2024-04-20 01:54:15 +02:00
2024-04-30 20:08:07 +02:00
"ap-staging".id = 2000;
2024-04-06 23:11:39 +02:00
};
AP = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [
"users"
"admin-ap"
];
};
2024-04-06 23:11:39 +02:00
};
2024-04-20 01:54:15 +02:00
AP-staging = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ "ap-staging" ];
};
2024-04-20 01:54:15 +02:00
};
2024-04-28 11:47:10 +02:00
in
{
2024-05-18 10:11:36 +02:00
netcore02 = {
2024-05-22 13:33:28 +02:00
deployment.targetHost = "netcore02.dgn";
2024-04-30 20:08:07 +02:00
vlans = vlansPlan;
protocols.rstp = [
2024-08-31 18:23:00 +02:00
# "ge-0/0/0"
# "ge-0/0/1"
# "ge-0/0/2"
# "ge-0/0/3"
# "ge-0/0/4"
# "ge-0/0/5"
# "ge-0/0/6"
# "ge-0/0/7"
# "ge-0/0/8"
# "ge-0/0/9"
# "ge-0/0/10"
# "ge-0/0/11"
# "ge-0/0/12"
# "ge-0/0/13"
# "ge-0/0/14"
# "ge-0/0/15"
# "ge-0/0/16"
# "ge-0/0/17"
2024-04-30 20:08:07 +02:00
"ge-0/0/42"
"ge-0/0/43"
"ge-0/0/47"
2024-04-06 23:11:39 +02:00
2024-04-30 20:08:07 +02:00
"xe-0/1/0"
"xe-0/1/1"
"ge-0/1/3"
];
2024-04-06 23:11:39 +02:00
interfaces = {
2024-08-31 18:23:00 +02:00
# "ge-0/0/0" = AP-staging;
# "ge-0/0/1" = AP-staging;
# "ge-0/0/2" = AP-staging;
# "ge-0/0/3" = AP-staging;
# "ge-0/0/4" = AP-staging;
# "ge-0/0/5" = AP-staging;
# "ge-0/0/6" = AP-staging;
# "ge-0/0/7" = AP-staging;
# "ge-0/0/8" = AP-staging;
# "ge-0/0/9" = AP-staging;
# "ge-0/0/10" = AP-staging;
# "ge-0/0/11" = AP-staging;
# "ge-0/0/12" = AP-staging;
# "ge-0/0/13" = AP-staging;
# "ge-0/0/14" = AP-staging;
# "ge-0/0/15" = AP-staging;
# "ge-0/0/16" = AP-staging;
# "ge-0/0/17" = AP-staging;
2024-04-06 23:11:39 +02:00
2024-04-20 01:54:15 +02:00
"ge-0/0/42" = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
2024-05-18 10:11:36 +02:00
interface-mode = "trunk";
vlans = [ "all" ];
2024-04-30 20:08:07 +02:00
};
2024-04-20 01:54:15 +02:00
};
"ge-0/0/43" = AP-staging;
2024-08-31 18:23:00 +02:00
"ge-0/0/46" = {
# uplink oob
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ 500 ];
};
};
2024-04-28 11:47:10 +02:00
"ge-0/0/47" = {
# ilo
2024-04-20 01:54:15 +02:00
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ "admin-core" ];
};
2024-04-20 01:54:15 +02:00
};
2024-04-06 23:11:39 +02:00
"xe-0/1/0" = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
2024-04-06 23:11:39 +02:00
};
"xe-0/1/1" = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [
"users"
2024-08-31 18:23:00 +02:00
"ap-staging"
2024-04-30 20:08:07 +02:00
"admin-ap"
"admin-core"
];
};
2024-04-06 23:11:39 +02:00
};
"ge-0/1/3" = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
2024-05-22 13:33:28 +02:00
vlans = [ "uplink-cri" ];
2024-04-30 20:08:07 +02:00
};
2024-04-06 23:11:39 +02:00
};
"me0" = {
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.inet = {
enable = true;
address = [ "192.168.42.6/24" ];
};
2024-04-06 23:11:39 +02:00
};
2024-04-30 20:08:07 +02:00
"irb" = {
2024-04-06 23:11:39 +02:00
enable = true;
2024-04-30 20:08:07 +02:00
unit."0".family.inet6 = {
enable = true;
address = [ "fd26:baf9:d250:8000::1001/64" ];
};
2024-04-06 23:11:39 +02:00
};
};
};
2024-05-22 13:33:28 +02:00
netaccess01 = {
deployment.targetHost = "netaccess01.dgn";
2024-04-30 20:08:07 +02:00
2024-05-22 13:33:28 +02:00
vlans = vlansPlan;
protocols.rstp = [
2024-08-31 18:23:00 +02:00
# "ge-0/0/0"
# "ge-0/0/1"
# "ge-0/0/2"
# "ge-0/0/3"
# "ge-0/0/4"
# "ge-0/0/5"
2024-05-22 13:33:28 +02:00
"xe-0/1/0"
];
interfaces = {
2024-08-31 18:23:00 +02:00
# "ge-0/0/0" = AP-staging;
# "ge-0/0/1" = AP-staging;
# "ge-0/0/2" = AP-staging;
# "ge-0/0/3" = AP-staging;
# "ge-0/0/4" = AP-staging;
# "ge-0/0/5" = AP-staging;
2024-05-22 13:33:28 +02:00
"xe-0/1/0" = {
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
};
2024-04-30 20:08:07 +02:00
2024-05-22 13:33:28 +02:00
"me0" = {
enable = true;
unit."0".family.inet = {
enable = true;
address = [ "192.168.42.6/24" ];
};
};
"irb" = {
enable = true;
unit."0".family.inet6 = {
enable = true;
address = [ "fd26:baf9:d250:8000::2001/64" ];
};
};
};
};
2024-04-06 23:11:39 +02:00
}