前言
本文介绍了链路聚合的转发原理、支持的负载分担方式,以及如何配置链路聚合的负载分担。
02
转发原理
-
HASH-KEY值 HASH-KEY值是根据数据包的MAC地址或IP地址等,经HASH算法计算得出。
-
接口号 Eth-Trunk转发表表项分布和设备每个Eth-Trunk支持加入的成员接口数量相关,不同的HASH-KEY值对应不同的出接口。
03
负载分担方式
-
源MAC地址 -
目的MAC地址 -
源MAC地址和目的MAC地址 -
源IP地址 -
目的IP地址 -
源IP地址和目的IP地址 -
VLAN、物理源端口等(对L2、IPv4、IPv6和MPLS报文进行增强型负载分担)
-
负载分担方式只在流量的出接口上生效,如果发现各入接口的流量不均衡,请修改上行出接口的负载分担方式。
-
尽量将数据流通过负载分担在所有活动链路上传输,避免数据流仅在一条链路上传输,造成流量拥堵,影响业务正常运行。
04
配置链路聚合的负载分担
<HUAWEI> system-view
[HUAWEI] interface eth-trunk 1
[HUAWEI-Eth-Trunk1] load-balance src-dst-mac
[HUAWEI-Eth-Trunk1] quit
[HUAWEI] display eth-trunk 1 load-balance
Eth-Trunk1's load-balance information:
Load-balance Configuration: SA-XOR-DA
Load-balance options used per-protocol:
L2 : Source XOR Destination MAC address, Vlan ID, Ethertype, Ingress-port
IPv4: Source XOR Destination MAC address, Vlan ID, Ethertype, Ingress-port
IPv6: Source XOR Destination MAC address, Vlan ID, Ethertype, Ingress-port
MPLS: Source XOR Destination MAC address, Vlan ID, Ethertype, Ingress-port
-
执行命令l2 field [ dmac | l2-protocol | smac | sport | vlan ] *,配置指定负载分担模板中二层报文的负载分担模式。缺省情况下,二层报文的负载分担模式为smac、dmac。
-
执行命令ipv4 field [ dip | l4-dport | l4-sport | protocol | sip | sport | vlan ] *,配置指定负载分担模板中IPV4报文负载分担模式。缺省情况下,IPv4报文负载分担模式为sip、dip。
-
执行命令ipv6 field [ dip | l4-dport | l4-sport | protocol | sip | sport | vlan ] *,配置指定负载分担模板中IPV6报文负载分担模式。缺省情况下,IPv6报文负载分担模式为sip、dip。
-
执行命令mpls field [ 2nd-label | 3rd-label | dip | dmac | l4-dport | l4-sport | protocol | sip | smac | sport | top-label | vlan ] *,配置指定负载分担模板中的MPLS报文负载分担模式。缺省情况下,MPLS报文负载分担模式为top-label、2nd-label。
<HUAWEI> system-view
[HUAWEI] load-balance-profile a
[HUAWEI-load-balance-profile-a] ipv6 field sip protocol
[HUAWEI-load-balance-profile-a] quit
[HUAWEI] interface eth-trunk 1
[HUAWEI-Eth-Trunk1] load-balance enhanced profile a
[HUAWEI-Eth-Trunk1] quit
[HUAWEI] display eth-trunk 1 load-balance
Eth-Trunk1's load-balance information:
Load-balance Configuration: ENHANCED
Load-balance enhanced profile: a
Load-balance options used per-protocol:
L2 : Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source IP address, IP protocol
MPLS: Top XOR Second label
如有侵权,请联系删除
推荐阅读
原文始发于微信公众号(橘猫学安全):交换机链路聚合的负载分担方式
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论