jump to navigation

Virtual Networking Part 1 November 14, 2011

Posted by audiomatron in Uncategorized.
trackback

Recently, I have had the opportunity to assist several friends of mine through their first endeavors into virtualization. Now, I’m not far removed from being a vNoob myself, but having made it my goal to live and breathe virtualization lately, I find myself struggling to find ways of effectively explaining what, in reality, can be difficult concepts to explain. Chief amongst these concepts is virtual networking. In fact in every case, it seems, virtual networking is the most difficult concept both to explain and understand – and rightly so! There are about a zillion ways to configure your virtual network. While there’s no “right” or “wrong” way to do it, there are definitely some good and bad ways to go about it. To compound the problem, even the bad ways of doing virtual networking will usually yield the desired result – and that is to get some VMs running and accessible from the network.

There’s more to virtual networking than can be covered in a single blog post, so this will be the first of several. Bear in mind, that I am certainly not an expert (hence the name of my blog) at virtual network design. Also, since my focus here is, as always, small business, I will try to focus on implementation of virtual networking in what I’ve found to be typical small business environments. In this first post, I shall attempt to de-mystify virtual networking concepts, and give sort of a broad overview. For the purposes of this article, we will focus on virtual networking on a single ESXi host rather than vSphere as a whole.

A Virtual World

Often, to explain a difficult concept, it is best to use a metaphor. I can think of no better metaphor than to compare virtual environments to the environments you might find in an online role-playing game. In these games, you have virtual people, virtual shops, virtual forests, virtual towns – virtual versions of many things you would find in real life. A virtual networking environment is no different. Inside every ESXi host, you’ll find virtual versions of just about everything you’d find in a physical network – virtual servers, virtual switches, and perhaps even virtual firewalls and routers. It is like an entire datacenter contained inside a single server. Let’s examine some of these components more closely:

Virtual Switches

In any network, the device that glues the whole thing together is the switch. Physical switches allow you to connect all of your PCs, servers, printers, etc. together using wires. A virtual switch is no different in that it allows all of your virtual servers and PCs to be connected together, sans the wires, of course. Just as you connect the NIC on a physical machine to a physical switch, in the same way, you connect the virtual NIC on your virtual machine to a virtual switch.

If you take a look at the network adapter settings under the virtual machine properties for one of your virtual machines, this is where you connect the virtual NIC to a virtual switch. Here, you have check boxes to connect or disconnect the virtual NIC and a drop down box that lets you select the virtual switch to which you wish to connect the virtual NIC. Any virtual switch that contains a virtual machine port group can be connected to by the virtual NICs of virtual machines (more about port groups later).

Uplinks

In order to connect your virtual switches to the rest of your LAN, you must specify an uplink. This is done by adding one of your ESXi host’s physical NICs to a virtual switch. In doing this, all traffic that flows back and forth between your virtual servers and your physical network will go through the physical NIC you specify as your uplink. Basically, in the same way that you would connect two physical switches together with a wire, you are using a wire to connect your virtual switch to a physical switch on your network. You can have many virtual machines attached to the same vSwitch, using the same uplink to the physical network.

The picture below illustrates how virtual machines (VMs) are connected to virtual switches (vSwitches), and how physical NICs are used to uplink the vSwitch to a physical network.

Port groups

In ESXi, port groups specify what type of traffic is handled by a vSwitch. There are two basic types of port groups – virtual machine and VMkernel. A virtual machine port group does as its name suggests – it handles LAN traffic for virtual machines. VMkernel ports are used to handle traffic other than virtual machine traffic, such as management traffic, vMotion traffic, and iSCSI and NFS. In fact, when creating a VMkernel port group, you can specify which of these types of traffic is handled by each particular VMkernel port group. Additionally, you can specify active and stand-by uplink NICs for each of your port groups, which is vital in being able to segregate the various types of traffic, as well as providing a method for failover in the event one of the NICs goes bad.

Below is an example of a very simple setup. This is by no means a good way to configure your NICs – I’m only using it for demonstration purposes. This is one of the hosts in my lab with no external or shared storage. The ESXi host has twoNICs. I have one vSwitch configured with two port groups – one for virtual machines, and one for VMkernel. As we can see, I have both NICs assigned to this vSwitch. If we were to dig in further we would see that I have one NIC set as the active NIC for the virtual machine port group, and the other NIC assigned to the VMkernel, using eachother as fail overs. My next article will have more on use of port groups and effective use of multiple NICs.

Conclusion (for now)

As I mentioned before, virtual networking can be extremely complicated. It was my hope, with this article, to lay the ground work for better understanding of virtual networking. I believe that understanding anything on a broad level is important before diving into the details. I sincerely hope these articles will be helpful to someone. After all, it was seeing folks who are new to virtualization trying to grasp these concepts that prompted me to write this.

In the next article, I will attempt to explain how to effectively utilize port groups based on the number of physical NICs available.

Anyway, if you are new to virtualization, what are some hang-ups you have run across? How can I help? If you are not new to virtualization, did I explain this well? I could always use some sage-like advice from those who’ve been around a while!

Advertisements

Comments»

1. Imran Siddiqui - January 31, 2012

Have been looking to understand virual networking for a while and this is the first post, it seems explaining from dummy’s point of view, which was extremely important! Waiting for the next post!

audiomatron - February 1, 2012

I actually have done the next post in the series https://whomademeanexpert.com/2011/12/21/virtual-networking-part-2-goals-and-considerations/ . I have been unusually busy at work and at home so I have not been able to continue the series since then. As always, I’m glad to be able to help. Your encouraging comments have served to motivate me to get back to writing this series. For a while I wasn’t sure if this stuff was helpful to anyone… Thanks!

2. audiomatron - February 1, 2012
3. Bruce G. - March 4, 2012

I am in a technical writing class a school and need a SME for a formal proposal. My paper is a recommendation to develop a vmware box that allows a company to train the IT people on. Also the vmware machine will be used to test software and patches on the network. My problem is finding a SME to answer 8-10 questions, would you consider helping me?

audiomatron - March 6, 2012

I don’t know that I’m necessarily a SME. I’m not certified or anything like that. I can certainly attempt to answer some questions, or perhaps point you in the direction of someone who can. My email address can be found on the contact page. I’ll see what I can do!

Bruce G. - March 6, 2012

Sorry I did not see your email, here are my questions:
Questions for SME
1. We have about 10 IT people; for a team of my company’s size what is the best configuration for my testing network?
2. I am planning on vmware for my virtual software, do you think is the better software to use?
3. What is the best way to setup the environment?
• Servers
• Workstations
• Switches
4. What other types of software should I consider?
5. What kind of issues do people run into is this type of environment?
6. Do you think there is a better way to do the same thing I am trying to do?
7. How much can I expect to spend on a setup like the one we are talking about?

Thanks for the help


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: