LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2015, 07:12 AM   #1
carancanfunfa
LQ Newbie
 
Registered: Feb 2015
Posts: 3

Rep: Reputation: Disabled
Adding virtual IP not working propperly in CentOS 6.4


Hello, I have to add a second IP address to one server running CentOS 6.4. I used the method of copying ifcfg-eth0 to ifcfg-eth0:1 and modify the necessary data.
The original file looks like this:

[root@nncsrv2 network-scripts]# vim ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=f2954b4d-0714-4678-ada6-424066e9ab26
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=172.18.4.44
PREFIX=24
GATEWAY=172.18.4.1
DNS1=10.70.44.30
DNS2=10.73.33.62
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=D8:9D:67:2AB:10
LAST_CONNECT=1389637604
~

and I modified ifcfg-eth0:1 file to this:

[root@nncsrv2 network-scripts]# vim ifcfg-eth0:1
DEVICE=eth0:1
TYPE=Ethernet
UUID=f2954b4d-0714-4678-ada6-424066e9ab26
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=172.18.4.45
PREFIX=24
GATEWAY=172.18.4.1
DNS1=10.70.44.30
DNS2=10.73.33.62
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0:1"
HWADDR=D8:9D:67:2AB:10
LAST_CONNECT=1389637604
~

After restartitg the networking service, the problem is that the IP dynamically assigned to the interface is just the new one (172.18.4.45). From other server I can ping 172.18.4.45 but not the original 172.18.4.44. I need both IP running.
Any help, please?
Thanks.
 
Old 02-11-2015, 07:38 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Hello and welcome to LQ.

Might go over this and see if some small mistake happened. ??

http://www.tecmint.com/create-multip...ork-interface/


Generally you'd go here. https://www.centos.org/docs/5/html/D...nterfaces.html

Multiple cards may cause some issues with examples.
 
Old 02-12-2015, 12:00 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
also be aware
CentOS 6.4 is missing about the last YEARS of security updates
cent dose NOT backport security fixes to older versions like RedHat dose

6.4 went End of life with the release of 6.5 in Dec.2013
 
Old 02-19-2015, 10:31 AM   #4
carancanfunfa
LQ Newbie
 
Registered: Feb 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Finally, I solved it by adding:

IPADDR2=172.21.8.11
PREFIX2=24

to the original ifcfg-eth0 file.
But I also had to disable the NetworkManager for this to work fine.
The reason is explained here: http://www.behindtherack.com/sub-int...hat-6centos-6/

Thanks.
 
Old 02-19-2015, 05:01 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Thanks for the update and solution.
 
  


Reply



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
Copy/paste not working in my virtual box - CentOS 6.5 tiggerfanatic Linux - Newbie 6 08-01-2014 06:05 PM
simply adding new virtual drive to centos web server slozzy Linux - Hardware 3 11-19-2008 04:20 AM
Adding virtual interface for IP based virtual host pridefc Linux - General 6 03-16-2008 03:52 PM
Ubuntu not installing propperly?? k0rfain Ubuntu 7 06-05-2007 07:11 AM
Does anyone have Linux running propperly on lostboy Linux - Hardware 1 03-18-2003 10:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:18 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