为什么会有链路聚合这种技术?

前言

在企业网络中,所有设备的流量在转发到其他网络前都会汇聚到核心层,再由核心区设备转发到其他网络,或者转发到外网。因此,在核心层设备负责数据的高速交换时,容易发生拥塞,这时候就需要用到链路聚合技术。

链路聚合是什么?

  1. 作用
    链路聚合就是把两台设备之间的多条物理链路聚合在一起,当作一条逻辑链路来使用。这两台设备可以是一对路由器、一对交换机、或者是一台路由器和一台交换机。一条聚合链路可以包含多条成员链路。
  2. 实现的条件
    ① 每个Eth-Trunk接口下最多可以包含8个成员接口。
    ② 成员接口不能配置任何业务和静态MAC地址。
    ③ 成员接口加入Eth-Trunk时,必须为缺省的hybrid类型接口。
    ④ Eth-Trunk接口不能嵌套,即成员接口不能是Eth-Trunk。
    ⑤ 一个Eth-Trunk接口中的成员接口必须是同一类型,例如:FE口和GE口不能加入同一个Eth-Trunk接口。
    ⑥ 一个以太网接口只能加入到一个Eth-Trunk接口,如果需要加入其它Eth-Trunk接口必须退出原来Eth-Trunk接口。
    ⑦ 可以将不同接口板上的以太网接口加入到同一个Eth-Trunk。
    ⑧ 如果本地设备使用了Eth-Trunk,与成员接口直连的对端接口也必须捆绑为Eth-Trunk,两端才能正常通信。
    ⑨ 当成员接口的速率不一致时,实际使用中速率小的接口可能会出现拥塞导致丢包。
    ⑩ 当成员接口加入Eth-Trunk后,学习MAC地址时,是按照Eth-Trunk学习的,而不是按照成员接口来学习。

二层交换机链路聚合

拓扑图
在这里插入图片描述


配置如下
PC1
在这里插入图片描述
PC2
在这里插入图片描述


SW1配置如下:

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

SW2配置如下:

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

测试
在这里插入图片描述
在这里插入图片描述
PC1与PC2完美互通。


三层交换机链路聚合

拓扑图

在这里插入图片描述

配置如下
CE1

<HUAWEI>system-view
Enter system view, return user view with return command.
[~HUAWEI]sysname CE1
[*HUAWEI]user-interface console 0
[*HUAWEI-ui-console0]idle-timeout 1440
[*HUAWEI-ui-console0]q
[*HUAWEI]int eth-trunk 1
[*HUAWEI-Eth-Trunk1]undo portswitch
[*HUAWEI-Eth-Trunk1]ip address 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]quit
[*HUAWEI]int loop 0
[*HUAWEI-LoopBack0]ip address 192.168.1.10 32
[*HUAWEI-LoopBack0]quit
[*HUAWEI]return
保存
<CE1>system-view 
Enter system view, return user view with return command.
[~CE1]ip route-static 192.168.2.10 32 10.1.1.2
[*CE1]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y
Warning: The current configuration will be written to the device. Continue? [Y/N
]:y
Now saving the current configuration to the slot 17 
Info: Save the configuration successfully.	
<CE1>system-view 
Enter system view, return user view with return command.
[*CE1]ip route-static 192.168.2.100 32 10.1.1.2

CE2配置如下:

<HUAWEI>undo terminal monitor
Info: Current terminal monitor is off.
<HUAWEI>system-view
Enter system view, return user view with return command.
[~HUAWEI]user-interface console 0
[~HUAWEI-ui-console0]idle-timeout 1440
[*HUAWEI-ui-console0]sysname CE2
[*HUAWEI]int eth-trunk 1
[*HUAWEI-Eth-Trunk1]undo portswitch
[*HUAWEI-Eth-Trunk1]ip address 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]quit
[*HUAWEI]int loopback 0
[*HUAWEI-LoopBack0]ip address 192.168.2.100 24
[*HUAWEI-LoopBack0]quit
[*HUAWEI]return 
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y	
<CE2>system-view 
Enter system view, return user view with return command.
[~CE2]ip route-static 192.168.1.10 32 10.1.1.1
[*CE2]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y	
<CE2>

测试
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

链路合二为一,交换机CE1和CE2可以互通。

这里要注意,三层交换机的配置得保存后才会作用!

总结

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

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

头发莫的了呀

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值