install
yum -y install dhcp
file
/etc/dhcp/dhcpd.conf
eg:
--------------------------------
ddns-update-style none;
ignore client-updates;
subnet 192.168.110.0 netmask 255.255.255.0 {
range 192.168.10.50 192.168.10.110;
option subnet-mask 255.255.255.0;
option routes 192.168.110.1;
option domain-name "aron.vps.com";
option domain-name-servers 192.168.110.1;
default-lease-time 21600;
max-lease-time 43200;
}
host-band { #绑定IP和MAC
hardware $Mac-Address
fixed-address $IP
}
-----------------------------
command:
service start dhcpd
service restart dhcpd
service stop dhcpd
service status dhcpd