feat(vault01): CRI uplink is now connected to internet

This commit is contained in:
sinavir 2024-03-27 15:38:46 +01:00
parent 9cbe1b828f
commit ce05bee635
2 changed files with 33 additions and 9 deletions

View file

@ -1,10 +1,19 @@
let
vlanName = "vlan-uplink-cri";
linkIp = "10.120.33.250";
linkPrefix = "30";
upstreamRouterIp = "10.120.33.249";
publicIp = "129.199.195.129"; # sync with meta
linkPrefixedIp = "${linkIp}/${linkPrefix}";
in
{
systemd.network = {
networks = {
"10-sfp-right" = {
"10-enp67s0f0np0" = {
name = "enp67s0f0np0";
networkConfig = {
VLAN = [ vlanName ];
@ -16,16 +25,21 @@ in
IPv6SendRA = false;
};
};
"20-vlan-uplink-cri" = {
"10-${vlanName}" = {
name = vlanName;
address = [ "10.120.33.250/30" ];
networkConfig = {
Gateway = "10.120.33.249";
};
address = [ linkPrefixedIp ];
routes = [
{
routeConfig = {
PreferredSource = publicIp;
Gateway = upstreamRouterIp;
};
}
];
};
};
netdevs = {
"20-vlan-uplink-cri" = {
"10-vlan-uplink-cri" = {
netdevConfig = {
Name = vlanName;
Kind = "vlan";