Operating System - Linux
1826751 Members
3179 Online
109702 Solutions
New Discussion

How t o configure DHCPv6 client to start at bootup

 
priyanka_2
Occasional Contributor

How t o configure DHCPv6 client to start at bootup

Can anyone please tell me how to enable Dhcpv6 client at startup of the system.
I tried with chkconfig. But chkconfig list is not listing the dhcp6c to make it on.

My NIC card is enabled for automatic configuration only.
I'm getting ip address only when I execute the command 'dhcp6c -f eth0'.

once I got the ip, if I restart the interface, then i'm not able to get ip address from the dhcp server. I'm getting only when i run the cmd 'dhcp6c -f eth0' again.
2 REPLIES 2
Stuart Browne
Honored Contributor

Re: How t o configure DHCPv6 client to start at bootup

Things to note:

if [ "${NETWORKING_IPV6}" = "yes" ]; then
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhcp6c ]; then
/sbin/dhcp6c ${DEVICE};
dhcp6_pid=(`/bin/ps -eo 'pid,args' | /bin/grep "dhcp6c ${DEVICE}" | egrep -v grep`);
echo ${dhcp6_pid[0]} > /var/run/dhcp6c_${DEVICE}.pid
fi;
fi

This is from '/etc/sysconfig/network-scripts/ifup-eth'.

Basically it's saying that '/etc/sysconfig/network' needs to have 'NETWORKING_IPV6=yes'. It also needs '/etc/sysconfig/network-scripts/ifcfg-eth0' (or whichever interface you're using) have 'DHCPV6C=Yes' as well.

Refer to '/usr/share/doc/initscripts-*/sysconfig.txt'.
One long-haired git at your service...
priyanka_2
Occasional Contributor

Re: How t o configure DHCPv6 client to start at bootup

Thanks Stuart

I have already done those configurations changes to /etc/sysconfig/network-scripts/ifup-eth0 file.

IPV6INIT=yes
DHCP6C=yes

I had these two lines in that file. After that also I'm facing the same problem.