随着网络中部署的业务量不断增长,对于全双工点对点链路,单条物理链路的带宽已不能满足正常的业务流量需求。如果将当前接口板替换为具备更高带宽的接口板,则会浪费现有的设备资源,而且升级代价较大。如果增加设备间的链路数量,则在作为三层口使用时需要在每个接口上配置IP地址,从而导致浪费IP地址资源。
Eth-Trunk( 链路聚合技术 )作为一种捆绑技术,可以把多个独立的物理接口绑定在一起作为一个大带宽的逻辑接口使用,这样既不用替换接口板也不会浪费IP地址资源。本课程我们将详细的介绍Eth-Trunk技术。
As the number of operations deployed in the network grows xff0c; the bandwidth of single physical links is no longer sufficient to meet normal business flow requirements, as the number of operations deployed in the network continues to grow xff0c; if the current interface board is replaced by an interface board with a higher bandwidth xff0c; if the number of links between the equipment is increased xff0c; if the IP address xff0c is used as a three-storey interface, the IP address xff0c; that leads to a waste of IP address resources.
Eth-Trunk#xff08; Linking Technology & #xff09; as a binding technology #xff0c; and if multiple separate physical interfaces can be tied together as a logic interface for a large band xff0c; this course will not waste IP address resources without replacing the interface board.
Eth-Trunk是一种将多个以太网接口捆绑成一个逻辑接口的捆绑技术。
Trunk的优势在于:
Eth-Trunk is a binding technique that binds multiple e-Terunk interfaces into a logical interface.
优势 | 说明 |
---|---|
增加带宽 | Trunk接口的总带宽是各成员接口带宽之和。通过这种方式可以成倍的增加接口带宽。 |
提高可靠性 | 当某个成员接口连接的物理链路出现故障时,流量会切换到其他可用的链路上,从而提高整个Trunk链路的可靠性。 |
负载分担 | 通过Trunk接口可以实现负载分担。Trunk接口将流量分散到不同的链路上,最后到达同一目的地。这样可以避免所有流量都走同一条链路而导致网络拥塞。 |
Eth-Trunk链路聚合模式:
1、手工负载分担模式;
2、LACP模式。
Eth-Trunk可以用于二层的链路聚合,也可以用于三层的链路聚合。缺省情况下,以太网接口工作在二层模式。如果需要配置二层Eth-Trunk接口,可以通过portswitch命令将该接口切换成二层接口;如果需要配置三层Eth-Trunk接口,可以通过undo portswitch命令将该接口切换成三层接口。
1, manual load-sharing mode xff1b;
2, LACP mode.
Eth-Trunk can be used for two layers of chain aggregation xff0c; it can also be used for three layers of chain aggregation. xff0c in default xff0c; working on two-storey mode with the Tainet interface. If two layers of Eth-Trunk interface xff0c; switch this interface to two layers interface xff1b by portswitch command; if three layers of Eth-Trunk interface xff0c; switch the interface to three layers can be ordered by undo portswitch command.
当两台设备中至少有一台不支持LACP协议时,可使用手工负载分担模式的Eth-Trunk来增加设备间的带宽及可靠性。
在手工负载分担模式下,加入Eth-Trunk的链路都进行数据的转发。
at least one of the two devices did not support the LACP agreement xffoc; Eth-Trunk could be used to increase bandwidth and reliability of the equipment using manual burden-sharing mode.
LACP模式也称为M:N模式,其中M条链路处于活动状态转发数据,N条链路处于非活动状态作为备份链路。
图中设置的活跃链路数为2,即2条链路处于转发状态,1条链路处于备份状态,不转发数据,只有当活跃的链路出现故障时,备份链路才进行转发。
LACP model also known as M: N mode xff0; M-link relay data #x0; N-links non-operational #0; #0xxxxx6ff
首先根据系统优先级进行选举主动端,LACP的系统优先级默认为32768,范围0-65535,值越小越优,如果系统优先级相同则比较系统ID,小的成为主动端。
比较完主动端后,根据主动端的接口优先级来选取活动端口,接口优先级越小越优,默认为32768,范围0-65535。接口优先级相同则比较接口ID,即接口号,越小越优。而对端根据主动端选取的活动接口对应自己的活动接口,剩下的则成为备份端口。
First, the electoral active end & #xff0c is based on the system priority; LACP's system priority is defaulted to 32768, range 0-65535, value is smaller by value xff0c; system priority is compared to system ID, smaller is active.
is compared to active end xff0c; active port xff0c is selected according to the active interface priority; interface priority is smaller by interface xff0c; default is defaulted to 32768xff0c; range 0-65535; interface priority is comparable to interface ID #xff0c; i.e. interface number xff0c; next priority is achieved. End is matched to its own activity interface based on active port #xff0c; remaining is backup port xff0c.
当活动端口port1发生故障后转为备份端口,而备份端口port3成为活动端口来接替工作,这时候如果port1恢复正常,设备使能了LACP抢占功能的话则根据抢占时延来进行抢占,时延结束port1重新成为活动端口而port3变为了备份端口,如果没有使能LACP抢占功能,则port1不会进行抢占,一直处于备份端口。抢占时延可进行配置。
when active port 1 fails to function as backup port & #xff0; back-up port port 3 is not used for replacement #xff0; this time is taken into possession of port1 & #xff0c; equipment enables LACP to retake port & #ffpl; this is delayed at #0; this time Axx ffpm & & & & ffpl
Eth-Trunk接口进行负载分担时,可以选择IP地址或者包作为负载分担的散列依据;同时还可以设置成员接口的负载分担权重。
Eth-Trunk接口中,某成员接口的权重值占所有成员接口负载分担权重之和的比例越大,该成员接口承担的负载就越大。在接口视图下配置distribute-weight 命令来修改权重,默认值未1,范围为1-16.
xff0c for load-sharing at the Eth-Trunk interface; can select an IP address or package as a hash for load-sharing xff1b; and can also set load-sharing weights for the member interface.
Eth-Trunk interface xff0c; the weight value of a member interface is greater than the weight of the share of all member interfaces xff0c; the load of the member interface is larger. Configure the distribute-weight command under the interface view to modify the weight xff0c; default value not 1xff0c; range 1-16.
接口负载分担 | 特点 |
---|---|
逐流负载分担 | 当报文的源IP地址、目的IP地址都相同或者报文的源MAC地址、目的MAC地址都相同时,这些报文从同一条成员链路上通过。 |
逐包负载分担 | 以报文为单位分别从不同的成员链路上发送。 |
使用命令interface Eth-Trunk 1进入eth-tunk视图
配置为手工负载分担模式mode manual load-balance,注意配置模式时如果配置了接口绑定,则无法修改模式,必须要把视图下其他配置都删除才能进行模式的修改。
然后加入接口成员 trunkport g0/0/0、trunkport g0/0/1、trunkport g0/0/2.两边都一致。
可以使用命令load-balance src-dst-ip修改手工负载分担模式,修改成根据源目IP地址逐流负载分担,使所有源目IP地址相同的流量走一条活动链路。
br/> Use the command interface Eth-Trunk 1 to enter 然后dis eth-trunk 1来查看运行状态,全UP,手工负载分担eth-trunk创建成功 Then dis eth-trunk 1 looks at active status & #xff0c; full UP, manual load-sharing Eth-trunk created successfully Amend the system priority level of R1 to make R1 the active end xff0c; interface priority xff0c; election by port xff0c; maximum active link designated as 2 xff0c; thus xff0c; 0/0 and 0/0/1 will become two activity ports xff0c; R2: selected as an active port xff0c; unselec can only be used as a backup port #xff0c; our g0/0 and g0/0/1 have been selected as a small activity port; g/0x0x0x0x0c LACP配置完成,我们这时候可以来配置下抢占机制来看下抢占的过程。 LACP configuring completed xff0c; this is when we can configure the seizure process by
configured as manual load-sharing mode(s)mode manual load-balance, If the configuration model is configured xff0c"; xff0c" can't be modified; if all other configurations under the view must be deleted to make changes to the model.
Add the member of the interface tunkag 0/0, trunk g0/0/1, tunkport g0/xffffffffffft3;
修改R1的系统优先级使得R1成为主动端,接口优先级不动,根据端口号来选举,最大活动链路指定为2条,这样g0/0/0和g0/0/1会成为2条活动端口,而g0/0/2成为备份端口。
R1:
#
lacp priority 1
#
interface Eth-Trunk1
mode lacp-static
max active-linknumber 2
#
interface GigabitEthernet0/0/0
eth-trunk 1
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
#lacp/maint0 < < /
#
interface Eth-Trunk1
mode lacp-static
#
interface GigabitEthernet0/0/0
eth-trunk 1
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
图中selected表示被选为活动端口,而unselect表示为备份端口,我们的g0/0/0和g0/0/1由于端口号小被选为活动端口,而g0/0/2则由于最大活动链路为2只能成为备份端口。
在R1使能抢占模式,并配置抢占时延
#
interface Eth-Trunk1
mode lacp-static
lacp preempt enable #使能抢占模式
max active-linknumber 2
lacp preempt delay 10 #配置抢占时延10s
#
而后我们来shutdown g0/0/0接口
这时候g0/0/0变成了备份端口,而我们的g0/0/2起来成为了活动端口,这时候我们再恢复g0/0/0接口。
经过10s后我们来查看下eth-trunk状态
G0/0/0又抢占回自己的活动状态,而g0/0/2则由于最大活动链路为2限制它不得不转为备份状态。
< alb-interface eth-Trunk1
< > >
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论