Web lists-archives.com

Re: Permanent Use of IPv4




Le 15/02/2019 à 20:03, Stephen P. Molnar a écrit :

On 02/15/2019 12:11 PM, Felix Miata wrote:
Reco composed on 2019-02-15 19:48 (UTC+0300):

On Fri, Feb 15, 2019 at 11:17:06AM -0500, Felix Miata wrote:
I made ipv6.disable=1 a standard option here at least as far back as 2011. If it ever caused a problem I never found out about it.

This totally disables the IPv6 subsystem. It has been reported to break stuff which rely on the IPv6 subsystem (even if not using IPv6). This is why it is recommended to use ipv6.disable_ipv6=1 which only disables IPv6 addresses on interfaces, not the whole IPv6 subsystem.

echo 'net.ipv6.conf.all.disable_ipv6 = 1' > /etc/sysctl.d/noipv6.conf

which did, indeed, result in the file being created.

However, there is only one problem, it didn't work.

This is what I get:

root@AbNormal:/home/comp# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 scope host lo
        valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
     link/ether bc:ee:7b:5e:83:36 brd ff:ff:ff:ff:ff:ff
     inet 192.168.1.123/24 brd 192.168.1.255 scope global dynamic enp2s0
        valid_lft 86306sec preferred_lft 86306sec
     inet6 2600:1700:4280:3690::2b/128 scope global dynamic
(...)

You can see that the loopback interface does not have the ::1/128 IPv6 address, so the file had some effect. I suspect a race condition : the setting was applied before enp2s0 was created and did not apply to it. Try to add this to the file to apply the setting to any new interface :

net.ipv6.conf.default.disable_ipv6 = 1

Also,  /proc/cmdline is empty.

What do you mean ? It cannot be empty and has nothing to do with sysctl config files anyway.