Manually adding an additional IP to a specific network device

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » System Level

Manually adding an additional IP to a specific network deviceLast Modified: May 1, 2017, 2:23 am
If you need to manually add an IP to your device, so that it's added by the system ("network" script), and not DA ("startips" script), you can do so by adding a network-script for the new IP.
This guide is only for Redhat/Fedora/CentOS based systems.  See this guide for other systems.

We'll use an IP example of , so replace all instances of that value with your own IP.

1) First we need to know on which device to add the additional IP.  Most of the time, it will be eth0, but not always.


to get a listing of your current devices.  See which device your server IP is using (Eg: eth0), then for your additional IP, you'll just add another number to it with a colon, eg: eth0:0

2) Create the actual network-scripts file:

cd /etc/sysconfig/network-scripts
nano ifcfg-eth0:0

3) In that file, add the following code:



4) Restart your network and pray it works:

/etc/init.d/network restart
/etc/init.d/startips start

the "startips" script is just for the DA controlled IPs. You need to run it after restarting your network to load all DA controlled IPs.  Your own IP should have been loaded into the device with the "netwrok restart" step.

5) Confirm it's loaded by checking ifconfig again:



Although we don't have much testing for this with Debian, try editing:


and at the bottom of the file (assuming you already have eth0 listed there), add eth0:0:

auto eth0:0
allow-hotplug eth0:0
iface eth0:0 inet static

Once set, then type

ifup eth0:0

As mentioned, this has very limited testing, so be very sure that the setting you're adding are correct.   It's possible the box can become inaccessible if an error is made at this point (which is why we can't do this for you)

FreeBSD ALPHA testing

Assuming your main device name is

ifconfig em0 netmask alias

which should load the IP into the em0 device.  Once confirmed that this worked, edit:


and below the line that starts with:


you'd add an alias line, that looks like this:

ifconfig_em0_alias0="inet netmask"

Related Errors

If you get the error:

Error, some other host already uses address

then add this line to your ifcfg-eth0:0 file:



Error: Connection activation failed: The connection is not for this device.

Solution, add this to your ifcfg file:


Related Helpfiles
My IPs are not being loaded into the network device after bootup or network restarts

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST