- 积分
- 29
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 注册时间
- 2014-1-21
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 听众
- 收听
网络小学徒
|
关于vsphere环境中的link aggregation
关于为什么要在vsphere环境中使用link aggregation这里不错讨论,可以参考之前的笔记关于vshpere 4.0中的link aggregation与通过链路聚合实现iscsi i/o性能提升的可行性.中相关内容.
这里主要想写一下关于在vsphere中实现link aggregation的方法.
其实对于esxi服务器本身来讲你不需要进行额外的配置,如果你想在esxi服务器中使用link aggregation,你只要在vswitch的属性中,将网卡绑定中的 负载平衡 这里设置成"基于ip hash值"这里就算完成了.
换句话说,esxi只是可以支持链路聚合并不能进行任何配置.
接下来需要你在连接esxi上需要聚合的网卡的物理交换机上配置链路聚合.
关于链路聚合的实现方法
LACP static
一般来讲国际标准是 IEEE 802.3ad Link Aggregation Standard(IEEE 802.3ad 链路聚合标准) 中的LACP(Link Aggregation Control Protocol, 链路聚合控制协议)来实现的.这个一般是所有设备都支持的.
但是LACP中又分 LACP dynamic和LACP static
以下引用国外网友 blog中的讨论内容
admin says:
February 22, 2012 at 9:30 pm
Hi Paul,
Thanks for your comments.
Link aggregation can be configured as either dynamic or static. Dynamic configuration is supported using the IEEE 802.3ad standard, which is known as Link Aggregate Control Protocol (LACP). So you have two types, LACP dynamic and LACP static. vmware does support IEEE 802.3ad static as shown here in this vSphere 4.0 article on the VMware site
I hope this answers your questions.
参考"vshpere 4.0到目前为止不支持lacp dynamic"中的转载内容
vmware目前支持LACP协议中的LACP static但是不支持LACP dynamic
所以,如果你需要在你的网络设备中配置link aggregation来支持你的esxi服务器,你需要配置 静态LACP链路聚合(参考笔记 配置静态LACP模式链路聚合示例 )
这里引用一段vmware官方的
Sample configuration of EtherChannel / Link aggregation with ESX/ESXi and Cisco/HP switches
中关于HP交换机的配置
HP Switches Sample ConfigurationThe following configuration is specific to HP switches:
* HP switches support only two modes of LACP, ACTIVE, and PASSIVE while ESX/ESXi does not support either LACP mode currently.
* Set HP Switch port mode to TRUNK to accomplish static link aggregation with ESX/ESXi.
* TRUNK Mode of HP switch ports are the only supported aggregation method compatible with ESX/ESXi NIC teaming mode IP hash.
To configure a static portchannel in an HP switch using ports 10,11,12,13, run this command:
conf
trunk 10-13 Trk1 Trunk
To verify your portchannel, run this command:
ProCurve# show trunk
Load Balancing
Port | Name Type | Group Type
---- + --------- + ----- -----
10 | 100/1000T | Trk1 Trunk
11 | 100/1000T | Trk1 Trunk
12 | 100/1000T | Trk1 Trunk
13 | 100/1000T | Trk1 Trunk
One IP to one IP connections over multiple NIC is not supported
注意红字部分,hp交换机只支持active passive模式的LACP,目前ESX/ESXi两种都不支持.
active和passive都是dynamic LACP模式,由于他们需要相邻的端口与它们进行dynamic的LACP协商,而esxi只支持静态的LACP(LACP static)所以这里是不能使用的.
但是如果你的交换机可以配置成 静态LACP聚合链路,比如说H3C的交换机,那么esxi是可以支持的.
回到HP的这个例子中,由于HP的交换机不能配置成静态LACP链路聚合,所以vmware这里使用trunk将一组端口绑定成一个通道.
不过请注意
以下为引用
802.3ad & LACP
Link aggregation control protocol (LACP) is a dynamic link aggregation protocol (LAG) which can dynamically make other switches aware of the multiple links and combine them into one single logical unit. It also monitors those links and if a failure is detected it will remove that link from the logical unit.
VMware doesn’t support LACP. However VMware does support IEEE 802.3ad which can be achieved by configuring a static LACP trunk group or a static trunk. The disadvantage of this is that if one of those links goes down, 802.3ad static will continue to send traffic down that link.
如果你使用LACP static 或者 trunk来绑定一组端口,那么如果有某条链路发生故障,交换机还是会向这个链路发送数据.
关于以太网通道:
一般来讲是指的cisco的Ethernet channel,不过最近许多其他设备的文档或者讨论link aggregation的文章中也开始用这个词来描述link aggregation.以太网通道是实现link aggregation的一个手段,只是许多人当作功能的描述了.
这里还是建议内部讨论的时候统一用link aggregation.
esxi也支持cisco的 Ethernet channel.不过和LACP的情况一样,因为esxi不会主动与交换机进行协商,所以同样对Ethernet channel的配置有一些要求.
下图是cisco以太网通道支持的所有模式
以太网通道模式
模式
描述
on
强制LAN端口加入到通道中。在这种on模式中,
仅当一个on模式的LAN端口组与另一个配置为on
模式的LAN端口组连接时才会存在一个可用的以太
网通道。因为配置为on模式的端口不会与邻接接口
协商,在两个端口之间没有协商通信。不能在以太网
通道协议(PAgP或LACP)上配置on模式。如果一
端用户配置为on模式,则另一端必须也是on模式
auto
PAgP协议的一种模式。它把LAN端口置于被动协
商状态。端口可以响应接收到的PAgP包,但不能发
送PAgP包与其他端口进行协商。这种设置可以最大
限度地减少PAgP包的传输。但这种模式在以太网通
道中的端口成员来自交换机堆叠中的不同成员交换机
时不支持。也就是在交叉堆叠以太网通道(也就是以太
网通道中的端口来自堆叠中不同的交换机)中不支持auto模式
续表
模式
描述
desirable
PAgP协议的一种模式。它把端口置为主动协
商状态,端口可以发送PAgP包主动与其他端
口进行协商。这种模式在以太网通道中的端口
成员来自交换机堆叠中的不同成员交换机时也
不支持。亦即在交叉堆叠以太网通道中不支持
desirable模式
passive
LACP协议的一种模式。它把端口置于被动协
商状态。这种模式的端口响应接收到的LACP包,
但不发起LACP协商。这是默认的模式
active
LACP协议的一种模式。它把端口置于主动协商
状态。这种模式的端口通过发送LACP包,
发起与邻接端口的协商
从表中可以看出来,cisco如果运行在LACP协议下的时候,也只有passive active这两个参数,也就是说cisco的交换机也不支持LACP static.
不过由于esxi可以支持PAgP,所以这里依然可以用interface Port-channel 命令来建立聚合链路
以下是vmware提供的配置命令
The following is a Cisco EtherChannel sample configuration:
interface Port-channel1
switchport
switchport access vlan 100
switchport mode access
no ip address
!
interface GigabitEthernet1/1
switchport
switchport access vlan 100
switchport mode access
no ip address
channel-group 1 mode on
esxi支持PAgP吗?前面说过了,vmware支持的汇聚协议目前所知只有802.3AD static(LACP static)
就像前面说的,esxi服务器中的vswitch并不会与和它相连的物理交换机进行任何协商(发送任何的动态链路聚合协议的广播包),它只是被动的接受所以它也是不支持PAgP.
esxi的两个(或者多个,这里指你要link aggregation的物理网卡)对于cisco的交换机来讲,就相当于两个mode on模式的Ethernet interface.
所以,这里你只要将cicso交换机的端口配置成"mode on"模式就可以实现与esxi服务器之间的链路聚合了.
为什么link aggregation的时候要使用LACP
首先,可以参考日志LACP中的内容了解一下LACP协议的介绍.使用LACP最大的用处就是两端交换机可以交换信息,如果某条线路中间环节出现问题或者单向通讯,信息交换就会停止,等待计时器超时后,该条问题线路就会自动被撤出聚合组。
所以,如果你要在esxi服务器上的多个网卡上使用link aggregation,尽量在你的交换机上使用静态LACP链路聚合.
引用vmware communities上的观点:
If what you wanted to achieve was a highly available virtual network, with load-balancing across multiple VMs and an aggregated bandwitch equal to the physical capacity of all connected NICs then you may find that the default algorithm of portbased loadbalancing works just fine and is easy to manage. Only if you have a single VM which requires more than one gigabit bandwidth, and which communicates with multiple destinations, will IP hash and etherchannel make sense.
一般来说还是建议使用默认的(他说的不是我说的)除非你的vm是需要连接到不同的目的地址.并且带宽要求比较高.
|
|