ops/nixos: switch to VLANs for uplink to veloxserv
This commit is contained in:
parent
bf274bbc00
commit
7a3f214944
2 changed files with 12 additions and 3 deletions
|
@ -56,6 +56,15 @@ with lib;
|
||||||
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
|
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
vlans.vl-transit = {
|
||||||
|
id = 100;
|
||||||
|
interface = "en-internet";
|
||||||
|
};
|
||||||
|
vlans.vl-linx = {
|
||||||
|
id = 200;
|
||||||
|
interface = "en-internet";
|
||||||
|
};
|
||||||
|
|
||||||
interfaces.br-public.ipv4.addresses = [{
|
interfaces.br-public.ipv4.addresses = [{
|
||||||
address = config.my.blade-router.addresses.br-public.v4.addr;
|
address = config.my.blade-router.addresses.br-public.v4.addr;
|
||||||
prefixLength = config.my.blade-router.addresses.br-public.v4.prefixLength;
|
prefixLength = config.my.blade-router.addresses.br-public.v4.prefixLength;
|
||||||
|
@ -64,11 +73,11 @@ with lib;
|
||||||
address = config.my.blade-router.addresses.br-public.v6.addr;
|
address = config.my.blade-router.addresses.br-public.v6.addr;
|
||||||
prefixLength = config.my.blade-router.addresses.br-public.v6.prefixLength;
|
prefixLength = config.my.blade-router.addresses.br-public.v6.prefixLength;
|
||||||
}];
|
}];
|
||||||
interfaces.en-internet.ipv4.addresses = [{
|
interfaces.vl-transit.ipv4.addresses = [{
|
||||||
address = config.my.blade-router.addresses.linknet.v4.local;
|
address = config.my.blade-router.addresses.linknet.v4.local;
|
||||||
prefixLength = config.my.blade-router.addresses.linknet.v4.prefixLength;
|
prefixLength = config.my.blade-router.addresses.linknet.v4.prefixLength;
|
||||||
}];
|
}];
|
||||||
interfaces.en-internet.ipv6.addresses = [{
|
interfaces.vl-transit.ipv6.addresses = [{
|
||||||
address = config.my.blade-router.addresses.linknet.v6.local;
|
address = config.my.blade-router.addresses.linknet.v6.local;
|
||||||
prefixLength = config.my.blade-router.addresses.linknet.v6.prefixLength;
|
prefixLength = config.my.blade-router.addresses.linknet.v6.prefixLength;
|
||||||
}];
|
}];
|
||||||
|
|
|
@ -117,7 +117,7 @@ in {
|
||||||
nat = lib.optionalAttrs (config.my.blade.macAddress.internet != null) {
|
nat = lib.optionalAttrs (config.my.blade.macAddress.internet != null) {
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = [ "br-mgmt" ];
|
internalInterfaces = [ "br-mgmt" ];
|
||||||
externalInterface = "en-internet";
|
externalInterface = "vl-transit";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
|
Loading…
Reference in a new issue