It is known that VMs, through their vNIC connect to vSwitch which is in turn connected to the physical machine or ESXI host's network adapter (vmnic). The vmnic is then connected to an actual L2/L3 switch.
[VM's vnic] <---> [vswitch] <---> [vmnic] <---> [physical switch]
Now what i don't understand is how does the vmnic works ? I can't really come up with a single question to explain my doubt but below are the questions that I have been asking myself ->
- How is it able to assign IP off to the internal VMs ?
- When a external packet from the physical switch is being send to the vmnic, how does it pass it internally to the internal VMS ?
- How does it even know that the designated IP belong to a VM inside and will pass it "inwards" to the vswitch ?
- Is the vmnic using the IP or MAC address to decide whether to pass the packet inwards to the switch ?
- When a arp request for a VM's IP is send out from external, will the vmnic reply with its mac address ?
- When a arp request is send out from an internal VM, does the vmnic keep track of the mac address of the VM so that next time when it saw a reply to that MAC, it know to "forward" inside to the vSwitch
- Is it working something like a "Bridge mode" bridging the internal vswitch to the external physical switch ? Is there a mac address table belonging to the vmnic ?
- Whenever VM's IP is being assigned, will the IP be bind to the vmnic ?
- How do we list all the IPs or MACs (if there are) that are associated with a vmnic ?
Can some gurus elaborate further on the the actual flow of a IP packet/frame in and out from a VM to the physical switch ?
Thank you.
Regards, Noob