Get the App
SLTechnology News&Howtos  ›  Servers  › 

Using Linux to build DHCP

Shulou Source: shulou.com Published: 2022-06-03 00:05:59 10月03日 Update

How to build DHCP services in Linux. First of all, configure the local machine with static ip. The following is the configuration file path to modify the ENI information:

Vim / etc/sysconfig/network-scripts/ifcfg-ens33

Restart the service after changing the configuration: systemctl restart network.

If it is a yum installation, you need to clear the yum cache rm-rf / etc/yum.repo.d/* first

Create a new yum file vim / etc/yum.repo.d/a.repo

Use the system CD mount mount / dev/sr0 / media to mount the CD to the meida directory

Yum installs the DHCP service

Cp- r/ usr/share/doc/dhcp-4.2.5/dhcp.conf.example / etc/dhcp/dhcpd.conf

Enter the DHCP main configuration file vim / etc/dhcp/dhcpd.conf

There is a subnet declaration at line 47

After setting up, if the unit has a machine that uses fixed IP, such as a printer, there is a setting reserved on line 77.

Save and exit wq after configuration

Finally, start the DHCP service systemctl start network

Tags: Configuration service file CD information unit printer machine directory system cache network card path static local machine Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Xiaomi Apple Linux vpn