CN101321130A - Method, system and device for forwarding traffic - Google Patents
Method, system and device for forwarding traffic Download PDFInfo
- Publication number
- CN101321130A CN101321130A CNA2008101167800A CN200810116780A CN101321130A CN 101321130 A CN101321130 A CN 101321130A CN A2008101167800 A CNA2008101167800 A CN A2008101167800A CN 200810116780 A CN200810116780 A CN 200810116780A CN 101321130 A CN101321130 A CN 101321130A
- Authority
- CN
- China
- Prior art keywords
- port
- efu
- flow
- traffic
- outbound port
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种转发流量的方法、系统和装置,属于通信技术领域。所述方法包括:从入端口接收广播流量,查找该流量对应的出端口;当入端口对应的TM与出端口对应的TM不同时,判断出端口是否为捆绑端口的成员端口;若是则获取该捆绑端口内所有的成员端口对应的EFU,为所述EFU中的每个EFU复制所述流量,并转发复制后的流量给所述每个EFU。所述系统包括:转发装置和EFU。所述装置包括:接收模块、查找模块和复制模块。本发明极大地缩短了Trunk成员端口切换时流量丢失的时间,使Trunk成员端口切换时间满足电信级要求。
The invention discloses a method, system and device for forwarding traffic, belonging to the technical field of communication. The method includes: receiving broadcast traffic from an ingress port, searching for an egress port corresponding to the traffic; when the TM corresponding to the ingress port is different from the TM corresponding to the egress port, judging whether the egress port is a member port of a bundled port; if so, obtaining the Bind the EFUs corresponding to all the member ports in the port, copy the traffic for each EFU in the EFU, and forward the copied traffic to each EFU. The system includes: forwarding device and EFU. The device includes: a receiving module, a searching module and a replicating module. The invention greatly shortens the flow loss time when the Trunk member port is switched, and makes the Trunk member port switch time meet the requirement of the carrier level.
Description
技术领域 technical field
本发明涉及通信技术领域,特别涉及一种转发流量的方法、系统和装置。The present invention relates to the technical field of communications, in particular to a method, system and device for forwarding traffic.
背景技术 Background technique
Trunk是一种捆绑技术,将网络交换设备的多个物理口捆绑成一个逻辑口来使用。用户通过对逻辑口进行配置,实现各种路由协议以及VLAN(Virtual Local Area Network,虚拟局域网)、MPLS(Multi Protocol Label Switching,多协议标签交换)和VPN(VirtualPrivateNetwork,虚拟专用网)等业务。绑定到一起的物理口称为Trunk的成员,所有对Trunk逻辑口的配置最终都会转化成对成员的配置。出口为Trunk逻辑口的流量,通常会通过哈希(HASH)运算选择其中的一个成员端口发送出去。Trunk捆绑技术可以增加网络交换设备的带宽,使流量负载均担。当Trunk中的某个链路出现故障时,该链路上的流量会自动切换到该Trunk中的其它可用链路上,从而提高了链路的可靠性。Trunk is a bundling technology that bundles multiple physical ports of a network switching device into one logical port for use. By configuring the logical port, the user can realize various routing protocols and services such as VLAN (Virtual Local Area Network, virtual local area network), MPLS (Multi Protocol Label Switching, multi-protocol label switching) and VPN (Virtual Private Network, virtual private network). The physical ports bound together are called members of the Trunk, and all configurations on the logical ports of the Trunk will eventually be converted into configurations on members. The traffic whose egress is a Trunk logical port usually selects one of the member ports through a hash (HASH) operation to send out. Trunk bundling technology can increase the bandwidth of network switching equipment, so that the traffic load is balanced. When a link in the trunk fails, traffic on the link is automatically switched to other available links in the trunk, thereby improving link reliability.
Ethernet(以太网)Trunk是一种二层捆绑技术,将多个Ethernet端口捆绑成一个Trunk逻辑口。Ethernet Trunk可以通过手工建立连接或者通过LACP(Link Aggregation ControlProtocol,链路汇聚控制协议))动态建立和维护连接。在Ethernet交换设备中,一般包含多个EFU(Express Forwarding Unit,快速转发单元)和TM(Traffic Manager,流量管理器)。EFU与设备的端口相连,根据转发表执行转发动作;TM分割转发的上下行,从EFU接收流量,并根据ELB(Egress Link Block,下行链接表)负责流量的调度、复制及转发。当TM从EFU接收的流量为广播流量时,根据TM中的ELB表,将流量复制多份发往ELB表下挂的每个出端口所在的EFU;当TM从EFU接收的流量有指定的出端口时,则将流量复制到出端口所在EFU对应的TM上,经该EFU从出端口发送出去,如果该指定的出端口所在的EFU即为接收流量的EFU,则TM不需复制接收的流量,直接通过该EFU转发到指定的出端口。Ethernet (Ethernet) Trunk is a Layer 2 bundling technology that bundles multiple Ethernet ports into a Trunk logical port. Ethernet Trunk can manually establish a connection or dynamically establish and maintain a connection through LACP (Link Aggregation Control Protocol, Link Aggregation Control Protocol)). In an Ethernet switching device, it generally includes multiple EFU (Express Forwarding Unit, fast forwarding unit) and TM (Traffic Manager, traffic manager). The EFU is connected to the port of the device and performs the forwarding action according to the forwarding table; the TM splits the forwarded uplink and downlink, receives traffic from the EFU, and is responsible for traffic scheduling, replication and forwarding according to the ELB (Egress Link Block, downlink table). When the traffic received by the TM from the EFU is broadcast traffic, according to the ELB table in the TM, multiple copies of the traffic are sent to the EFU where each outgoing port connected to the ELB table is located; when the traffic received by the TM from the EFU has a specified outgoing port port, copy the traffic to the TM corresponding to the EFU where the egress port is located, and send it out from the egress port through the EFU. If the EFU where the specified egress port is located is the EFU that receives the traffic, the TM does not need to copy the received traffic , forwarded directly to the specified egress port through the EFU.
现有技术中当Trunk中有成员端口发生故障时,从Trunk中选择其它的成员端口负责流量转发。参见图1,以太交换设备有三个端口P1、P2和P3,其中,P2和P3属于一个Trunk,且P1和该Trunk同属于一个广播域。TM1和TM2的ELB表中,保存有根据算法选出的出端口信息,如针对某一流量根据哈希算法得到出端口为P3。当P3在某一时刻t1发生故障时,该设备的上层软件根据故障端口信息在时刻t2刷新Trunk表,在表中删除P3。相应地,TM1根据新Trunk表在时刻t3刷新自身的ELB表,根据哈希算法将出端口改为P2。此后进入TM1的流量会被发送到P2所在的EFU1,不再发往TM2上,从而完成端口流量切换。In the prior art, when a member port in the Trunk fails, other member ports in the Trunk are selected to be responsible for traffic forwarding. Referring to FIG. 1, the Ethernet switching device has three ports P1, P2 and P3, where P2 and P3 belong to a Trunk, and P1 and the Trunk belong to the same broadcast domain. The ELB tables of TM1 and TM2 store the outbound port information selected according to the algorithm. For example, according to the hash algorithm for a certain traffic, the outbound port is P3. When P3 fails at a certain time t1, the upper layer software of the device refreshes the Trunk table at time t2 according to the faulty port information, and deletes P3 in the table. Correspondingly, TM1 refreshes its own ELB table at time t3 according to the new trunk table, and changes the outgoing port to P2 according to the hash algorithm. After that, the traffic entering TM1 will be sent to EFU1 where P2 is located, and will no longer be sent to TM2, thus completing port traffic switching.
在对现有技术进行分析后,发明人发现:当端口流量切换前后对应的Trunk成员端口不在同一个EFU上时,网络交换设备在该切换过程中会丢失流量,如果该Trunk加入较多的VLAN,则会导致网络交换设备流量中断较长时间。如图1中在Trunk成员端口切换时间t1至t3的时间内,该设备的流量仍会发往故障端口P3,因此会造成流量丢失。After analyzing the prior art, the inventor found that: when the corresponding Trunk member ports before and after port traffic switching are not on the same EFU, the network switching device will lose traffic during the switching process. If the Trunk joins more VLANs , it will cause the traffic of the network switching device to be interrupted for a long time. As shown in Figure 1, during the period from t1 to t3 when the trunk member port is switched, the traffic of the device will still be sent to the faulty port P3, which will cause traffic loss.
发明内容 Contents of the invention
为了缩短Trunk成员端口切换时流量丢失的时间,本发明实施例提供了一种转发流量的方法、系统和装置。所述技术方案如下:In order to shorten the time of traffic loss when a trunk member port is switched, the embodiments of the present invention provide a method, system and device for forwarding traffic. Described technical scheme is as follows:
一种转发流量的方法,所述方法包括:A method for forwarding traffic, the method comprising:
从入端口接收广播流量,查找所述流量对应的出端口;Receive broadcast traffic from the ingress port, and find the egress port corresponding to the traffic;
当所述入端口对应的流量管理器与所述出端口对应的流量管理器不相同时,判断所述出端口是否为捆绑端口的成员端口;When the traffic manager corresponding to the ingress port is different from the traffic manager corresponding to the egress port, judging whether the egress port is a member port of a bundled port;
如果是,则获取所述捆绑端口内所有的成员端口对应的快速转发单元EFU,为所述EFU中的每个EFU复制所述流量,并转发复制后的流量给所述每个EFU。If so, obtain EFUs corresponding to all member ports in the bundled port, copy the traffic for each EFU in the EFU, and forward the copied traffic to each EFU.
一种转发流量的系统,所述系统包括:A system for forwarding traffic, the system comprising:
转发装置,用于从入端口接收广播流量,查找所述流量对应的出端口;当所述入端口对应的流量管理器与所述出端口对应的流量管理器不相同时,判断所述出端口是否为捆绑端口的成员端口;如果是,则获取所述捆绑端口内所有的成员端口对应的快速转发单元EFU,为所述EFU中的每个EFU复制所述流量,并转发复制后的流量给所述每个EFU;A forwarding device, configured to receive broadcast traffic from an ingress port, and search for an egress port corresponding to the traffic; when the traffic manager corresponding to the ingress port is different from the traffic manager corresponding to the egress port, determine that the egress port Whether it is a member port of a bundled port; if yes, obtain the fast forwarding unit EFU corresponding to all member ports in the bundled port, copy the traffic for each EFU in the EFU, and forward the copied traffic to said each EFU;
EFU,用于接收所述转发装置发来的所述流量。The EFU is configured to receive the traffic sent by the forwarding device.
一种转发流量的装置,所述装置包括:A device for forwarding traffic, the device comprising:
接收模块,用于从入端口接收广播流量;A receiving module, configured to receive broadcast traffic from an ingress port;
查找模块,用于查找所述接收模块收到的流量对应的出端口;A search module, configured to search for an outbound port corresponding to the traffic received by the receiving module;
复制模块,用于当所述入端口对应的流量管理器与所述出端口对应的流量管理器不相同时,判断所述查找模块找到的出端口是否为捆绑端口的成员端口;如果是,则获取所述捆绑端口内所有的成员端口对应的快速转发单元EFU,为所述EFU中的每个EFU复制所述流量,并转发复制后的流量给所述每个EFU。Copying module, for when the traffic manager corresponding to the ingress port is different from the traffic manager corresponding to the egress port, judge whether the egress port found by the search module is a member port of a bundled port; if yes, then Obtain fast forwarding units EFUs corresponding to all member ports in the bundled port, copy the traffic for each EFU in the EFU, and forward the copied traffic to each EFU.
本发明实施例通过复制多份流量,向捆绑端口内的所有成员端口对应的EFU发送复制的流量,使得当Trunk成员端口切换时,出端口所连的EFU可以直接根据复制的流量进行转发,从而避免了流量丢失,与现有技术中出端口所连的EFU需要等待入端口对应的TM刷新自身的ELB表之后才能正确地转发相比,极大地缩短了Trunk成员端口切换时流量丢失的时间,使Trunk成员端口切换时间满足电信级要求,与现有技术相比,更有效地保护了网络交换设备的流量。In the embodiment of the present invention, by copying multiple copies of traffic, the copied traffic is sent to the EFU corresponding to all member ports in the bundled port, so that when the trunk member port is switched, the EFU connected to the outgoing port can directly forward according to the copied traffic, thereby Traffic loss is avoided. Compared with the EFU connected to the outgoing port in the prior art, which needs to wait for the TM corresponding to the incoming port to refresh its own ELB table before forwarding correctly, it greatly shortens the time for traffic loss when the Trunk member port is switched. The switching time of the Trunk member ports meets the requirements of the carrier level, and compared with the prior art, the traffic of the network switching equipment is more effectively protected.
附图说明 Description of drawings
图1是现有技术中Trunk端口切换时流量转发示意图;FIG. 1 is a schematic diagram of traffic forwarding during Trunk port switching in the prior art;
图2是本发明实施例提供的转发流量的方法流程图;FIG. 2 is a flowchart of a method for forwarding traffic provided by an embodiment of the present invention;
图3是本发明实施例提供的复制流量的示意图;FIG. 3 is a schematic diagram of replication traffic provided by an embodiment of the present invention;
图4是本发明实施例提供的端口发生故障后复制流量转发示意图;FIG. 4 is a schematic diagram of replication traffic forwarding after a port fails according to an embodiment of the present invention;
图5是本发明实施例提供的转发流量的系统结构示意图;FIG. 5 is a schematic structural diagram of a system for forwarding traffic provided by an embodiment of the present invention;
图6是本发明实施例提供的转发流量的装置一种结构示意图;FIG. 6 is a schematic structural diagram of a device for forwarding traffic provided by an embodiment of the present invention;
图7是本发明实施例提供的转发流量的装置另一种结构示意图。Fig. 7 is another schematic structural diagram of the device for forwarding traffic provided by the embodiment of the present invention.
具体实施方式 Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.
本发明实施例提供了一种转发流量的方法,包括:从入端口接收广播流量,查找该流量对应的出端口;当入端口对应的TM与出端口对应的TM不相同时,判断出端口是否为捆绑端口的成员端口;如果是,则获取该捆绑端口内所有的成员端口对应的EFU,为所述EFU中的每个EFU复制所述流量,并转发复制后的流量给所述每个EFU。An embodiment of the present invention provides a method for forwarding traffic, including: receiving broadcast traffic from an ingress port, searching for an egress port corresponding to the traffic; when the TM corresponding to the ingress port is different from the TM corresponding to the egress port, judging whether the port is a member port of a bundled port; if yes, obtain the EFUs corresponding to all member ports in the bundled port, copy the traffic for each EFU in the EFU, and forward the copied traffic to each EFU .
参见图2,本发明实施例提供的转发流量的方法,可以具体包括:Referring to Fig. 2, the method for forwarding traffic provided by the embodiment of the present invention may specifically include:
201:网络交换设备中的TM从入端口接收广播流量,查找该流量对应的出端口。201: The TM in the network switching device receives broadcast traffic from an ingress port, and searches for an egress port corresponding to the traffic.
具体地,TM接收到某一广播流量后,可以查找自己的ELB表,找到该广播流量对应的出端口,如目的地址为MACl的流量对应的出端口为P3。其中,TM的ELB表中的出端口信息,是根据在路由表中查找到的Trunk ID,以及按照预设的哈希算法对流量中的参数(如源IP地址)进行运算得到的哈希值,在相应的Trunk表中选取的成员端口而得到的。Specifically, after receiving a certain broadcast traffic, the TM can search its own ELB table to find the outbound port corresponding to the broadcast traffic, for example, the outbound port corresponding to the traffic whose destination address is MAC1 is P3. Among them, the outbound port information in the TM's ELB table is based on the Trunk ID found in the routing table and the hash value obtained by calculating the parameters in the traffic (such as the source IP address) according to the preset hash algorithm , obtained from the selected member ports in the corresponding Trunk table.
202:当出端口对应的TM不是上述TM时,上述TM判断该出端口是否为捆绑端口的成员端口,如果该出端口是捆绑端口的成员端口,则执行203;否则,执行205。202: When the TM corresponding to the egress port is not the above-mentioned TM, the above-mentioned TM judges whether the egress port is a member port of the bundled port, and if the egress port is a member port of the bundled port, execute 203; otherwise, execute 205.
具体地,TM可以从ELB表中获取出端口是否属于捆绑端口的信息,通常ELB表中保存有出端口的标识信息,用于标识该出端口是否属于捆绑端口,TM根据该标识可以判断出该端口是否为捆绑端口的成员端口。Specifically, the TM can obtain information about whether the outgoing port belongs to a bundled port from the ELB table. Usually, the ELB table stores the identification information of the outgoing port, which is used to identify whether the outgoing port belongs to a bundled port. Whether the port is a member port of the port bundle.
203:上述TM获取上述捆绑端口内所有的成员端口对应的EFU。203: The above-mentioned TM obtains the EFUs corresponding to all the member ports in the above-mentioned bundled port.
例如,捆绑端口内有5个成员端口P2、P3、P4、P5和P6,其中,P2和P3连在EFU2上,P4连在EFU3上,P5和P6连在EFU4上,则接收流量的TM获取该捆绑端口内5个成员端口对应的EFU共有三个,分别为:EFU2、EFU3和EFU4。For example, there are five member ports P2, P3, P4, P5, and P6 in the bundled port, among which, P2 and P3 are connected to EFU2, P4 is connected to EFU3, and P5 and P6 are connected to EFU4, then the TM that receives the traffic obtains There are three EFUs corresponding to the five member ports in the bundled port, namely: EFU2, EFU3, and EFU4.
204:上述TM为获取的EFU中的每个EFU复制一份上述流量,并将复制后的流量转发给每个EFU,然后结束。204: The above-mentioned TM copies the above-mentioned flow for each EFU in the obtained EFU, and forwards the copied flow to each EFU, and then ends.
在本发明实施例中,发往出端口所连的EFU上的流量称为主流量,发往捆绑端口内其它成员端口所连的EFU上的流量称为保护流量。例如,参见图3,网络交换设备有三个端口P1、P2和P3,其中,P2和P3属于一个Trunk,且P1和该Trunk同属于一个广播域。当TM1从端口P1接收某一流量后,在自己的ELB表中查找到该流量对应的出端口为P3,且获知P3属于捆绑端口,则TM1为该捆绑端口内的成员端口P2对应的EFU1和成员端口P3对应的EFU2分别复制一份流量,并转发复制后的流量。其中,转发给EFU2的流量为主流量,转发给EFU1的流量为保护流量。In the embodiment of the present invention, the traffic sent to the EFU connected to the egress port is called the main traffic, and the traffic sent to the EFUs connected to other member ports in the bundled port is called the protection traffic. For example, referring to FIG. 3 , the network switching device has three ports P1 , P2 and P3 , where P2 and P3 belong to a Trunk, and P1 and the Trunk belong to the same broadcast domain. When TM1 receives some traffic from port P1, it finds that the outbound port corresponding to the traffic is P3 in its ELB table, and knows that P3 belongs to the bundled port, then TM1 is the EFU1 and EFU1 corresponding to the member port P2 in the bundled port. EFU2 corresponding to member port P3 copies a copy of the traffic and forwards the copied traffic. Among them, the traffic forwarded to EFU2 is the main traffic, and the traffic forwarded to EFU1 is the protection traffic.
205:上述TM通过出端口所连的EFU将流量转发出去,然后结束。205: The above TM forwards the traffic through the EFU connected to the egress port, and then ends.
其中,转发的过程可以具体如下:Wherein, the forwarding process can be specifically as follows:
上述TM将接收的流量复制一份发送给上述出端口对应的TM,该出端口对应的TM收到后,下发给该出端口所连的EFU,该EFU收到后将流量发往该出端口。The above TM copies the received traffic and sends it to the TM corresponding to the above outbound port. After the TM corresponding to the outbound port receives it, it sends it to the EFU connected to the outbound port. After the EFU receives the traffic, it sends the traffic to the outbound port. port.
例如,TM1从P1接收流量,出端口为P3,且P3不是捆绑端口,P1连在EFU1上,而P3连在EFU2上,则TM1将该流量复制后经TM2发给EFU2,EFU2收到后转发给端口P3;如果出端口为P2,P2也不是捆绑端口,且P2与P1均连在EFU1上,则TM1不用复制接收的流量,直接将该流量转发给EFU1,EFU1收到后将该流量转发给端口P2。For example, TM1 receives traffic from P1, the outgoing port is P3, and P3 is not a bundled port, P1 is connected to EFU1, and P3 is connected to EFU2, then TM1 copies the traffic and sends it to EFU2 through TM2, and EFU2 forwards it after receiving it to port P3; if the outgoing port is P2, and P2 is not a bundled port, and both P2 and P1 are connected to EFU1, then TM1 does not need to copy the received traffic, but directly forwards the traffic to EFU1, and EFU1 forwards the traffic after receiving it to port P2.
进一步地,上述方法还可以包括:Further, the above method may also include:
每个EFU接收到TM转发的流量后,查找该流量对应的出端口,并判断查找到的出端口是否为自身所连的端口,如果是,则将该流量发往该出端口;否则,丢弃该流量。具体地,EFU可以根据在路由表中查找到的Trunk ID,查找相应的Trunk表,并按照预设的与TM采用的相同的哈希算法运算得到的哈希值,在该Trunk表中选取相应的成员端口作为出端口。通过判断进行转发,可以使接收主流量的EFU将该流量转发给出端口,其它EFU丢弃接收到的保护流量,从而保证网络交换设备发出的流量只有主流量,保护流量不会被发出。After each EFU receives the traffic forwarded by TM, it looks for the outbound port corresponding to the traffic, and judges whether the found outbound port is the port it is connected to, and if so, sends the traffic to the outbound port; otherwise, discards it the traffic. Specifically, the EFU can look up the corresponding Trunk table according to the Trunk ID found in the routing table, and select a corresponding The member port of the port is used as the outgoing port. By judging and forwarding, the EFU receiving the main traffic can forward the traffic to the port, and other EFUs discard the received protection traffic, so as to ensure that the traffic sent by the network switching device is only the main traffic, and the protection traffic will not be sent.
另外,上述方法还可以包括:In addition, the above method may also include:
当TM查找到的出端口发生故障且该出端口属于捆绑端口时,网络交换设备更新该捆绑端口的Trunk表。例如,在Trunk表中删除发生故障的成员端口,参见表1,为网络交换设备中的一个Trunk表,其长度为8,该Trunk中捆绑了三个物理端口P2、P3和P4,索引号即为哈希算法得到的哈希值。当成员端口P3发生故障时,在Trunk表中删除成员端口P3,并将剩余的成员端口重新进行排序,排序的方式有多种,表2所示的更新后的Trunk表中,删除成员端口P3后,该表中只有成员端口P2和P4,并按对应索引号从小到大的顺序将P2和P4进行升序排列。When the outbound port found by the TM fails and the outbound port belongs to a bundled port, the network switching device updates the Trunk table of the bundled port. For example, delete the failed member port in the Trunk table, see Table 1, which is a Trunk table in the network switching device, its length is 8, three physical ports P2, P3 and P4 are bound in this Trunk, and the index number is The hash value obtained by the hash algorithm. When member port P3 fails, delete member port P3 in the Trunk table, and reorder the remaining member ports. There are many ways to sort. In the updated Trunk table shown in Table 2, delete member port P3 Finally, there are only member ports P2 and P4 in the table, and P2 and P4 are arranged in ascending order according to the corresponding index numbers from small to large.
表1Table 1
表2Table 2
例如,参见图4,当P3在某一时刻t1发生故障时,该设备的上层软件根据故障端口信息在时刻t2刷新Trunk表,如表2。相应地,EFU1和EFU2在接收到TM1转发的流量后,计算出哈希值为1,分别查找Trunk表,如果此时Trunk表未更新,则查找到该流量对应的出端口为P3,如果此时Trunk表已更新,则查找到该流量对应的出端口为P4,因此P4所连EFU3上的复制流量变为主流量,而其它EFU上的复制流量变为保护流量。对于Trunk表已更新的情况,即图4所示的应用场景,EFU3判断查找到的出端口P4为自身所连的端口,则将该流量发往出端口P4;EFU1和EFU2则判断出该出端口P4不与自己相连,因此丢弃该流量。For example, referring to Fig. 4, when P3 fails at a certain time t1, the upper layer software of the device refreshes the Trunk table at time t2 according to the faulty port information, as shown in Table 2. Correspondingly, after receiving the traffic forwarded by TM1, EFU1 and EFU2 calculate the hash value as 1, and search the Trunk table respectively. If the Trunk table is not updated at this time, find that the outbound port corresponding to the traffic is P3. If this When the Trunk table has been updated, it is found that the outbound port corresponding to this traffic is P4, so the replication traffic on EFU3 connected to P4 becomes the main traffic, and the replication traffic on other EFUs becomes protection traffic. For the case where the Trunk table has been updated, that is, the application scenario shown in Figure 4, EFU3 judges that the found outbound port P4 is the port it is connected to, and then sends the traffic to outbound port P4; EFU1 and EFU2 judge that the outbound port Port P4 is not connected to itself, so this traffic is dropped.
进一步地,在网络交换设备更新Trunk表之后,TM还可以更新ELB表,即上述方法还包括:Further, after the network switching device updates the Trunk table, the TM can also update the ELB table, that is, the above method also includes:
当TM查找到的出端口发生故障且Trunk表已更新时,该捆绑端口内的所有成员端口对应的TM均按照相同的算法从更新后的Trunk表中选取新出端口,并将自己的ELB表中的该出端口更新为选取的新出端口。如图4中的TM1、TM2和TM3均按照相同的哈希算法得到相同的哈希值1,在更新后的Trunk表中选取相应的新出端口P4,然后在各自的ELB表中将已发生故障的原出端口P3更新为新出端口P4。此时,更新ELB表的过程并不影响主流量的转发,从而缩短了Trunk成员端口切换时流量丢失的时间。When the outbound port found by the TM fails and the trunk table has been updated, the TM corresponding to all member ports in the bundled port will select a new outbound port from the updated trunk table according to the same algorithm, and add its own ELB table The outbound port in is updated to the selected new outbound port. As shown in Figure 4, TM1, TM2, and TM3 all obtain the same hash value 1 according to the same hash algorithm, select the corresponding new outbound port P4 in the updated Trunk table, and then record the generated ports in their respective ELB tables. The faulty original outgoing port P3 is updated to the new outgoing port P4. At this time, the process of updating the ELB table does not affect the forwarding of the main traffic, thereby shortening the time for traffic loss when the trunk member port is switched.
本实施例通过复制多份流量,向捆绑端口内的所有成员端口对应的EFU发送复制的流量,使得当Trunk成员端口切换时,出端口所连的EFU可以直接根据复制的流量进行转发,从而避免了流量丢失,与现有技术中出端口所连的EFU需要等待入端口对应的TM刷新自身的ELB表之后才能正确地转发相比,极大地缩短了Trunk成员端口切换时流量丢失的时间,使Trunk成员端口切换时间满足电信级要求。与现有技术相比,节省了TM刷新ELB表的时间(该时间间隔通常比较长,一般TM对一个ELB表中的一个端口的更新时间长达100ms左右),将Trunk成员端口切换的时间缩短为端口发生故障到Trunk表更新的时间,该时间间隔非常小,一般在10ms以下,且不受Trunk加入的VLAN个数的影响,从而更有效地保护了网络交换设备的流量。通过EFU判断后进行转发,保证了网络交换设备只从出端口转发一份复制的流量(即主流量),而其它的复制流量(即保护流量)不转发,避免了网络交换设备转发多份复制流量。In this embodiment, by copying multiple copies of traffic, the copied traffic is sent to the EFUs corresponding to all member ports in the bundled port, so that when the trunk member port is switched, the EFU connected to the outgoing port can directly forward according to the copied traffic, thereby avoiding Compared with the EFU connected to the outgoing port in the prior art, which needs to wait for the TM corresponding to the incoming port to refresh its own ELB table before forwarding correctly, this greatly shortens the time for traffic loss when the Trunk member port is switched, making The switching time of Trunk member ports meets the carrier-class requirements. Compared with the existing technology, it saves the time for TM to refresh the ELB table (the time interval is usually relatively long, and generally the update time for a port in an ELB table by TM is as long as about 100ms), and shortens the time for switching trunk member ports It is the time from the failure of the port to the update of the trunk table. The time interval is very small, generally less than 10ms, and is not affected by the number of VLANs added to the trunk, thus more effectively protecting the traffic of the network switching device. After being judged by the EFU, it is forwarded to ensure that the network switching device only forwards a copy of the traffic (that is, the main traffic) from the egress port, while the other copy traffic (that is, the protection traffic) is not forwarded, which prevents the network switching device from forwarding multiple copies. flow.
参见图5,本发明实施例还提供了一种转发流量的系统,具体包括:Referring to Fig. 5, the embodiment of the present invention also provides a system for forwarding traffic, which specifically includes:
转发装置501,用于从入端口接收广播流量,查找流量对应的出端口;当入端口对应的TM与出端口对应的TM不相同时,判断出端口是否为捆绑端口的成员端口;如果是,则获取捆绑端口内所有的成员端口对应的EFU,为该EFU中的每个EFU复制流量,并转发复制后的流量给每个EFU;The
EFU 502,用于接收转发装置501发来的流量。The
进一步地,EFU 502还可以包括:Further,
转发模块,用于查找EFU 502接收到的流量对应的出端口,判断出端口是否为EFU 502所连的端口,如果是,则将流量发往出端口;否则,丢弃流量。The forwarding module is used to find out the corresponding outgoing port of the traffic received by the
进一步地,转发装置501还可以包括:Further, the
更新模块,用于当出端口发生故障时,按照预设的算法从捆绑端口中选取除出端口以外的一个成员端口作为新出端口,并将转发装置501的下行链接表中的出端口更新为新出端口。The updating module is used to select a member port other than the outgoing port from the bundled ports as a new outgoing port according to a preset algorithm when the outgoing port fails, and update the outgoing port in the downlink list of the
本实施例中的转发装置501可以具体为网络交换设备中的TM。The
本实施例通过转发复制多份流量,向捆绑端口内的所有成员端口对应的EFU发送复制的流量,使得当Trunk成员端口切换时,出端口所连的EFU可以直接根据复制的流量进行转发,从而避免了流量丢失,与现有技术中出端口所连的EFU需要等待入端口对应的TM刷新自身的ELB表之后才能正确地转发相比,极大地缩短了Trunk成员端口切换时流量丢失的时间,使Trunk成员端口切换时间满足电信级要求。与现有技术相比,节省了TM刷新ELB表的时间,将Trunk成员端口切换的时间缩短为端口发生故障到Trunk表更新的时间,更有效地保护了网络交换设备的流量。另外,通过EFU判断后进行转发,保证了网络交换设备只从出端口转发一份复制的流量(即主流量),而其它的复制流量(即保护流量)不转发。In this embodiment, by forwarding and copying multiple copies of traffic, the copied traffic is sent to the EFUs corresponding to all member ports in the bundled port, so that when the trunk member port is switched, the EFU connected to the outgoing port can directly forward according to the copied traffic, thereby Traffic loss is avoided. Compared with the EFU connected to the outgoing port in the prior art, which needs to wait for the TM corresponding to the incoming port to refresh its own ELB table before forwarding correctly, it greatly shortens the time for traffic loss when the Trunk member port is switched. Make the switchover time of Trunk member ports meet the carrier-class requirements. Compared with the existing technology, it saves the time for TM to refresh the ELB table, shortens the time for trunk member port switching to the time from port failure to trunk table update, and more effectively protects the traffic of network switching devices. In addition, forwarding after judgment by the EFU ensures that the network switching device only forwards a copy of the copied traffic (ie, the main traffic) from the egress port, while other duplicated traffic (ie, the protection traffic) is not forwarded.
参见图6,本发明实施例还提供了一种转发流量的装置,具体包括:Referring to Fig. 6, the embodiment of the present invention also provides a device for forwarding traffic, which specifically includes:
接收模块601,用于从入端口接收广播流量;A receiving
查找模块602,用于查找接收模块601收到的流量对应的出端口;A
复制模块603,用于当入端口对应的流量管理器与出端口对应的流量管理器不相同时,判断查找模块602找到的出端口是否为捆绑端口的成员端口;如果是,则获取捆绑端口内所有的成员端口对应的快速转发单元EFU,为该EFU中的每个EFU复制接收模块601收到的流量,并转发复制后的流量给每个EFU。
进一步地,参见图7,上述装置还包括:Further, referring to FIG. 7, the above-mentioned device also includes:
更新模块604,用于当查找模块602找到的出端口发生故障时,按照预设的算法从捆绑端口中选取除该出端口以外的一个成员端口作为新出端口,并将该装置的ELB表中的该出端口更新为新出端口。The updating module 604 is used to select a member port other than the outgoing port from the bundled ports as a new outgoing port according to a preset algorithm when the outgoing port found by the searching
本实施例中的转发流量的装置可以具体为网络交换设备中的TM。The device for forwarding traffic in this embodiment may specifically be a TM in a network switching device.
本实施例通过TM复制多份流量,向捆绑端口内的所有成员端口对应的EFU发送复制的流量,使得当Trunk成员端口切换时,出端口所连的EFU可以直接根据复制的流量进行转发,从而避免了流量丢失,与现有技术中出端口所连的EFU需要等待入端口对应的TM刷新自身的ELB表之后才能正确地转发相比,极大地缩短了Trunk成员端口切换时流量丢失的时间,使Trunk成员端口切换时间满足电信级要求。与现有技术相比,节省了TM刷新ELB表的时间,将Trunk成员端口切换的时间缩短为端口发生故障到Trunk表更新的时间,更有效地保护了网络交换设备的流量。In this embodiment, multiple copies of traffic are copied through TM, and the copied traffic is sent to the EFU corresponding to all member ports in the bundled port, so that when the trunk member port is switched, the EFU connected to the outgoing port can directly forward according to the copied traffic, thereby Traffic loss is avoided. Compared with the EFU connected to the outgoing port in the prior art, which needs to wait for the TM corresponding to the incoming port to refresh its own ELB table before forwarding correctly, it greatly shortens the time for traffic loss when the Trunk member port is switched. Make the switchover time of Trunk member ports meet the carrier-class requirements. Compared with the existing technology, it saves the time for TM to refresh the ELB table, shortens the time for trunk member port switching to the time from port failure to trunk table update, and more effectively protects the traffic of network switching devices.
本发明实施例可以利用软硬件相结合的方式实现,相应的软件程序可以存储在可读取的存储介质中,例如,交换机的硬盘、缓存或光盘中。The embodiment of the present invention can be implemented by combining software and hardware, and the corresponding software program can be stored in a readable storage medium, for example, a hard disk, cache or optical disk of the switch.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNA2008101167800A CN101321130A (en) | 2008-07-17 | 2008-07-17 | Method, system and device for forwarding traffic |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNA2008101167800A CN101321130A (en) | 2008-07-17 | 2008-07-17 | Method, system and device for forwarding traffic |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN101321130A true CN101321130A (en) | 2008-12-10 |
Family
ID=40180966
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNA2008101167800A Withdrawn CN101321130A (en) | 2008-07-17 | 2008-07-17 | Method, system and device for forwarding traffic |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101321130A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102624727A (en) * | 2012-03-07 | 2012-08-01 | 福建星网锐捷网络有限公司 | Interface configuration method and device, main control CPU and network equipment |
| CN108111412A (en) * | 2016-11-24 | 2018-06-01 | 腾讯科技(深圳)有限公司 | A kind of dispatching method of data resource, the first autonomous system and the second autonomous system |
| CN109379297A (en) * | 2018-11-26 | 2019-02-22 | 锐捷网络股份有限公司 | A kind of method and apparatus for realizing flow load balance |
| CN114143247A (en) * | 2021-11-03 | 2022-03-04 | 中盈优创资讯科技有限公司 | IP relay circuit flow emigration and emigration method and device |
-
2008
- 2008-07-17 CN CNA2008101167800A patent/CN101321130A/en not_active Withdrawn
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102624727A (en) * | 2012-03-07 | 2012-08-01 | 福建星网锐捷网络有限公司 | Interface configuration method and device, main control CPU and network equipment |
| CN102624727B (en) * | 2012-03-07 | 2014-12-24 | 福建星网锐捷网络有限公司 | Interface configuration method, device, master control central processing unit and network equipment |
| CN108111412A (en) * | 2016-11-24 | 2018-06-01 | 腾讯科技(深圳)有限公司 | A kind of dispatching method of data resource, the first autonomous system and the second autonomous system |
| CN108111412B (en) * | 2016-11-24 | 2020-11-03 | 腾讯科技(深圳)有限公司 | Data resource scheduling method, first autonomous system and second autonomous system |
| CN109379297A (en) * | 2018-11-26 | 2019-02-22 | 锐捷网络股份有限公司 | A kind of method and apparatus for realizing flow load balance |
| CN114143247A (en) * | 2021-11-03 | 2022-03-04 | 中盈优创资讯科技有限公司 | IP relay circuit flow emigration and emigration method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5661929B2 (en) | System and method for multi-chassis link aggregation | |
| US11411770B2 (en) | Virtual port channel bounce in overlay network | |
| CN101385284B (en) | Node, network system, frame transfer method, and frame transfer program | |
| CN105009523B (en) | Method and apparatus for IP/MPLS fast rerouting | |
| JP5873597B2 (en) | System and method for virtual fabric link failure recovery | |
| CN100450039C (en) | Method and device for quickly converging end-to-end services | |
| CN111935013B (en) | Flow forwarding control method and device, flow forwarding method and chip, and switch | |
| CA2555545A1 (en) | Interface bundles in virtual network devices | |
| CN110061915B (en) | Method and system for virtual link aggregation across multiple fabric switches | |
| WO2009033428A1 (en) | Method, system and device for removing media access control address | |
| CN101312432A (en) | Transitioning a virtual interface from one tunnel to another tunnel | |
| JPWO2002087175A1 (en) | Restoration protection method and apparatus | |
| CN102077521A (en) | Method and system for link aggregation | |
| US9832121B1 (en) | Next hop instruction associations for forwarding unit programming within a network device | |
| CN101877677B (en) | Tunnel switching method and system for multi-protocol label switching services | |
| CN103220215B (en) | The retransmission method of FCoE message and device in TRILL network | |
| WO2012149862A1 (en) | Ring network failover method and apparatus | |
| CN102546855B (en) | MAC Address recovery method and PE equipment in VPLS network | |
| WO2010135987A1 (en) | Link aggregation method and apparatus | |
| WO2022012145A1 (en) | Load balancing method, apparatus and system | |
| CN112054969B (en) | Method and device for realizing message mirror image | |
| CN101321130A (en) | Method, system and device for forwarding traffic | |
| CN101729361B (en) | Method and device for message processing | |
| CN107770061B (en) | Method and forwarding device for forwarding message | |
| CN108540386A (en) | One kind preventing Business Stream interrupt method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C04 | Withdrawal of patent application after publication (patent law 2001) | ||
| WW01 | Invention patent application withdrawn after publication |
