Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am very interested in how VMware networking works. I have scoured the VMware website and read their data sheets, this has given me some basic knowledge. I now have some questions.

Lets assume that we have a physical server running the VMware hypervisor. The physical server is running a Virtual Machine. The physical box has one physical NIC. The NIC is connected to a switch, as so is a desktop client.

Now, this is where my first question lies. The VM has an IP address: 192.168.1.1. How do desktop clients on the network communicate with this VM? So, the client pings 192.168.1.1. The ping packet is sent to the switch. The switch checks its MAC address table and sees that 192.168.1.1 is associated with the MAC address of the physical NIC. Correct?

I then assume that the ping packet is sent to the server's physical NIC, where the hypervisor routes the packet to the VM thats using 192.168.1.1?

Please could you give me a run down as to how VM networking works?

share|improve this question
    
VMWare is a company, they make products, which products are you referring to? –  Chopper3 May 14 '10 at 13:04
    
is this for workstation/server/esx ? Network handling is different in each (although the concepts are the same) –  Jim B May 14 '10 at 14:08
    
Thanks guys, I was thinking in terms of ESX. Just trying to get my head around setting up a few ESX servers to trial. –  Ross Wilson May 24 '10 at 13:48

2 Answers 2

If you're talking about something like ESX or ESXi, your VM's are networking through a virtual switch in the physical server. So if your VM has an ip address of 192.168.1.2, and the VM server itself is 192.168.1.1, your ping from the client to 192.168.1.2 will go to the switch and from there to the server which then routes it (invisibly) to 192.168.1.2. As far as your client is aware, the virtual system is as real as the VM server.

Your switch just acts like there's multiple systems fed through a single port, much like it would if you had another switch connected to the switch.

share|improve this answer
    
Well put - in simple terms the physical switch sees the connection to the ESX server NIC(s) the same way it would see a connection to another physical switch, in ESX terminology they are uplink ports for the Virtual Switches. This all happens at layer 2. At the layer 3\Layer 2 boundary the ARP tables map the VM's IP-address(es) to the the MAC addresses of the VM's, the MAC addresses of the physical ESX NIC's are never involved. –  Helvick May 14 '10 at 22:11
    
Thanks Bart & Helvick. Your two explanations helped a lot. I'm still reading up on it all though ... might be here a while, ha. –  Ross Wilson May 24 '10 at 13:49

It sounds like you're assuming that there is a 1:1 mapping between IP addresses and physical network cards. That most certainly is not the case. Even outside of a virtualized environment, it's quite common to have a given physical network card be assigned and respond to traffic to/from several IP addresses. In VMware, this is no different. The physical network card on the server knows which IP addresses reside on that physical host and the network will ARP for those IP addresses and respond to traffic as per usual.

share|improve this answer
    
Oh, ok that makes a lot more sense. You are correct, I was indeed assuming a 1:1 mapping. Thanks for clearing that up. –  Ross Wilson May 24 '10 at 13:50

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.