LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-07-2011, 12:51 PM   #1
kongfranon
Member
 
Registered: Aug 2010
Posts: 30

Rep: Reputation: 0
adding secondary IP address - CentOS 6


I was trying to add a second IP address to eth0.

I have done this in the past on RH5/CentOS5

I would cp ifcfg-eth0 to ifcfg-eth0:1 and then change IP and change device name to eth0:1

If I do that on centOS 6 and do a service network restart, it does not even try to start it.

If i manually do this at command line:
Code:
ifconfig eth0:1 192.168.110.80 netmask 255.255.255.0 up
It works, but I want to make sure if server restarts it will start it up automatically.

Thanks
 
Old 12-07-2011, 02:48 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,739

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
@ Reply

Hi kongfranon,

I tried it on my RHEL6 system and it worked after a little tweaking. I found that my ifcfg-eth0 file contains a line which says UUID=. When I copied my ifcfg-eth0 to ifcfg-eth0:1 I was able to activate the device but it was not pingable.

As UUID is unique and cannot be same for two devices I removed UUID= line from my ifcfg-eth0:1 file. Restarted the system and then I was able to ping the server with IP mentioned in ifcfg-eth0:1.

I think the same is in your case. Try it and let us know how it goes.
 
1 members found this post helpful.
Old 12-07-2011, 03:06 PM   #3
kongfranon
Member
 
Registered: Aug 2010
Posts: 30

Original Poster
Rep: Reputation: 0
Great thanks that worked!
 
Old 12-07-2011, 03:07 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,739

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
@ Reply

You're welcome. Enjoy Linux!!!
 
  


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
CentOS 5 and I am having troubles adding secondary drive johnweidauer Linux - Newbie 4 11-05-2009 05:27 PM
Adding user to a secondary group ? uncle-c Linux - Newbie 5 09-11-2009 06:05 AM
Adding New Hard Drive as Secondary Master derek8128 Linux - Newbie 4 10-24-2005 08:46 AM
secondary ip address ajavid Linux - Networking 5 02-17-2004 07:10 AM
Adding secondary groups thepurpleblob Linux - General 1 09-03-2003 10:19 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration