... say for CentOS?
-
Mult-part questions should be avoided. Also - I am not sure if this is really a programming question (I see more "tech support" than "programming". I will leave open and let the community decide. Dont be surprised if this gets downmodded though. – Rob Cooper Sep 16 '08 at 05:22
-
It's not directly about programming, but it isn't subjective or a meta-question. It could reasonably be something a programmer needs to know. This is actually a good specific question, multi-parts be damned. – Landon Sep 16 '08 at 05:26
-
1That's why I left it to the community.. :) "good" is a matter of opinion. – Rob Cooper Sep 16 '08 at 05:28
-
Thanks for the advice. Will keep that in mind for future questions. – jon Sep 16 '08 at 05:29
-
Hopefully you don't take ALL of the advice because I'd say now your question is so specific that it isn't very useful anymore. The old form was much better. – Landon Sep 16 '08 at 05:31
-
Landon, your missing the point, read the FAQ. Now can you please stop with the unnecessary comments! – Rob Cooper Sep 16 '08 at 05:40
-
Which part of the faq are you referring to? Because the faq that I've read says that questions should be: 1. Detailed and specific. 2. Written clearly 3. Of interest to at least one other programmer somewhere Maybe you need to read it? – Landon Sep 16 '08 at 05:44
3 Answers
From what I understand a virtul IP can let you abstract the address from the physical interface(s) the traffic actually goes through. If your server has two network cards it can have a single virtual IP and have the traffic go through either network physical interface. If hardware failure occurs on one of the two network cards, the traffic can keep going with the second one as a backup. I assume that this is more relevant on servers where such parts can be hotswapped.

- 7,183
- 3
- 21
- 24
A Virtual IP address is a secondary IP set on a host, it's just another IP bound to an adapter (adapters if bonded). This IP is useful for many things but most commonly used for webservers to run multiple SSL certificates for multiple sites.
In CentOS you pretty much copy the /etc/sysconfig/network-scripts/ifcfg-eth0 (whichever for the adapter you want) to /etc/sysconfig/network-scripts/ifcfg-eth0:1, In there change the devicename=eth0 to devicename=eth0:1 and change the IP for the new "virtual IP" you want.
Check out this article on Virtual IP address. As indicated it usually floats between machines, and is sometimes used to fail-over a service from one device to another. Are you thinking of a virtual interface instead perhaps?
/Allan

- 23,068
- 5
- 28
- 38