当前位置:首页 » 币种行情 » ethtrunk下配置lacp

ethtrunk下配置lacp

发布时间: 2022-09-19 16:40:53

1. 华为eth-trunk配置

VRRP与接口状态联动简介

VRRP主备备份功能有时需要额外的技术来完善其工作。例如,Master设备到达某网络的链路突然断掉时,VRRP无法感知故障进行切换,导致主机无法通过Master设备远程访问该网络。此时,可以通过VRRP与接口状态联动,解决这个问题。

当Master设备发现上行接口发生故障时,Master设备降低自己的优先级(使得Master设备的优先级低于Backup设备的优先级),并立即发送VRRP报文。Backup设备接收到优先级比自己低的VRRP报文后,切换至Master状态,充当VRRP备份组中新的Master设备,从而保证了流量的正常转发。

配置注意事项

· 保证同一备份组的设备上配置相同的备份组号(virtual-router-id)。

· 不同备份组之间的虚拟IP地址不能重复,并且必须和接口的IP地址在同一网段。

· 一个VRRP备份组最多可以配置监视8个接口。并且,当设备为IP地址拥有者时,不允许对其配置监视接口。

组网需求

如图1所示,用户通过Switch双归属到SwitchA和SwitchB。用户希望实现:

· 正常情况下,主机以SwitchA为默认网关接入Internet,当SwitchA或者其上下行接口故障时,SwitchB接替作为网关继续进行工作,实现网关的冗余备份。

· SwitchA和SwitchB之间增加带宽,实现链路冗余备份,提高链路可靠性。

· SwitchA故障恢复后,可以在20秒内重新成为网关。

配置思路

采用VRRP主备备份实现网关冗余备份,配置思路如下:

1. 配置各设备接口IP地址及路由协议,使各设备间网络层连通。

2. 在SwitchA和SwitchB上部署VLAN聚合,实现VLAN101~VLAN180二层隔离三层互通,节省了IP地址。

3. 在SwitchA和SwitchB上创建Eth-Trunk接口并加入成员接口,实现增加链路带宽,提供链路冗余备份。

4. 在SwitchA和SwitchB上配置VRRP备份组。其中,SwitchA上配置较高优先级和20秒抢占延时,作为Master设备承担流量转发;SwitchB上配置较低优先级,作为备用设备,实现网关冗余备份。

5. 在SwitchA上配置VRRP与接口状态联动,监视接口GE1/0/1和接口GE1/0/2,实现主设备故障时,VRRP备份组及时感知并进行主备切换。

2. 华为PTN3900设备传输链路聚合组怎么配置

在两台S-switch 设备上配置静态LACP 模式链路聚合组,提高两设备之

间的带宽与可靠性,具体要求如下:
l M 条活动链路具有负载分担的能力。
l 两设备间的链路具有N 条冗余备份链路,当活动链路出现故障链路时,备份链路替
代故障链路,保持数据传输的可靠性。
 

 
配置思路
采用如下的思路配置静态LACP 模式链路聚合:
1. 在S-switch 设备上创建Eth-Trunk,配置Eth-Trunk 为静态LACP 模式。
2. 将成员接口加入Eth-Trunk。
3. 配置接口Eth-Trunk 处理BPDU 报文。
4. 配置系统优先级确定主动端。
5. 配置活动接口上限阈值。
6. 配置接口优先级确定活动链路。
数据准备
为完成此配置例,需准备如下的数据:
l 两端S-switch 设备链路聚合组编号。
l S-switch-A 系统优先级。
l 活动接口上限阈值。
l 活动接口LACP 优先级。
配置步骤
1. 创建编号为1 的Eth-Trunk,配置它的工作模式为静态LACP 模式
# 配置S-switch-A。
<Quidway> system-view
[Quidway] sysname S-switch-A
[S-switch-A] interface eth-trunk 1
[S-switch-A-Eth-Trunk1] mode lacp-static
[S-switch-A-Eth-Trunk1] quit
# 配置S-switch-B。
<Quidway> system-view
[Quidway] sysname S-switch-B
[S-switch-B] interface eth-trunk 1
[S-switch-B-Eth-Trunk1] mode lacp-static
[S-switch-B-Eth-Trunk1] quit
2. 将成员接口加入Eth-Trunk
# 配置S-switch-A。
[S-switch-A] interface ethernet 0/0/1
[S-switch-A-Ethernet0/0/1] eth-trunk 1
[S-switch-A-Ethernet0/0/1] quit
[S-switch-A] interface ethernet 0/0/2
[S-switch-A-Ethernet0/0/2] eth-trunk 1
[S-switch-A-Ethernet0/0/2] quit
[S-switch-A] interface ethernet 0/0/3
[S-switch-A-Ethernet0/0/3] eth-trunk 1
[S-switch-A-Ethernet0/0/3] quit
# 配置S-switch-B。
[S-switch-B] interface ethernet 0/0/1
[S-switch-B-Ethernet0/0/1] eth-trunk 1
[S-switch-B-Ethernet0/0/1] quit
[S-switch-B] interface ethernet 0/0/2
[S-switch-B-Ethernet0/0/2] eth-trunk 1
[S-switch-B-Ethernet0/0/2] quit
[S-switch-B] interface ethernet 0/0/3
[S-switch-B-Ethernet0/0/3] eth-trunk 1
[S-switch-B-Ethernet0/0/3] quit
3. 配置接口Eth-Trunk 处理BPDU 报文
# 配置S-switch-A。
[S-switch-A] interface eth-trunk 1
[S-switch-A-Eth-Trunk1] bp enable
[S-switch-A-Eth-Trunk1] quit
# 配置S-switch-B
[S-switch-B] interface eth-trunk 1
[S-switch-B-Eth-Trunk1] bp enable
[S-switch-B-Eth-Trunk1] quit
4. 在S-switch-A 上配置系统优先级为100,使其成为LACP 主动端
[S-switch-A] lacp priority 100
5. 在S-switch-A 上配置活动接口上限阈值M 为2
[S-switch-A] interface eth-trunk 1
[S-switch-A-Eth-Trunk1] max bandwidth-affected-linknumber 2
[S-switch-A-Eth-Trunk1] quit
2 LACP 配置
说明
由于S-switch-A 为主动端,所以S-switch-B 不需要配置活动接口上限阈值,步骤 6 中配置接
口优先级同样只需要在主动端S-switch-A 上配置即可。
6. 在S-switch-A 上配置接口优先级确定活动链路
[S-switch-A] interface ethernet 0/0/1
[S-switch-A-Ethernet0/0/1] lacp priority 100
[S-switch-A-Ethernet0/0/1] quit
[S-switch-A] interface ethernet 0/0/2
[S-switch-A-Ethernet0/0/2] lacp priority 100
[S-switch-A-Ethernet0/0/2] quit
7. 验证配置结果
# 查看各S-switch 设备的Eth-Trunk 信息,查看链路是否协商成功。
[S-switch-A] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to MAC
System Priority: 100 System ID: 0077-7777-7777
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 2
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1 Selected 100M 100 1 289 11111100 1
Ethernet0/0/2 Selected 100M 100 2 289 11111100 1
Ethernet0/0/3 Unselect 100M 32768 3 289 11100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 32768 0001-0168-0182 32768 1 289 11111100
Ethernet0/0/2 32768 0001-0168-0182 32768 2 289 11111100
Ethernet0/0/3 32768 0001-0168-0182 32768 3 289 11100000
[S-switch-B] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to MAC
System Priority: 32768 System ID: 0001-0168-0182
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1 Selected 100M 32768 1 289 11111100 1
Ethernet0/0/2 Selected 100M 32768 2 289 11111100 1
Ethernet0/0/3 Unselect 100M 32768 3 289 11100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 100 0077-7777-7777 100 1 289 11111100
Ethernet0/0/2 100 0077-7777-7777 100 2 289 11111100
Ethernet0/0/3 100 0077-7777-7777 32768 3 289 11100000
通过以上显示信息可以看到,S-switch-A 的系统优先级为100,高于S-switch-B 的
系统优先级。Eth-Trunk 的成员接口中Ethernet 0/0/1、Ethernet 0/0/2 成为活动接
口,处于“Selected”状态,接口Ethernet 0/0/3 处于“Unselect”状态,同时实现M
条链路的负载分担和N 条链路的冗余备份功能。
配置文件
l S-switch-A 的配置文件
#
sysname S-switch-A
#
lacp priority 100
#
interface Eth-Trunk1
bp enable
mode lacp-static
max bandwidth-affected-linknumber 2
#
interface Ethernet0/0/1
eth-trunk 1
lacp priority 100
#
interface Ethernet0/0/2
eth-trunk 1
lacp priority 100
#
interface Ethernet0/0/3
eth-trunk 1
#
return
l S-switch-B 的配置文件
#
sysname S-switch-B
#
interface Eth-Trunk1
bp enable
mode lacp-static
#
interface Ethernet0/0/1
eth-trunk 1
#
interface Ethernet0/0/2
eth-trunk 1
#
interface Ethernet0/0/3
eth-trunk 1
#
return

3. 华为静态链路聚合配置

华为链路聚合分为两种:

● 手动负载均衡模式:在这种模式下,Eth-Trunk的建立、成员接口的加入都是手工配置的,没有协议
的参与。在该模式下所有活动链路都参与数据转发,平均分坦流量。如果某条活动链路出现故障,链
路聚合组自动在剩余的活动链路上平均分配流量。

● LACP模式:在LACP模式中,链路两端的设备相互发送LACP报文,协商聚合参数。协商完成后,两台
设备确定活动接口和非活动接口。LACP模式需要的动创建一个Eth-Trunk口,并添加成员。LACP模式
也叫M:N模式,M代表活动成员链路。N代表非活动链路,用于冗余备份。LACP与手动负载均衡的区别在
于,在LACP模式中,有一些链路充当备份链路,如果有一条活动链路发生故障,该链路传输的数据被
切换到一条优先级最高的备用链路上,这条备用链路转变为活动状态。而在手动负载均衡模式中,所
有的成员都处于转发状态。

4. 华为链路聚合配置

配置链路聚合
1、创建聚合组
sys
interface eth-trunk 2
2、配置聚合模式为手工模式
interface eth-trunk 2
mode manual load-balance 表示手工模式
mode lacp   lacp模式,可以自动检测链路是否错误;
3、将接口成员加入聚合组
interface eth-trunk 2
trunkport g1/0/1 to 1/0/3 mode { active | passive }
或者进到接口模式下:
interface g1/0/1
eth-trunk 2 mode { active | passive }
注意:
一个以太网接口只能加入到一个Eth-Trunk接口;
当成员接口加入Eth-Trunk后,学习MAC地址或ARP地址时是按照Eth-Trunk来学习的,而不是按照成员接口来学习;
删除聚合组时需要先删除聚合组中的成员接口
4、配置链路聚合的负载分担方式(可选)
Eth-Trunk的负载分担是逐流进行的,逐流负载分担能保证包的顺序,保证了同一数据
流的帧在同一条物理链路转发。而不同数据流在不同的物理链路上转发从而实现分担负载;
可以配置普通负载分担模式,基于报文的IP地址或MAC地址来分担负载;
由于负载分担只对出方向的流量有效,因此链路两端接口的负载分担模式可以不一致,两端互不影响;
配置普通负载分担方式:
interface eth-trunk 2
load-balance { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-dstmac }
dst-ip(目的IP地址)模式:根据目的IP地址进行负载分担;
dst-mac(目的MAC地址)模式;
src-ip(源IP地址)模式;
src-mac(源MAC地址)模式;
src-dst-ip(源IP地址异或目的IP地址)模式:根据源IP异或目的IP地址的结果进行负载分担。
src-dst-mac(源MAC地址异或目的MAC地址)模式;
5、检查配置结果
display eth-trunk 2 查看Eth-Trunk的配置信息;
display trunkmembership eth-trunk 2,查看Eth-Trunk的成员接口信息

5. 怎么删除华为eth-trunk下面的lacp协议

给你个绝对可行得办法:
[switch]interface g0/0/1 //如果是33系列以下,则是interface ethernet0/0/1
[switch-interface g0/0/1]display this //查看当前端口类型,是access,hybrid还是trunk,如果查不到,就说明它是默认端口类型,S23&33&53系列的交换机默认端口类型是hybird
如果接口有类似:
1. port link-type access 或者 port default vlan 2 //vlan 2是示例
删除办法:undo port default vlan 2
2. port link type hybird 或者 port hybrid tagged vlan 2 5 或者port hybrid untagged vlan 3 6等
删除办法:undo port hybrid tagged vlan 2 5 或者undo port hybrid untagged vlan 3 6
3. port link type trunk 或者 port trunk alloc-pass vlan 2 4 6 等
删除办法:undo port trunk alloc-pass vlan 2 4 6

希望能帮到你。

6. 华为S5700如何实现链路聚合以及负载均衡--交换机初学者求助

#启用聚合链路,动态模式
interface Eth-Trunk1
mode lacp
#相应端口划入聚合链路中
interface GigabitEthernet1/0/30
eth-trunk 1
interface GigabitEthernet1/0/31
eth-trunk 1
建议做动态模式,就是在ethTrunk里面开启lacp。然后接口的其他配置都做在Eth-Trunk1中。

7. 当一系列端口配置了 etherchannel 时,哪个模式将配置 lacp,以便启动 etherchannel

两个端口你要先做成trunk模式才可以做etherchannel,配完以后,你可以用show etherchannel summary来检测该链路是否正常启用

8. Eth-trunk的2种模式理解

你第一个配置里g0/0/2的eth-trunk2应该是eth-trunk1,写错了。

第一种手工配置,是没有办法检测单通的故障的,只要接口收到光,两个接口都在trunk里。而第二种配置,会发报文给对端,对端回了,接口才会加入;而且你配置了需要两个接口active,断了一个接口,整个捆绑接口也会down。

9. 交换机链路聚合手工模式和LACP模式的区别

聚合手工模式和LACP模式的区别如下:
LACP模式下,可以备份链路。
就是在聚合端口下这个端口坏了,备份的那个端口会立即启动,以免发生网络故障。
一般配置的都是LACP模式的。

10. 华为和思科怎么做链路捆绑

华为要将捆绑模式调整lacp的,配置如下:
*******切记!一定要调,否则会产生环路********
华为交换机

#interface Eth-Trunk1

port link-type trunk

port trunk allow-pass vlan 2
to 4094

mode lacp-static //修改链路聚合模式

max active-linknumber 2 //设置最大活动链接数为2

bp enable
//开启BPDU

//**一定先配置好eth-trunk,在将接口放入eth-trunk

#lacp priority 100

#interface GigabitEthernet0/0/1

eth-trunk 1

undo ntdp enable

undo ndp enable

(在配置端口前,一定要将端口原有配置清空,全部undo掉,否则无法应用eth-trunk命令。如果之前端口配置过trunk口,可以使用undo port link-type清除trunk状态)

#interface GigabitEthernet0/0/2

eth-trunk 1

undo ntdp enable

undo ndp enable

思科交换机

interface port-channel1

switchport trunk
encapsulation dot1q

switchport mode trunk

interface g0/25

switchport trunk
encapsulation dot1q

switchport mode trunk

channel-group 1 mode active

interface g0/27

switchport trunk
encapsulation dot1q

switchport mode trunk

channel-group 1 mode active

热点内容
区块链租凭平台 发布:2025-08-17 02:18:22 浏览:883
中国数字货币是什么样子 发布:2025-08-17 02:18:20 浏览:307
去中心化后主变量不显著 发布:2025-08-17 02:12:02 浏览:860
成都矿机托管 发布:2025-08-17 01:42:49 浏览:210
以太坊的前景怎么样 发布:2025-08-17 01:42:03 浏览:672
币圈费率在哪看 发布:2025-08-17 01:42:00 浏览:105
币圈惠轶 发布:2025-08-17 01:35:25 浏览:301
深圳币圈大佬群 发布:2025-08-17 01:29:49 浏览:758
比特币今日价格美元新闻 发布:2025-08-17 00:30:56 浏览:62
穿越利用比特币发财 发布:2025-08-17 00:03:43 浏览:46