2014-07-17

How to disable IPv6 on CentOS 6.x or Redhat 6.x (RHEL)

Setp 1  Check IPv6 on your CentOS or RHEL Server

$ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:8b:33:58 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.111/24 brd 192.168.0.255 scope global eth0
inet6 fe80::20c:29ff:fe8b:3358/64 scope link
valid_lft forever preferred_lft forever

Step 2  Diasble IPv6 on CentOS or RHEL Server

vi /etc/modprobe.d/disable-ipv6.conf

install ipv6 /bin/true

Step3 edit network and disable IPv6

vi /etc/sysconfig/network

NETWORKIING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAY=192.168.17.1

Step 4 Check your IP address on your server afrer reboot

$ ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 12:1b:50:ea:5a:1d brd ff:ff:ff:ff:ff:ff
    inet 192.168.17.41/24 brd 192.168.17.255 scope global eth0

see also How to disable ipv6 on CentOS 5.x

沒有留言:

張貼留言