LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-01-2010, 02:52 AM   #1
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Rep: Reputation: 15
Redhat lost it's virtual IP address


Last night we had a box lose it's virtual IP address on the eth0 card. I rebooted the box but it just would not give the card the second IP address. We rebooted several times in fact.

Today admin ran 'ifup ifcfg-eth0:1' and the virtual IP was there. Nothing was changed, just that command was ran.

I thought there might be a problem with the automagical stuff so I rebooted the box again, virtual IP is there and happy.

Anyone know why it would not have come back on reboot and why it now does?
 
Old 11-01-2010, 10:10 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Did the first IP address (eth0 as opposed to eth0:1) work? You know that the virtual is depending on the "real" one right? That is to say the virtual IP can only come up if the "real" IP is up.

Also I've seen issues with (real) IPs coming up when routing is confused. RHEL seems to want the default gateway to always be on eth0. You can add routes for other nics (e.g eth1) but making one of those primary gateway when you have a live eth0 seems to cause problems. (Of course virtuals should use same gateway as the real IP as they have to be on same network as the real IP so this shouldn't be an issue but I figured I'd mention it in case you didn't have eth0's gateway as your default.)
 
Old 11-02-2010, 12:23 AM   #3
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Original Poster
Rep: Reputation: 15
Yeah the real IP address always worked, it only has a single NIC, the virtual IP does not have a gateway, it is limited to contacting hosts on the same network.
 
Old 11-02-2010, 06:16 AM   #4
rew
Member
 
Registered: May 2010
Posts: 36

Rep: Reputation: 3
It should come up automatically provided it is configured as "auto eth0:1" in /etc/network/interfaces . If it once or a few times didn't come up there is little we can do to figure out why.
 
0 members found this post helpful.
Old 11-02-2010, 08:43 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by rew View Post
It should come up automatically provided it is configured as "auto eth0:1" in /etc/network/interfaces . If it once or a few times didn't come up there is little we can do to figure out why.
RHEL/CentOS have no "/etc/network/interfaces". The networking files are /etc/sysconfig/network and /etc/sysconfig/network-scripts/*.
 
Old 11-02-2010, 09:53 AM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,681
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Was there also another NIC, eth1? I've seen some weird things happen with the "sophisticated" network management one sees in 6 letter distros when there is more than one NIC. Ethernet interfaces might come up in a different order, and end up with interface names associated differently. Depending on how they are configured or what autoconfigured them, IP addresses may be associated with an interface name, or a MAC address. If one IP is associated with a MAC address, and the other with an interface name, for what is usually the same NIC, they would usually be together. But if sometimes the NICs activate out of order, then you could see those 2 IPs on different NICs, even if only one NIC is actually used.

If you see the problem again, do "ifconfig -a" and see what's going on. Do that command now and save its output for reference.

My workaround for such mess is I substitute my own network startup scripts that just do explicit address binding. That, and I also use the IPv6 link-local addresses (the ones beginning with "fe80::") as backdoors into the servers in case something goes wrong (has not since my scripts were debugged).

If you only have one physical NIC, ignore all this above.
 
Old 11-06-2010, 12:34 AM   #7
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by MensaWater View Post
RHEL/CentOS have no "/etc/network/interfaces". The networking files are /etc/sysconfig/network and /etc/sysconfig/network-scripts/*.
The only thing I could see wrong is the file in the /etc/sysconfig/network-scripts directory is called ifcfg-eth0:1 but inside the file it had the line:

DEVICE=eth0:0

I pointed that out to the admins and they have now changed that line to match the file name. It now also has an additional line:

ONBOOT=yes

The /etc/sysconfig/network file just has three lines in it:
NETWORKING=yes
NETWORKING IPV6=yes
HOSTNAME=xxxxxxx

@Skaperen: There is only one NIC inside the machine, post ignored
 
Old 11-26-2010, 04:35 PM   #8
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Original Poster
Rep: Reputation: 15
It has happened again, on several occasions, we have no idea why it is happening.

One person suggested that it could be a flaky cable, the box loses it's connection, drops it's shit, gets the connection back and does not bother to bring the virtual IP back online.

I doubt that though, there are no other indications it has a connection issue.
 
  


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
how to translate virtual address to physical address in linux application saurin Programming 1 11-18-2009 09:05 PM
Does user stack have a fixed address location in its virtual address? lqu Linux - Kernel 1 09-11-2009 01:28 PM
Outgoing local trafic over virtual interface has not virtual ip address :-( tkmbe Linux - Networking 3 08-25-2009 08:03 PM
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 09:08 PM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-24-2006 11:13 PM

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

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