Introduction: Configuring IP V4 Address to CenOS 7 VM Via DHCP - Part 03

About: An Open Source, Industrial Internet of Things (IIoT) and Unmanned Aerial Vehicles (UAVs) Enthusiast

This article will show steps to configure the IP address to CentOS VM. We presume a DHCP server is running on the LAN.

Supplies

A VM with CentOS 7 installed on a Personal Computer/Laptop with access to networking services such as DHCP

Step 1: Changes to Configuration File

In this step, we will perform the following:

  1. Check the configuration file in the path "/etc/sysconfig/network-scripts"
  2. Take a backup of the configuration file before we edit and save changes
  3. Edit the configuration file to fetch the IP V4 address from DHCP Server on LAN. Disable all the lines that refer to IP V6
  4. Check the status of the "NetworkManager" Service
  5. Stop & Disable the "NetworkManager" Service
  6. Check the status of the "network" Service
  7. Restart the "network" service for changes to take effect

Step 2: Note the IP V4 Address

To connect the VM console via PuTTY, we would like to understand the IP V4 address of the VM. Please take the necessary help from the screenshots and execute commands to fetch the IP address

Step 3: Connecting the VM to PuTTY

Enter the IP address and save the configuration to PuTTY.

Attempt to connect to the VM. Provide the "root" user credentials to successfully log in to the VM.

Step 4: Conclusion

Now that we have access to the VM via PuTTY, we will learn to configure the machine to handle different networking services such as Web Server, Database Server, etc.