LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Creating IP aliases upon server reboot (https://www.linuxquestions.org/questions/linux-server-73/creating-ip-aliases-upon-server-reboot-940770/)

hjazz6 04-19-2012 09:45 PM

Creating IP aliases upon server reboot
 
Hi,

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

Code:

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?

Thank you.

Regards,
Rayne

druuna 04-20-2012 01:15 AM

Hi,

You need to create the proper interface(s), have a look here: Interface Configuration Files (Especially 13.2.4).

In short: Copy ifcfg-eth0 to ifcfg-eth0.1 and ifcfg-eth0.2. Change the appropriate fields and restart the network.

Hope this helps.

hjazz6 04-20-2012 01:37 AM

Thank you!

druuna 04-20-2012 01:41 AM

You're welcome :)

BTW: Can you put up the [SOLVED] tag.
first post -> Thread Tools -> Mark this thread as solved


All times are GMT -5. The time now is 10:36 PM.