Steps to add IP address on Centos server

kumkumsharma

Administrator
Staff member
To add IP address on CentOS server you first have to go to network configuration directory:

Code:
/etc/sysconfig/network-scripts
Now you have to create a file ifcfg-eth0:1, but if you already have many other IP addresses then you have to add file with next increment for next IP address.

Now add below code in that file:

Code:
DEVICE=eth0:1
BOOTPROTO=static
IPADDR=YOUR_NEW_IP_HERE
ONBOOT=yes
To reflect the changes you can restart the server or you can run below command:

Code:
ifconfig eth0:1 up
 
Top