配置LACP.docx

上传人:b****6 文档编号:4411939 上传时间:2022-12-01 格式:DOCX 页数:9 大小:35.22KB
下载 相关 举报
配置LACP.docx_第1页
第1页 / 共9页
配置LACP.docx_第2页
第2页 / 共9页
配置LACP.docx_第3页
第3页 / 共9页
配置LACP.docx_第4页
第4页 / 共9页
配置LACP.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

配置LACP.docx

《配置LACP.docx》由会员分享,可在线阅读,更多相关《配置LACP.docx(9页珍藏版)》请在冰豆网上搜索。

配置LACP.docx

配置LACP

 

LACP配置

 

第1章

配置端口LACP汇聚

1.1端口LACP汇聚简介

端口汇聚是将多个物理端口聚合在一起形成1个汇聚组,以实现流量的负载均衡以及链路的冗余备份。

同一个汇聚组中端口的基本配置必须保持一致,基本配置主要包括STP、QoS、VLAN、端口属性等相关配置。

●STP配置包括:

端口的STP使能/关闭、与端口相连的链路属性〔如点对点或非点对点〕、STP优先级、STP开销、STP标准报文格式、报文发送速率限制、是否根保护等。

●QoS配置包括:

流量限速、优先级标记、缺省的优先级、带宽保证、拥塞防止、流重定向、流量统计等。

●VLAN配置包括:

端口上允许通过的VLAN、端口缺省VLANID。

●端口属性配置包括:

要求端口的速率、双工模式〔必须是全双工〕、链路类型〔即Trunk、Hybrid、Access类型〕一致。

在同一台交换机上,如果一个汇聚组内某个端口的这些特性被修改,则同一个汇聚组内其余端口都自动同步修改。

按照汇聚方式的不同,端口汇聚可以分为静态汇聚和动态LACP汇聚。

1.1.1端口LACP协议模式

端口的LACP协议模式有三种:

●静态模式〔on〕:

不运行LACP协议

●active模式:

active模式下端口主动发起LACP协商

●passive模式:

passive模式下端口只响应LACP协商

当与另一台设备对接时,只能静态与静态对接,active可以与active或passive对接,Passive只能与active对接。

1.1.2静态汇聚

静态汇聚方式下,汇聚组由管理员手工配置,不允许系统自动添加或删除汇聚组中的端口。

汇聚组中必须至少包含一个端口。

也就是说,与另一台设备对接时,设备之间没有LACP协议报文交互。

静态汇聚方式下,端口的LACP协议模式为静态模式〔on〕。

系统最多支持31个汇聚组〔不区分动静态〕,每个静态汇聚组最多可以配置8个端口成员。

1.1.3动态LACP汇聚

系统最多支持31个汇聚组〔不区分动静态〕,每个动态LACP汇聚组可以最多配置12个端口,但只有其中8个端口可以形成汇聚。

系统将根据端口的up/down状态、端口号大小、端口的LACP优先级来选出这8个端口。

动态LACP汇聚方式下,端口的LACP协议模式为active或passive。

1.1.4负载均衡策略

系统在进行流量的负载均衡时,会根据报文的内容分类,同一类的报文将固定走同一条物理链路,而只在不同类的报文之间实现负载均衡。

报文分类的策略如下,管理员可以任意选择一种作为负载均衡策略:

●源MAC

●目的MAC

●源MAC+目的MAC

●源IP

●目的IP

●源IP+目的IP

1.2配置LACP

1.2.1配置静态汇聚

表1-1配置静态汇聚

操作

命令

备注

进入全局配置模式

configureterminal

-

创建汇聚组

channel-groupnum

必选

删除汇聚组

nochannel-groupnum

-

进入端口配置模式下

interfaceethernetdevice/slot/port

-

将端口加入汇聚组并指定LACP协议模式

channel-groupchannel-groupmodeon

必选

将端口从汇聚组中删除:

channel-groupchannel-group

-

1.2.2配置动态LACP汇聚

表1-2配置动态LACP汇聚

操作

命令

备注

进入全局配置模式

configureterminal

-

创建汇聚组

channel-groupnum

必选

进入端口配置模式下

interfaceethernetslot/port

-

将端口加入汇聚组并指定LACP协议模式

channel-groupchannel-groupmode{active|passive}

必选

1.2.3配置负载均衡策略

表1-3配置负载均衡策略

操作

命令

备注

进入全局配置模式

configureterminal

-

配置负载均衡策略

channel-groupload-balance{dst-ip|dst-mac|src-dst-ip|src-dst-mac|src-ip|src-mac}

可选

缺省配置下,负载均衡策略为源MAC〔src-mac〕

1.2.4配置系统的优先级

在动态LACP方式下,根据系统ID来选择主从交换机。

系统ID由系统优先级和本地MAC地址组成。

表1-4配置系统的优先级

操作

命令

备注

进入全局配置模式

configureterminal

-

配置系统的优先级

lacpsystem-prioritypriority

可选

缺省配置下,系统的优先级为32768

1.2.5配置端口的LACP优先级

端口的LACP优先级只有端口工作在active或passive模式下才有效。

该参数作为选举在汇聚组内工作的端口时的依据,优先级小的端口将会被优先选择。

表1-5配置端口的LACP优先级

操作

命令

备注

进入全局配置模式

configureterminal

-

进入端口配置模式下

interfaceethernetslot/port

-

配置端口的LACP优先级

lacpport-prioritypriority

可选

缺省配置下,端口的LACP优先级为128

1.2.6LACP的显示和维护

在完成上面的配置后,可以通过下面的命令来查看配置。

表1-6LACP的显示和维护

操作

命令

备注

显示汇聚组中的端口成员相关参数

showlacpinternal[channel-group-number]

任何模式下可执行

显示系统的LACPID

showlacpsys-id

显示汇聚组中的邻接端口的信息

showlacpneighbor[channel-group-number]

1.3LACP配置举例

1.3.1组网需求

如图1-1所示,Switch-A和Switch-B为两台Switch设备,它们之间的链路为某城域网骨干传输链路之一,要求Switch-A和Switch-B之间的链路有较高的可靠性,并在Switch-A和Switch-B之间实现数据流量的负载分担。

1.3.2组网图

图1-1.LACP配置的组网图

1.3.3配置步骤

1、创建channel-group

#配置Switch-A

Switch-A#configureterminal

Switch-A(config)#channel-group1

#配置Switch-B

Switch-B#configureterminal

Switch-B(config)#channel-group1

2、配置channel-group的负载分担策略

#配置Switch-A

Switch-A(config)#channel-groupload-balancesrc-dst-mac

#配置Switch-B

Switch-B(config)#channel-groupload-balancesrc-dst-mac

3、配置动态汇聚的LACP系统优先级和端口优先级

#配置Switch-A

Switch-A(config)#lacpsystem-priority1024

Switch-A(config)#interfacerangeethernet0/1toethernet0/2

Switch-A(config-if-range)#lacpport-priority64

Switch-A(config-if-range)#exit

#配置Switch-B

Switch-B(config)#lacpsystem-priority2048

Switch-B(config)#interfacerangeethernet0/3toethernet0/4

Switch-B(config-if-range)#lacpport-priority256

Switch-B(config-if-range)#exit

4、为channel-group添加端口成员

1〕使用静态汇聚的配置方式

#配置Switch-A

Switch-A(config)#interfacerangeethernet0/1toethernet0/2

Switch-A(config-if-range)#channel-group1modeon

Remembertore-configmac-addressesassociatedwithporte0/1

Remembertore-configmac-addressesassociatedwithporte0/2

#配置Switch-B

Switch-B(config)#interfacerangeethernet0/0/3toethernet0/4

Switch-B(config-if-range)#channel-group1modeon

Remembertore-configmac-addressesassociatedwithporte0/3

Remembertore-configmac-addressesassociatedwithporte0/4

2〕使用动态汇聚的配置方式

#配置Switch-A

Switch-A(config)#interfacerangeethernet0/0/1toethernet0/2

Switch-A(config-if-range)#channel-group1modeactive

Remembertore-configmac-addressesassociatedwithporte0/1

Remembertore-configmac-addressesassociatedwithporte0/2

#配置Switch-B

Switch-B(config)#interfacerangeethernet0/3toethernet0/4

Switch-B(config-if-range)#channel-group1modepassive

Remembertore-configmac-addressesassociatedwithporte0/3

Remembertore-configmac-addressesassociatedwithporte0/4

5、在任意配置模式下验证配置结果

1〕显示本端汇聚信息

#显示Switch-A的静态汇聚信息

Switch-A(config-if-range)#showlacpinternal

Loadbalance:

src-dst-mac

Channel:

1,staticchannel

PortStateA-KeyO-KeyPriorityLogic-portActor-state

e0/1bndl---1-

e0/2bndl---1-

actor-state:

activity/timeout/aggregation/synchronization

collecting/distributing/defaulted/expired

#显示Switch-A的动态汇聚信息

Switch-A(config-if-range)#showlacpinternal

Loadbalance:

src-dst-mac

Channel:

1,dynamicchannel

PortStateA-KeyO-KeyPriorityLogic-portActor-state

e0/0/1bndl2264110111100

e0/0/2bndl2264110111100

actor-state:

activity/timeout/aggregation/synchronization

collecting/distributing/defaulted/expired

#显示Switch-B的动态汇聚信息

Switch-B(config-if-range)#showlacpinternal

Loadbalance:

src-dst-mac

Channel:

1,dynamicchannel

PortStateA-KeyO-KeyPriorityLogic-portActor-state

e0/3bndl22256300111100

e0/4bndl22256300111100

actor-state:

activity/timeout/aggregation/synchronization

collecting/distributing/defaulted/expired

2〕显示对端汇聚信息

#显示Switch-A的对端汇聚信息

Switch-A(config-if-range)#showlacpneighbor

Channel:

1

LocalPortKeyPriIDTimeoutNei-state

e0/132256000a5a02030582(90)00111100

e0/242256000a5a02030580(90)00111100

nei-state:

activity/timeout/aggregation/synchronization

collecting/distributing/defaulted/expired

#显示Switch-B的对端汇聚信息

Switch-B(config-if-range)#showlacpneighbor

Channel:

1

LocalPortKeyPriIDTimeoutNei-state

e0/31264000a5a01020371(90)10111100

e0/42264000a5a01020369(90)10111100

nei-state:

activity/timeout/aggregation/synchronization

collecting/distributing/defaulted/expired

3〕显示系统ID

#显示Switch-A的系统ID

Switch-A(config-if-range)#showlacpsys-id

1024,000a5a010203

#显示Switch-B的系统ID

Switch-B(config-if-range)#showlacpsys-id

2048,000a5a020305

6、从channel-group删除端口成员

#配置Switch-A

Switch-A(config-if-range)#nochannel-group1

Remembertore-configmac-addressesassociatedwithporte0/1

Remembertore-configmac-addressesassociatedwithporte0/2

Switch-A(config-if-range)#exit

#配置Switch-B

Switch-B(config-if-range)#nochannel-group1

Remembertore-configmac-addressesassociatedwithporte0/3

Remembertore-configmac-addressesassociatedwithporte0/4

Switch-B(config-if-range)#exit

7、删除channel-group

#配置Switch-A

Switch-A(config)#nochannel-group1

#配置Switch-B

Switch-B(config)#nochannel-group1

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 英语

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1