「Fitpc2i/isc-dhcp-server」の版間の差分
提供: fukudat.net
< Fitpc2i
ナビゲーションに移動検索に移動
(ページの作成:「== インストール == <pre> $ sudo apt-get install isc-dhcp-server </pre>」) |
(→インストール) |
||
2行目: | 2行目: | ||
<pre> | <pre> | ||
$ sudo apt-get install isc-dhcp-server | $ sudo apt-get install isc-dhcp-server | ||
+ | </pre> | ||
+ | |||
+ | == 設定 == | ||
+ | /etc/dhcp ディレクトリに移動。 | ||
+ | |||
+ | /etc/dhcp/dhcpd.conf を以下のように編集。 | ||
+ | <pre> | ||
+ | ddns-update-style interim; | ||
+ | ddns-domainname "fukudat.com"; | ||
+ | ddns-rev-domainname "in-addr.arpa"; | ||
+ | |||
+ | option domain-name "fukudat.com"; | ||
+ | option domain-name-servers ns.fukudat.com; | ||
+ | |||
+ | default-lease-time 600; # 10 minutes | ||
+ | max-lease-time 1200; # 20 minutes | ||
+ | |||
+ | log-facility local7; | ||
+ | |||
+ | subnet 192.168.0.0 netmask 255.255.255.0 { | ||
+ | authoritative; | ||
+ | option broadcast-address 192.168.0.255; | ||
+ | option routers 192.168.0.1; | ||
+ | option subnet-mask 255.255.255.0; | ||
+ | pool { | ||
+ | #failover peer "test"; | ||
+ | deny dynamic bootp clients; | ||
+ | range 192.168.0.100 192.168.0.250; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | host gateway { | ||
+ | hardware ethernet 00:0c:29:a3:dc:23; | ||
+ | fixed-address gateway.fukudat.com; | ||
+ | } | ||
+ | ... | ||
</pre> | </pre> |
2018年8月31日 (金) 05:46時点における版
インストール
$ sudo apt-get install isc-dhcp-server
設定
/etc/dhcp ディレクトリに移動。
/etc/dhcp/dhcpd.conf を以下のように編集。
ddns-update-style interim; ddns-domainname "fukudat.com"; ddns-rev-domainname "in-addr.arpa"; option domain-name "fukudat.com"; option domain-name-servers ns.fukudat.com; default-lease-time 600; # 10 minutes max-lease-time 1200; # 20 minutes log-facility local7; subnet 192.168.0.0 netmask 255.255.255.0 { authoritative; option broadcast-address 192.168.0.255; option routers 192.168.0.1; option subnet-mask 255.255.255.0; pool { #failover peer "test"; deny dynamic bootp clients; range 192.168.0.100 192.168.0.250; } } host gateway { hardware ethernet 00:0c:29:a3:dc:23; fixed-address gateway.fukudat.com; } ...