[Linux] Exercise---Building a DHCP server

Experiment requirements:

    Build a DHCP server so that it can assign IP addresses to hosts on the 172.24.8.0 network segment and 192.168.168.0 network segment. The DHCP server can assign fixed IP addresses to the hosts on the network segment as 172.24.8.8 and 192.168.168.168.

(In this experiment: rhel8 is used as a DHCP server and rhel7 is used as a client for testing)

1. First find the virtual network editor in the Edit tab of VMware, and remove the check mark of using the local DHCP service to assign the IP address to the virtual machine.

 

2. In the host, check whether VMnet1 and VMnet8 in the network adapter have the address of the corresponding mode segment, if not, configure manually

 

3. Ensure that the server has two network cards. One is in nat and one is in host-only mode, and manually configure the corresponding IP parameters , and reconnect the session

4. xshell remote connection (both IP addresses can be connected)

 

5. Install the dhcp-server package on the server side (rhel8) and install the dhcp package on the client side (rhel7)

6. Edit the server side /etc/dhcp/dhcpd.conf configuration file

7. Stop the firewall on the server side (rhel8) , change the mode of selinux to permissive, and restart the dhcpd service

8. Add two network cards to the virtual machine of the client, which are host-only and nat mode respectively

9. Test

 

 

 

Guess you like

Origin blog.csdn.net/trichloromethane/article/details/108950672