So you’ve racked and stacked your server(s) or blade center, you’ve installed and configured ESX or ESXi and now you are ready to start configuring your networking. Networking is the most important part of the installation and configuration process involved with your ESX/ESXi set up. Without networking, you’ve basically got a very expensive hunk of equipment that will produce heat and not much else. Networking is what makes the world go round (not love or money), so in this case it’s very important that you set up your networking correctly.

I came across this issue just the other day when I had finished racking/stacking and installing ESXi 4.0 on a our new Dell PowerEdge M1000e blade center. First off, just getting the layout of the ethernet ports on the back of the blade center was a task in itself, if you’ve ever set up a blade center you will understand. The back of the blade center basically consists of 3 pass-through cards that have 16 ports on each card. It was only by trial and error and a little bit of guessing that I finally got all the cables run to the right place from each blade to their associated ethernet port on the Cisco 4506 switch on the other end.

Why I decided to trunk
I had a total of 5 NICs to work with for each blade. My networking configuration for each blade consisted of 1 NIC for management traffic, 1 NIC for VMkernel (vMotion) traffic, and 3 NICs for VM production traffic only. The problem that I encountered was that vCenter was a tad sluggish and migrations with vMotion were on the slow side. I decided to create a portchannel on the switch, make the two ports going to the management NICs a trunk line and then make all three VM production traffic ports one trunk line as well. That wasn’t the end of the networking though, I still had to go to each host and configure each vSwitch with NIC teaming so that it matched up with the physical switch trunk ports. This basically allowed me to have a 3GB trunk for all VM traffic, and a 2GB trunk for management traffic. Almost instantly, vCenter was snappier and the test migration with vMotion was speedy. It definitely made a difference, and is something I would recommend to others in this situation. So, “To trunk or not to trunk?” The answer for me is emphatically, YES! This may not be the answer for your scenario, but take a look at your networking and see if you can configure a portchannel and turn the ports into trunk ports.

Sample Configuration
Not all of us are Cisco geniuses, I try to be but still make many mistakes, so here is what my switch configuration looked like, in a nutshell, for one of the blades. I had to configure two portchannels first, one for the management trunk and one for the VM traffic trunk:

    Interface Port-Channel8
    switchport mode trunk
    switchport trunk encapsulation dot1q
    switchport

    Interface Port-Channel9
    switchport
    switchport mode trunk
    switchport tunk encapsulation dot1q

    Interface GigabitEthernet2/9
    switchport
    switchport mode trunk
    switchport tunk encapsulation dot1q
    channel-group 8 mode on

    Interface GigabitEthernet2/10
    switchport
    switchport mode trunk
    switchport tunk encapsulation dot1q
    channel-group 8 mode on

    Interface GigabitEthernet2/11
    switchport
    switchport mode trunk
    switchport tunk encapsulation dot1q
    channel-group 9 mode on

    Interface GigabitEthernet2/12
    switchport
    switchport mode trunk
    switchport tunk encapsulation dot1q
    channel-group 9 mode on

    Interface GigabitEthernet2/13
    switchport
    switchport mode trunk
    switchport tunk encapsulation dot1q
    channel-group 9 mode on

Configuring NIC Teaming
Now that you have this done for your trunk ports, you will next need log into vCenter and configure the networking on the vSwitch(es), these are the steps you need to take:

1. Log into vCenter and click on the host you wish to configure.

2. Click on the configuration tab of the host, and then click the Networking link located on the left in the configuration window.

3. This will show you all of the vSwitches you have configured, now you need to click the Properties link on the vSwitch you wish to configure.

4. Once in the properties of the vSwitch, highlight the vSwitch and then click Edit at the bottom of the preferences window.

5. In the edit section you will see a NIC Teaming tab at the top, click it and make sure the selection “Route based on ip hash” is selected, then click ok and exit properties.

This is assuming you have already configured your vSwitch with the NICs you want uplinked to your vSwitch. NIC teaming provides redundancy as well as increased performace for VM traffic. Give it a shot and see if you notice a change in your VM network performance, I did!

-GStuart

Greg W Stuart
Greg is the owner and editor of vDestination.com. He's been a VMware vExpert every year since 2011. Greg enjoys spending time with his wife and 3 kids. He works as a Sr. Consultant at VMware and resides in Northern Virginia, 15 minutes west of Washington DC.

One thought on “To Trunk Or Not To Trunk?

Leave a Reply

Your email address will not be published. Required fields are marked *