How Setup DHCP Client on CentOS

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:

vim /etc/sysconfig/network-scripts/ifcfg-eth1



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.

For CentOS/RHEL 7

systemctl restart network

For CentOS/RHEL 6/5

service network restart


Powered by BetterDocs