A data forwarding method, device, routing device and storage medium
By setting a first priority forwarding list within the routing device, the forwarding priority of data packets is determined based on the wired port or wireless frequency band accessed by the terminal. This solves the latency problem caused by the data forwarding order in the prior art, and achieves more efficient network resource utilization and user experience.
Patent Information
- Application Number
- CN202310122544.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-02-03
AI Technical Summary
In existing data forwarding methods, data is forwarded according to the order in which it arrives at the routing device. This can easily lead to data with low real-time requirements being forwarded before data with high real-time requirements, increasing unnecessary latency, reducing the rationality of network resource utilization, and affecting user experience.
A first priority forwarding list is set up in the routing device to record the MAC address of the terminal and its corresponding forwarding priority. The forwarding priority is determined according to the wired port or wireless frequency band accessed by the terminal, and the forwarding order of data packets is dynamically adjusted to ensure that data packets with high real-time requirements are forwarded first.
It improves the rational utilization of network resources, reduces the forwarding time of data packets with high real-time requirements, and enhances the user experience.
Smart Images

Figure CN116055396B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of network technology, and in particular relates to a method, apparatus, routing device and storage medium for data forwarding. Background Technology
[0002] With the continuous development of network communication technology, more and more types of information can be forwarded through the network, and the forwarding pressure on network devices is also increasing. How to effectively and rationally allocate network resources of network devices to forward data has become an urgent problem to be solved.
[0003] In existing network communication technologies, routing devices are primarily responsible for data forwarding. Data is forwarded sequentially based on the order in which it arrives at the routing device from the terminal or the network. However, different types of data have different real-time requirements. If data is forwarded according to the order of arrival at the routing device, data with lower real-time requirements may be forwarded before data with higher real-time requirements, increasing unnecessary latency, reducing the rational utilization of network resources, and significantly impacting the user experience. Summary of the Invention
[0004] This application provides a data forwarding method, apparatus, routing device, and storage medium, which can solve the problem that existing data forwarding methods, which forward data according to the order of arrival at the routing device, are prone to forwarding data with low real-time requirements before data with high real-time requirements, thereby increasing unnecessary latency and reducing the rationality of network resource utilization, which greatly affects the user experience.
[0005] In a first aspect, embodiments of this application provide a data forwarding method, applied to a first routing device, comprising:
[0006] Receive the target data packet to be forwarded;
[0007] The forwarding priority of the target data packet is determined according to a first priority forwarding list, which includes the MAC address of the terminal and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address of the terminal is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device.
[0008] The target data packet is forwarded based on the forwarding priority.
[0009] In one possible implementation of the first aspect, determining the forwarding priority of the target data packet according to the first priority forwarding list includes:
[0010] Based on the source MAC address and / or destination MAC address of the target data packet, query the forwarding priority corresponding to the source MAC address and / or destination MAC address in the first priority forwarding list.
[0011] In one possible implementation of the first aspect, determining the forwarding priority of the target data packet according to the first priority forwarding list includes:
[0012] Based on the source MAC address of the target data packet, query the first priority corresponding to the source MAC address in the first priority forwarding list;
[0013] Based on the destination MAC address of the target data packet, query the second priority corresponding to the destination MAC address in the first priority forwarding list;
[0014] The higher priority among the first priority and the second priority is used as the forwarding priority of the target data packet.
[0015] In one possible implementation of the first aspect, before determining the forwarding priority of the target data packet according to the first priority forwarding list, the method further includes:
[0016] Receive user configuration operations, the configuration operations being used to set the forwarding priority of the wired port and / or the forwarding priority of the wireless frequency band of the first routing device;
[0017] The forwarding priority corresponding to the MAC address of the terminal is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device.
[0018] A first priority forwarding list is created based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address.
[0019] In one possible implementation of the first aspect, after creating the first priority forwarding list based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address, the method further includes:
[0020] The entry corresponding to the terminal in the first priority forwarding list is sent to at least one second routing device in the local area network, so that the second routing device adds the MAC address of the terminal and the forwarding priority corresponding to the MAC address to the second priority forwarding list of the second routing device.
[0021] In one possible implementation of the first aspect, after creating the first priority forwarding list based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address, the method further includes:
[0022] If any terminal is detected to have disconnected from the first routing device, the MAC address of the terminal and the forwarding priority corresponding to the MAC address are removed from the first priority forwarding list.
[0023] A removal instruction is generated for any of the terminals, and the removal instruction is sent to the second routing device; the removal instruction is used to notify the second routing device to remove the MAC address of any of the terminals and the forwarding priority corresponding to the MAC address from the second priority forwarding list.
[0024] One possible implementation of the first aspect also includes:
[0025] Receive several entries from the second priority forwarding list sent by the second routing device in the local area network;
[0026] The MAC address recorded in each of the entries and the forwarding priority corresponding to the MAC address are added to the first priority forwarding list.
[0027] Secondly, embodiments of this application provide a data forwarding apparatus, comprising:
[0028] The target data packet receiving unit is used to receive target data packets to be forwarded.
[0029] A forwarding priority determination unit is used to determine the forwarding priority of the target data packet according to a first priority forwarding list. The first priority forwarding list includes the MAC address of the terminal and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address of the terminal is determined according to the wired port or wireless frequency band of the terminal accessing the first routing device.
[0030] The target data packet forwarding unit is used to forward the target data packet based on the forwarding priority.
[0031] Thirdly, embodiments of this application provide a routing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the first aspects above.
[0032] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the first aspects above.
[0033] Fifthly, embodiments of this application provide a computer program product that, when run on a server, causes the server to execute the method described in any one of the first aspects above.
[0034] The beneficial effects of this application embodiment compared with the prior art are as follows: By setting a corresponding first priority forwarding list in the first routing device, the first priority forwarding list records the MAC addresses of each terminal accessing the first routing device and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address is determined according to the forwarding priority corresponding to the wired port and / or wireless frequency band used by the corresponding terminal when accessing the first routing device. When a target data packet that needs to be forwarded is received, the source MAC and / or destination MAC of the target data packet can be identified, thereby determining the forwarding priority corresponding to the target data packet through the first priority forwarding list, and then forwarding the target data packet according to the forwarding priority, thereby achieving the purpose of dynamically adjusting the forwarding priority of the target data packet. Compared with existing data forwarding technologies, the routing device in this embodiment does not determine the forwarding priority of data packets based on their arrival order. Instead, it determines the MAC address of the terminal corresponding to the target data packet and queries the forwarding priority of that MAC address in the first priority forwarding list, using it as the forwarding priority of the target data packet. Therefore, for target data packets with high real-time requirements, the terminal can use a wired port or wireless frequency band with a higher forwarding priority to access the first routing device. Subsequently, the first routing device will prioritize forwarding the target data packet corresponding to the wired port or wireless frequency band, thereby improving the rationality of network resource utilization and reducing the forwarding time of target data packets with high real-time requirements. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram illustrating the connection between a routing device and a user terminal according to an embodiment of this application;
[0037] Figure 2 This is a schematic diagram illustrating the implementation of a data forwarding method provided in an embodiment of this application;
[0038] Figure 3 This is a schematic diagram illustrating the setting of forwarding priority according to an embodiment of this application;
[0039] Figure 4 This is a flowchart illustrating the specific implementation of a data forwarding method provided in the second embodiment of this application before step S202;
[0040] Figure 5 This is a schematic diagram illustrating the setting of forwarding priority according to an embodiment of this application;
[0041] Figure 6 This is a schematic diagram illustrating the setting of forwarding priority according to another embodiment of this application;
[0042] Figure 7 This is a flowchart illustrating the specific implementation of a data forwarding method provided in the third embodiment of this application in step S202.
[0043] Figure 8 This is a schematic diagram illustrating the determination of the forwarding priority of a target data packet according to an embodiment of this application;
[0044] Figure 9 This is a flowchart illustrating a specific implementation of a data forwarding method provided in the fourth embodiment of this application;
[0045] Figure 10 This is a schematic diagram illustrating the setting of forwarding priority according to another embodiment of this application;
[0046] Figure 11 This is a schematic diagram of the structure of the data forwarding device provided in the embodiments of this application;
[0047] Figure 12 This is a schematic diagram of the routing device provided in the embodiments of this application. Detailed Implementation
[0048] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0049] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0050] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0051] The data forwarding method provided in this application can be applied to a routing device. This routing device may include one or more wired ports, through which user terminals can access the routing device. The routing device may also transmit one or more wireless networks with different Service Set Identifiers (SSIDs). The routing device can transmit wireless networks with the same SSID through one or more wireless frequency bands. User terminals can access these wireless networks through a wireless communication module to establish a wireless communication connection with the routing device. These user terminals include, but are not limited to, smartphones, smartwatches, tablets, laptops, ultra-mobile personal computers (UMPCs), netbooks, and other electronic devices that require data forwarding. This application does not impose any restrictions on the specific type of electronic device.
[0052] For example, Figure 1 This diagram illustrates the connection between a routing device and a user terminal according to an embodiment of this application. See also... Figure 1 As shown in (a), the local area network includes a routing device that can establish communication connections with one or more user terminals, including wired and wireless communication connections, and then receive data packets to be forwarded from each user terminal. Similarly, the routing device can also be connected to the Internet to receive data packets sent from the Internet. Therefore, the routing device can identify the forwarding priority of data packets sent by user terminals and data packets received from the Internet according to the data forwarding method provided in the embodiments of this application, and forward each data packet based on the forwarding priority.
[0053] See Figure 1 As shown in (b), the local area network contains at least two routing devices, namely a first routing device and a second routing device. Both the first and second routing devices can establish communication connections with multiple user terminals, and both can also be connected to the Internet. Figure 1 Unlike the embodiment shown in (a), the first routing device and the second routing device can also communicate with each other and exchange data. Both routing devices can use the data forwarding method provided in this application to set the forwarding priority of received data packets and forward data packets based on the forwarding priority. The specific networking method can be set according to the actual situation, and will not be described in detail here.
[0054] Please see Figure 2 , Figure 2The illustration shows a schematic diagram of a data forwarding method provided in an embodiment of this application, applied to a first routing device. The method includes the following steps:
[0055] In S201, the target data packet to be forwarded is received.
[0056] In this embodiment, the first routing device can establish a communication connection with the terminal and receive target data packets related to the terminal. These target data packets can be divided into two different types based on their forwarding direction: a first data packet sent by the terminal to the first routing device, and a second data packet forwarded by the first routing device to the terminal.
[0057] For example, in some application scenarios, when a terminal communicates with a server on the Internet, the terminal can send a first data packet to a first routing device. The first routing device can determine its corresponding forwarding priority according to the embodiments of this application and perform subsequent steps. When the server receives the terminal's request and replies with a message, since the terminal accesses the Internet through the first routing device, the network address corresponding to the reply message is the gateway address corresponding to the first routing device. In this case, after the first routing device receives the server's reply message, it will modify the destination MAC of the message to the MAC of the terminal device after a route lookup. At this time, the first routing device can also determine its forwarding priority and perform subsequent steps.
[0058] In S202, the forwarding priority of the target data packet is determined according to a first priority forwarding list. The first priority forwarding list includes the MAC address of the terminal and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address of the terminal is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device.
[0059] In this embodiment, after receiving a target data packet, the first routing device needs to determine its corresponding forwarding priority. The forwarding priority is determined based on a pre-set first priority forwarding list, which the first routing device can retrieve from its local storage. This first priority forwarding list records the MAC address of the access terminal and the forwarding priority corresponding to that MAC address. The forwarding priority of the terminal's MAC address is determined based on the wired port or wireless frequency band the terminal accesses the first routing device. The first routing device can configure forwarding priorities for specific wired ports and wireless frequency bands; the forwarding priorities for other unconfigured wired ports or wireless frequency bands will be set to default values. Alternatively, the administrator can set forwarding priorities for all wired ports and wireless frequency bands in the first routing device. The first routing device can determine the destination MAC address and / or source MAC address of the target data packet, and then use the forwarding priority corresponding to the destination MAC address and / or source MAC address as the forwarding priority of the target data packet.
[0060] In one possible implementation, the first routing device can be configured with at least two forwarding priorities: a high forwarding priority and a low forwarding priority. The first routing device will prioritize forwarding packets with the high forwarding priority, and will only forward packets with the low forwarding priority after all high forwarding priority packets have been forwarded.
[0061] For example, Figure 3 A schematic diagram illustrating the forwarding priority setting according to an embodiment of this application is shown. See also... Figure 3As shown, the first routing device includes two wired ports, port 1 and port 2. It can also simultaneously transmit two wireless networks with different SSIDs, SSID1 and SSID2, which operate on different frequency bands. Port 1 and the frequency band corresponding to SSID1 are configured by the user to have priority forwarding permissions (i.e., high forwarding priority). Port 2 and SSID2 are not configured, so their default forwarding priority is low. Therefore, when generating the first priority forwarding list, the first routing device obtains the MAC addresses of the terminals connected to port 1 and SSID1, uses the forwarding priority of port 1 and SSID1 as the forwarding priority of the connected terminals' MAC addresses, and generates the first priority forwarding list. Optionally, for wired ports and frequency bands without configured forwarding priorities, the first routing device can also obtain the MAC addresses of the connected terminals and set the forwarding priority corresponding to those terminals' MAC addresses to the default value, such as low forwarding priority. At this time, if the wired port accessed by the terminal is port 1, the forwarding priority of the terminal's MAC address can be set to high forwarding priority. If the wired port accessed by the terminal is port 2, the forwarding priority of the terminal's MAC address can be set to low forwarding priority, and so on.
[0062] Optionally, the first priority forwarding list may not record the MAC addresses of wired ports and wireless band access terminals that do not have a set forwarding priority, nor the forwarding priority corresponding to those MAC addresses. Therefore, if the first routing device detects that neither the source MAC address nor the destination MAC address of a target data packet is recorded in the aforementioned first priority forwarding list, it will set the forwarding priority of that target data packet to the default value, such as setting it to a low forwarding priority.
[0063] In one possible implementation, the first routing device can divide forwarding priorities into two or more categories, where a smaller forwarding priority value corresponds to a higher forwarding priority. For example, Table 1 shows a schematic diagram of a first priority forwarding list provided in an embodiment of this application. Referring to Table 1, the first routing device includes three wired ports: port 1, port 2, and port 3. In this case, the first routing device can record the forwarding priorities corresponding to all wired ports and wireless frequency bands in the first priority forwarding list. If a terminal accesses the first routing device through a wired port or wireless frequency band, the first routing device will record the terminal's MAC address and use the forwarding priority corresponding to the wired port or wireless frequency band used for access as the forwarding priority corresponding to the terminal's MAC address. After receiving a target data packet, the first routing device determines the destination MAC address and / or source MAC address of the target data packet, then queries the forwarding priority corresponding to that MAC address in the first priority forwarding list, and uses the forwarding priority corresponding to the MAC address as the forwarding priority of the target data packet.
[0064] Serial Number Attribute information Forwarding priority 1 MAC 1 2 2 MAC 2 1 3 MAC 3 3
[0065] Table 1
[0066] Compared with existing technologies, in this embodiment, the first routing device only needs to determine the destination MAC address and / or source MAC address of the target data packet. It can then use the forwarding priority corresponding to the MAC address as the forwarding priority of the target data packet by querying the first priority forwarding list. This eliminates the need to adjust the data format of the data packet to determine its forwarding priority. Therefore, the data forwarding method provided in this embodiment can support networks built with any protocol and data encapsulation format. In some existing technologies, to distinguish the forwarding priorities of different data packets, it is often necessary to adjust the protocols or data formats used within the local area network. For example, based on VLANs in 802.1q or based on private protocols, new headers are added to the header or footer of the data packet, or the Type of Service (TOS) field in the IP packet header is used to identify the corresponding priority flag. These methods require limitations on network protocols or data packet formats. If a network does not use or support these settings, it is impossible to forward data packets based on priority, thus greatly reducing the applicability.
[0067] Therefore, in order to solve the above-mentioned problems in the prior art, the present application embodiment determines the destination MAC address and / or source MAC address of the target data packet. By querying the first priority forwarding list, the forwarding priority corresponding to the above MAC address can be used as the forwarding priority corresponding to the target data packet. This enables the priority forwarding strategy to be applicable to all networks without adjusting the data packet format, thereby improving the scope of application of the data forwarding method provided in the present application embodiment.
[0068] In S203, the target data packet is forwarded based on the forwarding priority.
[0069] In this embodiment, after determining the forwarding priority of the target data packet, the first routing device determines the corresponding forwarding timing based on the forwarding priority of the target data packet. The forwarding rule of the first routing device is: forward each target data packet in descending order of forwarding priority. Therefore, if the forwarding queue in the first routing device contains other data packets with a forwarding priority higher than that of the target data packet, it will forward all data packets with a forwarding priority higher than that of the target data packet first, and then forward the target data packet; conversely, if there are no other data packets with a forwarding priority higher than that of the target data packet, the target data packet will be forwarded first.
[0070] In one possible implementation, if there are multiple data packets with the same forwarding priority in the forwarding queue (which may include the aforementioned target data packet), the first routing device can forward each data packet with the same forwarding priority in sequence according to the data packet reception time.
[0071] As can be seen from the above, the data forwarding method provided in this application embodiment sets a corresponding first priority forwarding list in the first routing device. The first priority forwarding list records the MAC addresses of each terminal connected to the first routing device and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address is determined according to the forwarding priority corresponding to the wired port and / or wireless frequency band used by the corresponding terminal when connecting to the first routing device. When a target data packet that needs to be forwarded is received, the source MAC and / or destination MAC of the target data packet can be identified, thereby determining the forwarding priority corresponding to the target data packet through the first priority forwarding list, and then forwarding the target data packet according to the forwarding priority, thereby achieving the purpose of dynamically adjusting the forwarding priority of the target data packet. Compared with existing data forwarding technologies, the routing device in this embodiment does not determine the forwarding priority of data packets based on their arrival order. Instead, it determines the destination MAC address and / or source MAC address of the target data packet, queries the forwarding priority of the MAC address in the first priority forwarding list, and uses it as the forwarding priority of the target data packet. Therefore, for target data packets with high real-time requirements, the terminal can use a wired port or wireless frequency band with a higher forwarding priority to access the first routing device. Subsequently, the first routing device will prioritize forwarding the target data packet corresponding to the wired port or wireless frequency band, thereby improving the rationality of network resource utilization and reducing the forwarding time of target data packets with high real-time requirements.
[0072] Furthermore, since the forwarding priority is determined based on the destination MAC address and / or source MAC address of the target data packet, and the forwarding priority of the MAC address is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device, and is unrelated to the service content of the target data packet, even if the service content within the target data packet is encrypted, its corresponding forwarding priority can still be determined. Therefore, the determination of the forwarding priority in this application embodiment does not depend on the parsing of the service content of the target data packet. For data packets with private protocols or specific traffic (such as data packets encrypted via VPN services), the forwarding priority can also be determined through this application embodiment, thereby improving the applicability of the data forwarding method provided in this application embodiment.
[0073] Figure 4 This diagram illustrates the specific implementation flowchart of a data forwarding method provided in the second embodiment of this application before step S202. See also... Figure 4 In contrast Figure 2 In the embodiment described herein, before determining the forwarding priority of the target data packet according to the first priority forwarding list, the method further includes steps S401 to S403, which are detailed below:
[0074] In S401, a user's configuration operation is received, which is used to set the forwarding priority of the wired port and / or the forwarding priority of the wireless frequency band of the first routing device.
[0075] In S402, the forwarding priority corresponding to the MAC address of the terminal is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device.
[0076] In S403, a first priority forwarding list is created based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address.
[0077] In this embodiment, when a user needs to configure the operating mode of the first router, they can open the corresponding settings interface of the first router. This settings interface may contain a startup control for the corresponding priority forwarding mode. The user can adjust the enabled state of the priority forwarding mode by clicking the startup control within the settings interface. If the first router receives a user-initiated command to enable the corresponding priority forwarding mode, i.e., when the priority forwarding mode switches from the disabled state to the enabled state, it creates a first priority forwarding list stored locally on the first router.
[0078] In one possible implementation, the aforementioned priority forwarding mode can be enabled by default. In this case, when the first routing device receives the power-on command, it will automatically set the aforementioned priority forwarding mode to the enabled state and create the corresponding first priority forwarding list.
[0079] In this embodiment, after enabling the priority forwarding mode, the first routing device can generate a forwarding priority setting interface. This setting interface contains multiple options, including all wired ports of the first routing device and the wireless frequency bands transmitted by the first routing device. Users can select the wired ports or wireless frequency bands that need priority forwarding from the above options and configure the corresponding forwarding priority for the selected wired ports or wireless frequency bands. The first routing device will determine the forwarding priority of the corresponding wired ports or wireless frequency bands based on the user's settings.
[0080] For example, the first routing device includes two wired ports, port 1 and port 2, and transmits two wireless frequency bands. Different wireless frequency bands correspond to different SSIDs; for example, the 2.4GHz wireless network is SSID1, and the 5GHz wireless network is SSID2. In this case, the above-mentioned options include four: port 1, port 2, SSID1, and SSID2. The user can select the wired port and wireless frequency band to be configured from these four options and configure the forwarding priority for the selected wired port or wireless frequency band. For example, if the user selects port 1 and SSID1 and configures the forwarding priority for each item, the MAC address of the terminal accessing port 1 and SSID1 is obtained. The priority of port 1 and SSID1 is used as the forwarding priority of the access terminal's MAC address. An entry for the MAC address is generated based on the MAC address and its corresponding forwarding priority, and this entry is added to the first priority forwarding list.
[0081] Optionally, after enabling the priority forwarding mode, when the user does not need to distinguish the forwarding priority of data packets, the user can disable the priority forwarding mode. The first routing device can respond to the user's command to disable the priority forwarding mode by deleting the first priority forwarding list.
[0082] Optionally, the user can also modify the forwarding priority of wired ports or wireless frequency bands. In response to the user's modification operation, the first routing device will delete the first priority forwarding list and reconfigure the forwarding priority based on the modification operation, thus reconfiguring a new first priority forwarding list. Preferably, when a user modifies the forwarding priority of a wired port or wireless frequency band, they can adjust only the relevant entries in the first priority forwarding list for the modified port or wireless frequency band; that is, only the forwarding priority of the MAC address of the terminal connected to the desired wired port or the terminal connected to the desired wireless frequency band will be modified.
[0083] In this embodiment, by enabling the priority forwarding mode and setting the wired port or wireless frequency band to be prioritized for forwarding, in the subsequent forwarding process, the terminal that needs priority forwarding can access the first routing device through the wireless network corresponding to the wired port or wireless frequency band with the forwarding priority set. All data packets sent by the terminal are set to the preset forwarding priority, thereby improving the utilization efficiency of network resources.
[0084] In this embodiment, the first routing device can receive user settings for wired ports and wireless frequency bands, and determine the forwarding priority corresponding to the wired ports and wireless frequency bands. After the user completes the settings, the first routing device will identify the access information of the terminal accessing the first routing device, that is, determine which wired port or wireless frequency band the terminal using to access the first routing device is using.
[0085] If a terminal connects to the first routing device via a wired port, the forwarding priority of the wired port used by the terminal to connect to the first routing device will be used as the forwarding priority corresponding to the terminal's MAC address. The first routing device will record the terminal's MAC address and the corresponding forwarding priority in the first priority forwarding list. Thus, in the subsequent forwarding process, if the source MAC address or destination MAC address of the target data packet is the same as any terminal MAC address in the first priority forwarding list, the first routing device can set the forwarding priority of the target data packet according to the forwarding priority corresponding to the MAC address.
[0086] If a terminal accesses the first routing device via a wireless frequency band, the forwarding priority of the wireless frequency band used by the terminal to access the first routing device will be used as the forwarding priority corresponding to the terminal's MAC address. The first routing device will record the terminal's MAC address and the corresponding forwarding priority in the first priority forwarding list. Thus, in the subsequent forwarding process, if the source MAC address or destination MAC address of the target data packet is the same as any terminal MAC address in the first priority forwarding list, the first routing device can set the forwarding priority of the target data packet according to the forwarding priority corresponding to the MAC address.
[0087] For example, Figure 5 A schematic diagram illustrating the forwarding priority setting according to an embodiment of this application is shown. See also... Figure 5As shown, user terminal A connects to the first routing device through port 1, while user terminal B connects through port 2. The first routing device has a forwarding priority configured for port 1, for example, setting its forwarding priority to 1. Port 2 is not configured; the default forwarding priority for unconfigured wired ports is 2. In this case, when user terminal A connects to the first routing device through port 1, the first routing device records the MAC address of user terminal A (MAC A) and uses the forwarding priority of port 1 as the forwarding priority of MAC A, for example, setting it to 1. When the first routing device receives a data packet A, which carries the MAC address MAC A, it uses the forwarding priority of MAC A as the forwarding priority of data packet A, i.e., setting it to 1. The MAC address carried in the data packet includes both the source and destination MAC addresses, and the forwarding priority can be determined based on the destination and / or source MAC addresses. Correspondingly, when user terminal B connects to the first routing device through port 2, since no forwarding priority is configured for port 2, the first routing device sets the forwarding priority of user terminal B's MAC address to the default value, such as 2. When the first routing device receives data packet B, it will identify the MAC address corresponding to data packet B as MAC B, and therefore set the forwarding priority of data packet B to the default value, i.e., forwarding priority 2. Correspondingly, the identification method when accessing the first routing device through a wireless network can also refer to the above process, and will not be repeated here.
[0088] In this embodiment of the application, after setting the forwarding priority corresponding to the wired port and the wireless frequency band, the forwarding priority of the wired port and the wireless frequency band can be used as the forwarding priority of the terminal accessed through the corresponding method. This enables the purpose of prioritizing the forwarding of all data packets sent by a wired port or wireless frequency band without the need to identify the service content, thereby improving the applicability of the forwarding priority setting.
[0089] Furthermore, as another embodiment of this application, the following may be included after S401:
[0090] In S404, the entry corresponding to the terminal in the first priority forwarding list is sent to at least one second routing device in the local area network, so that the second routing device adds the MAC address of the terminal and the forwarding priority corresponding to the MAC address to the second priority forwarding list of the second routing device.
[0091] In this embodiment, in order to facilitate other routing devices in the local area network to prioritize forwarding data packets whose source MAC address or destination MAC address is a specified terminal MAC address, the first routing device can send the entry corresponding to the terminal MAC address in the generated first priority forwarding list to other routing devices in the local area network, such as the second routing device, so that other routing devices can query the first priority forwarding list according to the source MAC address or destination MAC address of the target data packet, obtain the forwarding priority corresponding to the specified MAC address, and set the forwarding priority of the target data packet.
[0092] For example, Figure 6 This diagram illustrates a forwarding priority setting according to another embodiment of this application. The user sets the forwarding priority of port 1 and the forwarding priority of the wireless band corresponding to SSID1. For example, if the forwarding priority of port 1 is 1, the forwarding priority of the wireless band corresponding to SSID1 is also 1. Therefore, when user terminal A accesses the first routing device through port 1, the first routing device sets the forwarding priority of terminal A's MAC address (i.e., MAC A) according to the forwarding priority of the wired port accessed by the terminal. As mentioned above, if the forwarding priority of port 1 is 1, then the forwarding priority of MAC A is also 1, and a corresponding entry is generated and sent to the second routing device.
[0093] In this embodiment of the application, the first routing device can send entries in the first priority forwarding list that record the forwarding priority of the terminal MAC address to other routing devices in the local area network, thereby enabling the target data packet to have the same forwarding priority among the various routing devices in the entire local area network.
[0094] Furthermore, as another embodiment of this application, after S404, it also includes: S405 to S406, which are described in detail below:
[0095] In S405, if it is detected that any terminal has lost connection with the first routing device, the MAC address of the terminal and the forwarding priority corresponding to the MAC address are removed from the first priority forwarding list.
[0096] In S406, a removal instruction for any of the terminals is generated and sent to the second routing device; the removal instruction is used to notify the second routing device to remove the MAC address of any of the terminals and the forwarding priority corresponding to the MAC address from the second priority forwarding list.
[0097] In this embodiment, when a terminal is detected to have disconnected from the first routing device, the first routing device will remove the terminal's MAC address and its corresponding forwarding priority from the first priority forwarding list. This prevents the same MAC address from having multiple forwarding priorities when the terminal reconnects to the first routing device. Furthermore, since the terminal may use different wired ports or wireless frequency bands to connect to the first routing device in subsequent use, the forwarding priority of the terminal's corresponding MAC address will change. Therefore, to improve the timeliness of the forwarding priorities of each MAC address in the first priority forwarding list, the relevant deletion operation is performed when the terminal disconnects from the first routing device.
[0098] In this embodiment, since the first routing device sends the first priority forwarding list to the second routing device within the local area network (LAN), in order to maintain the synchronization of the priority forwarding list within the LAN, the first routing device generates a removal command for the MAC address and sends it to the second routing device within the LAN. The second routing device then removes the MAC address and its corresponding forwarding priority from the second priority forwarding list stored locally by the second routing device.
[0099] In this embodiment, when the terminal disconnects from the first routing device, its MAC address and the forwarding priority corresponding to the MAC address are deleted from the first priority forwarding list, and the deletion is synchronized among other routing devices in the local area network, thereby improving the timeliness and synchronization of information in the priority forwarding list.
[0100] Figure 7 A flowchart illustrating the specific implementation of a data forwarding method according to the third embodiment of this application in step S202 is shown. See also Figure 7 In contrast Figure 1 In the embodiment provided, S202 of the data forwarding method includes: S701, which is detailed below:
[0101] In S701, based on the source MAC address and / or destination MAC address of the target data packet, the forwarding priority corresponding to the source MAC address and / or destination MAC address in the first priority forwarding list is queried.
[0102] In this embodiment, the priority forwarding list of the first routing device can record the MAC address corresponding to the terminal and the forwarding priority corresponding to the MAC address. Therefore, when the first routing device receives a target data packet, it needs to determine its corresponding forwarding priority based on its MAC address. The packet contains the destination MAC address and the source MAC address; that is, one data packet can correspond to two MAC addresses, namely the source MAC address and the destination MAC address. The first routing device can determine the forwarding priority corresponding to the target data packet using these two MAC addresses.
[0103] In this embodiment, if the forwarding priority of the source MAC address of the target data packet is recorded in the first priority forwarding list, but the forwarding priority of the destination MAC address is not recorded, then the forwarding priority of the source MAC address is used as the forwarding priority of the target data packet.
[0104] If the first priority forwarding list records the forwarding priority of the destination MAC address of the target data packet, but does not record the forwarding priority of the source MAC address, then the forwarding priority of the destination MAC address will be used as the forwarding priority of the target data packet.
[0105] If neither the source MAC address nor the destination MAC address of the target data packet is recorded in the first priority forwarding list, then the forwarding priority of the target data packet is set to the default value.
[0106] If the first priority forwarding list records both the source MAC address and the destination MAC address of the target data packet and their forwarding priorities, then the forwarding priority with the higher priority is selected as the forwarding priority of the target data packet.
[0107] For example, Figure 8 This diagram illustrates the determination of the forwarding priority of a target data packet according to an embodiment of this application. See also... Figure 8 As shown, user terminal A accesses the first routing device through port 1. Therefore, the forwarding priority of MAC A is determined based on the forwarding priority of port 1. For example, if the forwarding priority of port 1 is 1, then the forwarding priority of MAC A is also 1. Similarly, if the forwarding priority of port 2 is 2, then the forwarding priority of MAC B for user terminal B is also 2.
[0108] At this time, user terminal A sends a data packet A1 to the first routing device. Since the source MAC address of data packet A1 is MAC A, by querying the first priority forwarding list, it can be determined that the forwarding priority of data packet A1 is 1. For data packet B1 sent by user terminal B to the first routing device, as mentioned above, its corresponding forwarding priority can be determined to be 2. Correspondingly, when the first routing device receives the reply data packet A2 to data packet A1, since the destination MAC address of reply data packet A2 is MAC A, its corresponding forwarding priority is also 1; while when the first routing device receives the reply data packet B2 to data packet B1, since its destination MAC address is MAC B, it will set its forwarding priority to 2.
[0109] For example, if the source MAC address in data packet C is MAC A and the destination MAC address is MAC B, meaning both MAC addresses are recorded in the first priority forwarding list, the first routing device will look up the two forwarding priorities and select the higher priority as the forwarding priority for data packet C. Since the forwarding priority of MAC A is higher than that of MAC B, the forwarding priority of data packet C will be determined based on the forwarding priority of MAC A, i.e., its forwarding priority will be set to 1.
[0110] In one possible implementation, the first routing device determines the forwarding priority of the target data packet by: adding a listening process within the kernel network protocol stack NF_BR_PRE_ROUTING to determine the forwarding priority corresponding to the source MAC address of the received data packet, for example, setting the forwarding priority of the data packet based on the forwarding priority corresponding to the source MAC address in the first priority forwarding list. Alternatively, the first routing device can add a listening process within the kernel network protocol stack NF_BR_POST_ROUTING to determine the forwarding priority corresponding to the destination MAC address of the received data packet, for example, setting the forwarding priority of the data packet based on the forwarding priority corresponding to the destination MAC address in the first priority forwarding list.
[0111] For packets sent to the Internet, the first routing device, after performing a route lookup, will change the source MAC address of the packet from the MAC address of the terminal within the local area network to the MAC address of the gateway, and the destination MAC address of the packet will become the MAC address of the next-hop router. However, the listening process in NF_BR_PRE_ROUTING precedes the aforementioned MAC address translation, so the forwarding priority of the corresponding packet can still be queried based on the source MAC address at this time.
[0112] For packets received from the Internet, the routing device, after performing a route lookup, modifies the destination MAC address of the packet from the gateway MAC address to the MAC address of the terminal within the local area network, and the source MAC address of the packet becomes the gateway MAC address. However, the listening process in NF_BR_POST_ROUTING occurs later than the aforementioned MAC address translation, so the forwarding priority of the corresponding packet can still be queried based on the destination MAC address at this time.
[0113] In one possible implementation, if the target data packet is forwarded between different terminals within a local area network (LAN), meaning both the target terminal and the source terminal of the target data packet are connected to the routing device within the LAN, then the above-mentioned S701 may specifically include two steps, S7011 to S7013, as described below:
[0114] In S7011, the first routing device identifies the source MAC address through the NF_BR_PRE_ROUTING listening process, and queries the first priority corresponding to the source MAC address in the first priority forwarding list based on the source MAC address of the target data packet.
[0115] In S7012, the first routing device identifies the destination MAC address through the NF_BR_POST_ROUTING listening process, and queries the second priority corresponding to the destination MAC address in the first priority forwarding list based on the destination MAC address of the target data packet; therefore, the target data packet will correspond to two priorities.
[0116] In S7013, the first routing device will use the higher priority among the first priority and the second priority as the forwarding priority of the target data packet. That is, if there are two priorities, the higher priority will be used as the forwarding priority of the target data packet.
[0117] Figure 9 A flowchart illustrating a specific implementation of a data forwarding method according to the fourth embodiment of this application is shown. See also... Figure 9 In contrast Figure 1-8 In any of the embodiments described above, the data forwarding method provided in this embodiment further includes: S901 to S902, which are detailed below:
[0118] In S901, several entries from the second priority forwarding list sent by the second routing device in the local area network are received.
[0119] In S902, the MAC address and the forwarding priority corresponding to each of the entries are added to the first priority forwarding list.
[0120] In this embodiment, in order to synchronize the priority forwarding lists of other routing devices (i.e., the second routing device), the first routing device receives several entries from the second priority forwarding list sent by the second routing device, and adds the MAC address recorded in the entry and its corresponding forwarding priority to the first priority forwarding list, thereby realizing the synchronization of forwarding priorities within the local area network.
[0121] For example, Figure 10 This diagram illustrates a forwarding priority setting according to another embodiment of this application. See also... Figure 10 As shown, the first routing device includes two wired ports and transmits two wireless networks on different frequency bands. The wired ports are port A1 and port A2, and the wireless networks are SSID A1 and SSID A2, respectively. Port A1 has a forwarding priority of 2, making it the preferred forwarding port. Correspondingly, the second routing device, located on the same local area network as the first routing device, also includes two wired ports and transmits two wireless networks on different frequency bands. The wired ports are port B1 and port B2, and the wireless networks are SSID B1 and SSID B2, respectively. Port B2 has a forwarding priority of 2, making it the preferred forwarding port. Terminal A connects to the first routing device via wired port A1. Therefore, the forwarding priority corresponding to Terminal A's MAC address (MAC A) is also 2. Terminal B connects to the second routing device via wired port B2. Therefore, the forwarding priority corresponding to Terminal B's MAC address (MAC B) is also 2. In this case, the first routing device sends the entry for MAC A in its first priority forwarding list, which records MAC A and its forwarding priority, to the second routing device. The second routing device adds MAC A to the corresponding second priority forwarding list and sets its forwarding priority to 2. See [link to relevant documentation]. Figure 10 The second priority forwarding list.
[0122] Correspondingly, the second routing device sends the entry for MAC B in the second priority forwarding list to the first routing device. The first routing device adds the record of MAC B and its forwarding priority to the first priority forwarding list, and sets the forwarding priority of MAC B in the first priority forwarding list to 2. See [link to relevant documentation]. Figure 10 The first priority forwarding list in the system.
[0123] In this embodiment of the application, by synchronizing the corresponding priority forwarding list within the local area network, the user terminals that need to be prioritized for forwarding can achieve synchronization of forwarding priorities across all routing devices within the local area network, thereby improving the uniformity of forwarding priorities within the local area network.
[0124] Figure 11The diagram illustrates a structural block diagram of a data forwarding apparatus according to an embodiment of the present invention. The data forwarding apparatus includes units configured to perform... Figure 2 The corresponding embodiments illustrate the steps implemented by the encryption device. Please refer to [link / reference] for details. Figure 2 and Figure 2 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown.
[0125] See Figure 11 The data forwarding device includes:
[0126] The target data packet receiving unit 111 is used to receive the target data packet to be forwarded;
[0127] Forwarding priority determination unit 112 is used to determine the forwarding priority of the target data packet according to a first priority forwarding list. The first priority forwarding list includes the MAC address of the terminal and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address of the terminal is determined according to the wired port or wireless frequency band of the terminal accessing the first routing device.
[0128] The target data packet forwarding unit 113 is used to forward the target data packet based on the forwarding priority.
[0129] Optionally, the forwarding priority determination unit 112 is specifically used to query the forwarding priority corresponding to the source MAC address and / or the destination MAC address in the first priority forwarding list based on the source MAC address and / or the destination MAC address of the target data packet.
[0130] Optionally, the forwarding priority determination unit 112 includes:
[0131] The first priority determination unit is used to query the first priority corresponding to the source MAC address in the first priority forwarding list based on the source MAC address of the target data packet;
[0132] The second priority determination unit is used to query the second priority corresponding to the destination MAC address in the first priority forwarding list based on the destination MAC address of the target data packet.
[0133] The priority comparison unit is used to take the higher priority among the first priority and the second priority as the forwarding priority of the target data packet.
[0134] Optionally, the device includes:
[0135] The user configuration unit is used to receive configuration operations from users, wherein the configuration operations are used to set the forwarding priority of the wired port and / or the forwarding priority of the wireless frequency band of the first routing device.
[0136] The priority setting unit is used to determine the forwarding priority corresponding to the MAC address of the terminal based on the wired port or wireless frequency band of the terminal accessing the first routing device.
[0137] The first priority forwarding list creation unit is used to create the first priority forwarding list based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address.
[0138] Optionally, the device further includes:
[0139] The first priority list sending unit is used to send the entry corresponding to the terminal in the first priority forwarding list to at least one second routing device in the local area network, so that the second routing device adds the MAC address of the terminal and the forwarding priority corresponding to the MAC address to the second priority forwarding list of the second routing device.
[0140] Optionally, the device further includes:
[0141] The terminal disconnection unit is used to remove the MAC address of any terminal and the forwarding priority corresponding to the MAC address from the first priority forwarding list if it is detected that any terminal has disconnected from the first routing device.
[0142] A removal instruction sending unit is configured to generate a removal instruction for any of the terminals and send the removal instruction to the second routing device; the removal instruction is configured to notify the second routing device to remove the MAC address of any of the terminals and the forwarding priority corresponding to the MAC address from the second priority forwarding list.
[0143] Optionally, the device further includes:
[0144] The second priority list sending unit is used to receive several entries in the second priority forwarding list sent by the second routing device in the local area network.
[0145] The priority synchronization unit is used to add the MAC address recorded in each of the entries and the forwarding priority corresponding to the MAC address to the first priority forwarding list.
[0146] Therefore, the data forwarding apparatus provided in this embodiment of the invention can also set a corresponding first priority forwarding list in the first routing device. The first priority forwarding list records the MAC addresses of each terminal connected to the first routing device and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address is determined according to the forwarding priority corresponding to the wired port and / or wireless frequency band used by the corresponding terminal when connecting to the first routing device. When a target data packet that needs to be forwarded is received, the source MAC and / or destination MAC of the target data packet can be identified, and the forwarding priority corresponding to the target data packet can be determined through the first priority forwarding list. Then, the target data packet is forwarded according to the forwarding priority, thereby achieving the purpose of dynamically adjusting the forwarding priority of the target data packet. Compared with existing data forwarding technologies, the routing device in this embodiment does not determine the forwarding priority of data packets based on their arrival order. Instead, it determines the MAC address of the terminal corresponding to the target data packet and queries the forwarding priority of that MAC address in the first priority forwarding list, using it as the forwarding priority of the target data packet. Therefore, for target data packets with high real-time requirements, the terminal can use a wired port or wireless frequency band with a higher forwarding priority to access the first routing device. Subsequently, the first routing device will prioritize forwarding the target data packet corresponding to the wired port or wireless frequency band, thereby improving the rationality of network resource utilization and reducing the forwarding time of target data packets with high real-time requirements.
[0147] It should be understood that, Figure 11 The block diagram of the data forwarding device shown illustrates how each module performs [the necessary operations]. Figures 2 to 10 The steps in the corresponding embodiments, and for Figures 2 to 10 The steps in the corresponding embodiments have been explained in detail in the above embodiments. Please refer to them for details. Figures 2 to 10 as well as Figures 2 to 10 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0148] Figure 12 This is a structural block diagram of a routing device provided in another embodiment of this application. For example... Figure 12 As shown, the routing device 1200 of this embodiment includes: a processor 1210, a memory 1220, and a computer program 1230 stored in the memory 1220 and executable on the processor 1210, such as a program for a data forwarding method. When the processor 1210 executes the computer program 1230, it implements the steps of the various embodiments of the data forwarding methods described above, for example... Figure 2 S201 to S203 are shown. Alternatively, the processor 1210 implements the above when executing computer program 1230. Figure 8 The functions of each module in the corresponding embodiments, for example, Figure 11For details on the functions of units 111 to 113 shown, please refer to [link / reference needed]. Figure 11 The relevant descriptions in the corresponding embodiments.
[0149] For example, computer program 1230 can be divided into one or more modules, one or more of which are stored in memory 1220 and executed by processor 1210 to complete this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 1230 in routing device 1200. For example, computer program 1230 can be divided into various unit modules, each with the specific functions described above.
[0150] Routing device 1200 may include, but is not limited to, processor 1210 and memory 1220. Those skilled in the art will understand that... Figure 12 This is merely an example of routing device 1200 and does not constitute a limitation on routing device 1200. It may include more or fewer components than shown, or combine certain components, or different components. For example, a routing device may also include input / output devices, network access devices, buses, etc.
[0151] The processor 1210 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0152] The memory 1220 can be an internal storage unit of the routing device 1200, such as a hard disk or memory of the routing device 1200. The memory 1220 can also be an external storage device of the routing device 1200, such as a plug-in hard disk, smart memory card, flash memory card, etc., equipped on the routing device 1200. Furthermore, the memory 1220 can include both internal storage units and external storage devices of the routing device 1200.
[0153] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A data forwarding method, applied to a first routing device, characterized in that, include: Receive the target data packet to be forwarded; The forwarding priority of the target data packet is determined according to a first priority forwarding list, which includes the MAC address of the terminal and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address of the terminal is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device. The target data packet is forwarded based on the forwarding priority; Before determining the forwarding priority of the target data packet according to the first priority forwarding list, the method further includes: Receive user configuration operations, the configuration operations being used to set the forwarding priority of the wired port and / or the forwarding priority of the wireless frequency band of the first routing device; The forwarding priority corresponding to the MAC address of the terminal is determined based on the wired port or wireless frequency band of the terminal accessing the first routing device. A first priority forwarding list is created based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address; the first priority forwarding list is stored in the first routing device.
2. The method according to claim 1, characterized in that, Determining the forwarding priority of the target data packet according to the first priority forwarding list includes: Based on the source MAC address and / or destination MAC address of the target data packet, query the forwarding priority corresponding to the source MAC address and / or destination MAC address in the first priority forwarding list.
3. The method according to claim 1, characterized in that, Determining the forwarding priority of the target data packet according to the first priority forwarding list includes: Based on the source MAC address of the target data packet, query the first priority corresponding to the source MAC address in the first priority forwarding list; Based on the destination MAC address of the target data packet, query the second priority corresponding to the destination MAC address in the first priority forwarding list; The higher priority among the first priority and the second priority is used as the forwarding priority of the target data packet.
4. The method according to claim 1, characterized in that, After creating the first priority forwarding list based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address, the method further includes: The entry corresponding to the terminal in the first priority forwarding list is sent to at least one second routing device in the local area network, so that the second routing device adds the MAC address of the terminal and the forwarding priority corresponding to the MAC address to the second priority forwarding list of the second routing device.
5. The method according to claim 4, characterized in that, After creating the first priority forwarding list based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address, the method further includes: If any terminal is detected to have disconnected from the first routing device, the MAC address of the terminal and the forwarding priority corresponding to the MAC address are removed from the first priority forwarding list. A removal instruction is generated for any of the terminals, and the removal instruction is sent to the second routing device; the removal instruction is used to notify the second routing device to remove the MAC address of any of the terminals and the forwarding priority corresponding to the MAC address from the second priority forwarding list.
6. The method according to any one of claims 1-5, characterized in that, Also includes: Receive several entries from the second priority forwarding list sent by the second routing device in the local area network; The MAC address recorded in each of the entries and the forwarding priority corresponding to the MAC address are added to the first priority forwarding list.
7. A data forwarding apparatus, characterized in that, include: The target data packet receiving unit is used to receive target data packets to be forwarded. A forwarding priority determination unit is used to determine the forwarding priority of the target data packet according to a first priority forwarding list. The first priority forwarding list includes the MAC address of the terminal and the forwarding priority corresponding to the MAC address. The forwarding priority corresponding to the MAC address of the terminal is determined according to the wired port or wireless frequency band of the terminal accessing the first routing device. A target data packet forwarding unit is used to forward the target data packet based on the forwarding priority; The device includes: The user configuration unit is used to receive configuration operations from users, wherein the configuration operations are used to set the forwarding priority of the wired port and / or the forwarding priority of the wireless frequency band of the first routing device. The priority setting unit is used to determine the forwarding priority corresponding to the MAC address of the terminal based on the wired port or wireless frequency band of the terminal accessing the first routing device. The first priority forwarding list creation unit is used to create a first priority forwarding list based on the MAC address of the terminal and the forwarding priority corresponding to the MAC address; the first priority forwarding list is stored in the first routing device.
8. A routing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Downlink message sending method and device and downlink message forwarding method and device
CN111147372A
FC switch scheduling method and apparatus, and electronic device and storage medium
WO2022142510A1