This post describes steps on how to disable IPv6 function in CentOS / RHEL 5. There are two cases to be considered here while disabling IPv6.
1. With Bonding interface
2. Without Bonding interface
Case 1 : Without Bonding interface
1. The easiest way to disable IPv6 functions is to forbid from loading ipv6.ko module. Thus add one line below onto /etc/modprobe.conf to forbid to install ipv6.ko module onto your kernel:
# vim /etc/modprobe.conf install ipv6 /bin/true
2. Reboot the server.
# sutdown -r now
Case 2 : With Bonding interface
1. In this case, it is impossible to forbid to install ipv6.ko onto kernel, since bonding.ko needs ipv6.ko. To forbid ipv6 from working actively even when ipv6.ko is loaded, add a line in /etc/modprobe.conf:
# vi /etc/modprobe.conf options ipv6 disable=1
2. Add a line onto /etc/sysconfig/network:
# vi /etc/sysconfig/network NETWORKING_IPV6=no
3. Disable ip6tables service:
# chkconfig ip6tables off
4. Reboot the server.
# shutdown -r now
Note: A loopback IPv6 query which can not be inhibited might occur even after this configuration, then ignore it.