其他分享
首页 > 其他分享> > 配置交换机之间直连链路聚合-LACP模式

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

作者:互联网

组网图形

LACP模式链路聚合简介

配置注意事项

组网需求

配置思路

操作步骤

<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1   //创建ID为1的Eth-Trunk接口
[SwitchA-Eth-Trunk1] mode lacp   //配置链路聚合模式为LACP模式
[SwitchA-Eth-Trunk1] quit
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] eth-trunk 1   //将GE0/0/1接口加入Eth-Trunk1中
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] eth-trunk 1   //将GE0/0/2接口加入Eth-Trunk1中
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] eth-trunk 1   //将GE0/0/3接口加入Eth-Trunk1中
[SwitchA-GigabitEthernet0/0/3] quit
[SwitchA] lacp priority 100   //系统LACP优先级缺省为32768,修改SwitchA的优先级大于SwitchB的优先级,作为主动端
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] max active-linknumber 2   //链路聚合组活动接口数的上限阈值缺省是8,修改活动接口数的上限阈值为2
[SwitchA-Eth-Trunk1] quit
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] lacp priority 100   //接口LACP优先级缺省为32768,修改GE0/0/1接口的LACP优先级为100,作为活动接口
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] lacp priority 100   //接口LACP优先级缺省为32768,修改GE0/0/2接口的LACP优先级为100,作为活动接口
[SwitchA-GigabitEthernet0/0/2] quit

  # 创建VLAN10和VLAN20并分别加入接口。SwitchB的配置与SwitchA类似,不再赘述。

[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 0/0/4
[SwitchA-GigabitEthernet0/0/4] port link-type trunk   //设置接口链路类型为trunk,接口缺省链路类型不是trunk口
[SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10
[SwitchA-GigabitEthernet0/0/4] quit
[SwitchA] interface gigabitethernet 0/0/5
[SwitchA-GigabitEthernet0/0/5] port link-type trunk   //设置接口链路类型为trunk,接口缺省链路类型不是trunk口
[SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20
[SwitchA-GigabitEthernet0/0/5] quit

   # 配置Eth-Trunk1接口允许VLAN10和VLAN20通过。SwitchB的配置与SwitchA类似,不再赘述。

[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] port link-type trunk   //设置接口链路类型为trunk,接口缺省链路类型不是trunk口
[SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
[SwitchA-Eth-Trunk1] quit

  # 查看各Switch设备的Eth-Trunk信息,查看链路是否协商成功

[SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:                                                                          
LAG ID: 1                       WorkingMode: LACP                             
Preempt Delay: Disabled         Hash arithmetic: According to SIP-XOR-DIP       
System Priority: 100            System ID: 00e0-fca8-0417
Least Active-linknumber: 1      Max Active-linknumber: 2                        
Operate status: up              Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName                    Status     PortType PortPri   PortNo PortKey   PortState  Weight
GigabitEthernet0/0/1             Selected  1GE       100      6145    2865      11111100     1
GigabitEthernet0/0/2             Selected  1GE       100      6146    2865      11111100     1
GigabitEthernet0/0/3             Unselect  1GE       32768    6147    2865      11100000     1

Partner:
--------------------------------------------------------------------------------
ActorPortName                     SysPri    SystemID    PortPri PortNo PortKey   PortState
GigabitEthernet0/0/1              32768  00e0-fca6-7f85  32768     6145   2609      11111100
GigabitEthernet0/0/2              32768  00e0-fca6-7f85  32768     6146   2609      11111100
GigabitEthernet0/0/3              32768  00e0-fca6-7f85  32768     6147   2609      11110000
[SwitchB] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1                      WorkingMode: LACP
Preempt Delay: Disabled        Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768         System ID: 00e0-fca6-7f85
Least Active-linknumber: 1     Max Active-linknumber: 8
Operate status: up             Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName                   Status     PortType    PortPri   PortNo  PortKey   PortState  Weight
GigabitEthernet0/0/1            Selected  1GE        32768      6145    2609      11111100     1
GigabitEthernet0/0/2            Selected  1GE        32768      6146    2609      11111100     1
GigabitEthernet0/0/3            Unselect  1GE        32768      6147    2609      11100000     1

Partner:
--------------------------------------------------------------------------------
ActorPortName                     SysPri    SystemID     PortPri  PortNo  PortKey   PortState
GigabitEthernet0/0/1              100    00e0-fca8-0417  100      6145     2865      11111100
GigabitEthernet0/0/2              100    00e0-fca8-0417  100      6146     2865      11111100
GigabitEthernet0/0/3              100    00e0-fca8-0417  32768    6147     2865      11110000

 

标签:直连,GigabitEthernet0,接口,LACP,链路,SwitchA,Eth
来源: https://www.cnblogs.com/zhangwencheng/p/13903131.html