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