分布式交换机LACP配置

 

NIC Teaming在生产环境使用非常广泛,使用基于IP哈希算法的负载均衡必须满足物理交换机必须支持链路聚合协议(Link Aggregation Control Protocol,以下简称LACP)以及思科私有的端口聚合协议(Port Aggregation Protocol,以下简称PAGP),同时要求端口必须处于同一物理交换机(如果使用思科Nexus交换机VirtualPort Channel功能不需要端口处于同一物理交换机)。

大多数使用分布式交换机的环境都使用开放标准的LACP,本节介绍分布式交换机LACP的配置。

1步,使用浏览器登录Web Client,选择分布式交换机”BDnetlab-vDS”,在管理标签中的设置选择“LACP”,如图4-3-27所示,单击新建链路聚合组图标。

技术分享

4-3-27 分布式交换机LACP配置之一

 

2步,输入新建链路聚合组的名称以及上行链路端口数,端口数为加入到链路聚合组的数量,LACP的模式配置为活动(对应物理交换机LACP的模式为ACTIVE),负载平衡的方式选择源和目标IP地址、TCP/UDP端口及VLAN”,如图4-3-28所示,单击确定按钮。

技术分享

4-3-28 分布式交换机LACP配置之二

 

3步,名为LACP01的链路聚合组创建完成,如图4-3-29所示。

技术分享

4-3-29 分布式交换机LACP配置之三

 

4步,不少人在完成第3步后就认为LACP配置完成了,实际上只进行了基础的配置,在对应的物理交换机上可以看到网卡line protocol状态为down,以及链路聚合组的状态为down,其原因是新创建的链路聚合组还未添加网卡。

BDNETLAB_4503_01#show interfaces g3/13

GigabitEthernet3/13 is up, line protocol is down(suspended)

 Hardware is Gigabit Ethernet Port, address is 000b.fd6c.e3dc (bia000b.fd6c.e3dc)

 Description: esxi01-trunk

  MTU1500 bytes, BW 1000000 Kbit, DLY 10 usec,

    reliability 255/255, txload 1/255, rxload 1/255

 

BDNETLAB_4503_01#show interfaces port-channel10

Port-channel10 is down, line protocol is down(notconnect)

 Hardware is EtherChannel, address is 0000.0000.0000 (bia 0000.0000.0000)

  MTU1500 bytes, BW 100000 Kbit, DLY 100 usec,

    reliability 255/255, txload 1/255, rxload 1/255

 

5步,在分布式交换机”BDnetlab-vDS”上单击右键,选择添加和管理主机,如图4-3-30所示。

技术分享

4-3-30 分布式交换机LACP配置之四

 

6步,在添加管理主机窗口选择管理主机网络,如图4-3-31所示,单击下一步按钮。

技术分享

4-3-31 分布式交换机LACP配置之五

 

7步,确定需要使用链路聚合组的ESXi主机,如图4-3-32所示,单击下一步按钮。

技术分享

4-3-32 分布式交换机LACP配置之六

 

8步,选择管理物理适配器,将ESXi主机的网卡添加到分布式交换机链路聚合组,如图4-3-33所示,单击下一步按钮。

技术分享

4-3-33 分布式交换机LACP配置之七

 

9步,在4.3.3小节中已经将ESXi主机上的vmnic2vmnic3网卡添加了分布式交换机上行链路中,现在需要将网卡加入到链路聚合组中,选择网卡后单击分配上行链路,如图4-3-34所示。

技术分享

4-3-34 分布式交换机LACP配置之八

 

10步,为网卡选择LACP01端口中的LACP01-03任意一个端口,如图4-3-35所示,单击确定按钮。

技术分享

4-3-35 分布式交换机LACP配置之九

 

11步,对原有的网卡进行了重新分配,确认网卡重新分配到上行链路LACP01链路聚合组,如图4-3-36所示。

技术分享

4-3-36 分布式交换机LACP配置之十

 

12步,使用相同的方法将ESXi主机其余的网卡重新分配到上行链路LACP01链路聚合组,如图4-3-37所示,单击下一步按钮。

技术分享

4-3-37 分布式交换机LACP配置之十一

 

13步,系统会自动分析ESXi主机网卡重新分配是否会对现在网络造成影响,如图4-3-38所示,单击下一步按钮。

技术分享

4-3-38 分布式交换机LACP配置之十二

 

14步,确认重新分配网卡参数否正确,如图4-3-39所示,单击完成按钮。

技术分享

4-3-39 分布式交换机LACP配置之十三

 

15步,登录对应的物理交换机上查看网卡以及链路聚合组的状态,这次可以所有状态均为up

BDNETLAB_4503_01#show interfaces g3/13

GigabitEthernet3/13 is up, line protocol is up(connected)

 Hardware is Gigabit Ethernet Port, address is 000b.fd6c.e3dc (bia000b.fd6c.e3dc)

 Description: esxi01-trunk

  MTU1500 bytes, BW 1000000 Kbit, DLY 10 usec,

    reliability 255/255, txload 1/255, rxload 1/255

 

BDNETLAB_4503_01#show interfaces port-channel10

Port-channel10 is up, line protocol is up (connected)

 Hardware is EtherChannel, address is 000b.fd6c.e3dc (bia 000b.fd6c.e3dc)

 Description: connetct to esxi01-lacp01

  MTU1500 bytes, BW 2000000 Kbit, DLY 10 usec,

    reliability 255/255, txload 1/255, rxload 1/255

 

16步,默认情况下DMZ VLAN 20分布式端口组使用的是4个活动上行链路,LACP01链路聚合组处于未使用状态,如图4-3-40,使用上下箭头可以进行调整。

技术分享

4-3-40 分布式交换机LACP配置之十四

 

17步,将LACP01链路聚合组调整为活动上行链路,Uplink14调整到未使用的上行链路,如图4-3-41所示,单击完成按钮。

技术分享

4-3-41 分布式交换机LACP配置之十五

 

18步,分布式端口组不支持链路聚合组与独立上行链路混用,如果备用上行链路中配置独立上行链路,会出现错误提示,如图4-3-42所示。

技术分享

4-3-42 分布式交换机LACP配置之十六

 

19步,分布式端口组DMZ VLAN 20配置LACP01链路聚合组完成,如图4-3-43所示。

技术分享

4-3-43 分布式交换机LACP配置之十七

 

20步,对应物理交换机针对LACP完整配置清单:

interface Port-channel10

 description connetct to esxi01-lacp01

 switchport

 switchport trunk encapsulation dot1q  #配置Trunk封装dot1q协议

 switchport trunk allowed vlan 10,20,30

 switchport mode trunk  #配置端口模式为Trunk

!

interface Port-channel20

 description connecto to esxi02-lacp01

 switchport

 switchporttrunk encapsulation dot1q  #配置Trunk封装dot1q协议

 switchport trunk allowed vlan 10,20,30

 switchport mode trunk  #配置端口模式为Trunk

 

interface GigabitEthernet3/13

 description esxi01-trunk

 switchport trunk encapsulation dot1q  #配置Trunk封装dot1q协议

 switchporttrunk allowed vlan 10,20,30

 switchport mode trunk  #配置端口模式为Trunk

 channel-group 10 mode active  #配置链路聚合协议LACP

!        

interface GigabitEthernet3/14

 description esxi01-trunk

 switchport trunk encapsulation dot1q  #配置Trunk封装dot1q协议

 switchport trunk allowed vlan 10,20,30

 switchport mode trunk  #配置端口模式为Trunk

 channel-group 10 mode active  #配置链路聚合协议LACP

 

interface GigabitEthernet3/17

 description esxi02-trunk

 switchport trunk encapsulation dot1q  #配置Trunk封装dot1q协议

 switchport trunk allowed vlan 10,20,30

 switchport mode trunk  #配置端口模式为Trunk

 channel-group 20 mode active  #配置链路聚合协议LACP

!

interface GigabitEthernet3/18

 description esxi02-trunk

 switchport trunk encapsulation dot1q  #配置Trunk封装dot1q协议

 switchport trunk allowed vlan 10,20,30

 switchportmode trunk  #配置端口模式为Trunk

 channel-group 20 mode active  #配置链路聚合协议LACP

 

 


本文出自 “3691740” 博客,请务必保留此出处http://3701740.blog.51cto.com/3691740/1697099

文章来自:http://3701740.blog.51cto.com/3691740/1697099
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3