WO2018001020A1 - Aggregated link based message forwarding method and device - Google Patents

Aggregated link based message forwarding method and device Download PDF

Info

Publication number
WO2018001020A1
WO2018001020A1 PCT/CN2017/086192 CN2017086192W WO2018001020A1 WO 2018001020 A1 WO2018001020 A1 WO 2018001020A1 CN 2017086192 W CN2017086192 W CN 2017086192W WO 2018001020 A1 WO2018001020 A1 WO 2018001020A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
packet
feature information
information
forwarding port
Prior art date
Application number
PCT/CN2017/086192
Other languages
French (fr)
Chinese (zh)
Inventor
朱杰
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018001020A1 publication Critical patent/WO2018001020A1/en

Links

Images

Definitions

  • This document relates to, but is not limited to, the field of communications, and in particular, to a packet forwarding method and apparatus based on an aggregated link.
  • FIG. 1 is a schematic diagram of an aggregation link. As shown in Figure 1, a link aggregation mechanism can be used to bind several ports together to form a logical port, which can increase the bandwidth and load balancing traffic.
  • the hash forwarding algorithm is used to determine the packet forwarding port to implement traffic load sharing.
  • Class A packets there are two types of packets, Class A packets, and Class B packets in Device 1, and the traffic of Class A packets is large, and the priority of packets is also high, but Class A is for this.
  • the system is not very important, allowing partial packet loss, while Class B packets, although not of high priority, are important to the system and do not allow packet loss.
  • Class A packet and the type B packet enter the device 2 through the aggregation port of the device 1, the processing capability of the device 2 is limited, and all the class A packets and the class B packets cannot be processed at the same time. There will be no difference packet loss for Class A and Class B, which will lead to a series of other problems.
  • the embodiment of the invention provides a packet forwarding method and device based on an aggregated link, which can avoid important packet loss.
  • the packet further carries the forwarding port information corresponding to the feature information, forwarding the packet according to the forwarding port corresponding to the feature information;
  • the packet does not carry the forwarding port information corresponding to the feature information, query the forwarding port information corresponding to the feature information from a preset rule table; and query the forwarding port corresponding to the feature information.
  • the information is forwarded according to the forwarding port corresponding to the feature information.
  • forwarding the packet according to the forwarding port corresponding to the feature information includes: when the forwarding port is unique, according to The forwarding port corresponding to the feature information forwards the packet; when the forwarding port is not unique, the packet is forwarded by selecting a forwarding port from the forwarding port according to a hash algorithm.
  • the packet forwarding method further includes: recording, in the case that the packet further carries the forwarding port information corresponding to the feature information, the forwarding port information corresponding to the feature information and the feature information to In the rules table.
  • the packet forwarding method further includes: forwarding the packet according to a hashing algorithm, if the forwarding port information corresponding to the feature information is not queried.
  • forwarding the packet according to the forwarding port corresponding to the feature information includes: when the forwarding table carries the forwarding speed information of the forwarding port, according to the forwarding port corresponding to the feature information, The forwarding speed forwards the message.
  • the feature information in the packet forwarding method is a source MAC address, a destination Mac address, a virtual local area network VLAN id, and a quality of service QoS information of the packet.
  • the embodiment of the invention further discloses a message forwarding device applied to the field of link aggregation, which comprises:
  • the receiving module is configured to receive a packet, where the packet carries the feature information of the packet;
  • the querying module is configured to query the forwarding port information corresponding to the feature information from a preset rule table if the packet does not carry the forwarding port information corresponding to the feature information;
  • the first forwarding module is configured to: when the packet further carries the forwarding port information corresponding to the feature information, forward the packet according to the forwarding port corresponding to the feature information; or, in the packet When the forwarding port information corresponding to the feature information is not carried, the packet is forwarded according to the forwarding port corresponding to the feature information that is queried from the preset rule table.
  • the first forwarding module is configured to: according to the forwarding port information corresponding to the feature information, if the packet further carries the forwarding port information corresponding to the feature information, The message is: when the forwarding port corresponding to the feature information is unique, the packet is forwarded according to the forwarding port corresponding to the feature information; and when the forwarding port corresponding to the feature information is not unique, according to a hash algorithm The selected one of the forwarding ports forwards the packet.
  • the first forwarding module is further configured to: when the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information is forwarded by the forwarding port. Forward the message.
  • the packet forwarding device further includes a maintenance module, configured to forward the feature information and the feature information when the packet further carries the forwarding port information corresponding to the feature information.
  • a maintenance module configured to forward the feature information and the feature information when the packet further carries the forwarding port information corresponding to the feature information.
  • Port information is recorded in the rules table.
  • the packet forwarding device further includes a second forwarding module, configured to forward the packet according to the hash algorithm if the forwarding port information corresponding to the feature information is not queried.
  • the feature information is extracted and the special packet is sent to the special port to avoid the problem that the important packet is lost when the packet is forwarded by the load balancing mode, and the specific packet is transmitted through the aggregation link.
  • the specific port is forwarded, and other packets are still forwarded according to normal load sharing, which ensures that important packets can be forwarded reliably and efficiently.
  • 1 is a schematic diagram of an aggregated link
  • FIG. 2 is a flow chart of packet forwarding of an aggregated link according to an embodiment of the present invention
  • FIG. 3 is a block diagram of a packet forwarding device of an aggregated link according to an embodiment of the present invention.
  • FIG. 4 is a block diagram 2 of a packet forwarding device of an aggregated link according to an embodiment of the present invention
  • FIG. 5 is a third block diagram of a packet forwarding device of an aggregated link according to an embodiment of the present disclosure
  • FIG. 6 is a flowchart of a method for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present disclosure
  • FIG. 7 is a block diagram of a device for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention
  • FIG. 8 is a second block diagram of a device for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention.
  • the embodiment of the present invention provides a packet forwarding method applied in the field of link aggregation, which can forward a specific packet from a specific port in an aggregation link, and other packets are performed according to a default hash algorithm of the device.
  • Message forwarding FIG. 2 is a flow chart of packet forwarding of an aggregated link according to an embodiment of the present invention. As shown in FIG. 2, the packet forwarding method includes the following processing steps:
  • Step S202 receiving a packet, where the packet carries the feature information of the packet
  • Step S204 If the packet further carries the forwarding port information corresponding to the feature information, the packet is forwarded according to the forwarding port corresponding to the feature information; or
  • Step S206 if the packet does not carry the forwarding port information corresponding to the feature information, query the forwarding port information corresponding to the feature information from the preset rule table; and query the forwarding port information corresponding to the feature information.
  • the packet is forwarded according to the port corresponding to the feature information.
  • the packet forwarding method further includes: in the case that the packet further carries the forwarding port information corresponding to the feature information, the forwarding port information corresponding to the feature information and the feature information is recorded in the rule table.
  • the device maintains a rule table according to the feature information of the packet and the forwarding port corresponding to the feature information.
  • the rule table describes the feature information of the packet to be matched and the corresponding forwarding port relationship.
  • the system will determine the legality of the command issued by the user, for example, whether the field is legal, whether the port belongs to the aggregation port, etc. If it is not legal, the user will be reminded that the input is invalid.
  • the message field includes the source media access control mac. Address (source mac, smac), destination mac (destination mac, dmac), virtual LAN ID vlan id information.
  • the packet when the packet further carries the forwarding port information corresponding to the feature information, when the forwarding port is unique, the packet is forwarded according to the forwarding port corresponding to the feature information; When the port is not unique, the packet is forwarded by selecting a forwarding port from the forwarding port according to a hash algorithm.
  • the packet forwarding method further includes: if the forwarding port information corresponding to the feature information is not found in the preset rule table, forwarding the packet according to the hash algorithm.
  • the rule table defaults to an empty table.
  • the system uses the default load balancing mode to forward packets.
  • the device When packets are forwarded through the aggregation port, the device extracts the required packet fields and then searches for the matching table according to these fields. If they match, they are forwarded from the corresponding port. If they do not match, load balancing is performed according to the hash algorithm result. It should be noted that the network communication device has multiple load sharing modes, and each load sharing mode has a corresponding hash algorithm.
  • the forwarding port corresponding to the feature information forwards the packet at the forwarding speed of the forwarding port, so that important packets can be Faster speed forwarding.
  • FIG. 3 is a block diagram of a packet forwarding device of an aggregated link according to an embodiment of the present invention, as shown in FIG. :
  • the receiving module 32 is configured to receive a packet, where the packet carries the feature information of the packet;
  • the querying module 34 is configured to query the forwarding port information corresponding to the feature information from a preset rule table if the packet does not carry the forwarding port information corresponding to the feature information;
  • the first forwarding module 36 is configured to forward the packet according to the forwarding port corresponding to the feature information when the packet further carries the forwarding port information corresponding to the feature information; or, the packet does not carry the feature information.
  • forwarding port information the packet is forwarded according to the forwarding port corresponding to the feature information queried from the preset rule table.
  • the first forwarding module 36 is configured to forward the packet according to the forwarding port corresponding to the feature information when the forwarding port is unique; and forward the packet according to a hash algorithm when the forwarding port is not unique A forwarding port selected in the port forwards the packet.
  • the first forwarding module 36 is further configured to: when the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information forwards the packet at the forwarding speed of the forwarding port.
  • FIG. 4 is a block diagram 2 of a packet forwarding device of an aggregated link according to an alternative embodiment of the present invention.
  • the packet forwarding device further includes a maintenance module 42 configured to carry a feature in the packet.
  • the forwarding port information corresponding to the information the forwarding port information corresponding to the feature information and the feature information is recorded in the rule table.
  • FIG. 5 is a block diagram 3 of a packet forwarding device of an aggregated link according to an alternative embodiment of the present invention.
  • the packet forwarding device further includes a second forwarding module 52, which is set to not query and In the case of forwarding port information corresponding to the feature information, the packet is forwarded according to a hash algorithm.
  • a specific packet can be forwarded through a specific port of the aggregation link, and other packets are forwarded according to normal load sharing, so that important packets can be forwarded reliably and efficiently.
  • FIG. 6 is a flowchart of a method for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention. As shown in FIG. 6, the method includes:
  • Step S602 obtaining a user configuration instruction, for example, the user inputs the following configuration instructions:
  • the first command is to forward the packet from port 2 when the source smac of the packet passing through the aggregation port is 00:12:34:56:11:22 and the vlan id is equal to 3.
  • the second command is to forward the packet from port 3 when the destination dmac of the packet passing through the aggregation port is 00:34:33:44:55:66 and the vlan id is equal to 2.
  • the third command is that when the vlanid of the packets passing through the aggregation port is 10, the packet can be forwarded by selecting one of the port and the port.
  • Step S604 the device determines that the instruction is legal when acquiring the instruction, and then writes the feature information of the three instructions and the forwarding port information corresponding to the feature information into the rule table, as shown in Table 1.
  • step S606 when the packets in the system pass the aggregation port, the entries in the search rule table are first polled, and when an entry is matched, the port corresponding to the entry is forwarded; if no entry is matched, Load sharing is performed according to the hash algorithm.
  • the packet command carries the feature information of the packet, but does not carry the forwarding port corresponding to the feature information. If the information recorded in the rule table is found, it is found that the forwarding port corresponding to the packet feature is port 3, and then the packet is forwarded according to the information recorded in the rule table.
  • the command carries the feature information of the packet, but does not carry the forwarding port corresponding to the feature information.
  • the information recorded in the rule table is found, and the forwarding port matching the packet feature is found to be Two, so according to the hash algorithm, the final forwarding port of the packet is further determined, and the packet is forwarded;
  • the packet is forwarded according to the hash algorithm.
  • FIG. 7 is a block diagram 1 of a device for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention, including:
  • the obtaining module 72 is configured to obtain a user configuration instruction, and determine the legality of the instruction issued by the user, and if not, prompt the user to re-enter.
  • the maintenance module 74 is configured to maintain and update the rules table in accordance with instructions entered by the user.
  • the processing module 76 is configured to perform forwarding processing on the packet passing the aggregation port.
  • FIG. 8 is a block diagram 2 of the device for specifying a packet forwarding port in the link aggregation port according to the embodiment of the present invention.
  • the processing module 76 includes the following sub-menets. Module:
  • the parsing sub-module 82 is configured to parse the message and extract the required fields from the message.
  • the query sub-module 84 is configured to query the rule table according to the field parsed by the parsing sub-module 82.
  • the first forwarding sub-module 86 is configured to forward the packet according to the corresponding port in the rule table when the query sub-module 84 matches the entry that matches the packet from the rule table.
  • the second forwarding sub-module 88 is configured to perform packet forwarding according to the hash algorithm when the query sub-module 84 does not match any entry that matches the packet from the rule table.
  • the function of the obtaining module 72 corresponds to the function of the receiving module 32.
  • the function of the maintenance module 74 corresponds to the function of the maintenance module 42.
  • the function of the processing module 76 corresponds to the querying module 34, the first forwarding module 36, and the second forwarding module 52. The function.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the method described in the foregoing embodiments.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules, or other data. , removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media.
  • the above-mentioned technical solution allows a specific packet to be forwarded through a specific port of the aggregation link, and the other packets are forwarded according to the normal load sharing, so that important packets can be forwarded reliably and efficiently.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A message forwarding method and a device for use in a field of link aggregation, wherein the method comprises: receiving a message, wherein the message carries feature information of the message (S202); on a condition that the message further carries information of a forwarding port corresponding to the feature information, forwarding the message from the forwarding port corresponding to the feature information (204); or inquiring the forwarding port corresponding to the feature information from a pre-set rule table when the message does not carry the forwarding port information corresponding to the feature information; and forwarding the message from the port corresponding to the feature information when the forwarding port information corresponding to the feature information is obtained(S206).

Description

一种基于聚合链路的报文转发方法和装置Message forwarding method and device based on aggregated link 技术领域Technical field
本文涉及但不限于通信领域,特别涉及一种基于聚合链路的报文转发方法和装置。This document relates to, but is not limited to, the field of communications, and in particular, to a packet forwarding method and apparatus based on an aggregated link.
背景技术Background technique
链路聚合(link aggregation),遵循IEEE 802.3AD链路聚合协议。图1是聚合链路示意图,如图1所示,通过链路聚合机制可以把几个端口绑定在一起,形成逻辑上的一个端口,实现增加带宽的目的,并且可以实现流量的负载分担。Link aggregation, which follows the IEEE 802.3AD link aggregation protocol. Figure 1 is a schematic diagram of an aggregation link. As shown in Figure 1, a link aggregation mechanism can be used to bind several ports together to form a logical port, which can increase the bandwidth and load balancing traffic.
上述在确定报文转发端口的时候,主要采用以下方法:When determining the packet forwarding port, the following methods are mainly used:
1,通过哈希算法进行报文转发端口的确定,以实现流量的负载分担;1. The hash forwarding algorithm is used to determine the packet forwarding port to implement traffic load sharing.
2,在哈希算法的基础上依据数据流转发的统计信息,为报文转发信息设置加权值,以决定各报文的转发端口,从而实现更加精确的负载分担。2. Based on the hash algorithm, based on the statistics of the data stream forwarding, set a weighting value for the packet forwarding information to determine the forwarding port of each packet, thereby achieving more accurate load sharing.
但是在以下场景中,例如,设备1中存在两类报文,A类报文和B类报文,A类报文的流量很大,报文的优先级也很高,但是A类对于该系统来说并不是很重要,允许部分丢包,而B类报文虽然优先级不高,但是对该系统来说很重要,不允许丢包。此种情况下,如果A类报文和B类报文同时经过设备1的聚合端口进入设备2时,由于设备2的处理能力有限,无法同时处理所有的A类报文和B类报文,则会对A类报文和B类进行无差别丢包,进而导致其它一系列问题的产生。However, in the following scenarios, for example, there are two types of packets, Class A packets, and Class B packets in Device 1, and the traffic of Class A packets is large, and the priority of packets is also high, but Class A is for this. The system is not very important, allowing partial packet loss, while Class B packets, although not of high priority, are important to the system and do not allow packet loss. In this case, if the type A packet and the type B packet enter the device 2 through the aggregation port of the device 1, the processing capability of the device 2 is limited, and all the class A packets and the class B packets cannot be processed at the same time. There will be no difference packet loss for Class A and Class B, which will lead to a series of other problems.
针对上述通过负载分担的方式转发报文导致重要报文丢失的问题,现有技术尚未提出解决方案。The problem that the packet is forwarded in the load balancing mode causes the important packet to be lost. The prior art has not proposed a solution.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。 The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种基于聚合链路的报文转发方法和装置,能够避免重要报文丢失。The embodiment of the invention provides a packet forwarding method and device based on an aggregated link, which can avoid important packet loss.
本发明实施例采用以下技术方案:The embodiment of the invention adopts the following technical solutions:
一种应用于链路聚合领域的报文转发方法,包括以下处理步骤:A packet forwarding method applied in the field of link aggregation includes the following processing steps:
接收报文,其中,所述报文携带有报文的特征信息;Receiving a message, wherein the message carries characteristic information of the message;
在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文;或者,And if the packet further carries the forwarding port information corresponding to the feature information, forwarding the packet according to the forwarding port corresponding to the feature information; or
在所述报文未携带有所述特征信息对应的转发端口信息的情况下,从预先设置的规则表中查询所述特征信息对应的转发端口信息;当查询到所述特征信息对应的转发端口信息时,依据所述特征信息对应的转发端口转发所述报文。If the packet does not carry the forwarding port information corresponding to the feature information, query the forwarding port information corresponding to the feature information from a preset rule table; and query the forwarding port corresponding to the feature information. The information is forwarded according to the forwarding port corresponding to the feature information.
可选的,在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文包括:在所述转发端口唯一时,根据所述特征信息对应的转发端口转发所述报文;在所述转发端口不唯一时,根据哈希算法从所述转发端口中选定一个转发端口转发所述报文。Optionally, if the packet further carries the forwarding port information corresponding to the feature information, forwarding the packet according to the forwarding port corresponding to the feature information includes: when the forwarding port is unique, according to The forwarding port corresponding to the feature information forwards the packet; when the forwarding port is not unique, the packet is forwarded by selecting a forwarding port from the forwarding port according to a hash algorithm.
可选的,所述报文转发方法还包括在所述报文还携带有所述特征信息对应的转发端口信息的情况下,将所述特征信息与所述特征信息对应的转发端口信息记录到所述规则表中。Optionally, the packet forwarding method further includes: recording, in the case that the packet further carries the forwarding port information corresponding to the feature information, the forwarding port information corresponding to the feature information and the feature information to In the rules table.
可选的,所述报文转发方法还包括在没有查询到所述特征信息对应的转发端口信息的情况下,根据哈希算法转发所述报文。Optionally, the packet forwarding method further includes: forwarding the packet according to a hashing algorithm, if the forwarding port information corresponding to the feature information is not queried.
可选的,依据所述特征信息对应的转发端口转发所述报文包括:在所述规则表中携带有所述转发端口的转发速度信息的情况下,依据所述特征信息对应的转发端口以所述转发速度转发所述报文。Optionally, forwarding the packet according to the forwarding port corresponding to the feature information includes: when the forwarding table carries the forwarding speed information of the forwarding port, according to the forwarding port corresponding to the feature information, The forwarding speed forwards the message.
可选的,所述报文转发方法中的特征信息为报文的源Mac地址、目的Mac地址、虚拟局域网VLAN id、服务质量QoS信息。Optionally, the feature information in the packet forwarding method is a source MAC address, a destination Mac address, a virtual local area network VLAN id, and a quality of service QoS information of the packet.
本发明实施例还公开了一种应用于链路聚合领域的报文转发装置,包括: The embodiment of the invention further discloses a message forwarding device applied to the field of link aggregation, which comprises:
接收模块,设置为接收报文,所述报文携带有报文的特征信息;The receiving module is configured to receive a packet, where the packet carries the feature information of the packet;
查询模块,设置为在所述报文未携带有所述特征信息对应的转发端口信息的情况下,从预先设置的规则表中查询所述特征信息对应的转发端口信息;The querying module is configured to query the forwarding port information corresponding to the feature information from a preset rule table if the packet does not carry the forwarding port information corresponding to the feature information;
第一转发模块,设置为在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文;或者,在所述报文未携带有所述特征信息对应的转发端口信息的情况下,依据从预先设置的所述规则表中查询得到的所述特征信息对应的转发端口转发所述报文。The first forwarding module is configured to: when the packet further carries the forwarding port information corresponding to the feature information, forward the packet according to the forwarding port corresponding to the feature information; or, in the packet When the forwarding port information corresponding to the feature information is not carried, the packet is forwarded according to the forwarding port corresponding to the feature information that is queried from the preset rule table.
可选的,所述第一转发模块,是设置为通过如下方式实现在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文:在所述特征信息对应的转发端口唯一时,根据所述特征信息对应的转发端口转发所述报文;在所述特征信息对应的转发端口不唯一时,根据哈希算法从所述转发端口中选定一个转发端口转发所述报文。Optionally, the first forwarding module is configured to: according to the forwarding port information corresponding to the feature information, if the packet further carries the forwarding port information corresponding to the feature information, The message is: when the forwarding port corresponding to the feature information is unique, the packet is forwarded according to the forwarding port corresponding to the feature information; and when the forwarding port corresponding to the feature information is not unique, according to a hash algorithm The selected one of the forwarding ports forwards the packet.
可选的,所述第一转发模块还设置为在所述规则表中携带有所述转发端口的转发速度信息的情况下,依据所述特征信息对应的转发端口以所述转发端口的转发速度转发所述报文。Optionally, the first forwarding module is further configured to: when the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information is forwarded by the forwarding port. Forward the message.
可选的,所述报文转发装置还包括维护模块,设置为在所述报文还携带有所述特征信息对应转发端口信息的情况下,将所述特征信息与所述特征信息对应的转发端口信息记录到所述规则表中。Optionally, the packet forwarding device further includes a maintenance module, configured to forward the feature information and the feature information when the packet further carries the forwarding port information corresponding to the feature information. Port information is recorded in the rules table.
可选的,所述报文转发装置还包括第二转发模块,设置为在没有查询到所述特征信息对应的转发端口信息的情况下,根据哈希算法转发所述报文。Optionally, the packet forwarding device further includes a second forwarding module, configured to forward the packet according to the hash algorithm if the forwarding port information corresponding to the feature information is not queried.
本发明实施例,通过对报文进行特征信息提取并指定特殊报文走特殊端口,避免出现通过负载分担的方式转发报文导致重要报文丢失的问题,实现了特定的报文通过聚合链路的特定端口进行转发,其它的报文仍然按照正常的负载分担进行转发,从而很好地保证了重要报文得以可靠高效地转发。In the embodiment of the present invention, the feature information is extracted and the special packet is sent to the special port to avoid the problem that the important packet is lost when the packet is forwarded by the load balancing mode, and the specific packet is transmitted through the aggregation link. The specific port is forwarded, and other packets are still forwarded according to normal load sharing, which ensures that important packets can be forwarded reliably and efficiently.
在阅读并理解了附图和详细描述后,可以明白其他方面。 Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是聚合链路示意图;1 is a schematic diagram of an aggregated link;
图2是本发明实施例提供的一种聚合链路的报文转发流程图;2 is a flow chart of packet forwarding of an aggregated link according to an embodiment of the present invention;
图3是本发明实施例提供的一种聚合链路的报文转发装置框图一;3 is a block diagram of a packet forwarding device of an aggregated link according to an embodiment of the present invention;
图4是本发明实施例提供的一种聚合链路的报文转发装置框图二;4 is a block diagram 2 of a packet forwarding device of an aggregated link according to an embodiment of the present invention;
图5是本发明实施例提供的一种聚合链路的报文转发装置框图三;FIG. 5 is a third block diagram of a packet forwarding device of an aggregated link according to an embodiment of the present disclosure;
图6是本发明实施例提供的一种在链路聚合端口中指定报文转发端口的方法流程图;FIG. 6 is a flowchart of a method for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present disclosure;
图7是本发明实施例提供的一种在链路聚合端口中指定报文转发端口的装置框图一;7 is a block diagram of a device for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention;
图8是本发明实施例提供的一种在链路聚合端口中指定报文转发端口的装置框图二。FIG. 8 is a second block diagram of a device for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solution of the present invention will be further described in detail below through the accompanying drawings and embodiments.
本发明实施例提供了一种应用于链路聚合领域的报文转发方法,可以将特定的报文从聚合链路中的特定端口转发,而其它的报文则按照设备默认的哈希算法进行报文转发。图2是根据本发明实施例的一种聚合链路的报文转发流程图,如图2所示,该报文转发方法包括以下处理步骤:The embodiment of the present invention provides a packet forwarding method applied in the field of link aggregation, which can forward a specific packet from a specific port in an aggregation link, and other packets are performed according to a default hash algorithm of the device. Message forwarding. FIG. 2 is a flow chart of packet forwarding of an aggregated link according to an embodiment of the present invention. As shown in FIG. 2, the packet forwarding method includes the following processing steps:
步骤S202,接收报文,其中,该报文携带有报文的特征信息;Step S202, receiving a packet, where the packet carries the feature information of the packet;
步骤S204,在该报文还携带有该特征信息对应的转发端口信息的情况下,根据该特征信息对应的转发端口转发该报文;或者,Step S204: If the packet further carries the forwarding port information corresponding to the feature information, the packet is forwarded according to the forwarding port corresponding to the feature information; or
步骤S206,在该报文未携带有该特征信息对应转发端口信息的情况下,从预先设置的规则表中查询与该特征信息对应的转发端口信息;当查询到该特征信息对应的转发端口信息时,依据该特征信息对应的端口转发该报文。 Step S206, if the packet does not carry the forwarding port information corresponding to the feature information, query the forwarding port information corresponding to the feature information from the preset rule table; and query the forwarding port information corresponding to the feature information. The packet is forwarded according to the port corresponding to the feature information.
可选的,该报文转发方法还包括在该报文还携带有该特征信息对应转发端口信息的情况下,将该特征信息与该特征信息对应的转发端口信息记录到规则表中。Optionally, the packet forwarding method further includes: in the case that the packet further carries the forwarding port information corresponding to the feature information, the forwarding port information corresponding to the feature information and the feature information is recorded in the rule table.
根据报文的特征信息及特征信息对应的转发端口,设备维护一张规则表,该规则表描述所要匹配的报文的特征信息及其对应的转发端口关系;此处有两点需要说明:第一,系统会判断用户下发指令的合法性,例如字段是否合法、端口是否属于聚合端口等,如果不合法,则会提醒用户输入不合法;第二,该报文字段包括源媒体访问控制mac地址(source mac,简称smac)、目的mac地址(destination mac,简称dmac)、虚拟局域网身份标识vlan id信息。The device maintains a rule table according to the feature information of the packet and the forwarding port corresponding to the feature information. The rule table describes the feature information of the packet to be matched and the corresponding forwarding port relationship. There are two points to be explained: First, the system will determine the legality of the command issued by the user, for example, whether the field is legal, whether the port belongs to the aggregation port, etc. If it is not legal, the user will be reminded that the input is invalid. Second, the message field includes the source media access control mac. Address (source mac, smac), destination mac (destination mac, dmac), virtual LAN ID vlan id information.
在一个可选的实施例中,在该报文还携带有特征信息对应的转发端口信息的情况下,在该转发端口唯一时,根据该特征信息对应的转发端口转发该报文;在该转发端口不唯一时,根据哈希算法从所述转发端口中选定一个转发端口转发所述报文。In an optional embodiment, when the packet further carries the forwarding port information corresponding to the feature information, when the forwarding port is unique, the packet is forwarded according to the forwarding port corresponding to the feature information; When the port is not unique, the packet is forwarded by selecting a forwarding port from the forwarding port according to a hash algorithm.
可选的,该报文转发方法还包括在预先设置的规则表中没有查询到与该特征信息对应的转发端口信息的情况下,根据哈希算法转发该报文。Optionally, the packet forwarding method further includes: if the forwarding port information corresponding to the feature information is not found in the preset rule table, forwarding the packet according to the hash algorithm.
如果用户没有输入任何指令,则该规则表默认是一张空表,此时报文通过聚合端口进行转发的时候会直接使用系统默认的负载分担方式进行转发报文。If the user does not enter any command, the rule table defaults to an empty table. When the packet is forwarded through the aggregation port, the system uses the default load balancing mode to forward packets.
报文通过聚合端口进行转发时,设备会提取所需要的报文字段,然后根据这些字段到该规则表中查找是否匹配。如果匹配,则从相应端口中转发出去,如果不匹配,按照哈希算法结果进行负载分担。需要说明的是,网络通信设备具有多种负载分担方式,每种负载分担方式都有对应的哈希算法。When packets are forwarded through the aggregation port, the device extracts the required packet fields and then searches for the matching table according to these fields. If they match, they are forwarded from the corresponding port. If they do not match, load balancing is performed according to the hash algorithm result. It should be noted that the network communication device has multiple load sharing modes, and each load sharing mode has a corresponding hash algorithm.
可选的,在该规则表中携带有该转发端口的转发速度信息的情况下,依据该特征信息对应的转发端口以该转发端口的转发速度转发该报文,从而可以使重要的报文以较快的速度转发。Optionally, in the case that the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information forwards the packet at the forwarding speed of the forwarding port, so that important packets can be Faster speed forwarding.
本发明实施例还提供了一种应用于链路聚合领域的报文转发装置,图3为根据本发明实施例的一种聚合链路的报文转发装置框图一,如图3所示,包括: The embodiment of the present invention further provides a packet forwarding device applied to the field of link aggregation, and FIG. 3 is a block diagram of a packet forwarding device of an aggregated link according to an embodiment of the present invention, as shown in FIG. :
接收模块32,设置为接收报文,该报文携带有报文的特征信息;The receiving module 32 is configured to receive a packet, where the packet carries the feature information of the packet;
查询模块34,设置为在报文未携带有特征信息对应的转发端口信息的情况下,从预先设置的规则表中查询该特征信息对应的转发端口信息;The querying module 34 is configured to query the forwarding port information corresponding to the feature information from a preset rule table if the packet does not carry the forwarding port information corresponding to the feature information;
第一转发模块36,设置为在报文还携带有该特征信息对应转发端口信息的情况下,根据该特征信息对应的转发端口转发该报文;或者,在报文未携带有该特征信息对应的转发端口信息的情况下,依据从预先设置的该规则表中查询得到的特征信息对应的转发端口转发报文。The first forwarding module 36 is configured to forward the packet according to the forwarding port corresponding to the feature information when the packet further carries the forwarding port information corresponding to the feature information; or, the packet does not carry the feature information. In the case of forwarding port information, the packet is forwarded according to the forwarding port corresponding to the feature information queried from the preset rule table.
可选的,该第一转发模块36,是设置为在该转发端口唯一时,根据该特征信息对应的转发端口转发该报文;在该转发端口不唯一时,根据哈希算法从多个转发端口中选定一个转发端口转发该报文。Optionally, the first forwarding module 36 is configured to forward the packet according to the forwarding port corresponding to the feature information when the forwarding port is unique; and forward the packet according to a hash algorithm when the forwarding port is not unique A forwarding port selected in the port forwards the packet.
可选的,该第一转发模块36还设置为在该规则表中携带有转发端口的转发速度信息的情况下,依据该特征信息对应的转发端口以该转发端口的转发速度转发该报文。Optionally, the first forwarding module 36 is further configured to: when the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information forwards the packet at the forwarding speed of the forwarding port.
图4为根据本发明可选实施例的一种聚合链路的报文转发装置框图二,如图4所示,该报文转发装置还包括维护模块42,设置为在报文还携带有特征信息对应的转发端口信息的情况下,将该特征信息与特征信息对应的转发端口信息记录到规则表中。FIG. 4 is a block diagram 2 of a packet forwarding device of an aggregated link according to an alternative embodiment of the present invention. As shown in FIG. 4, the packet forwarding device further includes a maintenance module 42 configured to carry a feature in the packet. In the case of the forwarding port information corresponding to the information, the forwarding port information corresponding to the feature information and the feature information is recorded in the rule table.
图5为根据本发明可选实施例的一种聚合链路的报文转发装置框图三,如图5所示,该报文转发装置还包括第二转发模块52,设置为在没有查询到与该特征信息对应的转发端口信息的情况下,根据哈希算法转发该报文。FIG. 5 is a block diagram 3 of a packet forwarding device of an aggregated link according to an alternative embodiment of the present invention. As shown in FIG. 5, the packet forwarding device further includes a second forwarding module 52, which is set to not query and In the case of forwarding port information corresponding to the feature information, the packet is forwarded according to a hash algorithm.
本发明实施例可以让特定的报文通过聚合链路的特定端口进行转发,其它的报文仍然按照正常的负载分担进行转发,从而保证重要的报文得以可靠高效地转发。In the embodiment of the present invention, a specific packet can be forwarded through a specific port of the aggregation link, and other packets are forwarded according to normal load sharing, so that important packets can be forwarded reliably and efficiently.
图6为根据本发明实施例的一种在链路聚合端口中指定报文转发端口的方法流程图,如图6所示,该方法包括:FIG. 6 is a flowchart of a method for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention. As shown in FIG. 6, the method includes:
步骤S602,获取用户配置指令,例如用户输入下面几条配置指令:Step S602, obtaining a user configuration instruction, for example, the user inputs the following configuration instructions:
link-aggregation smac=00:12:34:56:11:22 vlanid=3 port=2;Link-aggregation smac=00:12:34:56:11:22 vlanid=3 port=2;
link-aggregation dmac=00:34:33:44:55:66 vlanid=2 port=3; Link-aggregation dmac=00:34:33:44:55:66 vlanid=2 port=3;
link-aggregation vlanid=10 port=1,2;Link-aggregation vlanid=10 port=1,2;
上述三条命令的含义说明如下:The meanings of the above three orders are as follows:
第一条命令为,当经过聚合端口的报文的源smac为00:12:34:56:11:22并且vlan id等于3时,将该报文从2号端口转发;The first command is to forward the packet from port 2 when the source smac of the packet passing through the aggregation port is 00:12:34:56:11:22 and the vlan id is equal to 3.
第二条命令为,当经过聚合端口的报文的目的dmac为00:34:33:44:55:66并且vlan id等于2时,将该报文从从3号端口转发;The second command is to forward the packet from port 3 when the destination dmac of the packet passing through the aggregation port is 00:34:33:44:55:66 and the vlan id is equal to 2.
第三条命令为,当经过聚合端口的报文的vlanid=10时,该报文可以从1口端口和2口端口中选择一个端口转发。The third command is that when the vlanid of the packets passing through the aggregation port is 10, the packet can be forwarded by selecting one of the port and the port.
步骤S604,设备在获取指令的时候判断该指令是合法的,于是将该三条指令的特征信息及特征信息对应的转发端口信息写入规则表中,如表一所示。Step S604, the device determines that the instruction is legal when acquiring the instruction, and then writes the feature information of the three instructions and the forwarding port information corresponding to the feature information into the rule table, as shown in Table 1.
表一 规则表:Table 1 Rule table:
smacSmac dmacDmac vlan idVlan id portPort
00:12:34:56:11:2200:12:34:56:11:22 00 33 22
00 00:34:33:44:55:6600:34:33:44:55:66 22 33
00 00 1010 1,21,2
步骤S606,系统中的报文通过聚合端口时,首先会依次轮询查找规则表中的条目,当匹配到某个条目时,则根据该条目对应的端口进行转发;如果没有匹配到任何条目,则根据哈希算法进行负载分担。In step S606, when the packets in the system pass the aggregation port, the entries in the search rule table are first polled, and when an entry is matched, the port corresponding to the entry is forwarded; if no entry is matched, Load sharing is performed according to the hash algorithm.
例如,如果一个报文的dmac为00:34:33:44:55:66,vlan id为2,该报文指令携带有报文的特征信息,但是未携带该特征信息对应的转发端口,此时查找规则表记载的信息,发现该报文特征对应的转发端口为端口3,于是按照规则表记录的信息进行报文转发;For example, if the dmac of a packet is 00:34:33:44:55:66 and the vlan id is 2, the packet command carries the feature information of the packet, but does not carry the forwarding port corresponding to the feature information. If the information recorded in the rule table is found, it is found that the forwarding port corresponding to the packet feature is port 3, and then the packet is forwarded according to the information recorded in the rule table.
而如果一个报文的vlan=10,该指令携带有报文的特征信息,但是未携带该特征信息对应的转发端口,此时查找规则表记载的信息,发现该报文特征匹配的转发端口有两个,于是按照哈希算法进一步确定报文的最终转发端口,进行报文的转发; If a message has vlan=10, the command carries the feature information of the packet, but does not carry the forwarding port corresponding to the feature information. At this time, the information recorded in the rule table is found, and the forwarding port matching the packet feature is found to be Two, so according to the hash algorithm, the final forwarding port of the packet is further determined, and the packet is forwarded;
其他情况下,如果一个报文既没有携带报文特征信息的转发端口,规则表也没有匹配的转发端口,则按照哈希算法进行报文转发。In other cases, if a packet does not carry the forwarding port of the packet feature information, and the rule table does not have a matching forwarding port, the packet is forwarded according to the hash algorithm.
图7是根据本发明实施例的链路聚合端口中指定报文转发端口的装置框图一,包括:7 is a block diagram 1 of a device for specifying a packet forwarding port in a link aggregation port according to an embodiment of the present invention, including:
获取模块72,设置为获取用户配置指令,并判断用户下发的指令的合法性,如果不合法则提醒用户重新输入。The obtaining module 72 is configured to obtain a user configuration instruction, and determine the legality of the instruction issued by the user, and if not, prompt the user to re-enter.
维护模块74,设置为根据用户输入的指令维护并更新规则表。The maintenance module 74 is configured to maintain and update the rules table in accordance with instructions entered by the user.
处理模块76,设置为对通过聚合端口的报文进行转发处理,图8为本发明实施例提供的在链路聚合端口中指定报文转发端口的装置框图二,该处理模块76包括以下几个子模块:The processing module 76 is configured to perform forwarding processing on the packet passing the aggregation port. FIG. 8 is a block diagram 2 of the device for specifying a packet forwarding port in the link aggregation port according to the embodiment of the present invention. The processing module 76 includes the following sub-menets. Module:
解析子模块82,设置为解析报文,从报文中提取所需要的字段。The parsing sub-module 82 is configured to parse the message and extract the required fields from the message.
查询子模块84,设置为根据解析子模块82解析出来的字段查询规则表。The query sub-module 84 is configured to query the rule table according to the field parsed by the parsing sub-module 82.
第一转发子模块86,设置为在查询子模块84从规则表中匹配到与报文符合的条目时,根据规则表中对应的端口进行报文转发。The first forwarding sub-module 86 is configured to forward the packet according to the corresponding port in the rule table when the query sub-module 84 matches the entry that matches the packet from the rule table.
第二转发子模块88,设置为在查询子模块84没有从规则表中匹配到任何与报文符合的条目时,根据哈希算法进行报文转发。The second forwarding sub-module 88 is configured to perform packet forwarding according to the hash algorithm when the query sub-module 84 does not match any entry that matches the packet from the rule table.
其中,获取模块72的功能对应于接收模块32的功能,维护模块74的功能对应于维护模块42的功能,处理模块76的功能对应于查询模块34、第一转发模块36和第二转发模块52的功能。The function of the obtaining module 72 corresponds to the function of the receiving module 32. The function of the maintenance module 74 corresponds to the function of the maintenance module 42. The function of the processing module 76 corresponds to the querying module 34, the first forwarding module 36, and the second forwarding module 52. The function.
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述实施例所述的方法。The embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the method described in the foregoing embodiments.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分 不一定对应于物理单元的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description It does not necessarily correspond to the division of physical units; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules, or other data. , removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media.
以上所述仅为本发明的可选实施例,并不用以限制本发明,凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above is only an alternative embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalents, improvements, etc. made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.
工业实用性Industrial applicability
上述技术方案让特定的报文通过聚合链路的特定端口进行转发,其它的报文仍然按照正常的负载分担进行转发,从而保证重要的报文得以可靠高效地转发。 The above-mentioned technical solution allows a specific packet to be forwarded through a specific port of the aggregation link, and the other packets are forwarded according to the normal load sharing, so that important packets can be forwarded reliably and efficiently.

Claims (12)

  1. 一种报文转发方法,应用于链路聚合领域,包括步骤:A packet forwarding method is applied to the field of link aggregation, including the steps:
    接收报文,其中,所述报文携带有报文的特征信息(S202);Receiving a message, wherein the message carries feature information of the message (S202);
    在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文(S204);或者,If the packet further carries the forwarding port information corresponding to the feature information, the packet is forwarded according to the forwarding port corresponding to the feature information (S204); or
    在所述报文未携带有所述特征信息对应的转发端口信息的情况下,从预先设置的规则表中查询所述特征信息对应的转发端口信息;当查询到所述特征信息对应的转发端口信息时,依据所述特征信息对应的转发端口转发所述报文(S206)。If the packet does not carry the forwarding port information corresponding to the feature information, query the forwarding port information corresponding to the feature information from a preset rule table; and query the forwarding port corresponding to the feature information. In the case of information, the message is forwarded according to the forwarding port corresponding to the feature information (S206).
  2. 如权利要求1所述的报文转发方法,其中The message forwarding method according to claim 1, wherein
    在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文(S204)包括:And if the packet further carries the forwarding port information corresponding to the feature information, forwarding the packet according to the forwarding port corresponding to the feature information (S204) includes:
    在所述特征信息对应的转发端口唯一时,根据所述特征信息对应的转发端口转发所述报文;在所述特征信息对应的转发端口不唯一时,根据哈希算法从所述转发端口中选定一个转发端口转发所述报文。When the forwarding port corresponding to the feature information is unique, the packet is forwarded according to the forwarding port corresponding to the feature information; when the forwarding port corresponding to the feature information is not unique, the forwarding port is used according to a hash algorithm. A forwarding port is selected to forward the message.
  3. 如权利要求1或2所述的报文转发方法,在所述报文还携带有所述特征信息对应转发端口信息的情况下,所述方法还包括:The packet forwarding method according to claim 1 or 2, wherein, in the case that the packet further carries the forwarding port information, the method further includes:
    将所述特征信息与所述特征信息对应的转发端口信息记录到所述规则表中。Forwarding port information corresponding to the feature information and the feature information is recorded in the rule table.
  4. 如权利要求1所述的报文转发方法,所述方法还包括:The packet forwarding method of claim 1, the method further comprising:
    在没有查询到所述特征信息对应的转发端口信息的情况下,根据哈希算法转发所述报文。If the forwarding port information corresponding to the feature information is not queried, the packet is forwarded according to a hash algorithm.
  5. 如权利要求3所述的报文转发方法,其中,依据所述特征信息对应的转发端口转发所述报文包括:The packet forwarding method of claim 3, wherein forwarding the message according to the forwarding port corresponding to the feature information comprises:
    在所述规则表中携带有所述转发端口的转发速度信息的情况下,依据所述特征信息对应的转发端口以所述转发速度转发所述报文。When the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information forwards the packet at the forwarding speed.
  6. 如权利要求4或5所述的报文转发方法,其中,所述特征信息为报 文的源媒体访问控制Mac地址、目的Mac地址、虚拟局域网身份标识VLAN id、服务质量QoS信息。The packet forwarding method according to claim 4 or 5, wherein the feature information is a newspaper The source media access control MAC address, destination Mac address, virtual local area network identity VLAN id, quality of service QoS information.
  7. 一种报文转发装置,应用于链路聚合领域,包括:A packet forwarding device is applied to the field of link aggregation, including:
    接收模块(32),设置为接收报文,所述报文携带有报文的特征信息;The receiving module (32) is configured to receive a packet, where the packet carries the feature information of the packet;
    查询模块(34),设置为在所述报文未携带有所述特征信息对应的转发端口信息的情况下,从预先设置的规则表中查询所述特征信息对应的转发端口信息;The query module (34) is configured to query the forwarding port information corresponding to the feature information from a preset rule table if the packet does not carry the forwarding port information corresponding to the feature information;
    第一转发模块(36),设置为在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文;或者,在所述报文未携带有所述特征信息对应的转发端口信息的情况下,依据从预先设置的所述规则表中查询得到的所述特征信息对应的转发端口转发所述报文。The first forwarding module (36) is configured to: when the packet further carries the forwarding port information corresponding to the feature information, forward the packet according to the forwarding port corresponding to the feature information; or If the packet does not carry the forwarding port information corresponding to the feature information, the packet is forwarded according to the forwarding port corresponding to the feature information that is queried from the preset rule table.
  8. 如权利要求7所述的报文转发装置,所述第一转发模块(36),是设置为通过如下方式实现在所述报文还携带有所述特征信息对应的转发端口信息的情况下,根据所述特征信息对应的转发端口转发所述报文:The packet forwarding device according to claim 7, wherein the first forwarding module (36) is configured to implement, in a manner that the packet further carries forwarding port information corresponding to the feature information, Forwarding the packet according to the forwarding port corresponding to the feature information:
    在所述特征信息对应的转发端口唯一时,根据所述特征信息对应的转发端口转发所述报文;在所述特征信息对应的转发端口不唯一时,根据哈希算法从所述转发端口中选定一个转发端口转发所述报文。When the forwarding port corresponding to the feature information is unique, the packet is forwarded according to the forwarding port corresponding to the feature information; when the forwarding port corresponding to the feature information is not unique, the forwarding port is used according to a hash algorithm. A forwarding port is selected to forward the message.
  9. 如权利要求7或8所述的报文转发装置,所述装置还包括:The message forwarding device of claim 7 or 8, the device further comprising:
    维护模块(42),设置为在所述报文还携带有所述特征信息对应的转发端口信息的情况下,将所述特征信息与所述特征信息对应的转发端口信息记录到所述规则表中。The maintenance module (42) is configured to record the forwarding port information corresponding to the feature information and the feature information to the rule table, if the packet further carries the forwarding port information corresponding to the feature information. in.
  10. 如权利要求7所述的报文转发装置,所述装置还包括:The message forwarding device of claim 7, the device further comprising:
    第二转发模块(52),设置为在没有查询到所述特征信息对应的转发端口信息的情况下,根据哈希算法转发所述报文。The second forwarding module (52) is configured to forward the packet according to the hash algorithm if the forwarding port information corresponding to the feature information is not queried.
  11. 如权利要求9所述的报文转发装置,A message forwarding device according to claim 9,
    所述第一转发模块(36),还设置为在所述规则表中携带有所述转发端口的转发速度信息的情况下,依据所述特征信息对应的转发端口以所述转发 速度转发所述报文。The first forwarding module (36) is further configured to: when the forwarding table carries the forwarding speed information of the forwarding port, the forwarding port corresponding to the feature information is forwarded by the forwarding port Speed forwards the message.
  12. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求1~6中任一项所述的方法。 A computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of any one of claims 1 to 6.
PCT/CN2017/086192 2016-06-30 2017-05-26 Aggregated link based message forwarding method and device WO2018001020A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610514884.1A CN107566267A (en) 2016-06-30 2016-06-30 A kind of message forwarding method and device based on aggregated links
CN201610514884.1 2016-06-30

Publications (1)

Publication Number Publication Date
WO2018001020A1 true WO2018001020A1 (en) 2018-01-04

Family

ID=60786197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086192 WO2018001020A1 (en) 2016-06-30 2017-05-26 Aggregated link based message forwarding method and device

Country Status (2)

Country Link
CN (1) CN107566267A (en)
WO (1) WO2018001020A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006866A (en) * 2021-10-09 2022-02-01 苏州浪潮智能科技有限公司 Message forwarding method, system, equipment and medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683617B (en) * 2018-04-28 2021-01-01 新华三技术有限公司 Message distribution method and device and distribution switch
CN109450819B (en) * 2018-10-25 2021-08-17 锐捷网络股份有限公司 Method and system for forwarding broadcast message
CN109286686B (en) * 2018-11-23 2021-05-14 盛科网络(苏州)有限公司 Load balancing method based on polling mechanism
CN111314236A (en) * 2020-04-14 2020-06-19 杭州迪普科技股份有限公司 Message forwarding method and device
CN117749715A (en) 2022-09-14 2024-03-22 瑞昱半导体股份有限公司 Network packet transmission device and network packet transmission method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049778A1 (en) * 2006-08-25 2008-02-28 Hiroki Yano Device and method for relaying packets
CN103532851A (en) * 2013-09-30 2014-01-22 杭州华三通信技术有限公司 Method and device for processing data flow in distributed link aggregation network
CN104079424A (en) * 2013-03-29 2014-10-01 国际商业机器公司 Device and method for asymmetrical link aggregation
CN104753820A (en) * 2015-03-24 2015-07-01 福建星网锐捷网络有限公司 Asymmetric forwarding method and device for service stream in aggregated link and switch

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4946803B2 (en) * 2007-11-01 2012-06-06 富士通株式会社 Packet relay method and apparatus
CN103401801A (en) * 2013-08-07 2013-11-20 盛科网络(苏州)有限公司 Method and device for realizing dynamic load balance

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049778A1 (en) * 2006-08-25 2008-02-28 Hiroki Yano Device and method for relaying packets
CN104079424A (en) * 2013-03-29 2014-10-01 国际商业机器公司 Device and method for asymmetrical link aggregation
CN103532851A (en) * 2013-09-30 2014-01-22 杭州华三通信技术有限公司 Method and device for processing data flow in distributed link aggregation network
CN104753820A (en) * 2015-03-24 2015-07-01 福建星网锐捷网络有限公司 Asymmetric forwarding method and device for service stream in aggregated link and switch

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006866A (en) * 2021-10-09 2022-02-01 苏州浪潮智能科技有限公司 Message forwarding method, system, equipment and medium
CN114006866B (en) * 2021-10-09 2023-08-18 苏州浪潮智能科技有限公司 Message forwarding method, system, equipment and medium

Also Published As

Publication number Publication date
CN107566267A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
WO2018001020A1 (en) Aggregated link based message forwarding method and device
US10791066B2 (en) Virtual network
EP3069484B1 (en) Shortening of service paths in service chains in a communications network
US9246818B2 (en) Congestion notification in leaf and spine networks
US7933268B1 (en) IP multicast forwarding in MAC bridges
US9686137B2 (en) Method and system for identifying an outgoing interface using openflow protocol
US20160134531A1 (en) Network Based Service Function Chaining
CN102307136B (en) Method for processing message and device thereof
US9667440B2 (en) Method and system for identifying an incoming interface using openflow protocol
US10397116B1 (en) Access control based on range-matching
CN106911588B (en) Method, device and system for realizing deep packet inspection optimization
KR101855742B1 (en) Method and apparatus for destination based packet forwarding control in software defined networking
US9590922B2 (en) Programmable and high performance switch for data center networks
US10313154B2 (en) Packet forwarding
US9876718B2 (en) Forwarding packets
US20150341267A1 (en) Control apparatus, communication apparatus, communication system, switch control method, and program
US8938579B2 (en) Method and system for using range bitmaps in TCAM access
CN108683617B (en) Message distribution method and device and distribution switch
US9054982B2 (en) Satellite controlling bridge architecture
WO2021104393A1 (en) Method for achieving multi-rule flow classification, device, and storage medium
CN110768917B (en) Message transmission method and device
US20140101751A1 (en) Hardware engine for high-capacity packet processing of network based data loss prevention appliance
US20190296924A1 (en) Forwarding multicast data packet
US10313274B2 (en) Packet forwarding
US20150043585A1 (en) Communication apparatus, communication method, communication system and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17819017

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17819017

Country of ref document: EP

Kind code of ref document: A1