• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

华为交换机 链路聚合

武飞扬头像
tom.ma
帮助1

前言
随着网络规模不断扩大,用户对骨干链路的带宽和可靠性提出了越来越高的要求。在传统技术中,常用更换高速率的接口板或更换支持高速率接口板的设备的方式来增加带宽,但这种方案需要付出高额的费用,而且不够灵活。
采用链路聚合技术可以在不进行硬件升级的条件下,通过将多个物理接口捆绑为一个逻辑接口,来达到增加链路带宽的目的。在实现增大带宽目的的同时,链路聚合采用备份链路的机制,可以有效的提高设备之间链路的可靠性。

链路聚合应用场景
在企业网络中,所有设备的流量在转发到其他网络前都会汇聚到核心层,再由核心区设备转发到其他网络,或者转发到外网;
因此,在核心层设备负责数据的高速交换时,容易发生拥塞;
在核心层部署链路聚合,可以提升整个网络的数据吞吐量,解决拥塞问题。
链路聚合一般部署在核心节点,以便提升整个网络的数据吞吐量

手工负载分担模式

采用 CE12800 核心交换机(拓扑图)

学新通

1、CE1 交换机设置

  1.  
    <HUAWEI>sys
  2.  
    [~HUAWEI]un in en
  3.  
    [*HUAWEI]sys CE1
  4.  
    [*HUAWEI]commit
  5.  
     
  6.  
    # 批量启用端口
  7.  
    [~CE1]int range g1/0/1 to g1/0/4
  8.  
    [~CE1-port-group]undo shutdown
  9.  
    [*CE1-port-group]quit
  10.  
     
  11.  
    # g1/0/1切换三层接口并设置IP
  12.  
    [*CE1]int g1/0/1
  13.  
    [*CE1-GE1/0/1]undo portswitch
  14.  
    [*CE1-GE1/0/1]ip addr 192.168.10.254 24
  15.  
     
  16.  
    # 创建 eth-trunk1 接口
  17.  
    [*CE1-GE1/0/1]int eth-trunk 1
  18.  
     
  19.  
    # eth-trunk1 接口切换为三层接口
  20.  
    [*CE1-Eth-Trunk1]undo portswitch
  21.  
     
  22.  
    # 把g2-4接口加入到eth-trunk1接口
  23.  
    [*CE1-Eth-Trunk1]trunkport g 1/0/2 to 1/0/4
  24.  
     
  25.  
    # eth-trunk 接口设置 IP
  26.  
    [*CE1-Eth-Trunk1]ip addr 10.0.10.1 24
  27.  
    [*CE1-Eth-Trunk1]quit
  28.  
     
  29.  
    # 配置静态路由
  30.  
    [*CE1]ip route-static 192.168.20.0 24 10.0.10.2
  31.  
    [*CE1]commit
学新通

2、CE2 交换机设置

  1.  
    <HUAWEI>sys
  2.  
    [~HUAWEI]un in en
  3.  
    [*HUAWEI]sys CE2
  4.  
    [*HUAWEI]commit
  5.  
     
  6.  
    # 批量启用端口
  7.  
    [~CE2]int range g1/0/1 to g1/0/4
  8.  
    [~CE2-port-group]undo shutdown
  9.  
    [*CE2-port-group]quit
  10.  
     
  11.  
    # g1/0/1切换三层接口 设置IP
  12.  
    [*CE2]int g1/0/1
  13.  
    [*CE2-GE1/0/1]undo portswitch
  14.  
    [*CE2-GE1/0/1]ip addr 192.168.20.254 24
  15.  
     
  16.  
    # 创建 eth-trunk 接口
  17.  
    [*CE2-GE1/0/1]int eth-trunk 1
  18.  
     
  19.  
    # eth-trunk1接口切换三层接口
  20.  
    [*CE2-Eth-Trunk1]undo portswitch
  21.  
     
  22.  
    # 把g2-4接口加入到eth-trunk1接口
  23.  
    [*CE2-Eth-Trunk1]trunkport g 1/0/2 to 1/0/4
  24.  
     
  25.  
    # eth-trunk 接口设置 IP
  26.  
    [*CE2-Eth-Trunk1]ip addr 10.0.10.2 24
  27.  
    [*CE2-Eth-Trunk1]quit
  28.  
     
  29.  
    # 配置静态路由
  30.  
    [*CE2]ip route-static 192.168.10.0 24 10.0.10.1
  31.  
    [*CE2]commit
学新通

3、查看 eth-trunk

  1.  
    [~CE1]dis eth-trunk 1
  2.  
    Eth-Trunk1's state information is:
  3.  
    Working Mode: Normal Hash Arithmetic: According to flow
  4.  
    Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 32
  5.  
    Operating Status: up Number of Up Ports in Trunk: 3
  6.  
    --------------------------------------------------------------------------------
  7.  
    PortName Status Weight
  8.  
    GE1/0/2 Up 1
  9.  
    GE1/0/3 Up 1
  10.  
    GE1/0/4 Up 1

4、验证网络互通

  1.  
    PC1>ping 192.168.20.1
  2.  
     
  3.  
    Ping 192.168.20.1: 32 data bytes, Press Ctrl_C to break
  4.  
    From 192.168.20.1: bytes=32 seq=1 ttl=126 time=16 ms
  5.  
    From 192.168.20.1: bytes=32 seq=2 ttl=126 time=15 ms
  6.  
    From 192.168.20.1: bytes=32 seq=3 ttl=126 time=31 ms
  7.  
    From 192.168.20.1: bytes=32 seq=4 ttl=126 time=16 ms
  8.  
    From 192.168.20.1: bytes=32 seq=5 ttl=126 time=16 ms
  9.  
     
  10.  
    --- 192.168.20.1 ping statistics ---
  11.  
    5 packet(s) transmitted
  12.  
    5 packet(s) received
  13.  
    0.00% packet loss
  14.  
    round-trip min/avg/max = 15/18/31 ms

LACP模式的链路聚合

组网需求
如图所示,在两台Switch设备上配置LACP模式链路聚合组,提高两设备之间的带宽与可靠性,具体要求如下:
两条活动链路具有负载分担的能力。
两设备间的链路具有1条冗余备份链路,当活动链路出现故障链路时,备份链路替代故障链路,保持数据传输的可靠性。

采用 S5700 三层交换机(拓扑图)

学新通

配置思路

采用如下的思路配置LACP模式链路聚合:
创建Eth-Trunk,配置Eth-Trunk为LACP模式,实现链路聚合功能。
将成员接口加入Eth-Trunk。

说明:
配置系统优先级,确定主动端,按照主动端设备的接口选择活动接口。
配置活动接口上限阈值,实现保证带宽的情况下提高网络的可靠性。
配置接口优先级,确定活动链路接口,优先级高的接口将被选作活动接口。 

1、SW1 设置

  1.  
    <Huawei>sys
  2.  
    [Huawei]un in en
  3.  
    [Huawei]sys SW1
  4.  
     
  5.  
    # 批量创建 vlan
  6.  
    [SW1]vlan batch 10 100
  7.  
     
  8.  
    # 设置网关IP
  9.  
    [SW1]int g0/0/1
  10.  
    [SW1-GigabitEthernet0/0/1]p l a
  11.  
    [SW1-GigabitEthernet0/0/1]p d v 10
  12.  
    [SW1-GigabitEthernet0/0/1]int vlanif 10
  13.  
    [SW1-Vlanif10]ip addr 192.168.10.254 24
  14.  
    [SW1-Vlanif10]quit
  15.  
     
  16.  
    # 创建 eth-trunk1 接口
  17.  
    [SW1]int eth-trunk 1
  18.  
     
  19.  
    # lacp 模式
  20.  
    [SW1-Eth-Trunk1]mode lacp
  21.  
     
  22.  
    # 配置活动接口上限阈值为2
  23.  
    [SW1-Eth-Trunk1]max active-linknumber 2
  24.  
     
  25.  
    # 把g3-g5接口加入eth-trunk1接口
  26.  
    [SW1-Eth-Trunk1]trunkport g 0/0/3 to 0/0/5
  27.  
    [SW1-Eth-Trunk1]p l a
  28.  
    [SW1-Eth-Trunk1]p d v 100
  29.  
    [SW1-Eth-Trunk1]quit
  30.  
     
  31.  
    # 配置系统优先级为100,使其成为LACP主动端
  32.  
    [SW1]lacp priority 100
  33.  
     
  34.  
    # 配置接口优先级确定活动链路
  35.  
    [SW1]int g0/0/3
  36.  
    [SW1-GigabitEthernet0/0/3]lacp priority 100
  37.  
    [SW1-GigabitEthernet0/0/3]int g0/0/4
  38.  
    [SW1-GigabitEthernet0/0/4]lacp priority 100
  39.  
    [SW1-GigabitEthernet0/0/4]quit
  40.  
     
  41.  
    # eth-trunk 1 设置 IP
  42.  
    [SW1]int vlanif 100
  43.  
    [SW1-Vlanif100]ip addr 10.0.10.1 24
  44.  
     
  45.  
    # 静态路由
  46.  
    [SW1-Vlanif100]ip route-static 192.168.20.0 24 10.0.10.2
学新通

2、SW2 设置

  1.  
    <Huawei>sys
  2.  
    [Huawei]un in en
  3.  
    [Huawei]sys SW2
  4.  
     
  5.  
    # 批量创建 vlan
  6.  
    [SW2]vlan batch 20 100
  7.  
     
  8.  
    # 设置网关 IP
  9.  
    [SW2]int g0/0/1
  10.  
    [SW2-GigabitEthernet0/0/1]p l a
  11.  
    [SW2-GigabitEthernet0/0/1]p d v 20
  12.  
    [SW2-GigabitEthernet0/0/1]int vlanif 20
  13.  
    [SW2-Vlanif20]ip addr 192.168.20.254 24
  14.  
     
  15.  
    # 创建 eth-trunk1 接口
  16.  
    [SW2-Vlanif20]int eth-trunk 1
  17.  
     
  18.  
    # 设置 lacp 模式
  19.  
    [SW2-Eth-Trunk1]mode lacp
  20.  
     
  21.  
    # 把g3-g5接口加到eth-trunk1接口
  22.  
    [SW2-Eth-Trunk1]trunkport g 0/0/3 to 0/0/5
  23.  
    [SW2-Eth-Trunk1]p l a
  24.  
    [SW2-Eth-Trunk1]p d v 100
  25.  
    [SW2-Eth-Trunk1]quit
  26.  
     
  27.  
    # 设置eth-trunk1接口IP
  28.  
    [SW2]int vlanif 100
  29.  
    [SW2-Vlanif100]ip addr 10.0.10.2 24
  30.  
     
  31.  
    # 静态路由
  32.  
    [SW2-Vlanif100]ip route-static 192.168.10.0 24 10.0.10.1
学新通

3、查看链路聚合

  • SW1交换机可以看到  System Priority: 100
  • Max Active-linknumber: 2
  • GigabitEthernet0/0/3:Selected,GigabitEthernet0/0/4:Selected
  1.  
    [SW1]dis eth-trunk 1
  2.  
    Eth-Trunk1's state information is:
  3.  
    Local:
  4.  
    LAG ID: 1 WorkingMode: STATIC
  5.  
    Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
  6.  
    System Priority: 100 System ID: 4c1f-cc9a-3416
  7.  
    Least Active-linknumber: 1 Max Active-linknumber: 2
  8.  
    Operate status: up Number Of Up Port In Trunk: 2
  9.  
    --------------------------------------------------------------------------------
  10.  
    ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
  11.  
    GigabitEthernet0/0/3 Selected 1GE 100 4 305 10111100 1 # 默认选中
  12.  
    GigabitEthernet0/0/4 Selected 1GE 100 5 305 10111100 1 # 默认选中
  13.  
    GigabitEthernet0/0/5 Unselect 1GE 32768 6 305 10100000 1
  14.  
     
  15.  
    Partner:
  16.  
    --------------------------------------------------------------------------------
  17.  
    ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
  18.  
    GigabitEthernet0/0/3 32768 4c1f-cc90-16c1 32768 4 305 10111100
  19.  
    GigabitEthernet0/0/4 32768 4c1f-cc90-16c1 32768 5 305 10111100
  20.  
    GigabitEthernet0/0/5 32768 4c1f-cc90-16c1 32768 6 305 10110000
学新通
  • SW2交换机可以看到  System Priority: 32768
  • Max Active-linknumber: 8  #S5700默认可以配置8个
  • GigabitEthernet0/0/3:Selected,GigabitEthernet0/0/4:Selected
  1.  
    [SW2]dis eth-trunk 1
  2.  
    Eth-Trunk1's state information is:
  3.  
    Local:
  4.  
    LAG ID: 1 WorkingMode: STATIC
  5.  
    Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
  6.  
    System Priority: 32768 System ID: 4c1f-cc90-16c1
  7.  
    Least Active-linknumber: 1 Max Active-linknumber: 8
  8.  
    Operate status: up Number Of Up Port In Trunk: 2
  9.  
    --------------------------------------------------------------------------------
  10.  
    ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
  11.  
    GigabitEthernet0/0/3 Selected 1GE 32768 4 305 10111100 1
  12.  
    GigabitEthernet0/0/4 Selected 1GE 32768 5 305 10111100 1
  13.  
    GigabitEthernet0/0/5 Unselect 1GE 32768 6 305 10110000 1
  14.  
     
  15.  
    Partner:
  16.  
    --------------------------------------------------------------------------------
  17.  
    ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
  18.  
    GigabitEthernet0/0/3 100 4c1f-cc9a-3416 100 4 305 10111100
  19.  
    GigabitEthernet0/0/4 100 4c1f-cc9a-3416 100 5 305 10111100
  20.  
    GigabitEthernet0/0/5 100 4c1f-cc9a-3416 32768 6 305 10100000
  21.  
     
学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgaehjh
系列文章
更多 icon
同类精品
更多 icon
继续加载