鏈路聚合配置

鏈路聚合.jpg

二層鏈路聚合配置ide

1、手工負載分擔模式配置orm

(1)blog

LSW1:接口

<Huawei>sys路由

Enter system view, return user view with Ctrl+Z.it

[Huawei]sysn LSW1io

[LSW1]int eth-trunk 1   //建立編號爲1的eth-trunk端口ast

[LSW1-Eth-Trunk1]mode ?form

  lacp-static  Static working modeclass

  manual       Manual working mode

注意:eth-trunk工做模式分爲手工負載分擔模式和lacp模式兩種

[LSW1-Eth-Trunk1]mode manual load-balance         //配置爲手工分鐘分擔模式

[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3   //將物理端口G0/0/1,G0/0/2,G0/0/3加入eth-trunk 1 端口

[LSW1-Eth-Trunk1]dis eth-trunk 1   //查看eth-trunk端口信息

Eth-Trunk1's state information is:

WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP         

Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              

Operate status: up          Number Of Up Port In Trunk: 3                     

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

PortName                      Status      Weight 

GigabitEthernet0/0/1          Up          1      

GigabitEthernet0/0/2          Up          1      

GigabitEthernet0/0/3          Up          1  

(2)LSW2也須要一樣的配置

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sysn LSW2

[LSW2]int eth-trunk 1

[LSW2-Eth-Trunk1]mode manual load-balance 

[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3

Info: This operation may take a few seconds. Please wait for a moment...

[LSW2-Eth-Trunk1]dis eth-trunk 1

Eth-Trunk1's state information is:

WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP         

Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              

Operate status: up          Number Of Up Port In Trunk: 3                     

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


PortName                      Status      Weight 

GigabitEthernet0/0/1          Up          1      

GigabitEthernet0/0/2          Up          1      

GigabitEthernet0/0/3          Up          1      


(3)

回顯信息中WorkingMode: NORMAL ,表示eth-trunk1的工做模式爲收工負載分擔模式,eth-trunk1包含了3個成員端口G0/0/1,G0/0/2,G0/0/3,

此時,兩臺設備之間的三條物理鏈路聚合在一塊兒,已綁定成爲一條邏輯上的鏈路。


2、靜態LACP模式配置

(1)刪除LSW1和LSW2上的G0/0/1,G0/0/2和G0/0/3接口下的配置。

LSW1:

[LSW1]int g0/0/1

[LSW1-GigabitEthernet0/0/1]undo eth-trunk 

[LSW1-GigabitEthernet0/0/1]int g0/0/2

[LSW1-GigabitEthernet0/0/2]undo eth-trunk

[LSW1-GigabitEthernet0/0/2]int g0/0/3

[LSW1-GigabitEthernet0/0/3]undo eth-trunk 

[LSW1-GigabitEthernet0/0/3]q

[LSW1]


LSW2:

[LSW2]int g0/0/1

[LSW2-GigabitEthernet0/0/1]undo eth-trunk 

[LSW2-GigabitEthernet0/0/1]int g0/0/2

[LSW2-GigabitEthernet0/0/2]undo eth-trunk 

[LSW2-GigabitEthernet0/0/2]int g0/0/3

[LSW2-GigabitEthernet0/0/3]undo eth-trunk 

[LSW2-GigabitEthernet0/0/3]q

[LSW2]


(2)建立eth-trunk端口,配置爲lacp模式,將g0/0/1,g0/0/2,g0/0/3加入eth-trunk端口

LSW1:

[LSW1]int Eth-Trunk 1

[LSW1-Eth-Trunk1]mode lacp

[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3

[LSW1-Eth-Trunk1]dis eth-trunk 1    //查看鏈路協商信息

Local:

LAG ID: 1                   WorkingMode: STATIC          //此處工做模式爲lacp-static                     

Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         

System Priority: 32768      System ID: 4c1f-cce2-765e                         

Least Active-linknumber: 1  Max Active-linknumber: 8         //默認的最大活動端口數                 

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      305     10100010  1     

GigabitEthernet0/0/2   Unselect 1GE      32768   3      305     10100010  1     

GigabitEthernet0/0/3   Unselect 1GE      32768   4      305     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


LSW2:

[LSW2]interface Eth-Trunk 1

[LSW2-Eth-Trunk1]mode lacp

[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3

[LSW2-Eth-Trunk1]dis eth-trunk 1         

Eth-Trunk1's state information is:

Local:

LAG ID: 1                   WorkingMode: STATIC                               

Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         

System Priority: 32768      System ID: 4c1f-cc59-12d7                         

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      305     10111100  1     

GigabitEthernet0/0/2   Selected 1GE      32768   3      305     10111100  1     

GigabitEthernet0/0/3   Selected 1GE      32768   4      305     10111100  1     


Partner:

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

ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState

GigabitEthernet0/0/1   32768    4c1f-cce2-765e  32768   2      305     10111100

GigabitEthernet0/0/2   32768    4c1f-cce2-765e  32768   3      305     10111100

GigabitEthernet0/0/3   32768    4c1f-cce2-765e  32768   4      305     10111100

(3)修改最大活動端口數爲2 ,使g0/0/1和g0/0/2處於select狀態,g0/0/3處於unselect狀態。

LSW1:

[LSW1]interface Eth-Trunk 1

[LSW1-Eth-Trunk1]max active-linknumber 2   //設置最大活動端口數爲2

LSW2:

[LSW2]interface Eth-Trunk 1

[LSW2-Eth-Trunk1]max active-linknumber 2


查看:

[LSW1]dis Eth-Trunk 1

Eth-Trunk1's state information is:

Local:

LAG ID: 1                   WorkingMode: STATIC                               

Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         

System Priority: 32768      System ID: 4c1f-cce2-765e                         

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      305     10111100  1     

GigabitEthernet0/0/2   Selected 1GE      32768   3      305     10111100  1     

GigabitEthernet0/0/3   Unselect 1GE      32768   4      305     10100000  1     //此處g0/0/3鏈路已處於unselect狀態


Partner:

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

ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState

GigabitEthernet0/0/1   32768    4c1f-cc59-12d7  32768   2      305     10111100

GigabitEthernet0/0/2   32768    4c1f-cc59-12d7  32768   3      305     10111100

GigabitEthernet0/0/3   32768    4c1f-cc59-12d7  32768   4      305     10100000


當g0/0/1或者g0/0/2的端口處於中斷狀態時,lacp將會自動協商,將g0/0/3轉變爲轉發(select)狀態,維持鏈路的正常,這就是lacp模式的做用


========

三層鏈路聚合配置與二層鏈路聚合配置相似,假如在路由器上配置三層鏈路聚合,須要先建立Eth-Trunk接口,然

後在Eth-Trunk邏輯口上執行undo portswitch命令,把聚合鏈路從二層轉爲三層鏈路。執行undo portswitch命令後,能夠爲Eth-Trunk邏輯口

分配一個IP地址。

相關文章
相關標籤/搜索