Virtualization Pro

Nov 3 2008   7:50PM GMT

How traffic routes between VMs on ESX hosts

Eric Siebert Eric Siebert Profile: Eric Siebert

Understanding virtual machine networking intracacies can be difficult. You might wonder how the network traffic routes between two virtual machines (VMs) that are both located on the same host server — does the traffic go out onto the network at all? The answer implies that by assigning certain VMs to the same host, vSwitch and port group you can increase network speed and reduce latency, but you’ll need to understand how traffic routes between VMs on ESX hosts first.

A vSwitch on an ESX host is basically software that is contained in the memory of the host servers that connect virtual machines (VMs) with physical NICs. Here are a few scenarios that cover how network traffic is routed in different situations between two VMs on the same host server:

Different vSwitches, same port group and VLAN - VM1 is connected to vSwitch1 and VM2 is connected to vSwitch2. In this example the VMs are plugged into separate vSwitches on the same host server. Network traffic between VM1 and VM2 goes from a physical NIC on vSwitch1 to a physical switch that it is connected to and then back to a physical NIC on vSwitch2 and then to VM2.

Click to enlarge.

Same vSwitch, different port group and VLAN – VM1 is connected to vSwitch1, Port Group A. VM2 is connected to vSwitch1, Port Group B. In this example the VMs are plugged into the same vSwitch on the same host server. Network traffic between VM1 and VM2 goes from a physical NIC on vSwitch1 to a physical switch that it is connected to and then back to a physical NIC on vSwitch1 and then to VM2.


Click to enlarge.

Same vSwitch, same port group and VLAN – VM1 is connected to vSwitch1, Port Group A and VM2 is connected to vSwitch1, Port Group A. In this example the VMs are plugged into the same vSwitch and the same port group on the same host server. Network traffic between VM1 and VM2 never leaves the host server and does not go to the physical NICs on the host server and thus never travels on the physical network.

Because network traffic between VMs on the same host, same vSwitch and same port group does not leave the host it can be advantageous to configure VMs that have a lot of network traffic between them in this manner (for example, a Web server and an application server or an application server and a database server ). Doing this will result in increased network speed and reduced network latency between the VMs. If you use VMware Distributed Resource Scheduler (DRS) you might also consider creating a rule to ensure that the VMs stay on the same host.

Click to enlarge.

3  Comments on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • DonNWH
    Eric, Thanks for the article. Do you have a visual representation of each scenario?
    0 pointsBadges:
    report
  • Eric Siebert
    Good suggestion, I'll put one together and add it the tip.
    1,605 pointsBadges:
    report
  • HarryMitschele
    Hi Eric, i am a bit confused. Maybe you can help me sort some things out. In scenario 1, Different vswitches, same PortGroup and VLAN. Different switches i understand, but same Portgroup? How can you have the same Portgroup on 2 different vswitches? Or does it matter? I thought regardsless of name of portgroups and VLAN, 2 switches configured with each one has a seperate pNIC would allways end up that the traffic be returned by the physical switch outside esx server. Please help me understand this. In scenarion 2, Same vSwitch, Different portgroup, different Vlan. Its a bit confusing, you mention Portgroup 20 and Portgroup 17, do you mean VLAN 20 and VLAN 17, and instead Portgroup A and Portgroup B? So i understand it this way, you have one vswitch with 2 Portgroups defined, Port-Group A and Port-Group B. VM-A connects to Portgroup A and VM-B connects to Portgroup B. Portgroup A has VLAN ID: 20 and Portgroup B has VLAN ID:17 What happens if both Portgroups have same VLAN ID ? Does it matter? In scenarion 3, Same vSwitch, same Portgroup, same VLAN. This is clear to me, just was a little bit confused of the 2 Grafical boxes basically showing the same Portgroup. Thanks for helping me understanding this better. regards Harry
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: