Eth-trunk-配置2:动态配置

本文介绍了LACP模式(M:N模式)的基本概念,包括活动状态的数据转发链路与非活动状态的备份链路,并通过具体步骤指导如何配置交换机实现链路聚合。文中详细解释了如何创建VLAN、设置链路类型及加入VLAN、链路捆绑成Eth-Trunk、配置Eth-Trunk工作模式、设置最大带宽等关键操作。

LACP模式 - 可以称之为M:N模式 

 

1)M代表处于活动状态的转发数据
2)N代表处于非活动状态的备份链路
3)建立的三条链路,就是其中两条转发,其中1条备份,当转发链路出现故障的时候,备份链路才会进行数据转发,平时是不转发数据

交换机之间的多个链路通过 LACP 协议自动捆绑,

[1-创建 vlan 1 和 2]    

vlan batch 1 2

[2-配置交换机与PC之间的链路为 Access,并加入到正确的 VLAN]    

[sw1]

interface e/0/4
port link-type access
port default vlan 1
q
    
interface e0/0/5
port link-type access
port default vlan 2
q


[sw2]
interface e0/0/4
port link-type access
port default vlan 1
q
    
interface e0/0/5
p

华为 eth - trunk 链路聚合有手工模式和 LACP 模式,以下分别给出两种模式的配置教程。 #### 手工模式配置教程 ```plaintext [Huawei]interface Eth-Trunk 1 //创建并进入 eth - trunk 1 [Huawei-Eth-Trunk1]mode manual load-balance //配置手工模式 [Huawei-Eth-Trunk1]trunkport g0/0/3 //g0/0/3 加入成员端口 Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei-Eth-Trunk1]trunkport g0/0/4 //g0/0/4 加入成员端口 Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei-Eth-Trunk1]port link-type trunk //配置 eth - trunk 类型为 trunk [Huawei-Eth-Trunk1]port trunk allow-pass vlan all //允许所有 VLAN 通过 ``` 上述配置创建了一个手工负载分担模式的 Eth - Trunk 1 接口,并将物理接口 GigabitEthernet 0/0/3 和 GigabitEthernet 0/0/4 加入该 Eth - Trunk 接口,同时将 Eth - Trunk 接口配置Trunk 类型并允许所有 VLAN 通过[^4]。 #### LACP 模式配置教程 ```plaintext [Huawei]interface Eth-Trunk 2 [Huawei-Eth-Trunk2]mode lacp-static [Huawei-Eth-Trunk2]trunkport GigabitEthernet 1/0/1 to GigabitEthernet 1/0/3 [Huawei-Eth-Trunk2]lacp priority 100 [Huawei-Eth-Trunk2]max active-linknumber 2 [Huawei-Eth-Trunk2]port link-type trunk [Huawei-Eth-Trunk2]port trunk allow-pass vlan 10 20 ``` 此配置创建了一个 LACP 静态模式的 Eth - Trunk 2 接口,将 GigabitEthernet 1/0/1 到 GigabitEthernet 1/0/3 这三个物理接口加入 Eth - Trunk 接口,设置该 Eth - Trunk 的 LACP 优先级为 100,最大活动链路数为 2,将 Eth - Trunk 接口配置Trunk 类型并允许 VLAN 10 和 VLAN 20 通过。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值