Preparation
Enter ifconfig to view the MAC address of the client
Server side configuration
1. Enter vim /etc/dhcp/dhcpd.conf to make changes
host fantasia
{ hardware ethernet (input the MAC address of the client just now); //the Mac address of the client fixed-address 192.168.101.119; //the ip address assigned to the client }
It can be seen that the 119 address allocated below is not in the range (25-66) above, this does not conflict
2. After setting, enter systemctl start dhcpd to restart the DHCP server
client
1. Enter vim /etc/sysconfig/network-scripts/ifcfg-ens33 for client network configuration
Change ONBOOT to yes
2. Enter systemctl restart network to restart the network
3. Enter ifconfig
The address here has changed to 192.168.101.119 which we changed
At this point, the fixed IP address of DHCP is configured.
If you don’t understand it, you can refer to my last DHCP server configuration under Linux
https://blog.csdn.net/anluo233/article/details/125885435?spm=1001.2014.3001.5501