http://www.poppingclouds.com/2012/12/20/to-lacp-or-not-to-lacp-on-a-5-1-vds-2/

I have been recently mulling over the potential benefit of LACP in some of our environments. I want to discuss how LACP is implemented in vSphere, its limitations, and the potential benefits that I see in its use. I will also go over the process for enabling LACP from the vSphere side of things.

Beginning with vSphere 5.1, VMware supports Link Aggregation Control Protocol (LACP) on distributed switches (vDSs). LACP, as I am sure you are already aware, allows the bundling together of multiple physical links to form a single logical channel. The purpose here is to provide more efficient network redundancy and failover (as well as increased available bandwidth, which I will get to in a moment).

LACP works by simultaneously sending frames down each interface that has been enabled for LACP. If the device on the other end of the connection is configured for LACP, it will also start sending frames along those same links thereby enabling both systems to detect multiple connections between themselves and combine them into a single logical link.

So this all sounds great, the immediate question becomes, “Do I enable this in my vSphere 5.1 environment?” And as any architect would tell you (really it’s always the same answer for any design question) the answer is, “It depends.”

First we need to look closely at the limits of the current implementation of LACP in 5.1. According to the 5.1 networking guide published by VMware, these are the limitations as they exist today:

Limitations:

  • LACP is only available on vSphere Distributed Switches.
    • This means you need Enterprise Plus (or better) licensing.
  • LACP only works with IP Hash load balancing and Link Status Network failover detection.
  • LACP is not compatible with iSCSI software multipathing.
  • vSphere only supports one LACP group per distributed switch, and only one LACP group per host.
  • LACP settings do not exist in host profiles.
  • LACP between two nested ESXi hosts is not possible.
  • LACP does not work with port mirroring.

Now, depending on your environment’s functional and non-functional requirements, one or more of these may be a show stopper. For instance, if you have a budgetary constraint preventing you from purchasing Enterprise Plus licensing, that would undoubtedly rule this out. Or perhaps you are (like many environments today) aggregating all of your traffic from the host up through a pair of 10G interfaces into a stacked switch pair on a single vDS. If you are using ISCSI storage with software-based multipathing, you are probably going to run into a complication here.

You also need to be aware that the IP Hash load balancing method is not going to pay attention to the NIC utilization. Imagine a situation where a VM is accessing a backup server, it is quite possible that that VM is already saturating that link. It will never choose another uplink as long as the IP hash for it’s destination remains the same.

Okay, but don’t I get more bandwidth with the aggregated links?

Well yes and no. If you look at things from the point of view of a VM sitting in a port group, using IP Hash load balancing will let that single source IP use a single physical interface to any given destination IP. So for that one connection, no, you only have the bandwidth that is available on that single physical interface. But if we take a step back and look at a VM that is connecting to “many” destination IP addresses (for instance a web server), then yes, as a whole, that VM will have access to the total aggregate bandwidth available in the LACP group (even though each individual connection only has the total amount of bandwidth present in a single uplink). Likewise, inbound traffic will be subject to the load balancing policy that is in place on the access layer switches.

You also need to take into account the additional overhead of IP Hash, and determine if it is worth it for  your use case. For instance, the VMkernel will need to select the appropriate uplink for each connection while using IP Hash. Now imagine you have a VM that is accessing a backup server or a backend database for 90%+ of its traffic. The IP Hash calculation is useless in that scenario since it will ALWAYS choose the same physical interface (unless the IP on the remote host changes and alters the hash value).  Yet the VMkernel will still be making that calculation for every connection from that VM, even though it is always going to result in the same hash.

Lets take a look at a logical diagram of this (click to enlarge):

As you can see here, the LACP “magic” occurs pretty far up in the stack. The port groups are still subjected to the load balancing algorithm, and will be assigned one of the available physical uplinks based on that algorithm (IP hash) for that individual connection.

Bottom line: LACP can give you some pretty nice benefits in regards to failover and network failure detection. However, (in my opinion) it is not going to be better at balancing traffic, or route traffic any more efficiently than a properly configured set of static uplinks using “Route based on physical NIC Load.” Please keep in mind that I am basing that off of my research here, not on any real-world testing of LACP vs Nic Load. However it would have to be my recommendation that when using a vDS, you should stick with load-based teaming (Route based on physical NIC Load) rather than IP Hash for most use cases. It is load-aware, less complex to set up, places less overhead on the VMkernel (load calculations are made only every 30 seconds), and will route traffic just as efficiently (in my opinion) as IP Hash.

So, all that aside, there are still some notable advantages to running LACP within your vSphere environment.

Advantages:

  • It is literally “Plug and play.”
  • Link failures are detected nearly instantaneously and failover is immediate.
  • Can detect cabling mistakes and reconfigure the links automatically.

So, lets assume that you have made the decision to use LACP. You have confirmed that your upstream switches support the protocol, the limitations of LACP in a 5.1 VDS are not an issue for your environment, and you have a valid use case that warrants it. How do you go about enabling it?

It’s actually fairly simple. I will go through the steps below.

How to configure LACP on a vSphere 5.1 vDS:

First thing is first, you must use the vCenter Web client for this.

In order to use the dynamic link aggregation configuration, you must be working on a v5.1.0 switch or later:

It is also a good idea to enable the LLDP (Link Layer Discovery Protocol) since this makes the configuration on the physical switch a bit simpler:

With LLDP enabled, it is very easy to confirm which exact ports on the physical switch is connected to which individual hosts in the cluster.

Now go over to the uplink port group on your VDS. You will see the new LACP option:

You will notice, that you can also set the mode to either active or passive. This is the mode in which the vDS decides to initiate the LACP negotiation. In Passive mode, it will remain silent and not transmit any LACP BPDU frames unless the switch on the other side initiates the session. In active mode, the vDS will start transmitting the frames to start the session with the switch. Passive is the default option.

The last thing we need to do from a vDS standpoint is configure all the other port groups on this switch to use the “Route based on IP hash” load balancing method. Note that you also need to make sure that “Network failure detection” is set to “Link Status only.” Beacon probing is not supported with IP Hash load balancing. Also make sure all uplinks are active. Standby and unused uplinks are also not supported with IP Hash load balancing.

From this point you simply need to configure the LACP port grouping on the physical switch, (or switches if stacked). Again, having LLDP enabled makes this task a bit easier, especially if we are dealing with a ton of switchports here.

To LACP or not to LACP (on a 5.1 vDS)的更多相关文章

  1. Using LACP with a vSphere Distributed Switch 5.1

    Using LACP with a vSphere Distributed Switch 5.1 by Chris Wahl on Oct 15th, 2012 | 6,347 views One o ...

  2. HCNA配置静态LACP模式链路聚合

    1.静态LACP模式 静态LACP模式是一种利用LACP协议进行聚合参数协商.确定活动接口和非活动接口的链路聚合方式.该模式下,需手工创建Eth-Trunk,手工加入Eth-Trunk成员接口,由LA ...

  3. LACP学习笔记

    LACP学习笔记 来源: https://blog.csdn.net/zhengmx100/article/details/53893902 参考文档:download.h3c.com.cn/down ...

  4. LACP链路聚合控制协议

    LACP链路聚合控制协议 来源: https://www.cnblogs.com/taosim/articles/4378691.html http://storage.chinabyte.com/6 ...

  5. 配置交换机之间直连链路聚合-LACP模式

    组网图形 LACP模式链路聚合简介 以太网链路聚合是指将多条以太网物理链路捆绑在一起成为一条逻辑链路,从而实现增加链路带宽的目的.链路聚合分为手工模式和LACP模式. LACP模式需要有链路聚合控制协 ...

  6. 专题:『Channel Bonding/team』——EXPERIMANTAL!!!

    Linux内核支持的多网卡聚合方法——bond.team bond 优点:经过长时间的实践检验,具有较高的稳定性:kernel-2.4及以上内核均广泛支持 缺点:需要通过sysfs或发行版定制的网卡配 ...

  7. port-channel和channel-group

    cisco交换机上的链路聚合 2层 ethernet channel (interface)#channel-group number mode {on | auto [no-silent]|desi ...

  8. H3C Comware V3 端口聚合

    通常链路聚合有三种模式:手工汇聚.静态LACP汇聚和动态LACP汇聚. 但是V3版本下只提供了 手工聚合模式 manual 和 静态LACP聚合模式 static 两种 V3版本配置链路聚合 1,创建 ...

  9. 原创:vsphere概念深入系列四:Nic Teaming若干问题

    参考文档:http://www.hyper-v.nu/archives/marcve/2013/01/lbfo-hyper-v-switch-qos-and-actual-performance-pa ...

随机推荐

  1. C#编程(五十三)----------字典Dictionary<TKey,TValue>

    字典 关键字:Dicitionary 说明: 必须包含命名空间System.Collection.Generic Dictionary里面的每一个元素都是一个键值对(由两个元组组成:键和值). 键必须 ...

  2. 【GitLab】gitlab上配置webhook后,点击测试报错:Requests to the local network are not allowed

    gitlab上配置webhook后,点击测试报错: Requests to the local network are not allowed 操作如下: 报错: 错误原因: gitlab 10.6 ...

  3. OAuth:Access to shared resources via web applications

    A web application which wants to gain access to shared resources should redirect the user to a page ...

  4. 设计原则:多使用Specialized Types

    使用Specialized Types的好处: 可以服用:验证.计算. 更高的编程层次. 容易在UI层封装组件.

  5. MySql错误处理(三)- 错误处理的例子

    有几种错误处理的声明形式: § 如果任何错误(不是 NOT FOUND ) , 设置 l_error 为 1 后继续执行: DECLARE CONTINUE HANDLER FOR SQLEXCEPT ...

  6. mongodb如何设置主键自增

    function getNextSequence(name){ var ret = db.counters.findAndModify({ query: { _id: name}, update:{ ...

  7. 开源项目MultiChoiceAdapter详解(二)——MultiChoiceArrayAdapter的使用

    MultiChoiceArrayAdapter其实就是可以多选的ArrayAdapter了,ArrayAdpter我们已经很熟悉了.MultiChoiceArrayAdapter这个类是抽象类,所以使 ...

  8. Codeforces Round #258 (Div. 2)-(A,B,C,D,E)

    http://blog.csdn.net/rowanhaoa/article/details/38116713 A:Game With Sticks 水题.. . 每次操作,都会拿走一个横行,一个竖行 ...

  9. Linux Command : top

    top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程所占用的系统资源,类似于Windows的任务管理器.下面详细介绍它的使用方法.top是一个动态显示过程,即可以通过用户按键来不断刷 ...

  10. 数学图形之贝塞尔(Bézier)曲面

    前面章节中讲了贝塞尔(Bézier)曲线,而贝塞尔曲面是对其多一个维度的扩展.其公式依然是曲线的公式: . 而之所以由曲线变成曲面,是将顶点横向连了再纵向连. 很多计算机图形学的教程都会有贝塞尔曲面的 ...