All Products
Search
Document Center

:How do I resolve the 'error: "net.ipv6.conf.all.disable_ipv6" is an unknown key' error on a Linux ECS instance?

Last Updated:Aug 13, 2026

This topic describes why the 'error: "net.ipv6.conf.all.disable_ipv6" is an unknown key' error occurs when you run the sysctl -p command on a Linux ECS instance and provides solutions.

Symptoms

When you run the sysctl -p command on a Linux ECS instance, the following error message appears.

error: "net.ipv6.conf.all.disable_ipv6" is an unknown key

Causes

This error may occur for the following reasons:

  • The IPv6 feature is disabled, but the related parameter settings are not deleted from or commented out in the sysctl.conf kernel parameter file of the ECS instance.

  • The IPv6 feature is enabled, but the related parameter settings are not enabled in the sysctl.conf kernel parameter file, or the IPv6 module is missing.

Solution

To resolve this issue, modify the sysctl.conf kernel parameter configuration file.

  1. Connect to the ECS instance remotely.

    For more information, see Connection methods overview.

  2. Modify the sysctl.conf kernel parameter configuration file.

    • Disable IPv6.

      1. Run the following command to open and edit the sysctl.conf kernel parameter configuration file.

        vim /etc/sysctl.conf
      2. Press i to enter edit mode.

      3. Add a number sign (#) before the IPv6 parameter to comment it out, or delete the parameter setting.

        #net.ipv6.conf.all.disable_ipv6 = 1
      4. Press the Esc key and enter :wq to save the changes and exit edit mode.

    • Enable IPv6.

      1. Run the following command to open and edit the sysctl.conf kernel parameter configuration file.

        vim /etc/sysctl.conf
      2. Press i to enter edit mode.

      3. Modify the kernel parameter to enable the IPv6 configuration.

        net.ipv6.conf.all.disable_ipv6 = 0
      4. Press the Esc key and enter :wq to save the changes and exit edit mode.

      5. Run the following command to load the IPv6 module.

        modprobe ipv6
  3. Run the sysctl -p command again. The issue is resolved if no error message appears.