Setting up a static IP address on your RHEL or CentOS is simple.
Prerequisite
This how-to guide requires that you have administrative access to the Linux operating system.
Steps
1. Inside the RHEL Operating system, open the terminal and head to /etc/sysconfig/network-scripts
cd /etc/sysconfig/network-scripts
Using ls command, you can see the available network devices.
2. Use vi editor to edit the specific network device configuration
3. In this sample configuration, we will need to specifically change or add the following:
BOOTPROTO=none ONBOOT=yes IPADDR=x.x.x.x PREFIX=n GATEWAY=x.x.x.x DNS1=x.x.x.x