DHCP Server – Dynamic Host Configuration Protocol

The main configuration file: /etc/dhcp/dhcpd.conf is almost empty
Reference template: /usr/share/doc/dhcp-4.2.5/dhcpd.conf .sample
IP information and related lease information: /var/lib/dhcpd/dhcpd.leases

1. Install the software
yum -y install dhcp
2. Modify the configuration file , You can copy the contents of the template file to the configuration file for modification operations
vi /etc/dhcp/dhcpd.conf
The configuration file is divided into global settings, subnet definitions, host definitions

The global settings are as follows:

share picture

Share pictures

子The net definition is as follows:

Share pictures

share picture

The host is defined as follows:

Share pictures

share picture< /p>

3. After configuring all your own parameters, restart the service

s ystemctl restart dhcpd

Set the service to start at boot systemctl enable dhcpd

Leave a Comment

Your email address will not be published.