一.链路聚合的概念
端口绑定技术又称链路聚合(Link Aggregation)是将一组物理接口捆绑在一起作为一个逻辑接口来增加带宽的一种方法,又称为多接口负载均衡组或链路聚合组。通过在两台设备之间建立链路聚合组,可以提供更高的通讯带宽和更高的可靠性。链路聚合不仅仅为设备通信提供了冗余保护,而且不需要对硬件进行升级。
端口聚合又称链路捆绑。分为二层和三层,二层链路捆绑针对二层交换机,形成的链路不带IP地址功能;三层链路捆绑针对三层交换机,形成的链路带IP地址功能。
二.三层交换链路聚合配置
本次项目测试使用eNSP软件
项目拓扑图:
C1:
<HUAWEI>undo ter
<HUAWEI>undo terminal mo
<HUAWEI>undo terminal monitor
Info: Current terminal monitor is off.
<HUAWEI>syst
<HUAWEI>system-view
Enter system view, return user view with return command.
[~HUAWEI]sysname C1
[*HUAWEI]user-in
[*HUAWEI]user-interface c
[*HUAWEI]user-interface console 0
[*HUAWEI-ui-console0]idle-tim
[*HUAWEI-ui-console0]idle-timeout 1440
[*HUAWEI-ui-console0]q
[*HUAWEI]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y
<C1>syst
<C1>system-view
Enter system view, return user view with return command.
[~C1]int eth
[~C1]int Eth-Trunk 1
[*C1-Eth-Trunk1]undo portsw
[*C1-Eth-Trunk1]undo portswitch
[*C1-Eth-Trunk1]ip add 10.1.1.1 24
[*C1-Eth-Trunk1]int g1/0/0
[*C1-GE1/0/0]undo shut
[*C1-GE1/0/0]undo shutdown
[*C1-GE1/0/0]eth-t
[*C1-GE1/0/0]eth-trunk 1
[*C1-GE1/0/0]int g1/0/1
[*C1-GE1/0/1]undo shu
[*C1-GE1/0/1]undo shutdown
[*C1-GE1/0/1]eth-tr
[*C1-GE1/0/1]eth-trunk 1
[*C1-GE1/0/1]int g1/0/2
[*C1-GE1/0/2]undo shu
[*C1-GE1/0/2]undo shutdown
[*C1-GE1/0/2]eth-t
[*C1-GE1/0/2]eth-trunk 1
[*C1-GE1/0/2]int g1/0/3
[*C1-GE1/0/3]undo portsw
[*C1-GE1/0/3]undo portswitch
[*C1-GE1/0/3]undo shu
[*C1-GE1/0/3]undo shutdown
[*C1-GE1/0/3]ip add 192.168.1.1 24
[*C1-GE1/0/3]q
[*C1]ip rou
[*C1]ip route-st
[*C1]ip route-static 192.168.2.0 24 10.1.1.2
[*C1]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y
<C1>
C2:
<HUAWEI>undo ter
<HUAWEI>undo terminal mo
<HUAWEI>undo terminal monitor
Info: Current terminal monitor is off.
<HUAWEI>syst
<HUAWEI>system-view
Enter system view, return user view with return command.
[~HUAWEI]sysn
[~HUAWEI]sysname C2
[*HUAWEI]user-int
[*HUAWEI]user-interface co
[*HUAWEI]user-interface console 0
[*HUAWEI-ui-console0]idle-tim
[*HUAWEI-ui-console0]idle-timeout 1440
[*HUAWEI-ui-console0]q
[*HUAWEI]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y
<C2>syst
<C2>system-view
Enter system view, return user view with return command.
[~C2]int eth
[~C2]int Eth-Trunk 1
[*C2-Eth-Trunk1]undo portsw
[*C2-Eth-Trunk1]undo portswitch
[*C2-Eth-Trunk1]ip add 10.1.1.2 24
[*C2-Eth-Trunk1]int g1/0/0
[*C2-GE1/0/0]undo shu
[*C2-GE1/0/0]undo shutdown
[*C2-GE1/0/0]eth-tr
[*C2-GE1/0/0]eth-trunk 1
[*C2-GE1/0/0]int g1/0/1
[*C2-GE1/0/1]undo shu
[*C2-GE1/0/1]undo shutdown
[*C2-GE1/0/1]eth-tr
[*C2-GE1/0/1]eth-trunk 1
[*C2-GE1/0/1]int g1/0/2
[*C2-GE1/0/2]undo shut
[*C2-GE1/0/2]undo shutdown
[*C2-GE1/0/2]eth-tr
[*C2-GE1/0/2]eth-trunk 1
[*C2-GE1/0/2]int g1/0/3
[*C2-GE1/0/3]undo portsw
[*C2-GE1/0/3]undo portswitch
[*C2-GE1/0/3]undo shut
[*C2-GE1/0/3]undo shutdown
[*C2-GE1/0/3]ip add 192.168.2.2 24
[*C2-GE1/0/3]q
[*C2]ip rou
[*C2]ip route-st
[*C2]ip route-static 192.168.1.0 24 10.1.1.1
[*C2]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y
<C2>
连通性测试:
PC>ping 192.168.2.10
Ping 192.168.2.10: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
From 192.168.2.10: bytes=32 seq=4 ttl=126 time=16 ms
From 192.168.2.10: bytes=32 seq=5 ttl=126 time=16 ms
--- 192.168.2.10 ping statistics ---
5 packet(s) transmitted
2 packet(s) received
60.00% packet loss
round-trip min/avg/max = 0/16/16 ms
PC1和PC2设置:
三.总结
1.三层链路聚合使用的是三层交换机,形成的链路带IP地址功能
2.Eth-trunk一旦工作在三层上,将不能配置access/trunk
3.【】undo portswitch 开启三层功能