小編因為工作需要 所以用Ubuntu 14.04 架ipv6,由eth1來發ipv6
1. sudo apt-get install isc-dhcp-server 先安裝套件
2. set a static IPv6 address for the Interface I want to run the DHCPv6 server from that is part of the IPv6 network subnet outside the DHCP range.
sudo ifconfig eth0 inet6 add 2001:db8:0:1::128/64 (或直接去設定固定ipv6,請參考這篇:http://pk5566.blogspot.tw/2011/01/ubuntuipv6.html)
3. Edit the /etc/dhcp/dhcpd6.conf file to configure the DHCPv6 range etc.
但設定檔只有#/etc/dhcp/dhcpd.conf所以來建一個設定檔給ipv6用.指令如下
#cd /etc/dhcp/
# cp dhcpd.conf dhcpd6.con
#nano dhcpd6.con
內容如下
range6 2001:db8:0:1::129 2001:db8:0:1::254;
4. Create the /var/lib/dhcp/dhcpd6.leases
是沒這檔案,需要自己建立,指令如下
#cd /var/lib/dhcp
# cp dhcpd.leases dhcpd6.leases
#nano dhcpd6.leases
把你裡面容全部砍光光 就可以了....YA,並存擋
5. Manually start the DHCPv6 server. 指令如下
#touch /var/lib/dhcp/dhcpd6.leases
#sudo chmod 666 /var/lib/dhcp/dhcpd6.leases
#chown dhcpd:dhcpd /var/lib/dhcp/dhcpd6.leases
Internet Systems Consortium DHCP Server 4.1.0 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Wrote 0 leases to leases file. Bound to *:547 Listening on Socket/5/eth1/2001:db8:0:1::/64 Sending on Socket/5/eth1/2001:db8:0:1::/64