refactor(netconf): use dgn-isp for switches
This commit is contained in:
parent
1ed3749c33
commit
76239af209
3 changed files with 66 additions and 143 deletions
|
@ -2,46 +2,28 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
let
|
|
||||||
#TODO: meta
|
|
||||||
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;
|
|
||||||
"hypervisor".id = 2001;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
vlans = vlansPlan;
|
|
||||||
dgn-hardware.model = "EX2300-48P";
|
dgn-hardware.model = "EX2300-48P";
|
||||||
|
dgn-isp = {
|
||||||
|
enable = true;
|
||||||
|
staging-AP = [
|
||||||
|
# "ge-0/0/0"
|
||||||
|
# "ge-0/0/1"
|
||||||
|
# "ge-0/0/2"
|
||||||
|
# "ge-0/0/3"
|
||||||
|
# "ge-0/0/4"
|
||||||
|
# "ge-0/0/5"
|
||||||
|
];
|
||||||
|
admin-ip = "fd26:baf9:d250:8000::2001/64";
|
||||||
|
};
|
||||||
dgn-interfaces = {
|
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;
|
|
||||||
|
|
||||||
# netcore02
|
# netcore02
|
||||||
"xe-0/1/0".ethernet-switching = {
|
"xe-0/1/0".ethernet-switching = {
|
||||||
interface-mode = "trunk";
|
interface-mode = "trunk";
|
||||||
vlans = [ "all" ];
|
vlans = [ "all" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# management
|
# debug management
|
||||||
"me0".inet.addresses = [ "192.168.42.6/24" ];
|
"me0".inet.addresses = [ "192.168.42.6/24" ];
|
||||||
"irb".inet6.addresses = [ "fd26:baf9:d250:8000::2001/64" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,54 +2,35 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
let
|
|
||||||
#TODO: meta
|
|
||||||
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;
|
|
||||||
"hypervisor".id = 2001;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
vlans = vlansPlan;
|
|
||||||
dgn-hardware.model = "EX2300-48P";
|
dgn-hardware.model = "EX2300-48P";
|
||||||
dgn-interfaces =
|
dgn-isp = {
|
||||||
let
|
enable = true;
|
||||||
hypervisor.ethernet-switching = {
|
admin-ip = "fd26:baf9:d250:8000::100f/64";
|
||||||
|
};
|
||||||
|
dgn-profiles."hypervisor" = {
|
||||||
|
interfaces = [
|
||||||
|
"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"
|
||||||
|
];
|
||||||
|
configuration.ethernet-switching = {
|
||||||
interface-mode = "access";
|
interface-mode = "access";
|
||||||
vlans = [ "hypervisor" ];
|
vlans = [ "hypervisor" ];
|
||||||
};
|
};
|
||||||
in
|
};
|
||||||
{
|
dgn-interfaces = {
|
||||||
"xe-0/2/0".ethernet-switching = {
|
"xe-0/2/0".ethernet-switching = {
|
||||||
interface-mode = "trunk";
|
interface-mode = "trunk";
|
||||||
vlans = [ "all" ];
|
vlans = [ "all" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"ge-0/0/0" = hypervisor;
|
# debug management
|
||||||
"ge-0/0/1" = hypervisor;
|
|
||||||
"ge-0/0/2" = hypervisor;
|
|
||||||
"ge-0/0/3" = hypervisor;
|
|
||||||
"ge-0/0/4" = hypervisor;
|
|
||||||
"ge-0/0/5" = hypervisor;
|
|
||||||
"ge-0/0/6" = hypervisor;
|
|
||||||
"ge-0/0/7" = hypervisor;
|
|
||||||
|
|
||||||
# management
|
|
||||||
"me0".inet.addresses = [ "192.168.2.2/24" ];
|
"me0".inet.addresses = [ "192.168.2.2/24" ];
|
||||||
"irb".inet6.addresses = [ "fd26:baf9:d250:8000::100f/64" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,77 +2,38 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
let
|
|
||||||
#TODO: meta
|
|
||||||
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;
|
|
||||||
"hypervisor".id = 2001;
|
|
||||||
};
|
|
||||||
#TODO: additionnal module (always the same for APs)
|
|
||||||
AP-staging = {
|
|
||||||
poe = true;
|
|
||||||
ethernet-switching = {
|
|
||||||
interface-mode = "access";
|
|
||||||
vlans = [ "ap-staging" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
vlans = vlansPlan;
|
|
||||||
dgn-hardware.model = "EX2300-48P";
|
dgn-hardware.model = "EX2300-48P";
|
||||||
|
dgn-isp = {
|
||||||
|
enable = true;
|
||||||
|
staging-AP = [
|
||||||
|
# "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"
|
||||||
|
];
|
||||||
|
admin-ip = "fd26:baf9:d250:8000::1001/64";
|
||||||
|
};
|
||||||
dgn-interfaces = {
|
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;
|
|
||||||
|
|
||||||
# oob
|
# oob
|
||||||
"ge-0/0/42".ethernet-switching = {
|
"ge-0/0/42".ethernet-switching = {
|
||||||
interface-mode = "trunk";
|
interface-mode = "trunk";
|
||||||
vlans = [ "all" ];
|
vlans = [ "all" ];
|
||||||
};
|
};
|
||||||
# AP de test
|
|
||||||
"ge-0/0/43" = {
|
|
||||||
poe = true;
|
|
||||||
ethernet-switching = {
|
|
||||||
interface-mode = "access";
|
|
||||||
vlans = [ 4000 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# uplink oob
|
|
||||||
"ge-0/0/46".ethernet-switching = {
|
|
||||||
interface-mode = "access";
|
|
||||||
vlans = [ 222 ];
|
|
||||||
rstp = false;
|
|
||||||
};
|
|
||||||
# ilo
|
# ilo
|
||||||
"ge-0/0/47".ethernet-switching = {
|
"ge-0/0/47".ethernet-switching = {
|
||||||
interface-mode = "access";
|
interface-mode = "access";
|
||||||
|
@ -107,8 +68,7 @@ in
|
||||||
vlans = [ "uplink-cri" ];
|
vlans = [ "uplink-cri" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# management
|
# debug management
|
||||||
"me0".inet.addresses = [ "192.168.42.6/24" ];
|
"me0".inet.addresses = [ "192.168.42.6/24" ];
|
||||||
"irb".inet6.addresses = [ "fd26:baf9:d250:8000::1001/64" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue