Netconf-Module/netconf-hive.nix

150 lines
3 KiB
Nix

let
vlansPlan = {
"uplink-cri".id = 223;
"uplink-interne".id = 403;
"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;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [
"users"
"admin-ap"
];
};
};
AP-staging = {
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ "ap-staging" ];
};
};
in
{
netcore02 = {
deployment.targetHost = "jourdan01.dgn";
vlans = vlansPlan;
protocols.rstp = [
"ge-0/0/12"
"ge-0/0/13"
"ge-0/0/14"
"ge-0/0/15"
"ge-0/0/16"
"ge-0/0/17"
"ge-0/0/42"
"ge-0/0/43"
"ge-0/0/47"
"xe-0/1/0"
"xe-0/1/1"
"ge-0/1/3"
];
interfaces = {
"ge-0/0/12" = AP;
"ge-0/0/13" = AP;
"ge-0/0/14" = AP;
"ge-0/0/15" = AP;
"ge-0/0/16" = AP;
"ge-0/0/17" = AP;
"ge-0/0/42" = {
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
};
"ge-0/0/43" = AP-staging;
"ge-0/0/47" = {
# ilo
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "access";
vlans = [ "admin-core" ];
};
};
"xe-0/1/0" = {
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
};
};
"xe-0/1/1" = {
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [
"users"
"admin-ap"
"admin-core"
];
};
};
"ge-0/1/3" = {
enable = true;
unit."0".family.ethernet-switching = {
enable = true;
interface-mode = "trunk";
vlans = [ "uplink-cri" "uplink-interne" ];
};
};
"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::1001/64" ];
};
};
};
};
# netaccess01 = {
# deployement.targetHost = "root@192.168.42.6";
# vlans = vlansPlan "fd26:baf9:d250:8000::2001/64";
# interfaces = {
# "xe-0/1/0" = {
# enable = true;
# interface-mode = "trunk";
# vlans = [ "all" ];
# dhcp_trusted = true;
# };
# "me0" = {
# enable = true;
# management = "192.168.42.6/24";
# };
# };
# };
}