feat(vault01): CRI uplink is now connected to internet
All checks were successful
build configuration / build_rescue01 (push) Successful in 1m5s
build configuration / build_web02 (push) Successful in 1m6s
build configuration / build_storage01 (push) Successful in 1m9s
build configuration / build_vault01 (push) Successful in 1m8s
build configuration / build_compute01 (push) Successful in 1m16s
lint / check (push) Successful in 22s
build configuration / build_web01 (push) Successful in 1m30s

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 let
vlanName = "vlan-uplink-cri"; 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 in
{ {
systemd.network = { systemd.network = {
networks = { networks = {
"10-sfp-right" = { "10-enp67s0f0np0" = {
name = "enp67s0f0np0"; name = "enp67s0f0np0";
networkConfig = { networkConfig = {
VLAN = [ vlanName ]; VLAN = [ vlanName ];
@ -16,16 +25,21 @@ in
IPv6SendRA = false; IPv6SendRA = false;
}; };
}; };
"20-vlan-uplink-cri" = { "10-${vlanName}" = {
name = vlanName; name = vlanName;
address = [ "10.120.33.250/30" ]; address = [ linkPrefixedIp ];
networkConfig = { routes = [
Gateway = "10.120.33.249"; {
}; routeConfig = {
PreferredSource = publicIp;
Gateway = upstreamRouterIp;
};
}
];
}; };
}; };
netdevs = { netdevs = {
"20-vlan-uplink-cri" = { "10-vlan-uplink-cri" = {
netdevConfig = { netdevConfig = {
Name = vlanName; Name = vlanName;
Kind = "vlan"; Kind = "vlan";

View file

@ -89,6 +89,17 @@
vault01 = { vault01 = {
interfaces = { interfaces = {
vlan-uplink-cri = {
ipv4 = [
{
# see also machines/vault01/networking.nix
address = "129.199.195.129";
prefixLength = 27;
}
];
gateways = [ ];
enableDefaultDNS = true;
};
enp130s0f0 = { enp130s0f0 = {
ipv4 = [ ipv4 = [
{ {
@ -96,8 +107,7 @@
prefixLength = 24; prefixLength = 24;
} }
]; ];
gateways = [ ];
gateways = [ "192.168.42.1" ];
enableDefaultDNS = true; enableDefaultDNS = true;
}; };
}; };