VMware
12 Replies Last post: Jul 28, 2006 12:12 PM by Quotient  

QUESTION: How do you setup NIC Teaming and VLAN Trunking w/Cisco gear? posted: Jul 28, 2006 10:55 AM

Click to view groundLoop's profile Novice 31 posts since
Jul 28, 2006
I just managed to implement NIC Teaming in conjunction with VLAN trunking on a pair of ESX 3.0 Servers. It works, but I'm not sure that I understand why.

The physical switch is a big Cisco 4507. What caught me off guard is that I did not need to enable Cisco's Gigabit EtherChannel functionality. I'm used to bonding together NICs in EtherChannels. So how is this working? Can anyone explain it?

Here's the basics of my config:

interface GigabitEthernet3/10
description VMware ESX - NIC 0 - Trunk A
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,200
switchport mode trunk
switchport nonegotiate
speed 1000
spanning-tree portfast
end

interface GigabitEthernet3/11
description GRANT - VMware ESX - NIC 1 - Trunk B
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,200
switchport mode trunk
switchport nonegotiate
speed 1000
spanning-tree portfast
end

Note that I'm not using the typical "channel-group XX mode on" command to bond both ports in to a Port-Channel. As a matter of fact, if I try to use EtherChannel, I start getting very strange behavior.

Would anyone be kind enough to explain the various Virtual Switch Load Balancing properties?

-groundLoop

Message was edited by: Updated topic to question?
groundLoop
Click to view Paul Lalonde's profile Master 767 posts since
Jan 16, 2006
Hi,

If I'm not mistaken, most of the newer IOS-based Catalyst switches (including the Sup IV in the 4507) support auto PAGP and LACP, which means PAGP / LACP will detect directly connected switches / hosts with matching aggregation characteristics and build the EtherChannel automatically.

You can always check the log to see if EtherChannels have been built automatically... entries will exist if either PAGP or LACP have dynamically created the channel.

Regards,
Paul
Click to view Quotient's profile Expert 394 posts since
Nov 30, 2005
Ah, my pet favourite...

ESX doesn't support dynamic IEEE 802.3ad Link Aggregation Groups (pagp & lacp port groups).
It does however support static IEEE 802.3as LAGs (Gigabit / Fast EtherChannel).

Some "network" guys will usually tell you to avoid FEC/GEC, but from my experience this is misguided.
The again I am a "server" guy, so perhaps I'm a bit biased... :)

You need to set up a channel group and observe the load balancing mechanism that is used, e.g. show etherchannel load-balance...

Hopefully, it is src-dst-ip. It doesn't matter if it's not.
This one is just the most flexible - especially if you're using NLB...
Consider changing it if there's little chance of impact...

The trick here is to setup your vSwitch load balancing policy to be compatible.
src-mac, dst-mac, src-dst-mac = MAC hash
src-ip, dst-ip, src-dst-ip = IP hash

Use a pSwitch config like this:

!
interface port-channel1
description VMware ESX - Trunk A
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,200
switchport mode trunk
switchport nonegotiate
speed 1000
spanning-tree portfast trunk

!
exit
!
interface GigabitEthernet3/10
description VMware ESX - Trunk A - NIC 0
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,200
switchport mode trunk
switchport nonegotiate
speed 1000
spanning-tree portfast trunk
channel-group 1 mode on

!
exit
!
interface GigabitEthernet3/11
description VMware ESX - Trunk A - NIC 1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,200
switchport mode trunk
switchport nonegotiate
speed 1000
spanning-tree portfast trunk
channel-group 1 mode on

!
end

That should do the trick!

Ben

EDIT: Corrected syntax error ;)
Click to view Quotient's profile Expert 394 posts since
Nov 30, 2005
Just an update to say that without GEC / FEC trunks, you will end up with a broadcast storm under load.
You will also find that you are probably only transmitting / receiving data on one nic...

I believe it works in the default configuration without EC because the "originatiing virtual port ID" (whatever that is) uses a combination of MAC and IP load balancing algorithms or uses a src-dst-mac algorithm...

I wish these setting used industry standard terms or definitions. It would make life easier...
Click to view Quotient's profile Expert 394 posts since
Nov 30, 2005
Definitely headed down the right path...
In fact you've arrived...!
:)

FYI:

To display the load balancing algorith on the pSwitch issue:

show etherchannel load-balance

For algorithm options, enter global configuration mode (conf t) and issue:

port-channel load-balance ?

Ben
Click to view Quotient's profile Expert 394 posts since
Nov 30, 2005
Ah, the cream - here it is:

Use vSwitch ip hash with:
src-ip—Load distribution on the source IP address
dst-ip—Load distribution on the destination IP address
src-dst-ip—Load distribution on the source XOR destination IP address

Use vSwitch source MAC hash with:
src-mac—Load distribution on the source MAC address
dst-mac—Load distribution on the destination MAC address
src-dst-mac—Load distribution on the source XOR destination MAC address

Use vSwitch originating virtual port ID with:
src-port—Load distribution on the source port
dst-port—Load distribution on the destination port
src-dst-port—Load distribution on the source XOR destination port

From experience src-dst-ip has better interoperability with unicast and multicast load balancing solutions, e.g. NLB, radware, F5 Big-IP, etc.
In addition, this seems to be the default for most new switches.
I just wish it was VMware's because then the switch ports could be fully commissioned (with GEC) rather than having to change the vSwitch property first.
It would also mean that ESX would support receive load balancing out of the box in most new environments.

note: http://www.vmware.com/community/thread.jspa?threadID=49308
Click to view Quotient's profile Expert 394 posts since
Nov 30, 2005
no problem, gL...

You need to post the topic as a question to use the points system...

... but that's okay, because all good things come to those who wait :)

Glad I could help.
Click to view Quotient's profile Expert 394 posts since
Nov 30, 2005
Just on a side note, you should also consider using a dummy VLAN for the native VLAN.
Create the VLAN and then issue the following command for the port-channel group and all switchports that are members:

switchport trunk native vlan <dummy VLAN ID>

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities