加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

链路聚合配置

发布时间:2020-12-14 05:06:43 所属栏目:百科 来源:网络整理
导读:二层链路聚合配置 一、手工负载分担模式配置 (1) LSW1: Huaweisys Enter system view,return user view with Ctrl+Z. [Huawei]sysn LSW1 [LSW1]int eth-trunk 1 ? //创建编号为1的eth-trunk端口 [LSW1-Eth-Trunk1]mode ? ? lacp-static ?Static working mo

二层链路聚合配置

一、手工负载分担模式配置

(1)

LSW1:

<Huawei>sys

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

[Huawei]sysn LSW1

[LSW1]int eth-trunk 1 ? //创建编号为1的eth-trunk端口

[LSW1-Eth-Trunk1]mode ?

? lacp-static ?Static working mode

? 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/3,

此时,两台设备之间的三条物理链路聚合在一起,已绑定成为一条逻辑上的链路。


二、静态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地址。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读