Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.