Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server running RHEL 6, and have created multiple IP aliases on it. However, when I restart the server, the IP aliases are gone.

I tried to edit the /etc/rc.d/rc.local file to include

ifconfig eth0:1 1.1.1.1
ifconfig eth0:2 2.2.2.2

But it didn't work.

How can I make sure that the IP aliases stay after reboot?

share|improve this question
up vote 1 down vote accepted

It is best to use the standard process for setting up interface IP addresses.

Create a file in /etc/sysconfig/network-scripts called:

ifcfg-eth0:1

Containing:

NAME=""
BOOTPROTO=none
DEVICE=eth0:1
NETMASK=255.255.255.0
ONPARENT=yes
IPADDR=1.1.1.1
ONBOOT=yes

Chnage the netmask to reflect the one you need.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .