Well, its the start of a new “chapter” in the Back To Basic series. This time focusing on networking. Hang on I hear you say, didn’t you cover that way back when. Your right I covered Standard Switches (vSwitches?) and ploughed on into Storage (so I get my Synology and IOMega NAS setup)… But how would you do all that with distributed switches instead.
Introduction to Distributed vSwitches
Distributed vSwitches were first introduced in vSphere 4.0 – and since then various enhancements have been made as each subsequent release of vSphere has been released. At their heart, Distributed vSwitches are method of centralizing the management of the virtual network into single plane. Every VMware ESXi host added to Distributed vSwitch inherits its configuration, and those settings are stored within vCenter, rather than on the ESXi host itself. This means adding new portgroups for a new VLAN for a cluster of ESXi hosts are relatively trivial affair. The VMware ESXi host “caches” its Distributed vSwitch to local storage so if the vCenter is unavailable for whatever reason network communications are unaffected. However, no management of the Distributed vSwitch is possible until it is restored. For this reason some virtualization admins prefer that infrastructure VMs such as vCenter, SQL, Domain Controller and other VMware services and appliance remain on standard vSwitch to allow for continued management even if vCenter is offline.
Distributed vSwitch also off some features which are easier to configure than with Standard vSwitches, such as adjusting the MTU for Jumbo Frame support – in addition there are some unique features these include:
- Private Virtual LAN support (PVLAN)
- Port Binding
- Traffic Shaping for both inbound and outbound traffic
- Port Policies and Port Mirroring
- Network IO Control and Network Resource Pools
- NetFlow
- Network Rollback and Recovery
- Health Check
- Enhanced LACP Support
- Additional load-balancing options on a Distributed Portgroup called “Route based on physical NIC Load”
This part covers the basics of creating the Distributed Switch, Adding Hosts and creating portgroups for both virtual machine and VMware ESXi host networking…
UPDATE:
Since the first publication of this blogpost I’ve added some videos. The first is a “Show Me How” video which demo’s how to create a Distributed Switch using “Template Mode” in the vSphere Web Client, it then continues to show how to add VMKernel ports also using template mode to bulk assign the IP addresses required.
The second video is a “Discuss The Options” video with @chriswahl (Social media adventurer, virtualization whisperer, and global event speaker. VCDX 104. Author of http://goo.gl/C77kHn &http://goo.gl/jTBVMH ) In this video he talks about whether you should distributed switch exclusively, or whether you should use a combo of Standard & Distributed Switches, after we talk about the different network control available (load-balancing/distribution, LAGs, NOIC, Jumbo Frames and so on) and which pay dividends and which aren’t helpful in your environment.
Creating Distributed Switch
1. In the Web Client, right-click a Cluster or DataCenter, and select New Distributed Switch
2. Type a friendly name for the Distributed Switch. Names must be unique to the enter vCenter namespace, and commonly reflect a cluster of VMware ESXi hosts. Distributed vSwitch can span clusters, but many virtualization administrator prefer to curtail the scope to the host in a clusters. This means administration can be limited impact an smaller number of physical hosts. In this case DSswitch-GoldCluster01 was used to reflect the naming structure envisioned for the VMware Clusters that will be created.
3. Next, select what version of Distribute Switch you wish to use. Older formats are supported for backwards compatibility in situations where vCenter is managing a cluster of VMware ESXi hosts that have yet to be upgraded to the latest version.
4. Select the number of uplinks to be assigned. The default here is 4 vmnics. In our case vmnic0/1 have been assigned to a Standard vSwitch (vSwitch0), leaving another two physical NICs available (vmnic2/3). These physical adapters will be assigned to the Distributed Switch when we add the VMware ESXi hosts to the Distributed Switch in a later wizard. NIOC allows for advanced methods of triaging and prioritising network traffic which makes it a more sophisticated method than using Traffic Shaping on its own. Finally, you can create an initial portgroup. If you do wish for VLAN tagging to be supported this done by modifying the settings of the portgroup after it has been created in this wizard.
5. Click Finish to complete the wizard. Notice how this wizard indicates further steps including adding VMware ESXi hosts to the Distributed Switch and
After a short while the Distributed Switch should appear in the Web Client like so:
Adding VMware ESXi hosts
Note: When this article was first published I wasn’t using the “Template Mode” method of adding hosts into the Distributed Switch. This method is much more admin efficient and involves less clicking!
Once a Distributed Switch has been created we can make it accessible to the VMware ESXi hosts, and select which physical vmnics will back the movement of network traffic out to a physical switch.
1. You can add VMware ESXi hosts, by right-clicking the Distributed Switch and selecting Add and Manage Hosts…
2. Select Add Hosts
3. Click the green plus + to add hosts into the list. Enable the option to Configure identical network settings on multiple hosts (Template Mode). Template mode allows the administrator to select one reference VMware ESXi host and have its settings applied to all other hosts added to the Switch. This option massively reduces the amount clicking to complete the configuration – but does assume the physical configuration such as vmnic number is identical.
4. Select the server to be the template host, in our case we selected esx01nyc.corp.com
5. In our case we deselected Manage VMkernel Adapters, but keep Manage Physical Adapters selected. This is because will look at migrating both virtual machine network and VMkernel Networking from Standard vSwitches to Distributed Switches later
6. Select a free physical network adapter, in out case vmnic2, and assign it an Uplink container
7. Repeat this process for all the vmnics you wish to assign to the Distributed Switch, once completed – click the Apply to all button to apply this configuration to all the other VMware ESXi hosts
7. vCenter will look at your management changes, and assess the likely impact on your infrastructure.
Clicking Finish will trigger the adding of the ESXi host to the Distributed Switch, and you can confirm the hosts are correctly added and connected from
Creating and Modifying Virtual Machine Portgroups
Note: Advanced settings and options on both the Distributed Switch and Portgroup will be covered later.
The default portgroup created along side the Distributed Switch can be easily modified to support features such as VLAN tagging, and additional portgroups for VLANs can be easily added with the Web Client.
1. Right-click the target Distributed Switch, and select New Distributed Port Group
2. Type in a friendly and unique name for the portgroup
3. Assign the VLAN Tagging option, and type in the VLAN ID
4. Click Finish to create the portgroup
Creating VMKernel Portgroup
As well as virtual machine networking, it is possible to use Distributed Switches for VMware ESXi host network as well. Although many VMware Admins still prefer to use Standard vSwitches for this type of functionality – there maybe case where the administrator is compelled to do use just Distributed Switches. For instance a physical server may only have two 10Gps/20Gps/40Gps NIC interfaces which need to be teamed up in one switch technology – as physical vmnics can only be used once per switch type.
Creating a VMkernal Portgroup is a two-stage process and involves interacting with the Distributed Switch, and with the VMware ESX host to configure the VMkernel’s IP settings which are unique to the VMware ESXi. In this example we will create a portgroup to enable the VMware Fault Tolerance.
1. Right-click the target Distributed Switch, and select New Distributed Port Group
2. Type in a friendly and unique name for the portgroup
3. Assign the VLAN Tagging option, and type in the VLAN ID
4. Click Finish to create the portgroup
Once the portgroup has been created then we can transition to creating a VMKernel Port.
5. Select the VMware ESX host, and under the Manage tab, and the Networking column – select the VMKernel Adapters type
6. Click the Globe icon, to Add Host Networking
7. In the wizard, select VMKernel Adapter
8. Select option to use an Existing Distributed portgroup, and click the Browse button
9. In this case under VMkernel port settings we selected Fault Tolerance Logging
10. Configure appropriate IP settings as befits your network
11. After clicking next, the Web Client should refresh, and show the new VMK portgroup with its assign Distributed Switch. These configuration steps need to be repeated for each host
Note: For the configuration status for FT to switch from No, to Yes – the VMware ESXi host must be part of High-Availability Cluster (HA)