A message forwarding method and device

By splitting packets on the aggregation port of the device and forwarding them on multiple links, and allocating them using 5-tuple information and link bandwidth, the network lag problem caused by large data volume in multi-device networking is solved, achieving efficient data transmission and low-latency gaming service experience.

CN115883448BActive Publication Date: 2026-02-27HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111143922.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2026-02-27
Estimated Expiration
2041-09-28

AI Technical Summary

Technical Problem

In a multi-device collaborative network environment, large data volumes may lead to data transmission failures and network lag, which existing technologies struggle to effectively address.

Method used

By distributing received packets across multiple links from the aggregation port of the device, and using 5-tuple information and link bandwidth for allocation, it ensures that game packets select the link with the lowest latency, while non-game packets select the link with the highest bandwidth, thus avoiding overloading of a single link.

Benefits of technology

It improves data transmission efficiency, avoids network lag, ensures low latency for gaming services and efficient transmission for non-gaming services, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883448B_ABST
    Figure CN115883448B_ABST
Patent Text Reader

Abstract

The application relates to a message forwarding method and device. The method relates to a first network device and a second network device. In the method, the first network device can aggregate ports of multiple links capable of reaching the second network device on the first network device into a virtual bonding port, and then split a received message sent by a user device and forwards the message to the second network device on different links. In this way, the message can be transmitted to a peer device by using the multiple links, the situation that the load on a single link is too large is avoided, the data transmission efficiency is improved, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, in particular to a message forwarding method and device. BACKGROUND

[0002] With the rapid development of wireless broadband technology, the single device radio frequency coverage range has been unable to meet the requirements of large range and high throughput performance, therefore, multiple wireless devices cooperate to gradually become the industry trend. However, with the increase of user demand, the user data in the network also increases, so that the load on the link is relatively large. When the data volume is particularly large, it may cause the data to be transmitted to be queued in the buffer of the node, resulting in that the data cannot be normally transmitted, so that the data cannot be normally transmitted and received, and the network is stalled. SUMMARY

[0003] The present application provides a message forwarding method and device to improve the efficiency of data transmission and improve user experience.

[0004] In a first aspect, the present application provides a message forwarding method. In the method, first, a first network device receives a first message sent by a user equipment, the first message comprising a destination media access control (MAC) address; then, if the first network device determines that the destination MAC address included in the first message is the MAC address of a second network device, the first network device allocates at least one flow corresponding to the first message on at least two links included in a first aggregation port. Wherein, the first network device is a slave device of the second network device, and the first aggregation port is at least two ports aggregated on the at least two links capable of reaching the second network device on the first network device; finally, the first network device forwards the at least one flow to the second network device according to the allocated link.

[0005] It should be understood that the first network device and the second network device are in a master-slave relationship, and the first aggregation port is aggregated by the ports in the uplink direction of the first network device. That is, the slave device (i.e. the first network device) aggregates the uplink directed link into one port.

[0006] Through the above technical solution, after the slave device receives the message sent by the user equipment, the message can be shunted to the multiple links included in the aggregation port in the uplink direction of the slave device and forwarded to the master device, which can improve the efficiency of data transmission, avoid the problem that the data cannot be transmitted and the network is stalled due to too large data volume, and improve user experience. Moreover, the forwarding direction of the message is based on the direction of the physical link, which can control the forwarding direction of the message and avoid the problem of broadcast packet flooding.

[0007] In a possible design, before the first network device determines that the destination MAC address included in the first message is the MAC address of the second network device, the method further includes: determining, by the first network device, that the first message includes a plurality of five-tuple information.

[0008] By using the above technical solution, before the slave device determines that the received first message is sent to the master device, the slave device needs to determine that the five-tuple information can be extracted from the first message, so as to facilitate subsequent judgment of whether the corresponding data can be found in the IP FDB table, and to determine the forwarding link of the first message.

[0009] In a possible design, the first network device allocates at least one flow corresponding to the first message on at least two links, and the method includes the following steps.

[0010] The first network device allocates at least one flow corresponding to the first message on at least two links according to the plurality of five-tuple information and the residual bandwidth of the at least two links.

[0011] By using the above technical solution, the slave device can obtain the residual bandwidth of the plurality of links, and then determine the forwarding link of the flow corresponding to each five-tuple information based on the five-tuple information and the residual bandwidth, and further allocate different flows to different links, thereby improving the data transmission efficiency and further improving the user experience.

[0012] In a possible design, before the first network device allocates at least one flow corresponding to the first message on at least two links, the method further includes the following steps.

[0013] The first network device determines that there is no record of at least one flow corresponding to the first message in the first flow table. The first flow table includes record information of the flow forwarded by the first network device, and the record information includes five-tuple information, a receiving port of the flow, and a forwarding port of the flow.

[0014] By using the above technical solution, the slave device can save the record information of the flow forwarded by the slave device, and when the slave device extracts the five-tuple information, the slave device can determine whether the same five-tuple information is forwarded by the slave device by searching the flow table. If no record information is found, the forwarding link of the flow corresponding to the five-tuple information is allocated according to the five-tuple information and the residual bandwidth of the link.

[0015] In a possible design, the method further includes: if the first network device determines that there is a record of at least one flow corresponding to the first message in the first flow table, the first network device forwards at least one flow corresponding to the first message according to the forwarding port of the flow recorded in the first flow table.

[0016] By the technical solution, if the slave device finds the record of the current five-tuple information in the flow table, the slave device can forward the flow corresponding to the current five-tuple information according to the forwarding export information of the record in the flow table, without allocating a link again, and the data transmission efficiency can be improved.

[0017] In a possible design, before the first network device forwards the at least one flow to the second network device according to the allocated link, the method further includes: determining, by the first network device, that the first message is a non-game message.

[0018] By the technical solution, before the slave device forwards the first message to the master device, the slave device can determine the forwarding link of the first message according to the service type of the first message. When the first message is a non-game message, i.e., the first message is a service that is not sensitive to delay, the slave device can forward the first message to the master device.

[0019] In a possible design, the method further includes: if the first network device determines that the first message is a game message, selecting, by the first network device, a first link to forward the at least one flow corresponding to the first message to the second network device, the first link being a link with the lowest delay among at least two links included in the first aggregation port.

[0020] By the technical solution, when the first message is a game message, i.e., the first message is a service that is sensitive to delay, the link with the lowest delay can be selected to forward the message to the master device, so that the delay in the message forwarding process can be minimized, the low delay and zero lag of the game service can be ensured, and the user experience can be improved.

[0021] In a possible design, the method further includes: receiving, by the first network device, a second message sent by the second network device through the first link, the first link being a link with the lowest delay selected by the second network device from the at least two links included in the first aggregation port when the first network device determines that the first message is a game message, and the second message being sent by a server to the second network device.

[0022] By the technical solution, after the master device receives the first message, the master device can determine whether the first message is a game message. When the first message is a game message, i.e., the first message is a service that is sensitive to delay, the master device can select a link with the lowest delay to forward the feedback message to the slave device, so that the delay in the message forwarding process can be minimized, the low delay and zero lag of the game service can be ensured, and the user experience can be improved.

[0023] In a possible design, the method further includes: receiving, by the first network device, a third message forwarded by the second network device through the allocated link, the third message being sent by a server to the second network device.

[0024] Through the technical solution, after the master device receives the first message, the master device can send the first message to the server, the server feeds back a corresponding message to the master device, and the master device forwards the message fed back by the server to the slave device according to the original link.

[0025] In a second aspect, the application further provides a message forwarding method. The method is applied to a second network device. The method can include the following steps. First, the second network device receives a first message sent by a first network device according to an allocated link. Then, the second network device determines whether the first message (i.e., an uplink message) is a game message. Specifically, if the second network device determines that the first message is a game message, the second network device sends a second message (i.e., a downlink message) to the first network device through a first link, the first link being a link with the lowest delay selected by the second network device from at least two links included in a first aggregation port, and the second message being sent by a server to the second network device. If the second network device determines that the first message is a non-game message, the second network device sends a third message (i.e., a downlink message) to the first network device through the allocated link, the third message being sent by the server to the second network device.

[0026] Through the technical solution, after the master device receives the first message, the master device can determine whether the first message is a game message. If the first message is a game message, i.e., the first message is a service sensitive to delay, the master device can select a link with the lowest delay to forward the feedback message to the slave device, so as to ensure the lowest delay in the message forwarding process and ensure the low delay and zero lag of the game service, thereby improving the user experience.

[0027] In a third aspect, the application provides a first network device. The first network device includes one or more processors, one or more memories, and one or more computer programs. The one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions that, when invoked and executed by the one or more processors, cause the first network device to perform the method of the first aspect and any possible design of the first aspect.

[0028] For example, when the instructions are invoked and executed by the one or more processors, the first network device performs the following steps. The first network device receives a first message sent by a user device, and the first message includes a destination media access control (MAC) address. If it is determined that the destination MAC address included in the first message is a MAC address of a second network device, the first network device allocates at least one flow corresponding to the first message on at least two links included in a first aggregation port, the first network device being a slave device of the second network device, and the first aggregation port being at least two ports aggregated by at least two links capable of reaching the second network device on the first network device. The first network device forwards the at least one flow corresponding to the first message to the second network device according to the allocated link.

[0029] In a fourth aspect, the present application provides a second network device. The second network device comprises one or more processors; one or more memories; and one or more computer programs; wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs comprise instructions which, when executed by the one or more processors, cause the second network device to perform the method of the second aspect.

[0030] For example, the instructions, when executed by the one or more processors, cause the second network device to perform the following steps: receiving a first packet sent by the first network device through the assigned link; if it is determined that the first packet is a game packet, sending a second packet to the first network device through the first link, the first link being a link with the lowest latency selected by the second network device from at least two links included in the first aggregation port, and the second packet being sent by the server to the second network device; and if it is determined that the first packet is a non-game packet, sending a third packet to the first network device through the assigned link, the third packet being sent by the server to the second network device.

[0031] In a fifth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on the first network device, cause the first network device to perform the method of the first aspect and any possible design of the first aspect.

[0032] In a sixth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on the second network device, cause the second network device to perform the method of the second aspect.

[0033] In a seventh aspect, the present application provides a computer program product. When the computer program product is executed on the first network device, the first network device performs the method of the first aspect and any possible design of the first aspect.

[0034] In an eighth aspect, the present application provides a computer program product. When the computer program product is executed on the second network device, the second network device performs the method of the second aspect.

[0035] The various possible solutions and the technical effects that can be achieved by the various possible solutions in the third aspect to the eighth aspect are described above with reference to the technical effects that can be achieved by the various possible solutions in the first aspect and the second aspect, and will not be described here. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 A networking schematic diagram provided by the embodiments of the present application;

[0037] Figure 2An application scenario of a packet forwarding method provided by an embodiment of the present application is shown in the figure;

[0038] Figures 3A-3C A connection process of a router provided by an embodiment of the present application is shown in the figure;

[0039] Figure 4 A packet forwarding method provided by an embodiment of the present application is shown in the figure;

[0040] Figure 5 A link allocation method provided by an embodiment of the present application is shown in the figure;

[0041] Figure 6 A link weight provided by an embodiment of the present application is shown in the figure;

[0042] Figure 7 A forwarding path of a flow provided by an embodiment of the present application is shown in the figure;

[0043] Figure 8 A tree provided by an embodiment of the present application is shown in the figure;

[0044] Figure 9 Another packet forwarding method provided by an embodiment of the present application is shown in the figure;

[0045] Figure 10 A packet forwarding device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0046] The terms used in the following embodiments are only for the purpose of describing particular embodiments and are not intended to be limiting of the present application. As used in the specification and the appended claims, the singular forms "a," "an" and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. Also, it will be understood that the term "and / or," as used herein, encompasses all possible combinations of one or more of the associated listed items. It is also to be understood that the terminology "one or more of, as used herein, encompasses "at least one" and "one or more but not more than one."

[0047] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, the appearances of the phrases "in one embodiment" or "in some embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment, unless otherwise specified. The terms "including," "containing," "having," and variations thereof are meant to encompass the terms "including," "containing," "having," and variations thereof, unless otherwise specified. The term "connected" is meant to encompass both direct connections and indirect connections, unless otherwise specified.

[0048] The terms "first," "second," and the like, as used herein do not imply or mean any relative importance or any priority of one feature over another feature. Thus, a feature defined with "first," "second" can explicitly or implicitly include one or more of the feature.

[0049] The words "exemplary" and "for example" are used herein to mean serving as an example, instance, or illustration. Any implementation described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other implementations. The

[0050] Exemplarily, Figure 1 A networking schematic diagram is provided in embodiments of the application. Wherein, A, B, C, D, E, F can be routers, A is a master router, and the other routers are slave routers, D, E, F can be connected with user equipment, such as mobile phones, tablet computers, etc. In Figure 1 In the (a) schematic diagram shown, if a mobile phone is connected under the router D, the forwarding direction of the message sent by the mobile phone is: D-B-A. If a mobile phone is connected under the router E, the forwarding direction of the message sent by the mobile phone is: E-B-A. If a mobile phone is connected under the router F, the forwarding direction of the message sent by the mobile phone is: F-C-A.

[0051] In Figure 1 In the (b) schematic diagram shown, if a mobile phone is connected under the router D, the forwarding direction of the message sent by the mobile phone is: D-B-A; D-A; D-E-B-A; D-E-C-A. If a mobile phone is connected under the router E, the forwarding direction of the message sent by the mobile phone is: E-B-A; E-C-A; E-C-B-A. If a mobile phone is connected under the router F, the forwarding direction of the message sent by the mobile phone is: F-C-A; F-A; F-E-B-A.

[0052] For Figure 1 For the networking diagram shown in (a), only a single link can be established in the networking, which has a limitation on the physical link. For the networking diagram shown in (b), the chip needs to support the 802.11s protocol, which has a limitation on the hardware, and the 802.11s protocol only supports wireless links. Figure 1 Taking (a) in FIG. 1 as an example, it is assumed that a mobile phone is connected to the router D. When the user watches a video or downloads a file on the mobile phone to establish multiple tasks, the load on the D-B-A link will be relatively large, and the multiple tasks may need to be queued, which may cause network lag.

[0053] Therefore, the embodiments of the present application provide a packet forwarding method. The received packet is distributed to multiple links to avoid the problem of large load on a link, which causes network lag, so that the data transmission is faster, that is, the data transmission efficiency is improved, and the user experience is improved.

[0054] Exemplarily, Figure 2 An application scenario of the packet forwarding method provided by the embodiments of the present application is shown. As shown in FIG. 2, Figure 2 The scenario can include a master device (MD) 11 (such as a master router device), a slave device (SD) 12 (such as a slave router device), and a user device (UD) 13. The slave device 12 and the user device 13 can be interconnected through a communication network. Exemplarily, the communication network can be a local area network, such as a wireless fidelity (Wi-Fi) hotspot network. The user device 13 can include at least one, and at least one user device 13 can be connected to the same slave device 12 through the communication network. Of course, at least one user device 13 can also be connected to different slave devices 12 through the communication network. It should be understood that Figure 1 This is only an illustrative description, and the number of user devices 13 and the number of slave devices 12 are not specifically limited in the embodiments of the present application.

[0055] The functions of the master device MD are as follows: (1) responsible for managing slave devices belonging to an autonomous area; (2) based on a master device communication protocol (MDP), completing communication interaction with other master devices; (3) possibly synchronously assuming a service function possessed by a slave device, and providing services to the outside. The functions of the slave device SD are as follows: (1) cooperating with the master device to complete a service function, and providing services to the outside; (2) providing a management signaling channel and a service forwarding channel for a next-level slave device. The functions of the user device UD are as follows: connecting to the autonomous network of the master device to obtain services, and not providing services to the outside by itself.

[0056] In the embodiments of the present application, the service of any user equipment UD to the Internet InterNet needs to pass through Figure 2 the tree diagram shown in the figure to the master device MD, and then communicates with the Internet server through the WAN port of the master device.

[0057] The following describes the process of connecting the slave device to the master device by taking a router as an example. As shown in the figure, Figure 3A the wan port of the master router A is directly connected to the Internet internet, and the slave router B can access the master router A through the one-key smart connection. Then, the master router A issues the domain account password of the power line communication (PLC) to the slave router B, and issues the Service Set Identifier (SSID) and password of the 2.4G and 5G frequency bands to the slave router B. In this way, the slave router B can access the master router A through the three ways of PLC, 2.4G, and 5G.

[0058] As shown in the figure, Figure 3B when the slave router C accesses the local area network composed of the master router A and the slave router B, the master router A issues the domain account password of the PLC, the SSID and password of the 2.4G / 5G frequency band to the slave router C, and when the PLC link of the slave router C initiates connection, the router with the best PLC metric value (for example, the maximum link bandwidth value after link establishment) is selected, such as the slave router B access. Similarly, for the 2.4G / 5G frequency band, the slave router C can select the router with the best metric value of the 2.4G frequency band and the 5G frequency band, such as the master router A access.

[0059] As shown in the figure, Figure 3C when the slave router D accesses the local area network composed of the master router A, the slave router B, and the slave router C, the master router A issues the domain account password of the PLC, the SSID and password of the 2.4G / 5G frequency band to the slave router D, and when the PLC link of the slave router D initiates connection, the router with the best PLC metric value (for example, the maximum link bandwidth value after link establishment) can be selected, such as the slave router B access. When the 2.4G link of the slave router D initiates connection, the slave router B with the best link quality can be selected to access. When the 5G link of the slave router D initiates connection, the router with the best 5G metric value can be selected to access, such as the slave router C access.

[0060] It should be understood that Figure 3B and Figure 3C the routers selected by the links in the above two figures when initiating connection are only illustrative, and the present application is not limited thereto.

[0061] Based on the above introduction, the routers can access through different links, therefore, the message can be forwarded between multiple routers based on the physical link chain direction. For example, the message forwarding direction of the PLC link is from the slave to the master; the message forwarding direction of the Wifi link is from the station (STA) to the access point (AP); the message forwarding direction of the Ethernet eth link is from the port to the master port.

[0062] In some embodiments of the present application, the slave router can aggregate the ports that can reach the master router from the slave router into a virtual bonding port (or it can be understood that the slave router aggregates all the online ports into a virtual bonding port), and hang the virtual bonding port on the kernel two-layer bridge of the router. When the user equipment connected to the slave router is online, the message will be forwarded to the bonding port of the router, and then the bonding port can distribute the message to different links. For example, the slave router B can aggregate all the ports that can reach A (i.e. the ports of the PLC link, the ports of the 2.4G link, the ports of the 5G link) into a virtual bonding port, and hang the virtual bonding port on the kernel two-layer bridge of the router B. When the mobile phone or tablet connected to the slave router B is online, the message will be bridged to the bonding port of the router B, and the bonding port of the router B will distribute the message to different links. Figure 3C

[0063] The message forwarding method of the embodiments of the present application is introduced below taking the router as an example. For example, Figure 4 A flow chart of the message forwarding method provided by the embodiments of the present application is shown in FIG. 4. As shown in FIG. 4, the method can include the following steps: Figure 4

[0064] It should be understood that the "slave router" described below refers to the slave network device (which can also be referred to as the "first network device"), and the "master router" refers to the master network device (which can also be referred to as the "second network device").

[0065] S401, the slave router receives the message sent by the user equipment.

[0066] It should be understood that when the user is online on the user equipment such as a mobile phone, the mobile phone can send a message to the connected router.

[0067] The message can include five-tuple information, source media access control (MAC) address, and destination MAC address. The five-tuple information can include source Internet Protocol (IP) address, source port number, destination IP address, destination port number, and protocol number.​​

[0068] In some embodiments, after receiving a packet sent by a user device from a router, it can be determined whether the packet is to be sent to the bonding port of the router by the destination MAC in the packet. For example, the router can look up the MAC address in the BRIDGE FDB table to determine whether the destination MAC is in the table. If the destination MAC is in the table, the router can determine that the packet is to be sent to the bonding port of the router. If the destination MAC is not in the table, the router can determine that the packet is not to be sent to the bonding port of the router. Figure 1 For example, assume that the router D receives a packet sent by a mobile phone, at this time the router D can determine whether the packet is to be sent to the bonding port of the router D according to the destination MAC included in the packet sent by the mobile phone. Since the bonding port at the router D is an aggregation of three uplink ports, if the destination MAC is one of the MAC of the router A, the MAC of the router B and the MAC of the router E, the packet needs to be sent to the bonding port of the router D.

[0069] S402, determining whether the link included in the bonding port of the router is one link. If the link of the bonding port of the router is only one, the packet is forwarded according to the unique link. If the link of the bonding port of the router includes multiple links, S403 is executed.

[0070] In some embodiments, the router can determine how to forward the packet according to the number of links included in the bonding port of the router. When the number of links included in the bonding port is only one link, the router can only forward from the unique link. For example, if the link from the router to the master router is only one PLC link, the router can forward the packet to the master router through the unique PLC link.

[0071] S403, determining whether the IP FDB table is full. If the IP FDB table is full, the packet is forwarded to the device corresponding to the destination MAC in the packet according to the link with the largest bandwidth. If the IP FDB table is not full, S404 is executed.

[0072] It should be understood that in the present application, the IP FDB table can be referred to as: IP Forwarding Database (IP FDB) or referred to as: data forwarding table. In the IP FDB table, the five-tuple information of the packet, the receiving port (referred to as: receiving port or inlet) of the packet, the forwarding port (referred to as: output port or outlet) and the like can be included.

[0073] In some embodiments, when the router receives a packet, the packet can be divided into at least one flow according to the quintuple information in the packet, and then the ingress and egress of each flow can be learned and recorded in the IP FDB table. In addition, a timer can be set on the router, and when the router receives a packet, the timer can be started, and when the time of the timer reaches the update time (or aging time) of each record, the record can be deleted, i.e., the flow record is deleted. For example, the IP FDB table can refer to Table 1 shown below.

[0074] Table 1

[0075]

[0076] It should be understood that Table 1 is only an illustrative example, and the embodiments of the present application do not specifically limit the egress, ingress, and update time. It should be noted that the quintuple information of the same flow is completely the same, and the quintuple information of different flows is different.

[0077] Among them, the data storage capacity of the IP FDB table has an upper limit value, for example, the IP FDB table can store a maximum of 100 data records, so the 101st record cannot be saved in the IP FDB table. Of course, the maximum upper limit value of the storage of the IP FDB table can also be 200, etc., and the present application does not limit this. In some embodiments, if the IP FDB table is full, the router forwards the packet to the device corresponding to the destination MAC in the packet according to the link with the largest bandwidth.

[0078] S404, determine from the router whether the packet can extract the quintuple information. If the packet cannot extract the quintuple information, the packet is forwarded to the link with the largest bandwidth. If the packet can extract the quintuple information, S405 is continued.

[0079] As a possible implementation, the router can determine whether the packet can extract the quintuple information according to the type of the packet. Among them, the transmission control protocol (TCP) packet and the user datagram protocol (UDP) packet can extract the quintuple information, and the non-TCP / UDP packet, such as the address resolution protocol (ARP) packet, cannot extract the quintuple information. It can also be understood that the TCP packet and the UDP packet contain quintuple information, and the ARP packet does not contain quintuple information.

[0080] In the embodiments of the present application, if the packet cannot extract the quintuple information, the packet is forwarded to the device corresponding to the destination MAC in the packet. For example, it is assumed that the link with the largest bandwidth in the bonding port of the router is the 5G link, and the device corresponding to the destination MAC is the master router. The router can forward the packet from the 5G link to the master router.

[0081] As a possible implementation, when the packet cannot extract the quintuple information, the router can learn the MAC of the router included in the packet forwarding path. Moreover, the router can record the learned MAC, for example, in Table 2 as follows.

[0082] Table 2

[0083]

[0084] It should be understood that Table 2 is only an illustrative example, and the source MAC can include the MAC of the router device included in the forwarding path from the sending to the forwarding to the destination MAC. For example, Figure 3C For example, the schematic diagram shown in the figure is assumed to be the forwarding path: D-B-A, and the mobile phone is connected under the router D. Therefore, the source MAC can include the MAC of the mobile phone, the MAC of the router D, the MAC of the router B, and the MAC of the router A.

[0085] S405, the router determines whether the quintuple information can be queried in the IP FDB table. If the router can query the quintuple information in the IP FDB table, the packet is forwarded according to the saved link. If the router cannot query the quintuple information in the IP FDB table, S406 is continuously executed.

[0086] In some embodiments, after the router determines that the quintuple information can be extracted, it can be determined whether it is the first time to receive the quintuple information, that is, whether the record of the quintuple can be queried in the saved IP FDB table. If the record of the quintuple can be queried in the IP FDB table, it means that the router is not the first time to receive the quintuple information. If the record of the quintuple cannot be queried in the IP FDB table, it means that the router is the first time to receive the quintuple information or the quintuple information is deleted after reaching the update time in the IP FDB table.

[0087] When the IP FDB table saves the quintuple information of the packet currently received by the router, the egress corresponding to the quintuple information in the IP FDB table can be queried, that is, from which link to forward. Then, the router forwards the packet according to the egress recorded in the IP FDB table.

[0088] S406, determining, by the slave router, whether the destination MAC of the packet is the MAC of the master router. If the destination MAC of the packet is not the MAC of the master router, forwarding the packet according to the link with the largest bandwidth. If the destination MAC of the packet is the MAC of the master router, continuing to perform S407.

[0089] In some embodiments, the slave router can determine whether the destination MAC carried in the packet is the MAC of the master router, i.e., whether the packet is a packet sent to the master router. If the packet is not sent to the master router, the packet is forwarded according to the link with the largest bandwidth.

[0090] S407, determining, by the slave router, whether the packet is a game packet. If the packet is a game packet, forwarding the packet according to the link with the lowest latency. If the packet is not a game packet, continuing to perform S408.

[0091] It should be understood that S407 is an optional step. That is, before performing S408, the slave router can also determine whether the packet is a game packet. If the packet is a game packet, forwarding the packet according to the link with the lowest latency. If the packet is not a game packet, continuing to perform S408. Specifically, the slave router can include a service identification module, which can be a service classification (SC) module, which can identify the type of the packet based on an SC feature library. The SC feature library can include a plurality of identification rules. For example, the SC can identify the packet as a game packet according to the IP address of the game server, the special communication protocol number of the game packet, the transmission characteristics of the packet, etc. For example, the transmission characteristics of the packet are shown in Table 3.

[0092] Table 3

[0093]

[0094] It should be understood that Table 3 is only an illustrative example, and more user behaviors can be included in the game scenario, which are not listed here.

[0095] S408, distributing, by the slave router, the packet to the links included in the bonding port for forwarding.

[0096] For example, assuming that the links included in the bonding port of the slave router are PLC links, 5G links, and 2.4G links, the slave router can distribute at least one flow of the packet to different links for forwarding to the master router. That is, to ensure that the links included in the bonding port of the slave router are all transmitting data, avoiding the problem of excessive load on one link. At the same time, since the slave router selects the optimal link when accessing the network, the transmission rate will be faster.

[0097] It should be noted that, in this embodiment, allocating links according to flow allows the same flow to be forwarded on a single link, avoiding network congestion issues that occur when the same flow is forwarded on different links. Of course, this application can also allocate links according to packet, and there is no specific limitation on this.

[0098] The following details the process of packet allocation and forwarding on different links in the embodiments of this application. Figure 5 This is a flowchart illustrating a link allocation method provided in an embodiment of this application. Figure 5 As shown, the method may include the following steps:

[0099] S501. Obtain link metric values ​​from the router.

[0100] Link metrics may include the link's maximum bandwidth, remaining bandwidth (remaining bandwidth = maximum bandwidth of the link - actual bandwidth used), latency, connection status, channel occupancy, etc.

[0101] S502. The router determines the forwarding link of the packet based on the packet's five-tuple information and link metric value.

[0102] In some embodiments, the router can obtain the link metric from the network, then obtain the remaining bandwidth of the link based on the obtained link metric, and then determine the forwarding link of the packet based on the remaining bandwidth and the 5-tuple information.

[0103] Suppose there are three links between router B and main router A, such as a 5G link, a 2.4G link, and a PLC link. One possible implementation is to calculate the hash value of the five-tuple information using a hash algorithm, and then determine the forwarding link based on the calculated hash value and the weight of the remaining bandwidth on each link. For example, as shown... Figure 6 The diagram shown is a link weight diagram provided in an embodiment of this application. (See also...) Figure 6 As shown, assume that the ratio of the remaining bandwidth of the 5G link, the remaining bandwidth of the 2.4G link, and the remaining bandwidth of the PLC link is 1:3:6, that is, the 5G link accounts for 1 / 10, the 2.4G link accounts for 3 / 10, and the PLC link accounts for 6 / 10.

[0104] It should be noted that if the packet enters router A via a 2.4GHz inlet and router A's exit is on the 2.4GHz band, or if the packet enters router A via a 5GHz inlet and router A's exit is on the 5GHz band, then the weight value for the exit route can be halved. For example, if the frequency band from the mobile phone to router 1 is 5GHz, and the frequency bands between router 1 and main router 2 are both 5GHz, and the weight value of the 5GHz link is 6, then when calculating the packet's exit direction at router 1, the weight value of the 5GHz link will be 3.

[0105] In some embodiments, the forwarding link of the packet can be determined according to the remainder of the ratio of the hash value to the sum of the weights. Exemplarily, the conversion relationship between the remainder value and the link can refer to Table 4 shown below.

[0106] Table 4

[0107]

[0108] It should be understood that Table 4 described above is only an illustrative description, and when the residual weight ratio of the link is different, the corresponding relationship between the remainder value and the link can also change. That is, when the remainder value 0≤n<1, the packet is transmitted from the router to the exit of the 5G link; when 1≤n<4, the packet is transmitted from the router to the exit of the 2.4G link; and when 4≤n<10, the packet is transmitted from the router to the exit of the PLC link.

[0109] S503, forwarding the packet to the main router according to the determined forwarding link.

[0110] Continuing to take Table 3 as an example, assuming that the remainder of the hash value of the Flow1 five-tuple information after hashing compared with the sum of the link weights is 5, the router can forward the Flow1 to the main router according to the PLC link. That is, different flows can be forwarded to the main router through the same or different links.

[0111] Exemplarily, as shown in Figure 7 , a flow forwarding path diagram provided by an embodiment of the present application is shown. Assuming that the packet is a packet that cannot extract five-tuple information, the packet can be forwarded according to a fixed link, such as the forwarding path shown by the thick black line shown in (a) of Figure 7 , that is, the forwarding path can include D-B-A; E-B-A; F-C-A.

[0112] When the packet is a packet that can extract five-tuple information, assuming that the packet can include two flows, such as Flow1 and Flow2, the Flow1 can be forwarded according to the forwarding path shown by the thick black line shown in (b) of Figure 7 , and the Flow2 can be forwarded according to the forwarding path shown by the thick black line shown in (c) of Figure 7 . It should be understood that Figure 7 is only an illustrative description, and in actual application, the forwarding path of the flow can also be other paths, which are not limited by the present application. It should be understood that Figure 7 the arrows below the routers D and F in (a) of

[0113] In the above manner, different flows can be allocated to different links for forwarding, such as the Flow1 can be allocated to the PLC link and the Flow2 can be allocated to the 2.4G link.Figure 7 The forwarding path of the flow in the network shown is converted into a tree diagram, for example Figure 8 As shown, in this way Figure 7 The flow in the network shown can be forwarded according to an independent tree. It should be noted that Figure 8 B0, D0, E0, C0, F0 in the network shown are Figure 7 B, D, E, C, F shown in (a) in the network shown; Figure 8 B1, D1, C1, F1 in the network shown are Figure 7 B, D, C, F shown in (b) in the network shown; Figure 8 B2, C2, D2, F2 in the network shown are Figure 7 B, C, D, F shown in (c) in the network shown.

[0114] In the embodiment of the present application, since the bonding port is aggregated by the uplink port, the forwarding of the message between the routers is a directed forwarding process. That is, the learning and forwarding behavior of the layer 2 bridge can be controlled based on the physical directionality, and the layer 2 forwarding can be guaranteed to be non-looped through the directionality, avoiding broadcast packet flooding. Secondly, different flows are forwarded through different links in a shunting manner to realize multi-path concurrency, so that the forwarding paths of different flows converge to obtain Figure 8 the tree diagram shown.

[0115] In the above embodiment, the slave router can forward the message to the master router, so that the master router can send the message to the server after receiving the message, and the server feeds back the corresponding message to the master router, and then the master router forwards the message fed back by the server to the slave router according to the path of the received message. Since in the above embodiment, the slave router identifies and distinguishes whether the message is a game message, and when the message is a game message, the link with the lowest delay is selected to send to the master router. Correspondingly, when the master router feeds back the message to the slave router, the message is also forwarded according to the link with the lowest delay, which can make the data transmission faster.

[0116] Based on the above embodiment, the present application also provides a message forwarding method. Exemplarily, Figure 9 a message forwarding method flowchart provided in the embodiment of the present application. As Figure 9 shown, the method can include the following steps:

[0117] S901, the slave router receives the message sent by the user equipment.

[0118] S902, the slave router judges whether the link included in the bonding port of the slave router is one link. If the link of the bonding port of the slave router is only one, the message is forwarded according to the unique link. If the link of the bonding port of the slave router includes multiple links, S903 is continued.

[0119] S903, judging whether the IP FDB table is full from the router. If the IP FDB table is full, forwarding the packet to the device corresponding to the destination MAC in the packet according to the link with the largest bandwidth. If the IP FDB table is not full, continuing to execute S904.

[0120] S904, judging whether the packet can extract the quintuple information from the router. If the packet cannot extract the quintuple information, forwarding the packet to the link with the largest bandwidth. If the packet can extract the quintuple information, continuing to execute S905.

[0121] S905, judging whether the quintuple information can be queried in the IP FDB table from the router. If the quintuple information can be queried in the IP FDB table from the router, forwarding the packet according to the saved link. If the quintuple information cannot be queried in the IP FDB table from the router, continuing to execute S906.

[0122] S906, judging whether the destination MAC of the packet is the MAC of the master router from the router. If the destination MAC of the packet is not the MAC of the master router, forwarding the packet according to the link with the largest bandwidth. If the destination MAC of the packet is the MAC of the master router, continuing to execute S907.

[0123] S907, distributing the packet to the link included in the bonding port from the router to forward the packet to the master router.

[0124] S908, judging whether the packet is a game packet from the master router. If the packet is a game packet, forwarding the feedback packet to the slave router according to the link with the lowest latency; if the packet is not a game packet, forwarding the feedback packet to the slave router according to the forwarding path of the received packet.

[0125] It should be noted that, Figure 9 the difference between the embodiments shown in the Figure 4 the difference between the embodiments shown in the Figure 4 the difference between the embodiments shown in the Figure 9 the difference between the embodiments shown in the Figure 9 the method of the embodiments shown in the Figure 4 the difference between the embodiments shown in the

[0126] It should be understood that, Figure 9 the specific implementation process of S901-S906 and S907 in the embodiments shown in theFigure 4 For a detailed description of S401~S406 and S408 in the illustrated embodiment, and the specific implementation process of S908, please refer to [link to relevant documentation]. Figure 4 The detailed description of S407 in the illustrated embodiment is only different in that the executing entity is different, so it will not be repeated here to save space.

[0127] In the solution of this application embodiment, 300M speeds throughout the entire house can be achieved by superimposing multiple bandwidths between routers (ETH+PLC+5G+2.4G). Furthermore, by identifying services and measuring links, latency-sensitive services can always be forwarded via low-latency links, such as ensuring low latency and zero lag for gaming services.

[0128] Furthermore, in this embodiment, since packet forwarding occurs between router devices in a network scenario, when a packet is a broadcast packet, the same router device may receive multiple identical broadcast packets. Therefore, to solve the problem of duplicate broadcast packets, a flag can be added to the broadcast packet when the router receives it. This way, when the router receives the same broadcast packet again, it can discard any one of the broadcast packets, ensuring that no duplicate broadcast packets are received by the router.

[0129] It should be noted that all or part of the embodiments provided in this application can be freely and arbitrarily combined with each other. The combined technical solutions are also within the scope of this application.

[0130] To achieve the functions of the methods provided in the embodiments of this application, the network device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.

[0131] Based on the above embodiments, this application also provides a message forwarding device, which can be the router device in the foregoing embodiments, such as a first network device or a second network device. This device is used to implement... Figure 4 , Figure 5 , Figure 9 The method of the illustrated embodiment. See also Figure 10 As shown, the device 1000 includes a transceiver 1001, a processor 1002, and a memory 1003. The transceiver 1001, the processor 1002, and the memory 1003 are interconnected.

[0132] Optionally, the transceiver 1001, the processor 1002 and the memory 1003 are connected with each other through a bus 1004. The bus 1004 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 10 In the figure, only one thick line is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0133] The memory 1003 is configured to store program instructions and data, etc. Specifically, the program instructions can include program code, which includes computer operation instructions. The memory 1003 can include a random access memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory. The processor 1002 executes the program instructions and data stored in the memory 1003 to realize the above functions, thereby realizing the method provided by the above embodiments.

[0134] In the embodiments of the present application, the processor 1002 can be a general processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can realize or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor. The software module can be located in the memory 1003, and the processor 1002 reads the program instructions in the memory 1003 and combines the hardware to complete the steps of the method of any one of the above embodiments.

[0135] In the embodiments of the present application, the memory 1003 can be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and can also be a volatile memory, such as a RAM. The memory can also be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory in the embodiments of the present application can also be a circuit or other any device capable of realizing the storage function, used for storing instructions and / or data.

[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the apparatus and the unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be described here.

[0137] Based on the foregoing embodiments, the present application further provides a computer storage medium, wherein a computer program is stored in the computer storage medium, and the computer program causes a computer to execute the method provided in the foregoing embodiments when the computer program is executed by the computer.

[0138] The present application further provides a computer program product, comprising instructions which, when executed on a computer, cause the computer to carry out the method provided in the foregoing embodiments.

[0139] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams in accordance with the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be realized by instructions. The instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device that realizes the functions specified in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocks Figure 1 an apparatus that realizes the functions specified in one block or multiple blocks.

[0140] The computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction apparatus, which realizes the functions specified in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocks Figure 1 an apparatus that realizes the functions specified in one block or multiple blocks.

[0141] The computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for realizing the functions specified in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocks Figure 1 an apparatus that realizes the functions specified in one block or multiple blocks.

Claims

1. A message forwarding method, characterized in that, The method includes: The first network device receives a first message sent by the user equipment, the first message including the destination Media Access Control (MAC) address; The first network device determines that there is no record of at least one flow corresponding to the first packet in the first flow table. The first flow table includes record information of flows forwarded by the first network device. The record information includes five-tuple information, the receiving port of the flow, and the forwarding port of the flow. If the first network device determines that the destination MAC address included in the first packet is the MAC address of the second network device, then it allocates at least one flow corresponding to the first packet to at least two links included in the first aggregation port. The first network device is a slave device of the second network device, and the first aggregation port is obtained by aggregating at least two ports on the first network device that can reach at least two links of the second network device. The first network device forwards at least one flow corresponding to the first packet to the second network device according to the allocated link.

2. The method as described in claim 1, characterized in that, Before the first network device determines that the destination MAC address included in the first packet is the MAC address of the second network device, the method further includes: The first network device determines that the first message includes multiple 5-tuple information.

3. The method as described in claim 2, characterized in that, The first network device allocates at least one flow corresponding to the first packet on the at least two links, including: The first network device allocates at least one flow corresponding to the first packet onto the at least two links based on the plurality of five-tuple information and the remaining bandwidth of the at least two links.

4. The method as described in claim 1, characterized in that, The method further includes: If the first network device determines that there is a record of at least one flow corresponding to the first packet in the first flow table, it forwards the at least one flow corresponding to the first packet according to the forwarding port of the flow recorded in the first flow table.

5. The method according to any one of claims 1-4, characterized in that, Before the first network device forwards the at least one flow to the second network device according to the allocated link, the method further includes: The first network device determines that the first message is a non-game message.

6. The method as described in claim 5, characterized in that, The method further includes: If the first network device determines that the first packet is a game packet, it selects a first link to forward at least one flow corresponding to the first packet to the second network device. The first link is the link with the lowest latency among the at least two links included in the first aggregation port.

7. The method according to any one of claims 1-4, characterized in that, The method further includes: The first network device receives a second message sent by the second network device through a first link. The first link is the link with the lowest latency selected by the second network device from at least two links included in the first aggregation port when determining that the first message is a game message. The second message is sent by the server to the second network device.

8. The method according to any one of claims 1-4, characterized in that, The method further includes: The first network device receives a third message forwarded by the second network device through the allocated link, the third message being sent by the server to the second network device.

9. A first network device, characterized in that, The first network device includes one or more processors; one or more memories; and one or more computer programs; The one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions that, when executed by the one or more processors, cause the first network device to perform the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing instructions, characterized in that, When the instruction is executed on the first network device, the first network device performs the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Message transmission control method and device

    CN104092604A

  • Method, switch, and sites for data transmission

    CN112449751A