VMware vSphere

 View Only
Expand all | Collapse all

How to give multiple ip addresses to one Virtual Machine?

  • 1.  How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 06:16 PM

    Hello everyone,

    How do I get ESXi to give a particular virtual machine multiple ip addesses? I've looked all of vSphere and I can not find the solution...



  • 2.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 06:18 PM

    add additional vNICs and attach them to correct network label



  • 3.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 06:27 PM

    Do you have to edit the host's file on the VM? And how do you make it a static ip? Thank you for your help



  • 4.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 06:45 PM

    one thing to consider. If the IP addresses you are giving to the VM in question are all on the same network segment, you don't have to have multiple vNICs. You can simply go to the Advanced settings of your TCP protocol and the IP Settings tab and add in multiple static addresses.

    You would then set up DNS so that all the IP's resolve to the same hostname.



  • 5.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 07:28 PM

    I can't seem to find that setting in the vSphere client....Where are those settings located? Sorry for the hassle :smileysad: but thanks for your help



  • 6.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 07:31 PM

    The settings are inside the virtual machine. I gave you steps outlined for a Microsoft OS, is that the OS the VM is running? If Linux, I don't know how to make the adjustments.



  • 7.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 07:38 PM

    Thanks, but I am running centOs 5.3. But I'll mark your answer as helpful because I also have some XP Pro machines.



  • 8.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 29, 2009 07:47 PM

    maybe this will be helpful? Sorry I don't know Linux, but if you had multiple NICs maybe it would work?

    http://www.thewebmasterscafe.net/webhosting/how-to-configure-static-ip-address-on-centos-linux.html

    or here?

    http://wiki.centos.org/HowTos/postfix



  • 9.  RE: How to give multiple ip addresses to one Virtual Machine?

    Broadcom Employee
    Posted May 30, 2009 06:33 AM

    The answer to this question is: It is no different than a physical machine.

    You don't set a VM's IP settings inside vSphere client. vSphere client is like a factory where you can make servers, but instead of them being real, they are virtual. So if you wanted 2 IP addresses on a real server how would you do it? Easiest way would be to add a new network card. So you can add a new virtual network card to a VM (we support like 10 per VM or something ridiculous) and configure it inside the OS as you normally would.

    Are there ways to have a single network interface card listen and respond to more than 1 IP address? Sure- but they are usually non-standard and would vary based on your OS configuration.

    CentOS is a knockoff of Redhat, so I would Google 'Configuring IP address in Redhat'

    See: http://www.cyberciti.biz/faq/rhel-centos-fedoracore-linux-network-card-configuration/



  • 10.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted Jun 23, 2010 10:43 PM

    I tried the above suggestion but for some reason, I can't ping another computer within that segment.

    In my setup, I have 3 IP segments:

    192.168.0.x

    192.168.130.x

    192.168.131.x

    The switches that represent the 130.x and 131.x segments have management pages, so have an assigned IP address.

    I have a Win2k8 R2 VM with three vNICs. In Windows, I've gone in and manually assigned all three an IP address within each segment. However, when I try to ping the management page of the 130.x or 131.x switch, I get a Destination Host Unreachable and then a Request Timed Out error message.

    I've tried it in a WinXP VM and a Win2k3 VM with no success.

    I have two ESX hosts that are connected to the 130.x and 131.x switches, along with a Dell MD3000i that is also connected to the same switches.

    Any ideas?



  • 11.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 30, 2009 07:07 PM

    It is called IP aliasing and is quite commonly used.

    It is quite simple. This assumes your netwok is using eth0.

    copy your /etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-eth0:0

    Edit the /etc/sysconfig/network-scripts/ifcfg-eth0:0 and change the IP to whatever you need and restart your network.

    There are GUI tools if you are using a desktop.



  • 12.  RE: How to give multiple ip addresses to one Virtual Machine?

    Posted May 31, 2009 04:45 AM

    has write the correct way to add more IP alias (on the same subnet or on the same physical network) to a RH style Linux box.

    Instead, if you need to give a IP from a different physical network, you have to follow suggestion (add a second vNIC).

    Andre

    **if you found this or any other answer useful please consider allocating points for helpful or correct answers