ipv6 baby.

This commit is contained in:
Dmitry Voronin 2024-11-29 03:31:59 +03:00
parent 0d0575f05d
commit a6aa127d6c
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 48 additions and 20 deletions

View file

@ -91,6 +91,9 @@
# Style. # Style.
(mkLockedPref "toolkit.legacyUserProfileCustomizations.stylesheets" true) (mkLockedPref "toolkit.legacyUserProfileCustomizations.stylesheets" true)
# Prefer IPv6.
(mkLockedPref "network.dns.preferIPv6" true)
]; ];
userChrome = '' userChrome = ''

View file

@ -20,7 +20,7 @@ in {
services.openssh.openFirewall = false; services.openssh.openFirewall = false;
# NOTE: Debugging. # NOTE: Debugging.
# systemd.services."systemd-networkd".environment.SYSTEMD_LOG_LEVEL = "debug"; systemd.services."systemd-networkd".environment.SYSTEMD_LOG_LEVEL = "debug";
# Wan configuration. # Wan configuration.
systemd.network = { systemd.network = {
@ -29,38 +29,49 @@ in {
matchConfig.Name = wan; matchConfig.Name = wan;
linkConfig.RequiredForOnline = "carrier"; linkConfig.RequiredForOnline = "carrier";
dhcpV4Config = { dhcpV4Config = {
ClientIdentifier = "mac";
UseDNS = false; UseDNS = false;
UseRoutes = true; UseRoutes = true;
ClientIdentifier = "mac";
}; };
dhcpV6Config = { dhcpV6Config = {
DUIDRawData = "00:03:00:01:a8:a1:59:47:fd:a2";
DUIDType = "vendor";
UseDNS = false; UseDNS = false;
WithoutRA = "solicit";
# PrefixDelegationHint = "::/56";
}; };
networkConfig = { networkConfig = {
DHCP = "yes"; DHCP = "yes";
DNS = "1.1.1.1"; DNS = "1.1.1.1";
IPv6AcceptRA = true; IPv6AcceptRA = false;
IPv6SendRA = false;
DHCPPrefixDelegation = true;
};
dhcpPrefixDelegationConfig = {
UplinkInterface = ":self";
SubnetId = 0;
Announce = false;
}; };
}; };
"20-enp6s0f0" = { "20-enp6s0f0" = {
linkConfig.RequiredForOnline = "enslaved";
matchConfig.Name = "enp6s0f0"; matchConfig.Name = "enp6s0f0";
networkConfig.Bridge = lan; networkConfig.Bridge = lan;
linkConfig.RequiredForOnline = "enslaved";
}; };
"20-enp6s0f1" = { "20-enp6s0f1" = {
linkConfig.RequiredForOnline = "enslaved";
matchConfig.Name = "enp6s0f1"; matchConfig.Name = "enp6s0f1";
networkConfig.Bridge = lan; networkConfig.Bridge = lan;
linkConfig.RequiredForOnline = "enslaved";
}; };
"20-enp7s0f0" = { "20-enp7s0f0" = {
linkConfig.RequiredForOnline = "enslaved";
matchConfig.Name = "enp7s0f0"; matchConfig.Name = "enp7s0f0";
networkConfig.Bridge = lan; networkConfig.Bridge = lan;
linkConfig.RequiredForOnline = "enslaved";
}; };
"20-enp7s0f1" = { "20-enp7s0f1" = {
linkConfig.RequiredForOnline = "enslaved";
matchConfig.Name = "enp7s0f1"; matchConfig.Name = "enp7s0f1";
networkConfig.Bridge = lan; networkConfig.Bridge = lan;
linkConfig.RequiredForOnline = "enslaved";
}; };
"30-${lan}" = { "30-${lan}" = {
matchConfig.Name = lan; matchConfig.Name = lan;
@ -71,16 +82,30 @@ in {
]; ];
routes = [ routes = [
# Wifi 5G clients. # Wifi 5G clients.
{ routeConfig = { {
Gateway = wifi;
Destination = "192.168.1.0/24"; Destination = "192.168.1.0/24";
}; }
# Wifi 2G clients.
{ routeConfig = {
Gateway = wifi; Gateway = wifi;
}
# Wifi 2G clients.
{
Destination = "192.168.2.0/24"; Destination = "192.168.2.0/24";
}; } Gateway = wifi;
}
]; ];
networkConfig = {
DHCPPrefixDelegation = true;
IPv6AcceptRA = false;
IPv6SendRA = true;
};
ipv6SendRAConfig = {
# EmitDNS = false;
# DNS = "";
};
dhcpPrefixDelegationConfig = {
UplinkInterface = wan;
SubnetId = 1;
Announce = true;
};
}; };
}; };