yum install dhcp
nano /etc/dhcp/dhcpd.conf
systemctl enable dhcpd.service
systemctl restart dhcpd.service
conf:
nano /etc/dhcp/dhcpd.conf
systemctl enable dhcpd.service
systemctl restart dhcpd.service
conf:
Code:
option domain-name "domain.com";
option domain-name-servers 8.8.8.8, 4.2.2.1;
default-lease-time 600;
max-lease-time 7200;
subnet 10.0.0.0 netmask 255.255.255.0 {
# specify the range of lease IP address
range dynamic-bootp 10.0.0.200 10.0.0.254;
# specify broadcast address
option broadcast-address 10.0.0.255;
# specify default gateway
option routers 10.0.0.1;
}
host Laptop {
hardware ethernet XX:XX:XX:XX:XX:XX;
fixed-address 10.0.0.5;
}