forked from DGNum/infrastructure
feat(vault01): Add user vlans
Only the first 300 vlans are activated, 850 make it crash
This commit is contained in:
parent
9e75839ada
commit
01c2505491
1 changed files with 16 additions and 1 deletions
|
@ -35,6 +35,21 @@ let
|
|||
vlanConfig.Id = Id;
|
||||
};
|
||||
|
||||
mkUserVlan =
|
||||
id:
|
||||
let
|
||||
vlan = 3245 + id;
|
||||
prefix24nb = id / 32;
|
||||
prefix29nb = (id - prefix24nb * 32) * 8;
|
||||
in
|
||||
{
|
||||
name = "vlan-user-${builtins.toString vlan}";
|
||||
value = {
|
||||
Id = vlan;
|
||||
address = [ "10.0.${builtins.toString prefix24nb}.${builtins.toString (prefix29nb + 1)}/29" ];
|
||||
};
|
||||
};
|
||||
|
||||
vlans = {
|
||||
vlan-uplink-cri = {
|
||||
Id = 223;
|
||||
|
@ -67,7 +82,7 @@ let
|
|||
|
||||
extraNetwork.networkConfig.DHCPServer = "yes";
|
||||
};
|
||||
};
|
||||
} // builtins.listToAttrs (builtins.genList mkUserVlan 300); # 850 when we can
|
||||
in
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue