Building a static network connection
In this recipe, we will learn how to configure a static IP address for a new or existing CentOS server.
While a dynamically assigned IP address or DHCP reservation may be fine for most desktop and laptop users, if you are setting up a server, it is often the case that you will require a static IP address. From web pages to e-mail, databases to file sharing, a static IP address will become a permanent location from which your server will deliver a range of applications and services, and it is the intention of this recipe to show you how easily it can be achieved.
Getting ready
To complete this recipe, you will require a working installation of the CentOS 7 operating system with root privileges and a console-based text editor of your choice.
How to do it...
For the purpose of this recipe, you will be able to find all the relevant files in the directory, /etc/sysconfig/network-scripts/
. First, you need to find out the correct name of the network interface that...