Okay, so we’ve already configured the basics on both our switches, and ESXi servers, now it’s time to configure the LAG groups, and vSwitches for each of our necessary purposes.
We’re going to configure one LAG group for each of the following:
- Production network traffic for the VMs
- iSCSI Traffic
- Management and vMotion
- We’re only going to be using one NIC for Fault Tolerance, so we’re not going to configure a LAG group for that.
- Open your connection to your switch stack
- switchstack> enable
- switchstack# config
- switchstack(config)# interface range ethernet 1/g10,2/g10
- switchstack(config-if)# channel-group 10 mode on
- switchstack(config-if)#exit
- switchstack(config)# interface port-channel 10
- switchstack(config-if-ch10)# spanning-tree portfast
- switchstack(config-if-ch10)# hashing-mode 6
- switchstack(config-if-ch10)# switchport mode trunk
- switchstack(config-if-ch10)# switchport trunk allowed vlan add 2-3
- switchstack(config-if-ch10)# exit
UPDATE: if you are configuring iSCSI for an Equal Logic Array, please see this post instead of configuring LAGs for you iSCSI traffic.
- switchstack(config)# interface range ethernet 1/g11,2/g11
- switchstack(config-if)# channel-group 11 mode on
- switchstack(config-if)#exit
- switchstack(config)# interface port-channel 10
- switchstack(config-if-ch11)# spanning-tree portfast
- switchstack(config-if-ch11)# hashing-mode 6
- switchstack(config-if-ch11)# switchport mode access
- switchstack(config-if-ch11)# switchport access vlan 5
- switchstack(config-if-ch11)# mtu 9216
- switchstack(config-if-ch11)# exit
- switchstack(config)# interface range ethernet 1/g12-1/g13,2/g12
- switchstack(config-if)# channel-group 12 mode on
- switchstack(config-if)#exit
- switchstack(config)# interface port-channel 12
- switchstack(config-if-ch12)# spanning-tree portfast
- switchstack(config-if-ch12)# hashing-mode 6
- switchstack(config-if-ch12)# switchport mode trunk
- switchstack(config-if-ch12)# switchport trunk allowed vlan add 2,6-7
- switchstack(config-if-ch12)# exit
Don’t forget to “copy run start” on you switch, you don’t wan’t to lose all that work you’ve just done! Okay, our first few LAGs are configured, time to setup our first ESXi server’s network configuration:
Now comes time to configure the networking on the first ESXi server. The first thing we’re going to do is setup the vSwitch that corresponds to the LAG group for the Management and vMotion vlans. Follow these steps:
- Log into your ESXi server using the vSphere Client.
- Click on the Configuration tab at the top.
- Click on “Networking” under the hardware section, in the left pane.
- We’re going to be adding a new vSwitch, so click on “Add Networking…” in the top right hand corner of the screen.
- Select the Option for “VMkernel”, because this vSwitch will be supporting non- Virtual Machine tasks, click Next.
- Select “Create New Virtual Switch” and then check two vmnics (make sure these two are plugged into port 10 on each switch) and then press “Next”.
- Give this network the label of “MGMT_Network” or whatever you’ve named vlan 2 on the switches, for VLAN ID, enter the value of “2”, Check the box labeled “use this port group for management traffic”, click “Next”.
- Assign an IP address and subnet mask that are within the subnet of vlan 2. Click Next.
- Click “Finish”.
- Find the newly created vSwitch and click on “Properties”.
- Click “Add” to add a new port group.
- Select “VMkernel” again, and then click “Next”.
- Give this port group a name of “vMotion”, and a VLAN ID of “3”, Check the box labeled “use this port group for VMotion”, click “Next”.
- Click Finish.
- Select the “vSwitch”, which should be the first item in the list when the Port Group window closes, click “Edit…”.
- Click on the “NIC Teaming” tab.
- Change the “Load Balancing:” setting to “Route based on IP hash”.
- Leave the defaults of “Link status only” and “Yes” for the middle two settings, and then change the setting “Failback:” to “No”.
- Verify that both vmnics are listed under the “Active Adapters” section.
- Close all of the windows.
- iSCSI port group, two vmnics: both plugged into the ports that make up LAG 11 on the switches, assigned vlan 5, assigned the name “iSCSI” or whatever you named the vlan on the switch, assigned a IP address in that subnet, NIC teaming configuration exactly the same as the first vSwitch we configured.
- Fault Tolerance port group, one vmnic: plugged into one of the switch ports configured as an access port on vlan 4, VLAN ID of 4, a name that matches the vlan name on the switches, check the box for “Fault Tolerance Logging”, and an ip address in the corresponding subnet, leave all of the NIC Teaming settings in their default states.
- and finally a vSwitch that contains a port group for each of your production VM networks, Assign VLAN IDs to each, and plug them into the switch ports that make up your final LAG groups. Make sure the NIC Teaming settings match the example LAG group above. Don’t forgot to create a Port Group for MGMT traffic otherwise your vCenter server wont be able to communicate to the ESXi servers later.
Show interfaces port-channel
– this will display the status of all interfaces in all LAG groupsshow interfaces switchport port-channel XX
– This will display a list of all tagged or untagged vlans on this particular LAG group or Ethernet port
Pingback: Finishing the configuration of the EqualLogic PS4000E | The Day to Day Findings of an IT Engineer
Sean – Great articles. You are only creating on LAG group for production VMs. Is there any limit on the number of switch ports you should use for a single LAG group? What if you had 10 Servers with 4 NICS each for the Production VM Traffic? Does a LAG group of 40 switch ports make sense?
Jason
Pingback: Setup and Install the EqualLogic Multipathing Agent for VMWare ESXi 5 | The Day to Day Findings of an IT Engineer
Great article. I was trying to configure using the web GUI but the LAG would not show as active. Done from the CLI, it came right up – no problems.