Network data processing method and device, network equipment and storage medium

By sending network data to the kernel network card of the active member interface in the network device for processing, the network data discarding problem caused by the inactive member interface is solved, and the network data processing efficiency is improved.

CN119449698APending Publication Date: 2025-02-14JINAN YUSHI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310952721.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In a network device, when a member interface configured with an aggregated interface IP address is inactive, network data may be discarded, affecting processing efficiency.

Method used

By determining the data type of network data and the physical state of member interfaces, when the first member interface is inactive, the network data is sent to the kernel network card corresponding to the second member interface in the aggregate interface for processing.

Benefits of technology

On the premise of ensuring that network data is not discarded, the processing efficiency of network equipment on the network data it needs to process is improved, and the need for complex open source protocol stack development and aggregation group rebinding is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449698A_ABST
    Figure CN119449698A_ABST
Patent Text Reader

Abstract

The invention discloses a network data processing method and device, network equipment and a storage medium. The method comprises the following steps: when network data is received, determining a data type of the network data; wherein the data type comprises routing network data and non-routing network data; when the network data is non-routing network data, determining a physical state of a first member interface in an aggregation interface of the network equipment; wherein the physical state comprises an active state and an inactive state; the first member interface is a member interface configured with an aggregation interface IP address; when the first member interface is in an inactive state, sending the network data to a kernel network card corresponding to the second member interface through an aggregation interface, so that the kernel network card corresponding to the second member interface processes the network data; wherein the second member interface is any member interface in an active state in the aggregation interface. According to the scheme, the processing efficiency of the network equipment on the network data needing to be processed by the network equipment can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a network data processing method, device, network equipment and storage medium. Background Art

[0002] Link aggregation technology can achieve the purpose of increasing link bandwidth by bundling multiple physical interfaces into one logical interface without hardware upgrade. While achieving the purpose of increasing bandwidth, link aggregation adopts the mechanism of backup link, which can effectively improve the reliability of links between devices. After the network device creates an aggregation group, the aggregation group can be configured as a three-layer aggregation group or a two-layer aggregation group. The three-layer aggregation interface can be configured with an IP address to guide the completion of routing and forwarding functions.

[0003] Network devices can create aggregation groups based on the Data Plane Development Kit (DPDK). After adding physical interfaces to the aggregation group, they can send and receive messages to the outside in the form of the aggregation group. All member interfaces and aggregation interfaces use the same interface MAC address. When processing forwarding services, they only need to complete three-layer forwarding based on the IP address configured for the aggregation interface and the routing table of the network device. When the member interface switches state and a member interface is physically DOWN, the entire aggregation group can still work. However, when other member interfaces receive messages to access the network device itself, if the messages need to be sent to the kernel network card corresponding to the member interface that is physically DOWN, the messages will be discarded, affecting the processing of the messages.

[0004] In order to solve the above technical problems, two technical solutions are provided in the related art. One is to bypass the kernel network card and use some open source protocol stacks to process the messages that need to be processed by the network device itself. However, the architecture of the open source protocol stack is complex. The other is to modify the MAC address information of the message and send the modified message to the kernel network card corresponding to the aggregation interface matching the modified MAC address information. However, this method requires multiple unpacking, assembly and modification of the message, which seriously affects the processing efficiency of the message. Summary of the invention

[0005] The present invention provides a network data processing method, apparatus, network equipment and storage medium to solve the technical problem of how to improve the processing efficiency of network equipment for network data that needs to be processed by itself while ensuring that the network data is not discarded when a member interface configured with an aggregate interface IP address is in an inactive state.

[0006] According to one aspect of the present invention, there is provided a network data processing method, which is applied to a network device, and the method comprises:

[0007] When receiving network data, determining a data type of the network data; wherein the data type includes routed network data and non-routed network data;

[0008] When the network data is non-routing network data, determining the physical state of a first member interface in the aggregation interface of the network device; wherein the physical state includes an active state and an inactive state; and the first member interface is a member interface configured with an aggregation interface IP address;

[0009] When the first member interface is in an inactive state, the network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface, so that the kernel network card corresponding to the second member interface processes the network data; wherein, the second member interface is any member interface in the aggregation interface that is in an active state.

[0010] According to another aspect of the present invention, there is provided a network data processing device, which is applied to a network device, and the device comprises:

[0011] A data type determination module, used for determining the data type of the network data when receiving the network data; wherein the data type includes routing network data and non-routing network data;

[0012] A physical state determination module, used for determining the physical state of a first member interface in the aggregation interface of the network device when the network data is non-routing network data; wherein the physical state includes an active state and an inactive state; and the first member interface is a member interface configured with an aggregation interface IP address;

[0013] A network data sending module is used to send the network data to the kernel network card corresponding to the second member interface through the aggregation interface when the first member interface is in an inactive state, so that the kernel network card corresponding to the second member interface processes the network data; wherein the second member interface is any member interface in the aggregation interface that is in an active state.

[0014] According to another aspect of the present invention, a network device is provided, the network device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the network data processing method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the network data processing method described in any embodiment of the present invention when executed.

[0019] The network data processing scheme of the embodiment of the present invention, when receiving network data, determines the data type of the network data; wherein the data type includes routing network data and non-routing network data; when the network data is non-routing network data, determines the physical state of the first member interface in the aggregation interface of the network device; wherein the physical state includes active state and inactive state; the first member interface is a member interface configured with the aggregation interface IP address; when the first member interface is inactive, the network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface, so that the kernel network card corresponding to the second member interface processes the network data; wherein the second member interface is any member interface in the aggregation interface that is in active state. The technical solution provided by the embodiment of the present invention solves the technical problem that the network data is discarded when the member interface configured with the aggregation interface IP address is inactive, not only does it not need to develop an open source protocol stack with a complex architecture, but it also does not need to modify the received network data, nor does it need to rebind the aggregation group, avoiding the phenomenon of interface physical state switching during re-aggregation, which can greatly improve the processing efficiency of the network device for the network data that it needs to process.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flow chart of a network data processing method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flow chart of a network data processing method provided according to Embodiment 2 of the present invention;

[0024] Figure 3A system architecture diagram based on DPDK provided in an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of the structure of a network data processing device provided according to Embodiment 3 of the present invention;

[0026] Figure 5 It is a schematic diagram of the structure of a network device for implementing the network data processing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Figure 1 A flowchart of a network data processing method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of processing network data. The method can be executed by a network data processing device. The network data processing device can be implemented in the form of hardware and / or software. The network data processing device can be configured in a network device. Figure 1 As shown, the method includes:

[0030] S110. When receiving network data, determine the data type of the network data; wherein the data type includes routing network data and non-routing network data.

[0031] Among them, network equipment is a dedicated hardware device used to connect various servers, PCs, application terminals and other nodes to form an information communication network. Network equipment can include switches, routers, firewalls, bridges, hubs, gateways, VPN servers, network interface cards, wireless access points, modems, 5G base stations, optical terminals, optical transceivers, optical cables, etc.

[0032] In an embodiment of the present invention, a network device receives network data sent by other network devices in real time, wherein the network data may be a network data packet, for example, the network data is a data message. The received network data is analyzed to determine the quantity and type of the network data. The data types include routing network data and non-routing network data, wherein routing network data refers to network data that needs to be forwarded to other devices, and non-routing network data refers to network data that needs to be processed by the network device itself. Exemplarily, the network data includes a data type identifier, and the data type of the network data is determined according to the data type identifier. It should be noted that the embodiment of the present invention does not limit the method for determining the data type of the network data.

[0033] S120. When the network data is non-routing network data, determine the physical state of the first member interface in the aggregate interface of the network device; wherein the physical state includes an active state and an inactive state; and the first member interface is a member interface configured with an aggregate interface IP address.

[0034] In an embodiment of the present invention, the DPDK in the network device provides a kernel NIC interface (KNI) and a Bond interface. Among them, the communication between the DPDK application and the kernel can be realized through the KNI interface, that is, the message can be sent to the kernel protocol stack for processing through the KNI interface. The Bond interface can be understood as an aggregated interface after aggregating and binding multiple network interfaces. Using DPDK, an aggregation group is created, and the physical interface is added to the aggregation group. The member interfaces under the aggregation group can send and receive messages. When the aggregation group performs three-layer forwarding, the IP address is configured on the aggregation interface, and while configuring the IP address for the aggregation interface, the same IP address is configured for any member interface of the aggregation interface to guide the aggregation group to perform three-layer forwarding. When the aggregation group is created, the MAC address of the member interface configured with the IP address is used as the MAC address of the aggregation port. Optionally, the network device can create one or more aggregation groups through DPDK, so there are one or more corresponding aggregation interfaces.

[0035] Optionally, determining the type of the network data includes: parsing the network data to determine the target IP address of the network data; when the target IP address is consistent with the aggregate interface IP address, determining that the network data is non-routing network data; when the target IP address is inconsistent with the aggregate interface IP address, determining that the network data is routing network data. Specifically, the network data is parsed to determine the IP address in the network data, and the IP address parsed from the network data is referred to as the target IP address. Among all the aggregate interfaces of the network device, the aggregate interface whose MAC address is the same as the MAC address parsed from the network data is searched as the target aggregate interface. Then, the aggregate interface IP address of the target aggregate interface is further obtained, wherein the aggregate interface IP address is the IP address pre-configured on the target aggregate interface. Determine whether the target IP address parsed from the network data is consistent with the aggregate interface IP address. If so, it means that the network data is non-routing network data, that is, the network device itself needs to process the network data. Otherwise, it is determined that the network data is routing network data, that is, the network data is network data to be forwarded, and the network device needs to forward the network data to other devices without the network device processing the network data.

[0036] When it is determined that the network data is non-routing network data, the first member interface configured with the aggregate interface IP address is determined from each member interface of the aggregate interface, and the physical state of the first member interface is determined, wherein the physical state includes an active state (also referred to as an UP state) and an inactive state (also referred to as a DOWN state). The active state can be understood as the interface being in a working state and being able to send and receive data normally, and the inactive state can be understood as the interface being in a fault state or a backup state and being unable to send and receive data normally.

[0037] S130. When the first member interface is in an inactive state, the network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface, so that the kernel network card corresponding to the second member interface processes the network data; wherein, the second member interface is any member interface in the aggregation interface that is in an active state.

[0038] In an embodiment of the present invention, when the first member interface is in an inactive state, a target member interface whose physical state is active is searched from all member interfaces of the aggregated interface, and a second member interface is determined from the target member interfaces whose physical state is active. Among them, a member interface can be randomly selected from the target member interfaces as the second member interface, or a member interface can be determined from the target member interfaces as the second member interface according to a preset rule. Then, the network device sends the network data to the kernel network card corresponding to the second member interface through the aggregated interface, so that the kernel network card corresponding to the second member interface processes the network data. For example, the network data can be processed based on the kernel protocol stack on the kernel network card corresponding to the second member interface.

[0039] Optionally, when the first member interface is in an inactive state, the network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface, including: when the first member interface is in an inactive state, migrating the aggregation interface IP address to the second member interface in the aggregation interface, and updating the initial physical address of the aggregation interface based on the target physical address of the kernel network card corresponding to the second member interface; sending the network data to the kernel network card corresponding to the second member interface through the aggregation interface.

[0040] Exemplarily, when the first member interface is inactive, the aggregate interface IP address (i.e., the IP address configured by the aggregate interface) is migrated to the second member interface. It is understandable that the aggregate interface IP address is reconfigured on the second member interface, and the target physical address (i.e., the target MAC address) of the kernel network card corresponding to the second member interface is obtained, and then the initial physical address of the aggregate interface is updated based on the target physical address. It is understandable that the initial physical address of the aggregate interface is changed from the initial physical address to the target physical address. In an embodiment of the present invention, the configured MAC addresses of all member interfaces of the aggregate interface can also be updated to the target physical address. Then, the network data is sent to the kernel network card corresponding to the second member interface through the aggregate interface.

[0041] Optionally, after updating the initial physical address of the aggregate interface based on the target physical address of the kernel network card corresponding to the second member interface, it also includes: generating a physical address update message, and sending the physical address update message to the opposite network device; wherein the physical address update information is used to instruct the opposite network device to update a pre-stored Address Resolution Protocol (ARP) table based on the target physical address, the ARP table being a correspondence table between the physical address of the aggregate interface and the IP address, and the opposite network device is a network device used to send the network data.

[0042] Exemplarily, after updating the initial physical address of the aggregate interface based on the target physical address of the kernel network card corresponding to the second member interface, a physical address update message is generated, for example, the physical address update message can be an ARP message, and the ARP message is sent to the peer network device. The peer network device is a network device for sending network data. The peer network device updates a pre-stored ARP table based on the ARP message, wherein the ARP table is a correspondence table between the physical address of the aggregate interface and the IP address. It can be understood that the initial physical address of the aggregate interface in the ARP table is updated to the target physical address corresponding to the second member. The advantage of such a setting is that the peer network device can be instructed to send subsequent network data to be processed based on the updated ARP table.

[0043] The network data processing method of the embodiment of the present invention, when receiving network data, determines the data type of the network data; wherein the data type includes routing network data and non-routing network data; when the network data is non-routing network data, determines the physical state of the first member interface in the aggregation interface of the network device; wherein the physical state includes active state and inactive state; the first member interface is a member interface configured with the aggregation interface IP address; when the first member interface is inactive, the network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface, so that the kernel network card corresponding to the second member interface processes the network data; wherein the second member interface is any member interface in the aggregation interface that is in active state. The technical solution provided by the embodiment of the present invention solves the technical problem that the network data is discarded when the member interface configured with the aggregation interface IP address is inactive, not only does it not need to develop an open source protocol stack with a complex architecture, but it also does not need to modify the received network data, nor does it need to rebind the aggregation group, avoiding the phenomenon of interface physical state switching during re-aggregation, which can greatly improve the processing efficiency of the network device for the network data that it needs to process.

[0044] In some embodiments, it also includes: when the network data is routing network data, obtaining a pre-stored routing table; wherein the routing table is a correspondence table between IP addresses and network devices; based on the routing table, searching for a target device whose IP address is consistent with the target IP address of the network data, and forwarding the network data to the target device. Exemplarily, when the target IP address parsed from the network data is inconsistent with the aggregate interface IP address, it is determined that the network data is routing network data. At this time, obtaining a pre-stored routing table in the network device, wherein the routing table is a correspondence table between IP addresses and network devices. Searching for a target device whose IP address is consistent with the target IP address in the routing table, and then the network device forwards the network data to the target device. For example, the network data can be forwarded to the target device via an aggregate interface.

[0045] In some embodiments, it also includes: when the first member interface is in an active state, the network data is sent to the kernel network card corresponding to the first member interface through the aggregation interface, so that the kernel network card corresponding to the first member processes the network data. Exemplarily, when the first member interface is in an active state, it means that the kernel network card corresponding to the first member interface will not discard the network data. At this time, the network data is sent to the kernel network card corresponding to the first member interface through the aggregation interface, so that the kernel network card corresponding to the first member interface processes the network data. For example, the network data can be processed based on the kernel protocol stack on the kernel network card corresponding to the first member interface.

[0046] In some embodiments, after sending the network data to the kernel network card corresponding to the second member interface through the aggregation interface so that the kernel network card corresponding to the second member interface processes the network data, it also includes: the kernel network card corresponding to the second member interface sends response data to the opposite network device; wherein the response data includes the target physical address of the kernel network card corresponding to the second member interface, and the opposite network device is a network device for sending the network data. Exemplarily, after the kernel network card corresponding to the second member interface processes the network data, it generates response data for the network data based on the processing result, and feeds back the response data to the opposite network device. wherein the response data includes the target physical address of the kernel network card corresponding to the second member interface.

[0047] Embodiment 2

[0048] Figure 2 A flowchart of a network data processing method provided in Embodiment 2 of the present invention is shown in FIG. Figure 2 As shown, the method includes:

[0049] S210. When network data is received, the network data is parsed to determine a target IP address and a target MAC address of the network data.

[0050] S220. Determine a target aggregate interface according to the target MAC address, and obtain an aggregate interface IP address of the target aggregate interface, wherein the target aggregate interface is an aggregate interface with a pre-configured MAC address that is the same as that of the target aggregate interface.

[0051] S230. Determine whether the target IP address is consistent with the aggregate interface IP address. If so, execute S240; otherwise, execute S2100.

[0052] S240, determining whether the physical state of the first member interface in the target aggregate interface is active, if so, executing S290, otherwise, executing S250.

[0053] The physical state includes an active state and an inactive state, and the first member interface is a member interface configured with an aggregate interface IP address.

[0054] S250: Migrate the aggregate interface IP address to the second member interface in the target aggregate interface, and update the initial physical address of the target aggregate interface based on the target physical address of the kernel network card corresponding to the second member interface.

[0055] S260. Send the network data to the kernel network card corresponding to the second member interface through the target aggregation interface, so that the kernel network card corresponding to the second member processes the network data.

[0056] S270. The kernel network card corresponding to the second member interface sends response data to the opposite network device; wherein the response data includes the target physical address of the kernel network card corresponding to the second member interface, and the opposite network device is a network device used to send the network data.

[0057] S280. Generate a physical address update message, and send the physical address update message to the peer network device; wherein the physical address update information is used to instruct the peer network device to update a pre-stored Address Resolution Protocol ARP table based on the target physical address, the ARP table is a correspondence table between the physical address and the IP address of the aggregation interface, and the peer network device is a network device used to send the network data.

[0058] S290. Send the network data to the kernel network card corresponding to the first member interface through the target aggregation interface, so that the kernel network card corresponding to the first member processes the network data.

[0059] S2100. Obtain a pre-stored routing table; wherein the routing table is a correspondence table between IP addresses and network devices.

[0060] S2110. Search for a target device whose IP address is consistent with the target IP address based on the routing table, and forward the network data to the target device.

[0061] For example, Figure 3 A system architecture diagram based on DPDK provided in an embodiment of the present invention. Figure 3 As shown in the figure, the Bond interface provided by DPDK isolates the aggregation interface corresponding to the aggregation group from the underlying physical interface by creating an aggregation group, and unbinds the driver layer of the underlying kernel network card and the upper network layer (also called the business layer).

[0062] Taking the physical interfaces PORT1, PORT2, and PORT3 as examples, when these three physical interfaces are used as independent service interfaces, IP can be configured separately and three-layer forwarding can be completed. These three physical interfaces have different MAC addresses, and when receiving messages to be forwarded or sent to the KNI interface, they can all be processed normally. Table 1 is a configuration information table before physical interface aggregation provided by an embodiment of the present invention:

[0063] Table 1 Configuration information before physical interface aggregation

[0064]

[0065] After creating an aggregation group based on DPDK, the physical interfaces PORT1, PORT2, and PORT3 are aggregated to generate an aggregation interface TRUNK, and the IP address configured for the aggregation interface TRUNK is configured on the kernel network card corresponding to the member interface PORT1. At the same time, the MAC address of the kernel network card corresponding to the member interface PORT1 is used as the MAC address of the entire aggregation group, and the MAC address of each member interface under the aggregation group is updated based on the MAC address of the aggregation group configured by DPDK. At the business level, each member interface uses the same interface MAC address and appears to be the same interface to the outside world. Table 2 is a physical interface aggregation configuration information table provided in an embodiment of the present invention:

[0066] Table 2 Physical interface aggregation configuration information

[0067]

[0068]

[0069] When the physical interface under the aggregation group receives a message, if the destination IP address of the message is inconsistent with the IP address of the aggregation interface, a route search is performed, for example, a target device whose IP address is consistent with the destination IP address of the message is searched according to the pre-stored routing table, and the message is forwarded to the target device. If the destination IP address of the message is consistent with the IP address of the aggregation interface, the message is sent through the aggregation interface to the kernel network card corresponding to the member interface configured with the IP address of the aggregation interface, and the kernel network card processes the message.

[0070] For example, when member interfaces PORT1, PORT2, and PORT3 receive a message with a target IP address of 10.2.1.1, they all determine that the message is an address message for accessing themselves. The message is sent to the kernel network card corresponding to member interface PORT1 for processing. After the kernel network card corresponding to member interface PORT1 completes processing of the message, if a response message needs to be sent, a response message is generated and sent to the peer network device through the kernel network card corresponding to member interface PORT1, wherein the source MAC address of the response message uses the MAC address of the kernel network card corresponding to member interface PORT1.

[0071] When member interface PORT1 is DOWN for some reason, and the network device detects that the physical state of member interface PORT1 is in the DOWN state, since member interface PORT1 is a physical interface configured with the aggregate interface IP address, at this time, the IP address configured on the member interface PORT1 (that is, the aggregate interface IP address) is migrated. Specifically, the aggregate interface IP address is reconfigured on a network card that can work normally.

[0072] Exemplarily, when the physical state of the member interface PORT2 is detected to be UP (i.e., active state, also referred to as normal state), the IP address of the aggregation interface is reconfigured on the member interface PORT2. After the IP address migration is successful, the MAC address of the kernel network card corresponding to the member interface PORT2 is obtained, and the MAC address of the aggregation interface TRUNK is updated to the MAC address of the kernel network card corresponding to the member interface PORT2. Table 3 is a configuration information table after the physical interface address information is updated according to an embodiment of the present invention:

[0073] Table 3 Configuration information table after physical interface address information is updated

[0074]

[0075] The local network device sends an ARP message to the peer network device, so that the peer network device updates the pre-stored ARP according to the received ARP message. Specifically, the peer network device updates the MAC address of the aggregation interface in the ARP table to 6C:F1:7E:9C:00:C8 based on the ARP message. When the peer network device subsequently sends other messages that need to be processed by the local network device itself (that is, non-routing messages) to the local network device, they are all sent to the kernel network card corresponding to member PORT2.

[0076] Embodiment 3

[0077] Figure 4 A schematic diagram of the structure of a network data processing device provided in Embodiment 3 of the present invention.

[0078] like Figure 4 As shown, the device comprises:

[0079] The data type determination module 410 is used to determine the data type of the network data when receiving the network data; wherein the data type includes routing network data and non-routing network data;

[0080] A physical state determination module 420, configured to determine the physical state of a first member interface in an aggregate interface of the network device when the network data is non-routing network data; wherein the physical state includes an active state and an inactive state; and the first member interface is a member interface configured with an aggregate interface IP address;

[0081] The network data sending module 430 is used to send the network data to the kernel network card corresponding to the second member interface through the aggregation interface when the first member interface is in an inactive state, so that the kernel network card corresponding to the second member interface processes the network data; wherein the second member interface is any member interface in the aggregation interface that is in an active state.

[0082] Optionally, the network data sending module is used to:

[0083] When the first member interface is in an inactive state, the IP address of the aggregate interface is migrated to the second member interface in the aggregate interface, and based on the target physical address of the kernel network card corresponding to the second member interface, the initial physical address of the aggregate interface is updated;

[0084] The network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface.

[0085] Optionally, also include:

[0086] A physical address update message sending module is used to generate a physical address update message after updating the initial physical address of the aggregate interface based on the target physical address of the kernel network card corresponding to the second member interface, and send the physical address update message to the opposite network device; wherein the physical address update information is used to instruct the opposite network device to update a pre-stored Address Resolution Protocol ARP table based on the target physical address, the ARP table being a correspondence table between the physical address of the aggregate interface and the IP address, and the opposite network device is a network device used to send the network data.

[0087] Optionally, the data type determination module is used to:

[0088] Parsing the network data to determine the target IP address of the network data;

[0089] When the target IP address is consistent with the aggregation interface IP address, determining that the network data is non-routing network data;

[0090] When the target IP address is inconsistent with the aggregation interface IP address, it is determined that the network data is routing network data.

[0091] Optionally, the device further comprises:

[0092] A routing table acquisition module, used for acquiring a pre-stored routing table when the network data is routing network data; wherein the routing table is a correspondence table between IP addresses and network devices;

[0093] The network data forwarding module is used to search for a target device whose IP address is consistent with the target IP address of the network data based on the routing table, and forward the network data to the target device.

[0094] Optionally, the device further comprises:

[0095] The network data processing module is used to send the network data to the kernel network card corresponding to the first member interface through the aggregation interface when the first member interface is in an active state, so that the kernel network card corresponding to the first member processes the network data.

[0096] Optionally, the device further comprises:

[0097] A response data sending module is used to send the network data to the kernel network card corresponding to the second member interface through the aggregation interface, so that after the kernel network card corresponding to the second member interface processes the network data, the kernel network card corresponding to the second member interface sends response data to the opposite network device; wherein the response data includes the target physical address of the kernel network card corresponding to the second member interface, and the opposite network device is a network device used to send the network data.

[0098] The network data processing device provided in the embodiment of the present invention can execute the network data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0099] Embodiment 4

[0100] Figure 5 A schematic diagram of a network device 10 that can be used to implement an embodiment of the present invention is shown. The network device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The network device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0101] like Figure 5 As shown, the network device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the network device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0102] A number of components in the network device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the network device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a network data processing method.

[0104] In some embodiments, the network data processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the network device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the network data processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the network data processing method in any other appropriate manner (e.g., by means of firmware).

[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0107] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on a network device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the network device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A network data processing method, characterized in that: Applied to a network device, the method comprises: When receiving network data, determining a data type of the network data; wherein the data type includes routed network data and non-routed network data; When the network data is non-routing network data, determining the physical state of a first member interface in the aggregation interface of the network device; wherein the physical state includes an active state and an inactive state; and the first member interface is a member interface configured with an aggregation interface IP address; When the first member interface is in an inactive state, the network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface, so that the kernel network card corresponding to the second member interface processes the network data; wherein, the second member interface is any member interface in the aggregation interface that is in an active state.

2. The method according to claim 1, characterized in that When the first member interface is in an inactive state, sending the network data to a kernel network card corresponding to the second member interface through the aggregation interface includes: When the first member interface is in an inactive state, the IP address of the aggregate interface is migrated to the second member interface in the aggregate interface, and based on the target physical address of the kernel network card corresponding to the second member interface, the initial physical address of the aggregate interface is updated; The network data is sent to the kernel network card corresponding to the second member interface through the aggregation interface.

3. The method according to claim 2, characterized in that After updating the initial physical address of the aggregation interface based on the target physical address of the kernel network card corresponding to the second member interface, the method further includes: Generate a physical address update message and send the physical address update message to the opposite network device; wherein the physical address update information is used to instruct the opposite network device to update a pre-stored Address Resolution Protocol ARP table based on the target physical address, the ARP table being a correspondence table between the physical address of the aggregation interface and the IP address, and the opposite network device is a network device used to send the network data.

4. The method according to claim 1, characterized in that Determine the type of the network data, including: Parsing the network data to determine the target IP address of the network data; When the target IP address is consistent with the aggregation interface IP address, determining that the network data is non-routing network data; When the target IP address is inconsistent with the aggregation interface IP address, it is determined that the network data is routing network data.

5. The method according to claim 1, characterized in that Also includes: When the network data is routing network data, obtaining a pre-stored routing table; wherein the routing table is a correspondence table between IP addresses and network devices; A target device whose IP address is consistent with the target IP address of the network data is searched based on the routing table, and the network data is forwarded to the target device.

6. The method according to claim 1, characterized in that Also includes: When the first member interface is in an active state, the network data is sent to the kernel network card corresponding to the first member interface through the aggregation interface, so that the kernel network card corresponding to the first member processes the network data.

7. The method according to claim 1, characterized in that After sending the network data to the kernel network card corresponding to the second member interface through the aggregation interface so that the kernel network card corresponding to the second member interface processes the network data, the method further includes: The kernel network card corresponding to the second member interface sends response data to the opposite network device; wherein the response data includes the target physical address of the kernel network card corresponding to the second member interface, and the opposite network device is a network device used to send the network data.

8. A network data processing device, characterized in that: Applied to network equipment, the device comprises: A data type determination module, used for determining the data type of the network data when receiving the network data; wherein the data type includes routing network data and non-routing network data; A physical state determination module, used for determining the physical state of a first member interface in the aggregation interface of the network device when the network data is non-routing network data; wherein the physical state includes an active state and an inactive state; and the first member interface is a member interface configured with an aggregation interface IP address; A network data sending module is used to send the network data to the kernel network card corresponding to the second member interface through the aggregation interface when the first member interface is in an inactive state, so that the kernel network card corresponding to the second member interface processes the network data; wherein the second member interface is any member interface in the aggregation interface that is in an active state.

9. A network device, characterized in that: The network equipment includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the network data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the network data processing method according to any one of claims 1 to 7 when executed.