In this tutorial, we want to teach you how to activate the DHCP client in Centos. This method of connecting to the network is useful when you want to use the IPs inside the network to connect to the Internet and intranet networks.
We enter the CentOS machine and edit the Ethernet configuration file:
DEVICE=eth1 BOOTPROTO=dhcp TYPE=Ethernet ONBOOT=yes
Make sure BOOTPROTO is set to dhcp.
Let’s restart network services on the client machine. You will get that dhcp server assigned an ip address from the defined subnet. If you have connected to the client pc from remote login, Your session can be disconnected.