Linux network configuration-DHCP experiment
DHCP configuration in Linux
First configure the DHCP server
yum -y install dhcp
cd /etc/dhcp/
cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
vim /etc/dhcp/dhcpd.conf
Then enter dhcp.conf for global parameter configuration
option domain-name "zp.com";
option domain-name-servers 192.168.100.100
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.10 192.168.100.20;
option routers 192.168.100.254;
};
Finally, open the DHCP service and check the firewall at the same time. It is recommended to turn off the firewall first and then perform service configuration
systemctl start dhcpd
systemctl stop firewalld
sentenforce 0