差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:dhcp [2013/10/07 01:31] – [firewallの設定] ともやん | 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' | ||
# | # | ||
行 31: | 行 29: | ||
ignore client-updates; | ignore client-updates; | ||
- | subnet | + | subnet |
authoritative; | authoritative; | ||
- | option routers | + | option routers |
option subnet-mask 255.255.255.0; | option subnet-mask 255.255.255.0; | ||
option domain-name " | option domain-name " | ||
- | option domain-name-servers blue-ds.fireball.local, 172.16.78.254; | + | option domain-name-servers blue-dc, blue-ns, tomoyan-wrt; |
- | option ntp-servers blue-ds.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 dynamic-bootp | + | |
+ | | ||
default-lease-time 21600; | default-lease-time 21600; | ||
max-lease-time 43200; | max-lease-time 43200; | ||
- | |||
- | host blue-work-sv { | ||
- | hardware ethernet 52: | ||
- | fixed-address 172.16.78.80; | ||
- | } | ||
} | } | ||
- | </ | ||
+ | #host blue-work-sv { | ||
+ | # hardware ethernet 52: | ||
+ | # fixed-address 192.168.1.80; | ||
+ | #} | ||
+ | </ | ||
+ | ==== 設定ファイルのチェック ==== | ||
+ | < | ||
+ | $ 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サービスを許可する。 |