dhcpv6开源软件配置

ISC-dhcp server for IPv6 

1.  下载源码:http://www.isc.org/software/dhcp
2.安装:最好以root身份安装,否则会permission denied.

$cd dir
$tar xfvz dhcp-4.2.1-p1.tar.gz
$ cd dhcp-4.2.1-p1
$ ./configure --prefix=/usr/local
$ make && make install
    经过一个漫长的make 和install过程,isc-dhcp server已经装在你的ubuntu下了,具体目录/usr/sbin 或者 
/usr/local/sbin;而且一个dhcp configuration file(dhcpd.conf)应该在/etc or /usr/local/etc 目录下了。
对这个dhcpd.conf配置就可以了。
   到这里呢,都很easy的。。。好,接来下,转入今天的正题,let's go--------->
将这个ISC-dhcp server做为 ipv6 server,为了跟别的server(例如dhcp3 或者dibber)区分开,我在etc下创建一个
/isc-dhcp/dhcpd6.conf文件,专门保存ipv6 的一些配置:

 创建这个文件:touch /etc/isc-dhcp/dhcpd6.conf
然后将下列配置信息copy到文件中 :

default-lease-time 7200;

#default-lease-time 80;

#max-lease-time 80;

max-lease-time 86400;

 #default-lease-time 88;

#max-lease-time 99;

 log-facility local7;

subnet6 2011:1:2::/48 {

        # Range for clients

        range6 2011:1:2::111 2011:1:2::234;

          # Additional options

        option dhcp6.name-servers 2011:1:2::2012;

        option dhcp6.domain-search "ipv6.domain.example";

        # Prefix range for delegation to sub-routers

          prefix6 2011:1:2:2:: 2011:1:2:168:: /64;

            # Example for a fixed host address

        host specialclient {

                host-identifier option dhcp6.client-id 00:01:00:01:4a:1f:ba:e3:60:b9:1f:01:23:45;

                fixed-address6 2011:1:2::110;

        }

}

备注:subnet6 2011:1:2::/48 为网段地址

然后配置监听网卡的信息:

cat /etc/network/interfaces

iface eth0 inet6 static

address   2011:1:2:1:2:3:4:5 (和dhcpd6.conf中subnet6 同一个网段)

netmask 48

最后我们让dhcpd从这个文件启动:

# sudo /usr/local/sbin/dhcpd -6 -cf /etc/isc-dhcp/dhcpd6.conf eth0

OK,一个dhcp6 server就配置好了。

备注:如果启动不成功,手动创建/var/db/dhcpd6.leases文件。


这个server呢,分配pd和ia是独立的,不像dibbler,如果不分配ia的话,就start不起来

 

 

 

原文见

http://blog.csdn.net/inthat/article/details/13018221

posted on 2016-03-17 20:17  与非朋仔  阅读(2608)  评论(0编辑  收藏  举报

导航