DHCP common configuration file analysis

This article provides a detailed analysis of several common files in the DHCP installation process. The specific analysis is as follows:

/etc/dhcpd.conf

This is the main configuration file of the DHCP server, but this file is not available after the DHCP server is installed in some systems, so it needs to be created manually. There is also this main configuration file but no content, just copy the corresponding template to this configuration file.

/usr/sbin/dhcpd

This is the executable file that starts the entire dhcp server.

/var/lib/dhcpd/dhcpd.leases

This is the record of the start and expiration time of the lease establishment between the DHCP server and the client. It is empty by default when the DHCP server is not started or has not been assigned an IP.

Detailed explanation of the main configuration of /etc/dhcpd.conf

Open the main configuration file /etc/dhcpd.conf and find that it is empty, but the template is provided, which is the file /usr/share/doc/dhcp*/dhcpd.conf.sample after see, the dhcp template configuration file The content includes the usage of some parameters, declarations and options. The comment part can be placed anywhere and starts with a "#" sign. When the content of a line ends, it ends with a ";" sign, except for the line where the curly brackets are located.

DHCP common configuration file parsing DHCP common configuration file parsing

Enter the dhcp configuration template in Vim editing mode, press Enter or copy the dhcpd.conf.sample file directly to /etc/ and name it dhcpd.conf

DHCP common configuration file parsing DHCP common configuration file parsing

Open the main configuration file dhcpd.conf with the vim editor

DHCP common configuration file parsing DHCP common configuration file parsing

DHCP common configuration file parsing DHCP common configuration file parsing

The original text comes from: https://www.linuxprobe.com/dhcp-common-analysis.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325208853&siteId=291194637