2024-03-27 10:26:31 +01:00
|
|
|
let
|
|
|
|
vlanName = "vlan-uplink-cri";
|
2024-03-27 15:38:46 +01:00
|
|
|
|
|
|
|
linkIp = "10.120.33.250";
|
|
|
|
linkPrefix = "30";
|
|
|
|
|
|
|
|
upstreamRouterIp = "10.120.33.249";
|
|
|
|
|
|
|
|
publicIp = "129.199.195.129"; # sync with meta
|
|
|
|
|
|
|
|
linkPrefixedIp = "${linkIp}/${linkPrefix}";
|
2024-03-27 10:26:31 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
systemd.network = {
|
|
|
|
networks = {
|
2024-03-27 15:38:46 +01:00
|
|
|
"10-enp67s0f0np0" = {
|
2024-03-27 10:26:31 +01:00
|
|
|
name = "enp67s0f0np0";
|
|
|
|
networkConfig = {
|
|
|
|
VLAN = [ vlanName ];
|
|
|
|
|
|
|
|
LinkLocalAddressing = false;
|
|
|
|
LLDP = false;
|
|
|
|
EmitLLDP = false;
|
|
|
|
IPv6AcceptRA = false;
|
|
|
|
IPv6SendRA = false;
|
|
|
|
};
|
|
|
|
};
|
2024-03-27 15:38:46 +01:00
|
|
|
"10-${vlanName}" = {
|
2024-03-27 10:26:31 +01:00
|
|
|
name = vlanName;
|
2024-03-27 15:38:46 +01:00
|
|
|
address = [ linkPrefixedIp ];
|
|
|
|
routes = [
|
|
|
|
{
|
|
|
|
routeConfig = {
|
|
|
|
PreferredSource = publicIp;
|
|
|
|
Gateway = upstreamRouterIp;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2024-03-27 10:26:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
netdevs = {
|
2024-03-27 15:38:46 +01:00
|
|
|
"10-vlan-uplink-cri" = {
|
2024-03-27 10:26:31 +01:00
|
|
|
netdevConfig = {
|
|
|
|
Name = vlanName;
|
|
|
|
Kind = "vlan";
|
|
|
|
};
|
|
|
|
vlanConfig = {
|
|
|
|
Id = 223;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|