配置手工模式链路聚合示例(交换机之间直连)

组网图形

图1 配置手工模式链路聚合组网图

  • 手工模式链路聚合简介
  • 配置注意事项
  • 组网需求
  • 配置思路
  • 操作步骤
  • 配置文件

手工模式链路聚合简介

以太网链路聚合是指将多条以太网物理链路捆绑在一起成为一条逻辑链路,从而实现增加链路带宽的目的。链路聚合分为手工模式和LACP模式。

手工模式下,Eth-Trunk的建立、成员接口的加入由手工配置,没有链路聚合控制协议LACP的参与。当需要在两个直连设备间提供一个较大的链路带宽而设备又不支持LACP协议时,可以使用手工模式。手工模式可以实现增加带宽、提高可靠性、负载分担的目的。

手工模式下,所有的活动链路都参与数据转发并分担流量。

配置注意事项
  • 一个Eth-Trunk接口中的成员接口必须是以太网类型和速率相同的接口。
  • Eth-Trunk链路两端相连的物理接口的数量、速率、双工方式、流控配置必须一致。
  • 如果本端设备接口加入了Eth-Trunk,与该接口直连的对端接口也必须加入Eth-Trunk,两端才能正常通信。
  • 两台设备对接时需要保证两端设备上链路聚合的模式一致。
  • 本举例适用于S系列交换机所有产品的所有版本。

组网需求

图1所示,SwitchA和SwitchB通过以太链路分别都连接VLAN10和VLAN20的网络,且SwitchA和SwitchB之间有较大的数据流量。

用户希望SwitchA和SwitchB之间能够提供较大的链路带宽来使相同VLAN间互相通信。同时用户也希望能够提供一定的冗余度,保证数据传输和链路的可靠性。

配置思路

采用如下的思路配置手工模式链路聚合:

  1. 创建Eth-Trunk接口并加入成员接口,实现增加链路带宽。

  2. 创建VLAN并将接口加入VLAN。

  3. 配置负载分担方式,实现流量在Eth-Trunk各成员接口间的负载分担,增加可靠性。

操作步骤
  1. 在SwitchA和SwitchB上创建Eth-Trunk接口并加入成员接口

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] interface eth-trunk 1   //创建ID为1的Eth-Trunk接口
    [SwitchA-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3   //在Eth-Trunk1接口中加入GE0/0/1到GE0/0/3三个成员接口
    [SwitchA-Eth-Trunk1] quit
    
    
    
    
    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] interface eth-trunk 1   //创建ID为1的Eth-Trunk接口
    [SwitchB-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3   //在Eth-Trunk1接口中加入GE0/0/1到GE0/0/3三个成员接口
    [SwitchB-Eth-Trunk1] quit

  2. 创建VLAN并将接口加入VLAN

    # 创建VLAN10和VLAN20并分别加入接口。SwitchB的配置与SwitchA类似,不再赘述。
    
    [SwitchA] vlan batch 10 20
    [SwitchA] interface gigabitethernet 0/0/4
    [SwitchA-GigabitEthernet0/0/4] port link-type trunk   //设置接口链路类型为trunk,接口缺省链路类型不是trunk口
    [SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10
    [SwitchA-GigabitEthernet0/0/4] quit
    [SwitchA] interface gigabitethernet 0/0/5
    [SwitchA-GigabitEthernet0/0/5] port link-type trunk   //设置接口链路类型为trunk,接口缺省链路类型不是trunk口
    [SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet0/0/5] quit

    # 配置Eth-Trunk1接口允许VLAN10和VLAN20通过。SwitchB的配置与SwitchA类似,不再赘述。
    
    [SwitchA] interface eth-trunk 1
    [SwitchA-Eth-Trunk1] port link-type trunk   //设置接口链路类型为trunk,接口缺省链路类型不是trunk口
    [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
    [SwitchA-Eth-Trunk1] quit

  3. 配置Eth-Trunk1的负载分担方式。SwitchB的配置与SwitchA类似,不再赘述。

    [SwitchA] interface eth-trunk 1
    [SwitchA-Eth-Trunk1] load-balance src-dst-mac   //配置Eth-Trunk1基于源MAC地址与目的MAC地址进行负载分担
    [SwitchA-Eth-Trunk1] quit

  4. 验证配置结果

    在任意视图下执行display eth-trunk 1命令,检查Eth-Trunk是否创建成功,及成员接口是否正确加入。

    [SwitchA] display eth-trunk 1
    Eth-Trunk1's state information is: 
    WorkingMode: NORMAL           Hash arithmetic: According to SA-XOR-DA
    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
    从以上信息看出Eth-Trunk 1中包含3个成员接口GigabitEthernet0/0/1、GigabitEthernet0/0/2和GigabitEthernet0/0/3,成员接口的状态都为Up。Eth-Trunk 1的“Operate status”为up。

    配置文件

SwitchA的配置文件

#
sysname SwitchA
#
vlan batch 10 20
# 
interface Eth-Trunk1
 port link-type trunk 
 port trunk allow-pass vlan 10 20
 load-balance src-dst-mac
# 
interface GigabitEthernet0/0/1 
 eth-trunk 1
# 
interface GigabitEthernet0/0/2 
 eth-trunk 1
# 
interface GigabitEthernet0/0/3 
 eth-trunk 1
#
interface GigabitEthernet0/0/4 
 port link-type trunk 
 port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5 
 port link-type trunk 
 port trunk allow-pass vlan 20
#
return
SwitchB的配置文件

#
sysname SwitchB
#
vlan batch 10 20
# 
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 10 20
 load-balance src-dst-mac
# 
interface GigabitEthernet0/0/1 
 eth-trunk 1
# 
interface GigabitEthernet0/0/2 
 eth-trunk 1
# 
interface GigabitEthernet0/0/3 
 eth-trunk 1
#
interface GigabitEthernet0/0/4 
 port link-type trunk 
 port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5 
 port link-type trunk 
 port trunk allow-pass vlan 20
#
return

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2023-12-25 14:12:02       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-25 14:12:02       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-25 14:12:02       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-25 14:12:02       18 阅读

热门阅读

  1. 国产化之路 Linux Mono下的asp.net 开发笔记(一)

    2023-12-25 14:12:02       37 阅读
  2. void类型指针和函数指针

    2023-12-25 14:12:02       31 阅读
  3. 盘点 | 2023年针对国内的电子邮件安全事件

    2023-12-25 14:12:02       34 阅读
  4. obs video-io.c

    2023-12-25 14:12:02       30 阅读
  5. 策略模式(Strategy)

    2023-12-25 14:12:02       37 阅读
  6. Transformer 模型设计的灵感

    2023-12-25 14:12:02       34 阅读
  7. 【题解】洛谷 P9183 [USACO23OPEN] FEB B

    2023-12-25 14:12:02       38 阅读
  8. git拉取远程分支到本地

    2023-12-25 14:12:02       36 阅读
  9. 【前端基础】uniapp、axios 获取二进制图片

    2023-12-25 14:12:02       43 阅读
  10. 使用Uniapp随手记录知识点

    2023-12-25 14:12:02       37 阅读