Test Linux Operating System for IPv6 Networking Support

There is an easy way to find out if Linux kernel compiled with IPv6 or not.

To check, whether your current running kernel supports IPv6, Go to your /proc-file-system and look for the following entry:

cat /proc/net/if_inet6

Output should be like this:

fe80000000000000022590fffec1d836 02 40 20 80     eth0
fe80000000000000022590fffec1d837 03 40 20 80     eth1
00000000000000000000000000000001 01 80 10 80       lo

If above command fails, it is quite possible, that the IPv6 module is not loaded. Just login as root and enter the following command:

modprobe ipv6

Now to test again enter:

lsmod | grep ipv6
ipv6  334932  88

Following code can be use to display human readable output:

[ -f /proc/net/if_inet6 ] && echo 'IPv6 ready system!' || echo 'No IPv6 support found! Compile the kernel!!'
IPv6 ready system!