#!/bin/nash cat > /etc/dhcp/dhcpd.conf << EOF default-lease-time 600; max-lease-time 7200; authoritative; subnet 192.168.3.0 netmask 255.255.255.248 { range 192.168.3.1 192.168.3.6; option domain-name-servers 8.8.8.8, 8.8.4.4; option subnet-mask 255.255.255.248; option routers 172.16.4.1; } host hq-cli { hardware ethernet 08:00:27:c7:82:fa; fixed-address 192.168.4.2; } EOF chmod 600 /etc/dhcp/dhcpd.conf cat > /etc/sysconfig/dhcpd << EOF DHCPDARGS="enp0s8" EOF systemctl enable dhcp systemctl start dhcp