サーバー設定  http://kwne.jp/

[サーバー設定に戻る]
 ■ DHCPサーバーの設定

dhcpをInstall

# yum install dhcp

設定ファイルを編集

# cp /usr/share/doc/dhcp-*/dhcpd.conf.sample /etc/dhcpd.conf

# vi /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;
not authoritative;

subnet 192.168.5.0 netmask 255.255.255.0 {   ※環境に合わせる

# --- default gateway
option routers 192.168.5.2; option subnet-mask 255.255.255.0;   ※環境に合わせる

# option nis-domain "domain.org";
option domain-name "kwne.jp";   ※環境に合わせる
option domain-name-servers 192.168.0.2;   ※環境に合わせる

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.5.171 192.168.5.189;   ※環境に合わせる
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;
# }
}


eth1側でDHCPサーバーを起動

# vi /etc/rc.d/init.d/dhcpd

start() {
# Start daemons.
echo -n $"Starting $prog: "
daemon /usr/sbin/dhcpd eth1   
※eth1に変更
RETVAL=$?


DHCPサーバを起動

# /etc/rc.d/init.d/dhcpd start

自動起動

# chkconfig dhcpd on

起動確認

# chkconfig dhcpd --list
dhcpd 0:オフ 1:オフ 2:オン 3:オン 4:オン 5:オン 6:オフ

▲このページのトップへ戻る


Copyright(c) KWNE All rights reserved.
リンクフリーです(連絡不要)