vSphere-6:Part 7-Configuring dvSwitch & Port groups

In last post of this series we have seen how to configure and install licenses for vCenter Server and Esxi hosts. Also we have performed some basic tasks like creating Datacenter/Cluster and adding hosts to cluster.

In this post we will see how to configure networking in vCenter Server.

If you have missed earlier posts of this series then you can access the same by clicking on below links:

1: Introduction to vSphere 6

2: vSphere 6-Lab Setup

3: Installing and Configuring Esxi Server 6

4: Installing vCenter 6

5: Enabling AD Authentication for vCenter Server

6: vCenter Server 6 Basic Configuration

This post will be revolving around dvSwitch and associated components so that we can take benefits of some advanced features provided by dvSwitch.

If you are a newbie to VMware then I would recommend going with standard switches in beginning and playing around options to gain clarity on how virtual networking works and what are the differences between while working with physical networks and then with virtual networks in VMware vSphere.

I feel myself a bit comfortable with Standard switches now so I have decided to go with dvSwitch in my lab so that I can explore more on dvSwitch as it is a bit grey area for me.

So with this let’s get started. We will learn following things in this post:

1: Creating dvSwitch

For creating dvSwitch navigate to Home > Networking and click on datacenter. Remember dvSwitch can be created only at datacenter level.

Click on Create a distributed switch

In the new window which popped out provide a name to your dvSwitch and hit next.

Select the dvSwitch version. I am going ahead with version 6 as all my Esxi hosts are v6. If you want backward compatibility and have some older version Esxi hosts as well in your environment along with v6 then choose appropriate version of dvSwitch from the list.

Hit next after making your selection.

On the Edit settings page select the number of uplinks which you want. Also you can choose to enable disable NIOC (I am not using NIOC so I have changed it to disabled) and can chose to create a default portgroup.

Hit next.

On Ready to complete page review your settings and hit finish.

A new dvswitch will be created. You can review its summary by selecting the dvSwitch and clicking on summary tab. It will give you a basic information about your configuration and supported features.

Navigate to Manage tab and click on Edit button in right hand side corner to edit dVS settings.

On General settings page click on Edit uplink names to rename the uplinks. It is always good idea to provide a name for your uplinks which makes more sense rather than going by default name.

I have renamed my uplink names as below. This way it is easier to identify purpose of each uplink.

On Advance settings page you can set MTU settings and can select type of discovery protocol (CDP or LLDP) or can set it to disabled. Hit OK after making your selections.

2: Creating Port Groups

Now since dvSwitch has been setup, its time to create portgroups.

Select the dvSwitch which you just created and click on create a new port group.

Provide a name for your port-group and hit next.

Under Configure Settings, Select Port Binding type and Port allocation scheme.

Also choose default number of ports that this portgroup must contain. You can segregate traffic type by using Network resource pool and if you have created any then you can select from the drop down menu.

Also you can provide a VLAN id for this portgroup if you are using VLAN’s for different traffic type (management,vMotion,Replication etc). Hit next.

On security settings page, select appropriate settings for Promiscuous mode, Mac Address Change and forged transmit as per your infrastructure standards and hit Next.

If you are using Traffic shaping then you can configure this setting for the portgroup in question. I am not doing any traffic shaping in my lab so I kept it to disabled. Hit next for next setting for this portgroup.

Under Teaming and failover, select which uplink will be active uplink for this port group by clicking down arrow.

For explaining load balancing and other settings I have wrote this Blog which can help you in  determining which load balancing policy to choose in which environment.

Under monitoring, you can choose to enable Netflow if you want to analyze traffic for this portgroup else keep it disabled. Hit next to continue.

Choose No for Block all ports and hit next.

Select Enabled for Configure reset at disconnect. This can help you in reverting the portgroup setting to original if a port group get disconnected while migrating it from standard to vDS.

On Ready to complete page, review your settings and hit finish to complete portgroup creation.

3: Adding hosts to dvSwitch

Next is to add host to dvSwitch. Select the dvSwitch and click on “Add and manage hosts”

Under Select task page select “Add host and manage host networking” option to add host and migrate the vmkernel adapter and uplinks from standard switch to dvSwitch (all in one shot)

If you just want to add host and later migrate the networking components then select “Add hosts” and hit next.

On Select host page click on “+” button to add new host.

From list of Esxi hosts select the appropriate host or all hosts (if you are very much comfortable with dvSwitch and migration process). I am doing one by one so that if anything is broken in my lab, all my lab components should not break at once.

Hit OK after selecting your host.

Hit next to continue.

Under “select network adapter tasks” you get Manage physical adapters, Manage VMkernel adapters, Migrate VM networking and Manage advanced host setting options. If you want to migrate all network components from standard switch to dvSwitch in one shot then select all 4 check boxes and hit next.

First you have to assign an uplink to this host on dvSwitch. Select the physical adapter to which you want to assign an uplink and click on Assign uplink.

In my Lab, vmnic0 is my management network on standard switch, so I am assigning it the corresponding uplink (inf-mgmt) which I created on dvSwitch. Hit OK after selecting the appropriate uplink.

Hit next to assign a VMkernel adapter from dvSwitch to this uplink.

Select the VMkernel adapter (vmk0 in my case) and click on “Assign port group”.

Select the destination portgroup where vmk0 will be migrated.

Remember that the destination portgroup is on dvSwitch and vmk0 is currently on standard switch and assigned to Management Network. Hit OK after making your selection.

The following page now shows that vmk0 is currently in used by vSwitch0 and is assigned to Management Network and it will be migrated to portgroup Lab-Mgmt which is on dvSwitch.

If you want to add a new vmkernel portgroup you can do this by clicking on “New Adapter“. I am adding a new vmkernel adapter for my vMotion Network. At present I have no vmkernel adapter configured on my Standard switch and I am creating it directly on my dvSwitch.

 

A new window will popup. Click on browse to select existing portgroup for this new vmkernel adapter.

Note: If things are getting a bit complex here for you then I want to let you know that a vmkernel adapter needs a portgroup where it can be assigned. You cannot create a vmkernel portgroup alone, you need to have a portgroup where you can place this vmkernel adapter.

I have created a portgroup named vMotion_NW in advance on my dvSwitch.

From the list of available Network, select the appropriate one and click OK.

Hit Next to continue.

Next is to determine what type of traffic will be carried by this vmkernel adapter. Since this was created for my vMotion network, I choose vMotion traffic. Hit next after making your selection.

As a vmkernel adapter requires an IP address, provide the IP details and hit next.

On Ready to complete page review your settings and hit finish.

Below page shows summary of the VMkernel adapters. Note that vmk1 does not shows anything in Source Port Group because we have not migrated vmotion network from standard to dvSwitch and instead created vMotion port group on dvSwitch directly.

This was intentional from me as I wanted to demonstrate both how to migrate vmkernel adapter from standard to dvswitch and create a new vmkernel adapter on dvSwitch. Hit next to continue.

Under Analyze impact you will be warned if there is going to be any disconnection while trying to migrate network components from Standard switch to dvSwitch. If everything is configured correctly you will see a No Impact message on this page. This is something cool, isn’t it?

Hit next to continue.

Under Migrate VM networking I have nothing to migrate as I don’t have any VM installed or configured yet. Hit Next to continue.

Under advanced host settings click on “Edit settings” if you want to change max port settings etc else click next to continue.

On ready to complete page review your settings and hit finish to complete the host addition and network migration task.

 

Same way you can add all your Esxi host to dvSwitch. With vSphere 6 a new feature of using template host has been introduced which accelerates the host addition and virtual network migration from standard switch to dvSwitch. I will cover this in my next post.

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable 🙂