nixos/tests: adapt systemd-networkd-ipv6-prefix-delegation

This commit is contained in:
Vincent Haupert 2021-01-30 13:25:32 +01:00
parent e6660ffe7f
commit 730da50f85
No known key found for this signature in database
GPG Key ID: A8B605E96F82B4E4

View File

@ -165,7 +165,7 @@ import ./make-test-python.nix ({pkgs, ...}: {
# accept the delegated prefix. # accept the delegated prefix.
PrefixDelegationHint = "::/48"; PrefixDelegationHint = "::/48";
}; };
ipv6PrefixDelegationConfig = { ipv6SendRAConfig = {
# Let networkd know that we would very much like to use DHCPv6 # Let networkd know that we would very much like to use DHCPv6
# to obtain the "managed" information. Not sure why they can't # to obtain the "managed" information. Not sure why they can't
# just take that from the upstream RAs. # just take that from the upstream RAs.
@ -179,24 +179,20 @@ import ./make-test-python.nix ({pkgs, ...}: {
name = "eth2"; name = "eth2";
networkConfig = { networkConfig = {
Description = "Client interface"; Description = "Client interface";
# the client shouldn't be allowed to send us RAs, that would be weird. # The client shouldn't be allowed to send us RAs, that would be weird.
IPv6AcceptRA = false; IPv6AcceptRA = false;
# Just delegate prefixes from the DHCPv6 PD pool. # Delegate prefixes from the DHCPv6 PD pool.
# If you also want to distribute a local ULA prefix you want to DHCPv6PrefixDelegation = true;
# set this to `yes` as that includes both static prefixes as well IPv6SendRA = true;
# as PD prefixes.
IPv6PrefixDelegation = "dhcpv6";
}; };
# finally "act as router" (according to systemd.network(5))
ipv6PrefixDelegationConfig = {
RouterLifetimeSec = 300; # required as otherwise no RA's are being emitted
# In a production environment you should consider setting these as well: # In a production environment you should consider setting these as well:
# ipv6SendRAConfig = {
#EmitDNS = true; #EmitDNS = true;
#EmitDomains = true; #EmitDomains = true;
#DNS= = "fe80::1"; # or whatever "well known" IP your router will have on the inside. #DNS= = "fe80::1"; # or whatever "well known" IP your router will have on the inside.
}; # };
# This adds a "random" ULA prefix to the interface that is being # This adds a "random" ULA prefix to the interface that is being
# advertised to the clients. # advertised to the clients.