dhcpv6開源軟件配置

ISC-dhcp server for IPv6 

1.  下載源碼:http://www.isc.org/software/dhcp
2.安裝:最好以root身份安裝,不然會permission denied.ubuntu

$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;dom

#default-lease-time 80;ide

#max-lease-time 80;spa

max-lease-time 86400;.net

 #default-lease-time 88;code

#max-lease-time 99;router

 log-facility local7;server

subnet6 2011:1:2::/48 {blog

        # Range for clientsip

        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

相關文章
相關標籤/搜索