How To Test Linux Operating System for IPv6 Networking Support

Q. Before I can start using IPv6 on a Linux server, how do I test, whether my Linux server system is IPv6 ready or not? If not, how do I enable IPv6 support under Redhat Enterprise Linux version 5?

A. Linux kernel has IPv6 support since 1996. All you need to do is compile kernel with IPv6 networking support. However, there is easy way to find out if Linux kernel compiled with IPv6 or not.

Task: Check for IPv6 support in the current running kernel

To check, whether your current running kernel supports IPv6, take a look into your /proc-file-system. Following entry must exists:
$ cat /proc/net/if_inet6

00000000000000000000000000000001 01 80 10 80       lo
fe8000000000000002179afffe0af644 03 40 20 80      ra0
fe800000000000000219d1fffe2abaa8 02 40 20 80     eth0

IPv6 protocol stack for Linux via ipv6 module – Turn on IPv6 Support

ipv6 module has IPv6 protocol stack for Linux. If above cat command fails, it is quite likely, that the IPv6 module is not loaded. Just login as root and type the following command, enter:
# modprobe ipv6
Now test again, enter:
$ lsmod | grep ipv6

ipv6                  411425  18

Try following simple shell conditional code to display human readable output, enter:
$ [ -f /proc/net/if_inet6 ] && echo 'IPv6 ready system!' || echo 'No IPv6 support found! Compile the kernel!!'

IPv6 ready system!

Further readings:

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.