Using Linux to build DHCP
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