blade-{paris,tuvok}: split IPv4/IPv6 VRRP

This commit is contained in:
Luke Granger-Brown 2021-03-29 22:36:03 +01:00
parent 0d46b6d4fe
commit b0198cfa3d
2 changed files with 24 additions and 8 deletions

View file

@ -83,18 +83,26 @@ in {
}; };
}; };
services.keepalived = { services.keepalived = let
enable = true; mgmtBase = {
vrrpInstances.mgmtGateway = {
interface = "br-mgmt"; interface = "br-mgmt";
state = "MASTER"; state = "MASTER";
priority = 100; priority = 100;
};
in {
enable = true;
vrrpInstances.mgmtGateway = mgmtBase // {
virtualIps = [ virtualIps = [
{ addr = "10.100.0.1/23"; } { addr = "10.100.0.1/23"; }
{ addr = "92.118.28.1/24"; dev = "br-public"; } { addr = "92.118.28.1/24"; dev = "br-public"; }
{ addr = "2a09:a441::/48"; dev = "br-public"; }
]; ];
virtualRouterId = 1; virtualRouterId = 1;
}; };
vrrpInstances.mgmtGateway6 = mgmtBase // {
virtualIps = [
{ addr = "2a09:a441::/48"; dev = "br-public"; }
];
virtualRouterId = 2;
};
}; };
} }

View file

@ -118,18 +118,26 @@ in {
"0.0.0.0" "[::]" "0.0.0.0" "[::]"
]; ];
services.keepalived = { services.keepalived = let
enable = true; mgmtBase = {
vrrpInstances.mgmtGateway = {
interface = "br-mgmt"; interface = "br-mgmt";
state = "MASTER"; state = "MASTER";
priority = 50; priority = 50;
};
in {
enable = true;
vrrpInstances.mgmtGateway = mgmtBase // {
virtualIps = [ virtualIps = [
{ addr = "10.100.0.1/23"; } { addr = "10.100.0.1/23"; }
{ addr = "92.118.28.1/24"; dev = "br-public"; } { addr = "92.118.28.1/24"; dev = "br-public"; }
{ addr = "2a09:a441::/48"; dev = "br-public"; }
]; ];
virtualRouterId = 1; virtualRouterId = 1;
}; };
vrrpInstances.mgmtGateway6 = mgmtBase // {
virtualIps = [
{ addr = "2a09:a441::/48"; dev = "br-public"; }
];
virtualRouterId = 2;
};
}; };
} }