eth-trunk 笔记

LACP:Link Aggregation Control protocol 链路聚合控制协议

将多条以太网物理链路捆绑在一起成为一条逻辑链路,从而实现增加链路带宽的目的。同时,这些捆绑在一起的链路通过相互间的动态备份,可以有效地提高链路的可靠性

一、配置手工trunk,可直接在trunk下配:

int eth-trunk 1
  mode manual load-balance    #默认不显示 
  trunkport G0/0/23        #最多8条链路
  trunkport G0/0/24
  load-balance src-dst-ip | src-dst-mac | src-ip |src-mac | dst-ip | dst-mac    #选择负载模式
dis eth-trunk
也可以在接口下直接配:
int eth-trunk 1
  mode manual load-balancing    #默认不显示 
int G0/0/23
  eth-trunk 1
int G0/0/24
  eth-trunk 1
* if 在接口下直接敲时,要先清空配置:clear configuration int G0/0/23,否则报错
eth-trunk是lag,不是trunk,配置了eth-trunk,还需要按需配置接口类型,
dis port vlan eth-trunk 1    #如上配置后,显示是一个hybrid接口,现在把它配置为trunk:
int eth-trunk 1
  port link-type trunk
  port trunk allow pass vlan 10 20
这时dis stp brief,可看到eth-trunk1为一个逻辑接口

二、静态/动态LACP:

可以通过协议选举激活端口和备份端口
端口选举:
    lacp master:主
    lacp slave:从
静态 lacp (也称M:N模式,  同时实现 负载分担和冗余备份的功能,   配置如下:
lacp priority x    #全局下,配置lacp优先级,默认32768
undo int eth-trunk 1    #取消eth-trunk 1
int eth-trunk 1
  mode   lacp-static
  trunkport G0/0/22
  trunkport G0/0/23
  trunkport G0/0/24
  max active-linknumber 2    #定义活动接口数量, 在主动方上配
  lacp preempt enable    #默认active端口恢复后不抢占, 这里配置为抢占,默认抢占等待时间为30s
  lacp premmpt delay x    #默认active端口down掉后恢复时间
int G0/0/22
  lacp priority x    #设置端口优先级,越小越优

三、静态 lacp 和 动态 lacp 区别:

        静态:一旦 LACP 协商失败,eth-trunk 直接 down 掉,不能转发数据
        动态:LACP 协商失败后,eth-trunk 转为 down,但成员口继承 eth-trunk 的 vlan 属性变为 Indep,可独立进行二层数据转发。动态 lacp 仅用于华为设备与服务器直连场景

四、常用配置命令

lacp priority n    #配置lacp优先级,系统下或者接口下,默认32768,越小越优,系统下优先级相同则mac地址越小越优
lacp select priority | speed    #接口下,按优先级选或者按速率选 活动接口
lacp system-id <mac_addr>    #配置system-id,默认为桥ID
mac-address <mac_addr>    #仅当需要转发三层流量时,在接口下配置eth-trunk的mac地址    
undo local-preference disable    #使能eth-trunk接口流量本地转发优先,默认已开
int eth-trunk n
  mode manual | load-balance    #配置eth-trunk 工作模式,缺省为 load-balance
  least active-linknumber n    #配置活动接口数量,默认为1
int eth-trunk X.Y    #配置eth-trunk三层子接口,子接口范围1~99999999
lacp alarm-control link-failure    #使能lacp告警控制功能
trunk member-port-inspect    #使能eth-trunk成员接口检测功能,默认未开
dis load-balance forwarding-path unicast int eth-trunk 1
dis port forwarding-path
dis eth-trunk X
load-balance profile X    #配置eth-trunk负载分担(CE交换机)
  eth-trunk hash-mode X    #默认为1
load-balance packet | flow    #S系列交换机的负载分担
dis lacp statistics eth-trunk X    #查看eth-trunk报文收发统计信息
lacp priority 100
int eth-trunk 1
  mode lacp-static | lacp-dynamic
  lacp max active-linknumber 2
  trunk-port port-number G0/0/1 to G0/0/3
dis eth-trunk membership 1
dis load-balance profile
dis forward eth-trunk mode

五、扩展

E-trunk:Enhanced Trunk,可以做跨设备链路聚合,把链路可靠性从单板级升级到设备级,如CE和两家ISP做双归的E-trunk
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值