make BGP dummy interface addresses configurable
This commit is contained in:
@@ -94,6 +94,7 @@ Cost: $10/month + tax for two Linodes with pooled 2TB traffic quota.
|
||||
"2001:db8:9f2b::4"
|
||||
];
|
||||
advertisedSubnets = [ "2001:db8:a7c4::/56" ];
|
||||
extraAddresses = [ "2001:db8:0:ff::1/128" ]; # shared IP for WireGuard endpoint
|
||||
routeMap = "primary"; # or "secondary" for the backup server
|
||||
};
|
||||
};
|
||||
|
||||
@@ -79,6 +79,13 @@ in {
|
||||
description = "List of IPv6 subnets to advertise via BGP";
|
||||
};
|
||||
|
||||
extraAddresses = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "2001:db8:0:ff::1/128" ];
|
||||
description = "List of IP addresses to bind to the dummy interface for shared WireGuard endpoint or other HA services";
|
||||
};
|
||||
|
||||
routeMap = mkOption {
|
||||
type = types.enum [ "primary" "secondary" ];
|
||||
description = "BGP route map type (primary/secondary for HA)";
|
||||
@@ -140,7 +147,7 @@ in {
|
||||
|
||||
systemd.network.networks."20-shared-dummy" = mkIf cfg.bgp.enable {
|
||||
matchConfig.Name = "shared0";
|
||||
address = [ "2600:3c08:e002:6cff::1/128" ];
|
||||
address = cfg.bgp.extraAddresses;
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
|
||||
Reference in New Issue
Block a user