2

I have a machine running CentOS 5.8. IPv6 was disabled by creating a file /etc/modprobe.d/disable-ipv6 with the following contents:

options ipv6 disable=1

Removing the file and rebooting the machine should re-enable IPv6. Is there a way to enable IPv6 without having to reboot?


Additional info:

I found something that said to echo 0 > /proc/sys/net/ipv6/conf/interface/disable_ipv6, but /proc/sys/net/ipv6 does not exist on this machine.

sysctl shows nothing about IPv6:

# sysctl -a | grep -i ipv6 | wc -l
0

The ipv6 kernel module is loaded:

#lsmod | grep ipv6
ipv6                  437857  1 cnic

Attempting to remove it throws an error:

# modprobe -vnr ipv6
FATAL: Module ipv6 is in use.

# modprobe --show-depends ipv6
insmod /lib/modules/2.6.18-308.13.1.el5/kernel/crypto/crypto_api.ko 
insmod /lib/modules/2.6.18-308.13.1.el5/kernel/net/xfrm/xfrm_nalgo.ko 
insmod /lib/modules/2.6.18-308.13.1.el5/kernel/net/ipv6/ipv6.ko

Modprobe says crypto_api depends on the ipv6 module. Unloading and loading that on a running webserver does not sound like best idea.

I tried rmmod as suggested by @Zoredache:

# rmmod -v ipv6
ERROR: Module ipv6 is in use by cnic
hcsteve
  • 341
  • 2
  • 7

3 Answers3

1

It is possible to reload the ipv6 driver without a reboot

$ /sbin/lsmod |grep ipv
ipv6                  438625  3 rdma_cm,ib_addr,cnic

# loop through all the dependent modules, and unload them 
$ rmmod cnic ...
$ rmmod rdma_cm

$ modprobe ipv6 disable=0

You may need to turn off the n/w, but this should avoid the reboot.

0

Looks like it's not possible. I ended up rebooting the machine to enable IPv6. I'd love for someone to prove me wrong since I have a slew of other machines configured the same way.

hcsteve
  • 341
  • 2
  • 7
0

i've got it working,

before:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever

do this :

$ modprobe ipv6
$ sysctl net.ipv6.conf.all.disable_ipv6=0

after:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever

hope this helps

pvc
  • 101
  • 3