Configuration and use of dhcp server in LINUX -cyl

  • The first step:
    first install the dhcp package under root privileges, the relevant command codes are as follows
    as follows
    or you can use the two commands
    yum install dhclient.x86_64
    yum install dhcp-common.x86_64

  • In the second step
    , after the DHCP software package is successfully installed, the dhcp version information will be displayed, as shown in the following figure.
    Different computers may be different

  • Step 3
    Use the rpm -q dhcp command to check whether the DHCP service is installed. No information is returned if it is not installed, and version information is returned if it is installed.
    as follows

  • Edit the dhcp configuration file "/etc/dhcp/dhcpd.conf", the code is as follows (take Beihua University network class 16 linux classroom experiment as an example):
    This error-prone configuration is as follows
    The meaning and content explanation are as follows :
    Meaning and explanation
  • Edit the "/etc/rc.d/init.d/dhcpd" file and modify the relevant code below. (centos7 does not need to be modified)
    Change as follows

  • When setting Linux to start, start the dhcpd service at the same time (this step may report an error, don't worry about it)
    The relevant command codes are as follows:

  • After configuring the relevant parameters of DHCP, we also need to start the DHCP service. The command code is as follows:
    service dhcpd restart After that, there is no error on centos7. The word [OK] appears on centos6.5.
    Learn from this experience to configure my computer

Guess you like

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