1. Configure the server IP as 192.168.1.254
2. Configure the default inteface
vi /etc/sysconfig/dhcpd
INTERFACES="eth3"
3. vi /etc/dhcp/dhcpd.conf
default-lease-time 3600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.2 192.168.1.253;
option routers 192.168.1.254;
}
5. service isc-dhcp-server start
6. host abcde {
hardware ethernet F4:52:02:D2:B9:E4
fixed-address 192.168.1.100
}
note: In CentOS 7, the /etc/sysconfig/dhcpd is NOT used anymore.
Add the interface name you would like to use into the ExecStart variable in the /etc/systemd/system/dhcpd.service.
note: In CentOS 7, the /etc/sysconfig/dhcpd is NOT used anymore.
Add the interface name you would like to use into the ExecStart variable in the /etc/systemd/system/dhcpd.service.
沒有留言:
張貼留言