How traffic routes between VMs on ESX hosts

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.

No comments:

Post a Comment

Thank You for your Comments, We will read and response you soon...