nixos-module/container/upstream: enable dhcpv6 prefix delegation
This commit is contained in:
parent
0ea6f38867
commit
9615317bf6
|
@ -12,8 +12,25 @@ let
|
||||||
else null;
|
else null;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.network.networks = builtins.mapAttrs (_: { upstream, ... }: {
|
systemd.network.networks = {
|
||||||
|
core = {
|
||||||
|
# systemd-networkd only requests Prefix Delegation via DHCPv6 on
|
||||||
|
# the upstream interface if another interface is configured for it.
|
||||||
|
# without this, the static ipv6 subnet won't be routed to us.
|
||||||
|
extraConfig = ''
|
||||||
|
[Network]
|
||||||
|
IPv6PrefixDelegation=dhcpv6
|
||||||
|
'';
|
||||||
|
dhcpV6PrefixDelegationConfig = {
|
||||||
|
SubnetId = "81";
|
||||||
|
# because we have static addresses, we don't actually use this
|
||||||
|
Assign = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} // builtins.mapAttrs (_: { upstream, ... }: {
|
||||||
DHCP = "yes";
|
DHCP = "yes";
|
||||||
|
networkConfig.IPv6AcceptRA = true;
|
||||||
|
dhcpV6Config.PrefixDelegationHint = "::/56";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
[CAKE]
|
[CAKE]
|
||||||
|
|
Loading…
Reference in New Issue