Setting up a static IP address in your RHEL or CentOS is simple.
This how-to guide requires that you have administrative access to the Linux operating system.
Inside the RHEL Operating system, open the terminal and head to /etc/sysconfig/network-scripts. Using ls command, you can see the available network devices in the directory.
cd /etc/sysconfig/network-scripts ls
Use a text editor to edit the specific network device configuration
- 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