差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:dhcp [2013/10/10 14:49] – [DHCP サーバーの設定] ともやん | linux:dhcp [2019/05/18 02:23] (現在) – 外部編集 非ログインユーザー | ||
---|---|---|---|
行 3: | 行 3: | ||
===== パッケージインストール ===== | ===== パッケージインストール ===== | ||
< | < | ||
- | $ sudo yum install dhcp | + | $ sudo dnf install dhcp |
</ | </ | ||
===== DHCP サーバーの設定 ===== | ===== DHCP サーバーの設定 ===== | ||
- | 設定前にバックアップを作成しておく。 | + | |
+ | ====設定ファイルのバックアップ | ||
< | < | ||
$ sudo cp / | $ sudo cp / | ||
行 14: | 行 15: | ||
サンプルを元に修正する場合は、以下のファイルをコピーする。 | サンプルを元に修正する場合は、以下のファイルをコピーする。 | ||
< | < | ||
- | $ sudo cp / | + | $ sudo cp / |
</ | </ | ||
- | + | ==== 設定ファイルの編集 | |
- | 設定ファイルの編集。 | + | |
< | < | ||
$ sudo vi / | $ sudo vi / | ||
行 24: | 行 24: | ||
# | # | ||
# DHCP Server Configuration file. | # DHCP Server Configuration file. | ||
- | # see / | ||
- | # see 'man 5 dhcpd.conf' | ||
# | # | ||
行 38: | 行 36: | ||
option domain-name " | option domain-name " | ||
- | option domain-name-servers blue-dc.fireball.local, 192.168.1.254; | + | option domain-name-servers blue-dc, |
- | option ntp-servers blue-dc.fireball.local; | + | option ntp-servers blue-dc; |
- | option time-offset 32400; | + | option time-offset 32400; |
- | # option netbios-name-servers | + | # option netbios-name-servers |
# option netbios-node-type 2; | # option netbios-node-type 2; | ||
+ | option root-path "/ | ||
+ | if substring( option vendor-class-identifier, | ||
+ | filename "/ | ||
+ | } else { | ||
+ | filename "/ | ||
+ | } | ||
+ | next-server 192.168.1.15; | ||
+ | range 192.168.1.150 192.168.1.199; | ||
range dynamic-bootp 192.168.1.91 192.168.1.100; | range dynamic-bootp 192.168.1.91 192.168.1.100; | ||
default-lease-time 21600; | default-lease-time 21600; | ||
行 55: | 行 61: | ||
#} | #} | ||
</ | </ | ||
+ | ==== 設定ファイルのチェック ==== | ||
+ | < | ||
+ | $ sudo dhcpd -t | ||
+ | Internet Systems Consortium DHCP Server 4.3.6 | ||
+ | Copyright 2004-2017 Internet Systems Consortium. | ||
+ | All rights reserved. | ||
+ | For info, please visit https:// | ||
+ | ldap_gssapi_principal is not set,GSSAPI Authentication for LDAP will not be used | ||
+ | Not searching LDAP since ldap-server, | ||
+ | Config file: / | ||
+ | Database file: / | ||
+ | PID file: / | ||
+ | Source compiled to use binary-leases | ||
+ | </ | ||
===== firewallの設定 ===== | ===== firewallの設定 ===== | ||
dhcpサービスを許可する。 | dhcpサービスを許可する。 |