IPv6 support in Linux
Checking the /proc/net/if_net6
Checking the /proc/sys/net/ipv6/conf/*/disable_ipv6
Introdution
IPv6 support for Linux appeard in the kernel 2.4 (2001). To the kernel version 2.4.2 IPv6 implementation is marked as experimental. At present each Linux distributuion has support for IPv6, which is also enabled by default.
Before proceeding to services and applications configuration in an IPv6 envirionment, you should check that the operationg system has enabled IPv6 service. Without this, any communication using this protocol will be impossible. This can be done in 3 ways.
Checking by ping6 command
Type in the command line:
ping6 ::1
When IPv6 is enabled, the ping command returns the replies. Otherwise, a message appears:
connect: Network is unreachable
Checking the /proc/net/if_net6
Type in the command line:
cat /proc/net/if_inet6
As a resault there should appear all network interfaces and their IPv6 addresses. If the file is empty, the system is not configured to support IPv6.
Checking the /proc/sys/net/ipv6/conf/*/disable_ipv6
In /proc/sys/net/ipv6/conf directory there are IPv6 configurations of network interfaces (eg lo, eth0, eth1). besides netwokr interfeces there is also cumulative configuration for all network interfaces in the "all" directory. In the "default" directory there is default configuration used while creation of new interfaces.
To verify that all interfaces have enabled IPv6 support, type in the command line:
cat /proc/sys/net/ipv6/conf/*/disable_ipv6
As a resault, there should be returned zeros (the number of results is the number of network interfaces +2). When there is a vaule equal to 1, you need to locate in which directory is disable_ipv6 with such value. It can be done in this way:
for i in `ls /proc/sys/net/ipv6/conf`; do echo -en "$it"; cat /proc/sys/net/ipv6/conf/$i/disable_ipv6; done
Here is a sample result:
all 0
default 0
eth0 0
eth1 0
eth2 0
lo 1
You must pass value 0, where you find 1. It can be done in this way:
echo 0 > /proc/sys/net/ipv6/conf/lo/disable_ipv6