LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2012, 09:45 PM   #1
hjazz6
Member
 
Registered: Jan 2009
Posts: 36

Rep: Reputation: 0
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
 
Old 04-20-2012, 01:15 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 04-20-2012, 01:37 AM   #3
hjazz6
Member
 
Registered: Jan 2009
Posts: 36

Original Poster
Rep: Reputation: 0
Thank you!
 
Old 04-20-2012, 01:41 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an automatic reboot script ACDII Linux - General 3 01-09-2008 08:44 AM
wrap lines at 80 for long aliases in .aliases.csh jhwilliams Linux - Software 0 07-26-2007 07:49 AM
Creating aliases in the .bashrc file LDJ Linux - Newbie 3 01-15-2007 02:28 PM
why does reboot remove aliases? deucedlt Linux - Newbie 2 01-09-2005 07:46 PM
creating aliases to run file Squeak2704 Linux - Software 3 04-28-2004 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration