ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Eth-trunk配置-LACP模式

2020-10-31 04:00:27  阅读:463  来源: 互联网

标签:32768 0000 GigabitEthernet0 LACP trunk SW1 Eth 1GE


 

 

 

 

 

SW2

[SW2]
[SW2]int eth 20  #创建eth-trunk20
[SW2-Eth-Trunk20]mode?  
mode
[SW2-Eth-Trunk20]mode ?   #查看模式
lacp-static Static working mode  #acp模式
manual Manual working mode    #手工模式

[SW2-Eth-Trunk20]mode lacp
[SW2-Eth-Trunk20]mode lacp-static   #启用lacp模式
[SW2-Eth-Trunk20]dis this    #查看当前端口
#
interface Eth-Trunk20
mode lacp-static
#
return
[SW2-Eth-Trunk20]
Oct 31 2020 02:30:40-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk20]tru
[SW2-Eth-Trunk20]trunkport gi
[SW2-Eth-Trunk20]trunkport GigabitEthernet 0/0/1 to 0/0/4  #将物理端口加入eth-trunk20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk20]
Oct 31 2020 02:31:30-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk20]dis this
#
interface Eth-Trunk20
mode lacp-static
#
return
[SW2-Eth-Trunk20] dis eth
[SW2-Eth-Trunk20] dis eth-trunk 20  #查看详细eth-trunk20信息
Eth-Trunk20's state information is:
Local:

LAG ID: 20 WorkingMode: STATIC

#抢占延迟默认disabled   #Hash算法
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DI

#系统优先级默认32768  #物理网卡

System Priority: 32768 System ID: 4c1f-cc7b-3489

#最小活跃连接数为1,最大为8
Least Active-linknumber: 1 Max Active-linknumber: 8

#运行状态down

Operate status: down Number Of Up Port In Trunk: 0
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1 Unselect 1GE 32768 2 5169 10100010 1
GigabitEthernet0/0/2 Unselect 1GE 32768 3 5169 10100010 1
GigabitEthernet0/0/3 Unselect 1GE 32768 4 5169 10100010 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 5169 10100010 1

Partner:  #对端状态
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 0 0000-0000-0000 0 0 0 10100011
GigabitEthernet0/0/2 0 0000-0000-0000 0 0 0 10100011
GigabitEthernet0/0/3 0 0000-0000-0000 0 0 0 10100011
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

--------------------------------------------------------------------------------------------------

可以使用dis trunkmembership eth 查看状态

[SW2]dis trunkmembership eth 20
Trunk ID: 20
Used status: VALID
TYPE: ethernet
Working Mode : Static
Number Of Ports in Trunk = 4
Number Of Up Ports in Trunk = 0
Operate status: down

Interface GigabitEthernet0/0/1, valid, operate down, weight=1
Interface GigabitEthernet0/0/2, valid, operate down, weight=1
Interface GigabitEthernet0/0/3, valid, operate down, weight=1
Interface GigabitEthernet0/0/4, valid, operate down, weight=1

 

 

SW1

[SW1]
[SW1]int eth 10  #创建eth-trunk 10
[SW1-Eth-Trunk10]mode la
[SW1-Eth-Trunk10]mode lacp-static  #配置模式
[SW1-Eth-Trunk10]t
Oct 31 2020 02:58:21-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 27, the
change loop count is 0, and the maximum number of records is 4095.
^
Error:Ambiguous command found at '^' position.
[SW1-Eth-Trunk10]trunk
[SW1-Eth-Trunk10]trunkport g 0/0/1 to 0/0/4  #将端口加入trunk口
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-Eth-Trunk10]
Oct 31 2020 02:59:04-08:00 SW1 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk10
has turned into UP state.
Oct 31 2020 02:59:11-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 28, the
change loop count is 0, and the maximum number of records is 4095.
[SW1-Eth-Trunk10]dis
^
Error:Incomplete command found at '^' position.
[SW1-Eth-Trunk10]dis this
#
interface Eth-Trunk10
mode lacp-static
#
return
[SW1-Eth-Trunk10]dis eth 10  #查看eth-trunk 10详细配置
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 4c1f-cc1b-2330
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight  #可以看到SW1端up状态,123端口selected,说明两端配置都生效了,
GigabitEthernet0/0/1 Selected 1GE 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Selected 1GE 32768 3 2609 10111100 1
GigabitEthernet0/0/3 Selected 1GE 32768 4 2609 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------        #可以看到对端SW2端口信息
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10111100
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10111100
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

修改系统优先级

[SW1]
[SW1]lacp pr
[SW1]lacp priority 0  #在全局模式下将lacp优先级改为0,系统优先级现在是0,
[SW1]
Oct 31 2020 03:13:04-08:00 SW1 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk10
has turned into DOWN state.
Oct 31 2020 03:13:04-08:00 SW1 %%01IFNET/4/IF_STATE(l)[1]:Interface Eth-Trunk10
has turned into UP state.
[SW1]dis eth 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330     #系统优先级为0
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1 Selected 1GE 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Selected 1GE 32768 3 2609 10111100 1
GigabitEthernet0/0/3 Selected 1GE 32768 4 2609 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10111100
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10111100
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

修改最大活跃连接数

[SW1]
[SW1]int eth 10
[SW1-Eth-Trunk10]max ?
active-linknumber Max active linknumber in link aggregation
group
bandwidth-affected-linknumber The maximum number of the affect-bandwidth
links

[SW1-Eth-Trunk10]max acti
[SW1-Eth-Trunk10]max active-linknumber 2  #修改最大活跃数为2
[SW1-Eth-Trunk10]
Oct 31 2020 03:15:41-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 30, the
change loop count is 0, and the maximum number of records is 4095.
[SW1-Eth-Trunk10]dis eth 10  
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330
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  #可以看到只有两个端口被selected
GigabitEthernet0/0/1 Selected 1GE 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Selected 1GE 32768 3 2609 10111100 1
GigabitEthernet0/0/3 Unselect 1GE 32768 4 2609 10100000 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10111100
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10110000
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

 

查看SW2

[SW2]dis eth 20
Eth-Trunk20's state information is:
Local:
LAG ID: 20 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 4c1f-cc7b-3489
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  #可以看到SW2上也显示只有两个端口selected
GigabitEthernet0/0/1 Selected 1GE 32768 2 5169 10111100 1
GigabitEthernet0/0/2 Selected 1GE 32768 3 5169 10111100 1
GigabitEthernet0/0/3 Unselect 1GE 32768 4 5169 10110000 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 5169 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 0 4c1f-cc1b-2330 32768 2 2609 10111100
GigabitEthernet0/0/2 0 4c1f-cc1b-2330 32768 3 2609 10111100
GigabitEthernet0/0/3 0 4c1f-cc1b-2330 32768 4 2609 10100000
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

 

修改端口优先级

[SW1]int g 0/0/3  #进入端口修改优先级
[SW1-GigabitEthernet0/0/3]lacp pro
[SW1-GigabitEthernet0/0/3]lacp pr
[SW1-GigabitEthernet0/0/3]lacp priority 100  #在端口下修改优先级,只对当前端口优先级生效,全局模式下是系统优先级
[SW1-GigabitEthernet0/0/3]dis eth 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330
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 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Selected 1GE 32768 3 2609 10111100 1
GigabitEthernet0/0/3 Unselect 1GE 100 4 2609 10100000 1     #优先级已经更改为100
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10111100
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10110000
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

 

配置抢占

[SW1-GigabitEthernet0/0/3]int eth 10  #进入eth-trunk端口下
[SW1-Eth-Trunk10]lacp pre
[SW1-Eth-Trunk10]lacp preempt en
[SW1-Eth-Trunk10]lacp preempt enable   #启用抢占
[SW1-Eth-Trunk10]

[SW1-Eth-Trunk10]dis eth 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay Time: 30 Hash arithmetic: According to SIP-XOR-DIP  #系统默认30s抢占延时
System Priority: 0 System ID: 4c1f-cc1b-2330
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 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Unselect 1GE 32768 3 2609 10100000 1
GigabitEthernet0/0/3 Selected 1GE 100 4 2609 10111100 1   #可以看到在优先级值低的优先被选中 
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10110000
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10111100
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

[SW1-Eth-Trunk10]lacp pre
[SW1-Eth-Trunk10]lacp preempt de
[SW1-Eth-Trunk10]lacp preempt delay 9
^
Error: Wrong parameter found at '^' position.
[SW1-Eth-Trunk10]lacp preempt delay ?    #修改抢占延时时间,最小10s,最大180s
INTEGER<10-180> Value of preemption delay time, the default value is 30 (in
second)

[SW1-Eth-Trunk10]lacp preempt delay 20    #修改为20s
[SW1-Eth-Trunk10]dis
Oct 31 2020 03:44:52-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 33, the
change loop count is 0, and the maximum number of records is 4095.
^
Error:Incomplete command found at '^' position.
[SW1-Eth-Trunk10]dis eth 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay Time: 20 Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330
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 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Unselect 1GE 32768 3 2609 10100000 1
GigabitEthernet0/0/3 Selected 1GE 100 4 2609 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

 

 

shutdown一个端口测试

将0/0/1down掉

[SW1-Eth-Trunk10]dis eth 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay Time: 20 Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330
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 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Unselect 1GE 32768 3 2609 10100000 1   #现在是1和3被选中 
GigabitEthernet0/0/3 Selected 1GE 100 4 2609 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10110000
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10111100
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

[SW1-Eth-Trunk10]int g 0/0/1
[SW1-GigabitEthernet0/0/1]shutdown    #将1口down掉
[SW1-GigabitEthernet0/0/1]
Oct 31 2020 03:49:07-08:00 SW1 %%01PHY/1/PHY(l)[6]: GigabitEthernet0/0/1: cha
nge status to down
Oct 31 2020 03:49:08-08:00 SW1 %%01PHY/1/PHY(l)[7]: GigabitEthernet0/0/1: cha
nge status to downdis
Oct 31 2020 03:49:12-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 34, the
change loop count is 0, and the maximum number of records is 4095. eth 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay Time: 20 Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330
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 Unselect 1GE 32768 2 2609 10100010 1
GigabitEthernet0/0/2 Selected 1GE 32768 3 2609 10111100 1     #现在是2和3被选中
GigabitEthernet0/0/3 Selected 1GE 100 4 2609 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 0 0000-0000-0000 0 0 0 10100011
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10111100
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10111100
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

 

[SW1-GigabitEthernet0/0/1]undo shutdown    #启用1端口

SW1-GigabitEthernet0/0/1]dis eth 10      #20s后1端口抢占2端口
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay Time: 20 Hash arithmetic: According to SIP-XOR-DIP
System Priority: 0 System ID: 4c1f-cc1b-2330
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 32768 2 2609 10111100 1
GigabitEthernet0/0/2 Unselect 1GE 32768 3 2609 10100000 1
GigabitEthernet0/0/3 Selected 1GE 100 4 2609 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 2609 10100010 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc7b-3489 32768 2 5169 10111100
GigabitEthernet0/0/2 32768 4c1f-cc7b-3489 32768 3 5169 10110000
GigabitEthernet0/0/3 32768 4c1f-cc7b-3489 32768 4 5169 10111100
GigabitEthernet0/0/4 0 0000-0000-0000 0 0 0 10100011

 

标签:32768,0000,GigabitEthernet0,LACP,trunk,SW1,Eth,1GE
来源: https://www.cnblogs.com/coolruo/p/13900119.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有