Netconf-Module/netconf-hive.nix
2024-08-31 22:37:30 +02:00

183 lines
3.8 KiB
Nix

let
vlansPlan = {
"uplink-cri".id = 223;
"admin-core" = {
id = 3000;
l3-interface = "irb.0";
};
"admin-ap".id = 3001;
"users".id-list = [
{
begin = 3045;
end = 4094;
}
];
"ap-staging".id = 2000;
};
AP = {
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [
"users"
"admin-ap"
];
};
};
AP-staging = {
enable = true;
poe = true;
ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ "ap-staging" ];
};
};
in
{
netcore02 = {
deployment.targetHost = "netcore02.dgn";
imports = [ ./dgn-module.nix ];
vlans = vlansPlan;
dgn-interfaces = {
# "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;
"ge-0/0/42" = {
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
};
"ge-0/0/43" = AP-staging;
"ge-0/0/46" = {
# uplink oob
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ 500 ];
};
};
"ge-0/0/47" = {
# ilo
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ "admin-core" ];
};
};
"xe-0/1/0" = {
# router
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
};
"xe-0/1/1" = {
# netaccess01
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [
"users"
"ap-staging"
"admin-ap"
"admin-core"
];
};
};
"ge-0/1/3" = {
# uplink
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "uplink-cri" ];
};
};
"me0" = {
enable = true;
inet = {
enable = true;
address = [ "192.168.42.6/24" ];
};
};
"irb" = {
enable = true;
inet6 = {
enable = true;
address = [ "fd26:baf9:d250:8000::1001/64" ];
};
};
};
};
netaccess01 = {
deployment.targetHost = "netaccess01.dgn";
imports = [ ./dgn-module.nix ];
vlans = vlansPlan;
dgn-interfaces = {
# "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;
"xe-0/1/0" = {
enable = true;
ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
};
"me0" = {
enable = true;
inet = {
enable = true;
address = [ "192.168.42.6/24" ];
};
};
"irb" = {
enable = true;
inet6 = {
enable = true;
address = [ "fd26:baf9:d250:8000::2001/64" ];
};
};
};
};
}