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'm fairly new to Hyper-V, and can't seem to find the answer to this question:

Do two virtual machines on a single Hyper-V host use the NIC when communicating with each other?

For example, take this diagram:

VM Diagram

Does the communication between the web and DB VMs go through the physical NIC, or is it able to communicate through the virtual switch without going over the physical NIC?

Also, does SR-IOV have anything to do with this, or is this more to do with going over the NIC directly without going through the host (as in the diagram on this article)?

Ideally, I'd like to see references to actual documentation explaining this, as I've searched, and can't find anything one way or the other.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

They will not use the physical NIC if the two VMs are on the same vSwitch.

SR-IOV basically takes a physical NIC and passes it through to a guest, so in that case, yes, communication would traverse that NIC since it's not part of a vSwitch.

Ideally, I'd like to see references to actual documentation explaining this, as I've searched, and can't find anything one way or the other.

It would be just as fast for you to fire up netmon on the host and watch the traffic in/out of the NIC and see that there's nothing there for intra-vSwitch communication.

share|improve this answer
    
Awesome, thanks. However, that makes this issue even more puzzling. And yes, I'll give netmon a spin. –  Jerad Rose Sep 25 '13 at 0:09
    
@MDMarra - How would that explain VM level VLAN tagging? You can create two VM's on two different VLAN's and connect them to the same virtual switch, with the physical NIC of the host server connected to a switch trunk port. I don't see how those two VM's could communicate without going through the physical NIC? –  joeqwerty Sep 25 '13 at 0:25
    
FYI, I ran netmon on the host, and while I saw a ton of activity to/from the web VM's IP (as expected), I saw zero activity to/from the DB VM's IP, confirming @MDMarra's answer. –  Jerad Rose Sep 25 '13 at 0:52
2  
MDMarra is correct. To JoeQwerty's question posted as a comment, yes, if the VMs are on different vLANs, and neither the host nor another VM is the router, then the VMs would have to communicate through an external router(s) as you would expect. –  Chris S Sep 25 '13 at 2:14

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.