ditsoft

เข้าสู่ระบบจัดการข้อมุล



Server Configuration: (dhcp6s) IPv6

As I am building up a total IPv6 network of Linux servers, today I will write about how we can configure DHCPv6 server & client. I tested only on CentOS based platforms. So lets start…

Server Configuration: (dhcp6s)

เริ่มต้นก็ติดตั้ง  DHCPv6 

# yum -y install dhcpv6
หลังจากนั้นก็แก้ไขค่าที่เราติตตั้งไว้ เพื่อให้ทำ forwarding of IPv6 packets:
# nano /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"

จากนั้นจัดการ interface สำหรับ DHCPv6 server:
# nano /etc/sysconfig/dhcp6s

DHCP6SIF=eth0
DHCP6SARGS=

แก้ไข DHCPv6 server configuration file โดยเพิ่มบรรทัดดังต่อไปนี้ เพื่อให้ทำการแจกจ่าย IPv6:
# cp /usr/share/doc/dhcpv6-*/dhcp6s.conf /etc/
# nano /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:3c8:4107::3 csc.ku.ac.th;
link AAA {
pool{
range 2002:3c8:1303:4110::100 to 
2002:3c8:1303:4110::500/64;
prefix 2002:3c8:1303:4110::/64;
};
};
};
 start DHCPv6 server daemon:
# service network restart && service dhcp6s start && chkconfig dhcp6s on

Client Configuration: (dhcp6c)

start client configuration by installing DHCPv6 client :

# yum –y install dhcpv6_client
enable IPv6 networking on the client:
# vi /etc/sysconfig/network

NETWORKING_IPV6=yes

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

edit the main DHCPv6 client configuration file as following:
# cp /usr/share/doc/dhcpv6_client-*/dhcp6c.conf /etc/
# nano /etc/dhcp6c.conf
interface eth0 { 
send rapid-commit;
request domain-name-servers;
};
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