Sunday, October 10, 2010

VMware – Virtual Networking

Let’s talk something about virtual networking today. In VMware everything is virtualized. Even the networks also. Before proceeding to our discussion, lets see how a common physical network looks like.

image

If you see in this image, the two systems are connected to a router/switch (in this case, the router is also acting as switch) to enable networking between them. All these three devices are physical, and those are connected using the cables. So when you configure this type of networking A Switch, Cables and Network cards are mandatory. But is it possible to enable the same type of networking between two machines without any cables, physical switches or physical nics in between them ?

Yes, absolutely using the Grand Grand Virtualization Master VMware.

Using VMware Virtualization software we can create virtual machines, we can add virtual nics to those virtual machines, we can also create virtual switches and finally we can connect those virtual machines using these virtual devices. But one thing is absolutely not needed in this type of networking that is Cables. Everything is virtualized here. Now lets see how a simple virtual network looks like.

image

In the image beside, VM1 and VM2 are examples of Pure Virtual Networking. That means, there is no physical device at all between VM1 and VM2. They can communicate each other in all aspects using the Virtual Networking. But if you take VM0, VM1(it has two nics), VM3 are connected to respective Virtual Switches using the Virtual Nics added to them . The communication between these VM’s also takes place using the Virtual Switches which they are connected. But aprat from the internal communication, they are also able to communicate with external networks i.e Prod LAN1, Prod LAN2 and Mgmt LAN. That means they are able to communicate with the other physical machines in their external network or on the internet.

How this external communication happens?

Let me explain this in detail, we are creating virtual machines on ESX servers right, so these ESX servers contains Physical nics attached to them. And these physical nics again connected to Physical Switches using the cables. So we are using One Port on Physical Switch for this ESX server, and the other ports on the same switch are used for other ESX servers or other Physical Machines. So when you create a virtual machine on this ESX server, we will add virtual nics to it. Those virtual nics are connected to Virtual Switch on the same ESX server. So what we are doing here is, we are creating a Virtual Switch using the Physical Nics which are attached to the ESX server. When we initiate a request on the virtual machine, it goes to virtual switch (means physical nics of ESX server), from there it forwarded to physical switch. And as you switch is an intelligent device, it can transmit the same request to the target machine if the target is in same network. Other wise, it will forward it to another switch or router. In this way a Virtual machine communicates with the Physical network.

What is a VNIC and vSwitch?

A VNIC is a virtual nic which is added when we create a virtual machine. Its a software based nic (virtualized nic) which enables the communication between vm’s or between a vm or vSwitch.

A vSwitch is nothing but the physical nic which is installed on the ESX server. The same physical nic shared to all the virtual machines hosted on that particular ESX server. So it is acting as a Switch in this scenario. We can connect/configure 1016 virtual machines to use a physical nic, in other words we can create a virtual switch that contain 1016 ports. No physical switch provides these many ports in real time. And in other case, we can create the vSwitch with out any physical nic also. Its purely software based vSwitch (the same is used between VM1 and VM2).

Here you go, a virtual networking looks like below when you manage it through Virtual Center. In the below image, Help,Exchange1, Mandarin, DC2, SIF, Kurzweil are the virtual machines which are connected to vSwitch0 (2 physical nics on ESX server). In the same way iSCSI and Exchange1 are connected to vSwitch1. Here vSwitch0 and vSwitch1 are different networks (assume them as Production network and management network respectively). This the networking belong to one ESX server only, if we are configuring a Cluster using multiple ESX servers, we need to configure them in the same way. All must have identical configuration, otherwise vMotion, HA and DRS will not work properly.

image

I hope this is informative for you. Thanks for visiting my blog.

Train signal CBT, CBT Nuggets are some of the video tutorials available in the current market. You can see the demo videos in Youtube also for real-time configurations i suggest you to watch them.

Tq http://www2.isupportyou.net/2010/07/vmware-virtual-networking.html

No comments:

kunkun-laptop .... ;)