安裝
apt-get install isc-dhcp-server
vi /etc/default/isc-dhcp-server
INTERFACES="eth1" //看你要用哪張網卡去配送ipv6的ip
有這兩個啟動檔
#/etc/init.d/isc-dhcp-server
#/etc/init.d/isc-dhcp-server6
subnet6 2001:620:40b:555::/64 {
range6 2001:620:40b:555::100 2001:620:40b:555::110;}
#/etc/init.d/isc-dhcp-server
#/etc/init.d/isc-dhcp-server6
但設定檔只有
#/etc/dhcp/dhcpd.conf
所以來建一個設定檔給ipv6用
為何要建立這個設定檔
回推回去
/init.d/isc-dhcp-server //啟動檔
/isc-dhcp-server.conf //啟動檔的設定值
vi isc-dhcp-server.conf //拆了它
你會發現裡面的邏輯結構,接下來
換/init.d/isc-dhcp-server6推估回去,你會發現這個isc-dhcp-server6.conf
這樣懂了吧
cp dhcpd.conf dhcpd6.conf
回推回去
/init.d/isc-dhcp-server //啟動檔
/isc-dhcp-server.conf //啟動檔的設定值
vi isc-dhcp-server.conf //拆了它
你會發現裡面的邏輯結構,接下來
換/init.d/isc-dhcp-server6推估回去,你會發現這個isc-dhcp-server6.conf
這樣懂了吧
cp dhcpd.conf dhcpd6.conf
vi dhcpd6.conf //編輯
range6 2001:620:40b:555::100 2001:620:40b:555::110;}
#取消 , 設定ipv6位置
*********************************************************
官方設定範例
default-lease-time 600;
*********************************************************
官方設定範例
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet6 2001:db8:0:1::/64 {
# Range for clients
range6 2001:db8:0:1::129 2001:db8:0:1::254;
range6 2001:db8:0:1::129 2001:db8:0:1::254;
# Additional options
option dhcp6.name-servers fec0:0:0:1::1;
option dhcp6.domain-search "domain.example";
# Prefix range for delegation to sub-routers
prefix6 2001:db8:0:100:: 2001:db8:0:f00:: /56;
# 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 2001:db8:0:1::127;
}
}
*********************************************************
視情況來啟動
#/etc/init.d/isc-dhcp-server start
#/etc/init.d/isc-dhcp-server6 start
或
# /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf eth1 //網路卡號要注意
# /usr/sbin/dhcpd -6 -f -cf /etc/dhcp/dhcpd6.conf eth1
#/etc/init.d/isc-dhcp-server6 start
或
# /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf eth1 //網路卡號要注意
# /usr/sbin/dhcpd -6 -f -cf /etc/dhcp/dhcpd6.conf eth1
沒有留言:
張貼留言