nisya @Wiki
RedHat関連-DHCP設定
最終更新:
匿名ユーザー
-
view
注)「#」の場合、rootユーザにて、「$」の場合、一般ユーザで操作
インストールCDに入っているものを使用
$ rpm -qa | grep dhcp dhcp-3.0pl1-23 ↑表示されれば入ってる。なければCDから追加。
サンプルを探す
# rpm -ql dhcp|grep 'dhcpd.conf.sample' /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample
表示されたdhcpd.conf.sampleを/etc/dhcpd.confにコピー
# cp -p /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample /etc/dhcpd.conf
設定フィルを編集
# vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 { ←※1
# --- default gateway
option routers 192.168.0.1; ←※2
option subnet-mask 255.255.255.0; ←※3
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.0.1; ←※4
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
~~中略~~
# option netbios-node-type 2;
range dynamic-bootp 192.168.0.100 192.168.0.199; ←※5
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
※1 クライアント要求を受けるネットワーク
※2 自サーバのIPアドレス
※3 自サーバのサブネットマスク
※4 自サーバ
※5 払い出すIPアドレスの幅
実行
# /etc/init.d/dhcpd start
自動実行登録
# /sbin/chkconfig --level 2345 dhcpd on
発生トラブル