Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: sysctl.conf still being ignored on boot

  1. #11
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,004
    Blog Entries
    2

    Default Re: sysctl.conf still being ignored on boot

    Quote Originally Posted by iDominic42 View Post
    The entry in /etc/sysctl.conf is this:

    Code:
    net.ipv6.conf.all.disable_ipv6 = 1
    This is - as far as I am aware - the normal way to disable ipv6 in linux

    You can apply it manually after putting that line in /etc/sysctl.conf by running

    Code:
    sudo sysctl -p
    This works, and running ip a afterwards shows that I do not have an ipv6 address

    However, it is not applied after a reboot.

    This is probably nothing to do with the problem I currently have - I suspect a DNS problem - however I am surprised that adding a perfectly valid setting to sysctl.conf is ignored at boot time


    So, why does tumbleweed ignore /etc/sysctl.conf at boot time?


    This may well not be the root cause of the issue I am experiencing, it's just that this is on a laptop that gets used at work and at home, and at work - with no ipv6 - I do not have delays opening web sites which I am thinking are to do with DNS lookups

    So I was simply looking to eliminate an obvious difference which is that at home my router gives me an ipv6 address, and I have an ipv6 nameserver in /etc/resolv.conf

    But ignore that

    This is about why settings in /etc/sysctl.conf are not applied on boot.in Tumbleweed but do work fine if manually run in


    Regards
    The way you're executing the command may not work, it may work only because the environment assumes what you're not providing.

    As I described in my prior post,
    Enter the full command using "sysctl" -- You can read the MAN page for a full explanation what it does.
    I also recommend the "-w" option although it may not be needed, it's one of those things that might be required if certain conditions exist (ie already exists as a sysctl setting?) but if that condition doesn't exist, then it's not going to cause a problem.

    So,
    Code:
    sysctl -w net.ipv6.conf.all.disable_ipv6 = 1
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  2. #12
    Join Date
    Sep 2012
    Posts
    5,363

    Default Re: sysctl.conf still being ignored on boot

    Quote Originally Posted by iDominic42 View Post
    This works, and running ip a afterwards shows that I do not have an ipv6 address
    However, it is not applied after a reboot.
    You seem to believe that you cannot have IPv6 with net.ipv6.conf.all.disable_ipv6 = 1. Guess what - you can.

    This is about why settings in /etc/sysctl.conf are not applied on boot.in Tumbleweed
    You continue to claim it but so far you did not provide single line of evidence that it is true. Show output of
    Code:
    grep -r . /proc/sys/net/ipv6/conf/*/disable_ipv6
    immediately after boot.

    And finally show your actual content of /etc/sysctl.conf.

  3. #13

    Default Re: sysctl.conf still being ignored on boot

    Quote Originally Posted by arvidjaar View Post
    You seem to believe that you cannot have IPv6 with net.ipv6.conf.all.disable_ipv6 = 1. Guess what - you can.


    You continue to claim it but so far you did not provide single line of evidence that it is true. Show output of
    Code:
    grep -r . /proc/sys/net/ipv6/conf/*/disable_ipv6
    immediately after boot.

    And finally show your actual content of /etc/sysctl.conf.


    OK, so I ran this immediately after a reboot

    Code:
    sudo grep -r . /proc/sys/net/ipv6/conf/*/disable_ipv6
    
    /proc/sys/net/ipv6/conf/all/disable_ipv6:1
    /proc/sys/net/ipv6/conf/default/disable_ipv6:1
    /proc/sys/net/ipv6/conf/enp2s0/disable_ipv6:0
    /proc/sys/net/ipv6/conf/lo/disable_ipv6:1
    /proc/sys/net/ipv6/conf/wlp3s0/disable_ipv6:0
    So ipv6 is partly disabled, but not against my two network cards, and I have an inet6 address against the wireless (which is the one with a connection)

    Code:
    ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        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: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
        link/ether 68:f7:28:cb:56:d9 brd ff:ff:ff:ff:ff:ff
    3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether 34:e6:ad:a4:fa:e2 brd ff:ff:ff:ff:ff:ff
        inet 10.10.3.241/24 brd 10.10.3.255 scope global dynamic noprefixroute wlp3s0
           valid_lft 7094sec preferred_lft 7094sec
        inet6 fe80::d03c:222c:30ac:df7e/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    Note the inet6 address


    Then I manually run


    Code:
    sudo sysctl -p
    which returns the result of the only uncommented line is /etc/sysctl.conf (and sets it)


    Code:
    net.ipv6.conf.all.disable_ipv6 = 1
    The I immediately re-run the earlier command:

    Code:
    sudo grep -r . /proc/sys/net/ipv6/conf/*/disable_ipv6
    
    /proc/sys/net/ipv6/conf/all/disable_ipv6:1
    /proc/sys/net/ipv6/conf/default/disable_ipv6:1
    /proc/sys/net/ipv6/conf/enp2s0/disable_ipv6:1
    /proc/sys/net/ipv6/conf/lo/disable_ipv6:1
    /proc/sys/net/ipv6/conf/wlp3s0/disable_ipv6:1

    And ipv6 is now disabled against my network interfaces, which I can see by running ip a again

    Code:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        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: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
        link/ether 68:f7:28:cb:56:d9 brd ff:ff:ff:ff:ff:ff
    3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether 34:e6:ad:a4:fa:e2 brd ff:ff:ff:ff:ff:ff
        inet 10.10.3.241/24 brd 10.10.3.255 scope global dynamic noprefixroute wlp3s0
           valid_lft 6910sec preferred_lft 6910sec
    As I (I thought, already) said, the only uncommented line in /etc/sysctl.conf is

    Code:
    net.ipv6.conf.all.disable_ipv6 = 1
    So my conclusion - which I admit may be erroneous - is that I have an inet6 / ipv6 adress until I manually run sudo sysctl -p

    And after doing that, I don't have an inet6 / ipv6 address




    Please note this is not specifically about ipv6 - it just happens that I attempted to use a method to disable it on Tumbleweed, that I know persists on debian systems, and it does not appear to work in the same way here ie on boot

  4. #14
    Join Date
    Sep 2012
    Posts
    5,363

    Default Re: sysctl.conf still being ignored on boot

    Quote Originally Posted by iDominic42 View Post
    Code:
    sudo grep -r . /proc/sys/net/ipv6/conf/*/disable_ipv6
    
    /proc/sys/net/ipv6/conf/all/disable_ipv6:1
    /proc/sys/net/ipv6/conf/default/disable_ipv6:1
    /proc/sys/net/ipv6/conf/enp2s0/disable_ipv6:0
    /proc/sys/net/ipv6/conf/lo/disable_ipv6:1
    /proc/sys/net/ipv6/conf/wlp3s0/disable_ipv6:0
    So your settings are correctly applied on boot. At which point this thread may be considered closed.
    So ipv6 is partly disabled, but not against my two network cards
    Any network management application is free to re-enable IPv6 for each interface individually. And this becomes off-topic on this subforum (strictly speaking, it has already been off-topic ...).
    Please note this is not specifically about ipv6
    It is due to semantic of net/ipv6/conf/*/disable_ipv6 sysctl.

  5. #15
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,004
    Blog Entries
    2

    Default Re: sysctl.conf still being ignored on boot

    FYI
    From
    https://wiki.archlinux.org/index.php...ration_(SLAAC)

    If you are using NetworkManager then it automatically enables IPv6 addresses if there are advertisements for them in the network.
    Which essentially means that something else on the network is "broadcasting" (I'm quoting since in IPv6 there is not supposed to be any "broadcasts" but there are "advertisements") a query for IPv6 so Network Manager is simply responding

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •