Configuring a Cisco switch to provide network redundancy for VMware

If you only have two network adapters in your server, you will likely want to utilize a port-channel trunk  between your switch and server.  This allows you trunk your VMWare management VLAN and your virtual machine VLANS across both adapters for increased bandwidth and redundancy. If you’re using a Cisco switch, here’s a sample port channel and switchport configuration:

The following port-channel configuration binds ports gig 1/0/30 and 2/0/30 to trunked port-channel group 5 and prunes ALL VLANs except 1, 10 and 20 which are allowed across the trunk.

interface Port-Channel 5
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20
switchport mode trunk
spanning-tree portfast trunk
!
Interface Gigabit-Ethernet 1/0/30
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20
switchport mode trunk
spanning-tree portfast trunk
channel-group 5 mode on
!
Interface Gigabit-Ethernet 2/0/30
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20
switchport mode trunk
spanning-tree portfast trunk
channel-group 5 mode on

Within VMWare, add the second physical adapter to the vSwitch, then set both the Virtual Port Group (or Management Interface) and vSwitch to “Route based on IP hash” instead of “Route based on the originating port ID”.

vmnicipHash

Also, don’t forget to tag the VLAN ID on any VM Port Group to assign specific hosts to a specific VLAN.
vmnicVLAN