Linuxでdhcpサーバーを構築する

1.「dhcpd.conf.sample」を「/etc/dhcpd.conf」にコピーする
cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf

2.単一のサブネットにDHCPを設定する
vi /etc/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0{
range 192.168.0.11 192.168.0.100;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name “XXX.com";
option domain-name-servers 192.168.0.124;
option broadcast-address 192.168.0.255;
default-lease-time 86400;
max-lease-time 172800;
host pc1{
hardware ethernet 00:0C:29:E8:EC:44;
fixed-address 192.168.0.12;
}
}

3.dhcpが再起動
/etc/init.d/dhcpd restart

Linux

Posted by arkgame