On 9/25/24 6:00 AM, Walter Dnes wrote:
>   My system is actually very stable.  In the shitstorm that erupted on
> this list at "ipv6" enabling I did not see any mention of sysctl.  In my
> /etc/default/grub file I have...
> 
> GRUB_CMDLINE_LINUX_DEFAULT="noexec=on net.ifnames=0 ipv6.disable=1"
> 
> With this setting is it guaranteed that a program compiled with "ipv6"
> flag will not try IPV6 first and timeout before dropping down to IPV4?


(Note that the sysctl dynamically disables ipv6 support so that you can
manually toggle it after boot, e.g. for testing. The kernel command line
option hard-disables it at boot time. Your choice which to use, I guess.)


If the kernel has disabled ipv6 there is no timeout because no attempt
is made.

If the kernel has enabled ipv6 then an attempt will be made and it may:

- succeed, if your network has functioning ipv6 connectivity

- fail instantly, if your network is correctly configured (you may not
  be in control of the network you use)

- fail after a lengthy timeout after your network "valiantly" attempts
  to send your connection attempt into a black hole of doom

As Arsen mentioned, RFC 8305 defines the "Happy Eyeballs" mechanism for
trying both ipv4 and ipv6 at the same time, incurring the cost of
slightly more traffic for the benefit of avoiding timeouts (since ipv4
will still succeed just as fast regardless of whether a parallel ipv6 is
timing out, and as soon as ipv4 succeeds, the ipv6 timeout is ignored
and made redundant).

Not all software uses Happy Eyeballs. In particular, emerge --sync does
not, because the python library that portage uses to check for updated
PGP keys used when validating manifests, does not. This pained me
tremendously since "emerge --sync" would literally hang forever, until I
disabled ipv6 via the kernel. Note that since Aug 31, 2021, Gentoo's
package for python has not supported USE=ipv6, but the sysctl works
quite well.


>   How OS-specific is this?  I "asked Mr. Google" and the NordVPN web
> page recommended for Redhat based distros...


It is specific to the linux kernel, that is all. You may replace "all"
with the name of a machine-specific interface (as listed by "ip addr")
to express settings that are specific to a given interface. Most people
do not need that flexibility and simply want all interfaces to look the
same.


-- 
Eli Schwartz

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to