DHCPv6

Server Configuration: (dhcp6s)

First we will install DHCPv6 RPM on the server:

# yum -y install dhcpv6

After installing the above mentioned RPM we will turn on global IPv6 initialization and will also enable forwarding of IPv6 packets:

# vi /etc/sysconfig/network

NETWORKING_IPV6=yes

IPV6FORWARDING=yes

Then we will turn on IPv6 on a particular device and we will also a set an IPv6 address for that device by adding the following lines:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

IPV6INIT=yes

IPV6ADDR="2002:1851:c622:1::1/64"

Now we will specify the interface for DHCPv6 server:

# vi /etc/sysconfig/dhcp6s

DHCP6SIF=eth0

DHCP6SARGS=

Next, we will edit the main DHCPv6 server configuration file as following:

# cp /usr/share/doc/dhcpv6-*/dhcp6s.conf /etc/

# vi /etc/dhcp6s.conf

interface eth0 {

server-preference 255;

renew-time 60;

rebind-time 90;

prefer-life-time 130;

valid-life-time 200;

allow rapid-commit;

option dns_servers 2002:1851:c622:1::1 example.com;

link AAA {

pool{

range 2002:1851:c622:1::2 to 2002:1851:c622:1::9/64;

prefix 2002:1851:c622:1::/64;

};

};

};

Finally, we will start DHCPv6 server daemon:

# service network restart && service dhcp6s start && chkconfig dhcp6s on

Client Configuration: (dhcp6c)

We will start client configuration by installing DHCPv6 client RPM:

# yum –y install dhcpv6_client

Then we will enable IPv6 networking on the client:

# vi /etc/sysconfig/network

NETWORKING_IPV6=yes

Next we will configure a particular device to participate as DHCPv6 client by adding the following lines to that device configuration file:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

IPV6INIT=yes

DHCPV6C=yes

After that we will edit the main DHCPv6 client configuration file as following:

# cp /usr/share/doc/dhcpv6_client-*/dhcp6c.conf /etc/

# vi /etc/dhcp6c.conf

interface eth0 {

send rapid-commit;

request domain-name-servers;

};

Finally we will restart networking on the client to acquire an IPv6 address from the DHCPv6 server:

# service network restart

That’s all. If everything goes right we will see a global IPv6 address on the client by running:

# ifconfig eth0

Source: http://blog.zakir.net/index.php?/archives/3-Configuring-DHCPv6-on-Linux.html