CentOS add IP Address

To add IP address on a Linux server, first find name of your network interface. This can be done with command

In most case, it can be enp3s0 or eth0, if you have more than one network card, this may be differnt, in such case, you need to identify which network interface you need to configure the the IP address .

Now create file

Here i used enp3s0 as network inferface name, replace it with whatever network interface name you use.

Add following content

IP_ADDR_HERE = replace with the IP address you need to add.

enp3s0 = replace with actual network interface name.

Restart network service with command

If you need to add another IP, create file with name

for example “enp3s0:2”, you need to use same alias name in DEVICE entry (first line) in the file.

Adding IP Range in CentOS 6

Add a Comment

Your email address will not be published. Required fields are marked *