Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running an Ubuntu VM on a Windows 7 host. I have two questions:

  1. I think that on Windows, localhost is a loopback address, and sending packets to it doesn't actually transmit any data on the wire. Is that correct? On the Ubuntu VM I have a localhost as well, pointing to 127.0.0.1. Is it the same thing?

  2. Is it possible to send data from the VM to the host? For example, when I install software on the Ubuntu VM, can I have it send a message to the Windows host? What IP should I use?

share|improve this question
    
I'm not sure what you mean by "send a message"; you can't just send arbitrary packets and expect it to do anything useful. What are you actually trying to accomplish? –  Michael Mrozek Aug 2 '12 at 15:31
    
It would also make your question clearer if you mentioned what visualization software you are using. Example: VMware, Xen, VirtualBox –  Tim Aug 2 '12 at 15:34
    
The above is supposed to read "Virtualization", for some reason I cannot edit it. –  Tim Aug 2 '12 at 19:13
add comment

2 Answers

Most Virtual hosting platforms support either "Bridged", "NAT" and "Host Only" networking. Using Bridged networking will make it seem like both machines are on the same LAN together. Using "Host Only" will allow communication between both devices (exclusively).

It is very common for most Operating Systems to have a loopback adapter. Even if there is no physical network adapter. These virtual interfaces do not send packets out onto a physical network.

Do not attempt to use the local loopback interface for your VM networking. I would recommend setting your Host networking to "Bridged", set the Ubuntu guest to obtain a DHCP address (assuming there is a DHCP/Router on your network), and use the IP address assigned via DHCP.

share|improve this answer
add comment
  1. The loopback interface i.e. 127.0.0.1 is provided with every operating system to check whether the network stack of that OS is working fine or not. Actually whole subnet 127.0.0.0/16 is for localhost only. The interface lo which u see after giving the ifconfig command is that loopback interface only.

  2. To have communication between the Host Machine and the Guest Machine(VM), you need to set them in bridged mode which means that its like both the Host and Guest OS are connected to the same switch of a LAN. You can communicate using NAT mode also, which means that the VirtualBox(or Vmware) acts as a Network Address Translator in between the Windows and Ubuntu VM. Host-Only mode is to have communication in between host machine and VM only but not with any other node in the outside world.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.