Assign Additional IP Addresses in RedHat/CentOS

If you are using cPanel, you should add the IP addresses through WHM.  Do not follow these instructions if you are using CPanel.

1. Determine what existing range files exist:

# cd /etc/sysconfig/network-scripts/
# ls ifcfg-eth1-range*

You will see at least one file, possibly several. Find the highest number following the "range" and add one to it. This will be the new range number.

For example, if you see ifcfg-eth1-range0 and ifcfg-eth1-range1, your new range number will be "2".

2. Determine the next available interface number (clone number).

# ifconfig | grep eth1

You will see a list of interfaces that looks like this
eth1 Link encap:Ethernet HWaddr 00:08:74:A3:29:70
eth1:0 Link encap:Ethernet HWaddr 00:08:74:A3:29:70
eth1:1 Link encap:Ethernet HWaddr 00:08:74:A3:29:70
eth1:8 Link encap:Ethernet HWaddr 00:08:74:A3:29:70

Find the highest number after the "eth1:". Add one to it and this your new clone number. In this case it would be 9.

3. create a range file for the new range number. (for this example, we will use range2)

# nano ifcfg-eth1-range2

4. Write the following lines to the range file. (replace the dummy ip information with your desired ip range and the CLONENUM_START value with the one calculated above)


5. Write and quit the range file, and restart your network.

# /etc/init.d/network restart

6. Your new ips should now be visible by running:

# ifconfig

Was this answer helpful?

 Print this Article

Also Read

Setting up IPtables

1. Introduction CentOS has an extremely powerful firewall built in, commonly referred to as...

Setting up an SSL secured Webserver with CentOS

This guide will explain how to set up a site over https. The tutorial uses a self signed key so...

Install Squid on CentOS / RHEL 5

Use yum command as follows:# yum install squidOutput: Loading "installonlyn" plugin Setting up...

Securing OpenSSH

OpenSSH (or Secure SHell) has become a de facto standard for remote access replacing...

Create custom SSH login welcome message

If you like to change the default welcome message for SSH login for your VPS or dedicated Linux...