サーバのインストール †
# apt-get install dhcp
設定ファイル †
# cp /usr/doc/dhcp-2.0pl5/dhcpd.conf.sample /etc/dhcp.conf
subnet 192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain "funaori.com";
option domain-name "funaori.com";
option domain-name-servers 192.168.0.1;
option time-offset -5; # Eastern Standard Time
option ntp-servers 192.168.0.1;
# option netbios-name-servers 192.168.0.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.0.32 192.168.0.64;
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;
#}
}
- 内容
- ネットワークアドレス:192.168.0.x
- ドメインネーム:funaori.com
- サーバアドレス:192.168.0.1
- 割り当て範囲:192.168.0.32~64
- Macアドレスからの固定割り当てはなし.
DHCPDARGS=eth0
- eth0のネットワークにdhcpサーバを適用する.
# /etc/rc.d/init.d/dhcpd start