Disable IPv6 on Red Hat Enterprise linux 6

You might be saying that IPv6 is the bees knees, and I must be crazy for wanting to disable it.  Well that is partially true.  In this case I need to disable it because my machinne is on a network that can only handle IPv4 packets.  It also slowed down connections on the machine because of how the network was set up.  So basically it was necessary in order to speed up the networking on the server.

add the “options single-request” to the /etc/resolv.conf file

nameserver 4.2.2.1
nameserver 4.2.2.2
options single-request

add “NETWORKING_IPV6=off” to /etc/sysconfig/network

NETWORKING_IPV6=off

next edit the /etc/modprobe.d/ECS.conf file and add “alias ipv6 off” and “net-pf-10″

alias ipv6 off
alias net-pf-10 off

remove the running module

# rmmod ipv6

Then restart network by

# service network restart

or reboot to box to make sure it works after a reboot with

# reboot

To test to make sure that the changes have worked, you should not get anything returned

# lsmod | grep ipv6

You can also run “ifconfig -a” and make sure you do not see the fowling

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1

should see

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
UP LOOPBACK RUNNING  MTU:16436  Metric:1