链路聚合技术的简单写法与介绍

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


链路聚合技术

链路聚合技术的含义:链路聚合是将一组物理接口捆绑在一起作为一个逻辑接口来增加带宽的一种方法,又称多接口负载均衡组成链路聚合组,通过在两台设备之间建立链路聚合组,可以提供更高的通讯带宽和更高的可靠性。链路聚合不仅为设备通信提供了冗余保护,而且不需要对硬件进行升级。

一、链路聚合的实现条件

  • 每个Eth-Trunk接口下最多可以包含8个成员接口
  • 成员接口不可配置任何业务和静态MAC地址
  • 成员接口加入Eth-Trunk时,必须为缺省的hybrid类型接口
  • Eth-Trunk接口不能嵌套,即成员接口不能是Eth-Trunk
  • 一个以太网接口只能加入一个Eth-Trunk接口,如果要加入其它Eth-Trunk接口,必须退出原来的Eth-Trunk接口
  • 一个Eth-Trunk接口中的成员接口类型必须是同一类型,例如:FE口和GE口不能加入同一个Eth-Trunk接口
  • 可以将不能接口板上的以太网接口加入到同一个Eth-Trunk
  • 如果本地设备使用Eth-Trunk,与成员接口直连的对端接口必须捆绑在Eth-Trunk接口,两端才能正常通信
  • 当成员接口速率不一致时,实际使用中速率小的接口可能会出现拥塞,导致丢包
  • 当成员接口加入Eth-Trunk后,学习MAC地址时是按照Eth-Trunk来学习的,而不是按照成员接口来学习

二、链路聚合的三大主要优势

  • 增加带宽
    链路聚合接口的最大带宽可以达到各成员接口带宽之和。
  • 提高可靠性
    当某条活动链路出现故障时,流量可以切换到其他可用的成员链路上,从而提高链路聚合接口的可靠性。
  • 负载分担
    在一个链路聚合组内,可以实现在各成员活动链路上的负载分担。

三、具体使用

1.二层聚合

示例:在这里插入图片描述
上图是网络拓扑图,我们在LSW4和LSW5之间进行二层链路聚合。
我们通过创建链路聚合,然后更改链路聚合模式为trunk模式,最后将需要聚合的成员加入链路聚合中。

LSW4

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 2
[Huawei-vlan2]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access 
[Huawei-Ethernet0/0/1]port default vlan 2
[Huawei-Ethernet0/0/1]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]port link-type trunk 	
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
[Huawei-Eth-Trunk1]int e0/0/2	
[Huawei-Ethernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.

LSW5

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 2
[Huawei-vlan2]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access 	
[Huawei-Ethernet0/0/1]port default vlan 2
[Huawei-Ethernet0/0/1]q	
[Huawei]int Eth-Trunk 1	
[Huawei-Eth-Trunk1]port link-type trunk 	
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
[Huawei-Eth-Trunk1]q
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.

2.三层聚合

示例:

在这里插入图片描述
网络拓扑图如上,在交换机CE1和CE2之间的g0/0/1、g0/0/2端口进行三层链路聚合,分别在CE1和CE2中添加回环口进行测试,完成操作后测试PC1和PC2的连通性。

CE1

<HUAWEI>undo terminal monitor 
Info: Current terminal monitor is off.
<HUAWEI>sys
Enter system view, return user view with return command.
[~HUAWEI]int	
[~HUAWEI]interface Eth-Trunk 1
[*HUAWEI-Eth-Trunk1]undo portswitch 
[*HUAWEI-Eth-Trunk1]ip add 10.1.1.1 24
[*HUAWEI-Eth-Trunk1]q
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown	
[*HUAWEI-GE1/0/0]eth-trunk 1
[*HUAWEI-GE1/0/0]int g1/0/1
[*HUAWEI-GE1/0/1]undo shutdown	
[*HUAWEI-GE1/0/1]eth-trunk 1
[*HUAWEI-GE1/0/1]q	
[*HUAWEI]interface LoopBack 0
[*HUAWEI-LoopBack0]ip address 192.168.1.100 32
[*HUAWEI-LoopBack0]q
[*HUAWEI]ip route-static 192.168.2.100 32 10.1.1.2
[*HUAWEI]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:Y

CE2

<HUAWEI>undo terminal monitor 
Info: Current terminal monitor is off.
<HUAWEI>sys
Enter system view, return user view with return command.	
[~HUAWEI]int Eth-Trunk 1	
[*HUAWEI-Eth-Trunk1]undo portswitch 
[*HUAWEI-Eth-Trunk1]ip add 10.1.1.2 24
[*HUAWEI-Eth-Trunk1]q
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown	
[*HUAWEI-GE1/0/0]eth-trunk 1
[*HUAWEI-GE1/0/0]int g1/0/1
[*HUAWEI-GE1/0/1]undo shutdown	
[*HUAWEI-GE1/0/1]eth-trunk 1	
[*HUAWEI-GE1/0/1]q	
[*HUAWEI]interface LoopBack 0
[*HUAWEI-LoopBack0]ip add 192.168.2.100 32
[*HUAWEI-LoopBack0]q
[*HUAWEI]ip route-static 192.168.1.100 32 10.1.1.1
[*HUAWEI]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:Y

测试连通性结果:

<HUAWEI>ping 192.168.2.100
  PING 192.168.2.100: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.100: bytes=56 Sequence=1 ttl=255 time=12 ms
    Reply from 192.168.2.100: bytes=56 Sequence=2 ttl=255 time=4 ms
    Reply from 192.168.2.100: bytes=56 Sequence=3 ttl=255 time=5 ms
    Reply from 192.168.2.100: bytes=56 Sequence=4 ttl=255 time=4 ms
    Reply from 192.168.2.100: bytes=56 Sequence=5 ttl=255 time=4 ms

  --- 192.168.2.100 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/5/12 ms
[~HUAWEI]ping 192.168.1.100
  PING 192.168.1.100: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.100: bytes=56 Sequence=1 ttl=255 time=11 ms
    Reply from 192.168.1.100: bytes=56 Sequence=2 ttl=255 time=8 ms
    Reply from 192.168.1.100: bytes=56 Sequence=3 ttl=255 time=5 ms
    Reply from 192.168.1.100: bytes=56 Sequence=4 ttl=255 time=5 ms
    Reply from 192.168.1.100: bytes=56 Sequence=5 ttl=255 time=4 ms

  --- 192.168.1.100 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/6/11 ms

总结

随着网络规模不断扩大,用户对骨干链路的带宽和可靠性提出越来越高的要求。在传统技术中,常用更换高速率的接口板或更换支持高速率接口板的设备的方式来增加带宽,但这种方案需要付出高额的费用,而且不够灵活。

采用链路聚合技术可以在不进行硬件升级的条件下,通过将多个物理接口捆绑为一个逻辑接口,达到增加链路带宽的目的。在实现增大带宽目的的同时,链路聚合采用备份链路的机制,可以有效的提高设备之间链路的可靠性。

猜你喜欢

转载自blog.csdn.net/Lucien010230/article/details/111569315