How to configure etherchannel trunk between ESXi hosts and Cisco 2960 switch?

MichaelBalack
MichaelBalack used Ask the Experts™
on
This is using 2 VMware ESXi 6.5 hosts. There are 5 VMs per host. We are intend to have 1 vlan for management, 1 for backup segment, and 1 for the production segment. we intend to configure a NIC teaming on 2 physical network (vmnic0 & 1) port per host. Respective port-group for each vlan id were created. 101 for production, 121 for mgmt, and 122 for backup. All 3 port groups joined to the same vswitch0. Load-balancing mode is, Route based on IP hash.

This ESXi Hosts are connected to Cisco Catalyst 2960-48-port switch. The Ethernet channels were configured as follows,

int port-channel 1
  switchport trunk allowed vlan 101,121,122
  switchport mode trunk

int gigabitethernet1/15
  switchport trunk native vlan 101
  switchport trunk encap dot1q
  switchport trunk allowed vlan 101,121,122
  switchport mode trunk
  channel-group 1 mode on

int gigabitethernet1/16
  switchport trunk native vlan 101
  switchport trunk encap dot1q
  switchport trunk allowed vlan 101,121,122
  switchport mode trunk
  channel-group 1 mode on

Do these configurations work?

Thank in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Yes, at quick glance, that looks like the correct configuration.

Make sure you also set the vSwitch in ESXi to Route based on IP hash.

Also make sure you create the various Virtual Machine Portgroups with the correct VLAN Tag.
MichaelBalackSenior System Engineer

Author

Commented:
Hi Sajid,

Found the difference.

It looks like you are configure vlan 1 to be the native vlan without tag. In switch, you configured "switchport trunk native vlan 1", and other vlans must be in "switchport trunk allowed ...". Then for the vlan 1 in ESXi, you configured vlan 1 with vlan id 0.

My question is, can I replace this vlan 1 with 101, and set the vlan 101 with vlan id 0 in ESXi?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
see the vlan 1 is the default vlan on the switch ... so when you trunk port to default then you have to go with only vlan 1
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
Do not use VLAN 1, VLAN 1 is a special VLAN and should not be used.

Tagged VLANs on the physical switch need to match the VLAN tags on your  virtual machine portgroups.

So if you use 100, 101, then you need to use 100, 101 in ESXi.

I would not bother with a native VLAN for the trunk, because all this means is if you do not specify a VLAN Tag on a virtual machine portgroup, traffic will be tagged default with this VLAN

which may not be what you want!
MichaelBalackSenior System Engineer

Author

Commented:
Hi Andrew,

Thanks for your comments on the native vlan on cisco switch, and matching with those set in ESXi port-group.
MichaelBalackSenior System Engineer

Author

Commented:
Hi Sajid and Andrew,

I am schedule to have the setup and configuration on this coming Friday.
MichaelBalackSenior System Engineer

Author

Commented:
Thanks expert-Andrew in solving the problem. It works now
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
no problems

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial