Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to check whether linux supports ipv6

Shulou Source: shulou.com Published: 2022-05-31 10:46:20 09月18日 Update

This article mainly explains "how to check whether linux supports ipv6". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to check whether linux supports ipv6".

There are two ways to view it: 1. Execute the "ifconfig" command to display the IP address, view the output information, and support ipv6 if it contains "inet6" information. 2. Execute the "netstat-tuln" command to detect the IP monitored by the service. If the output contains "tcp6" information, then ipv6 is supported.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Check whether the linux server supports ipv6

Method 1: use the ifconfig command to check whether your IP address contains an IPv6 address

If the output has the line "inet6" indicating that ipv6 is supported, if ipv6 is not supported, the output will not have "inet6".

Method 2: use the netstat-tuln command to check whether there is an address in IPv6 format in the IP that the service is listening to.

Ipv6 is supported if the output contains "tcp6" information.

Expand knowledge: how to turn on IPV6

1 、 vim / etc/sysctl.conf

Change the following value to 0. If not, add it.

Net.ipv6.conf.all.disable_ipv6 = 0

Net.ipv6.conf.default.disable_ipv6= 0

Net.ipv6.conf.lo.disable_ipv6 = 0

2 、 vim / etc/modprobe.d/disable_ipv6.conf

Change the following value to 0. If not, add it.

Options ipv6 disable= 0

3 、 vim / etc/sysconfig/network

Modify the following values yes. If not, you can add them.

NETWORKING IPV6=yes

So far, the server-side support for ipv6 has been modified.

4. Restart the server to test whether ipv6 is supported.

Restart command:

Service network restart

After rebooting, ifconfig looks at the information about ipv6 and sees the output about ipv6.

Thank you for your reading, the above is the content of "how to check whether linux supports ipv6". After the study of this article, I believe you have a deeper understanding of how to check whether linux supports ipv6, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Support output information commands services addresses results values servers face-to-face learning content methods knowledge package monitoring one line that is ideas situations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft vpn Xiaomi Shulou Technology Linux