Container network-based message processing method and device, and medium

By introducing hardware uninstallation function into the container network, the container network interface plug-in generates and issues forwarding flow tables, solving the problem of fast and slow path switching in the container network, realizing high-performance packet forwarding, and improving CPU usage and Forwarding performance.

CN119030923APending Publication Date: 2024-11-26BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162766.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the container network scenario, the switching of fast and slow paths cannot be achieved, resulting in the inability to leverage the technical advantages of the high-performance network forwarding architecture.

Method used

By introducing hardware offloading function into network devices, the container network interface plug-in generates and issues forwarding flow tables in the user state, so that the hardware data plane can directly forward messages, realizing the construction of fast paths.

Benefits of technology

High-performance message forwarding function is implemented in the container network, which improves forwarding performance, saves overhead of messages in the kernel state, and improves the CPU usage rate of the entire machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030923A_ABST
    Figure CN119030923A_ABST
Patent Text Reader

Abstract

The invention discloses a message processing method and device based on a container network and a medium, in the container network, for a software data surface which runs in a kernel mode in a network device and cannot directly issue a forwarding flow table to a hardware data surface on the network device. The software data plane triggers a container network interface plug-in to generate a forwarding flow table in a mode of sending forwarding information required for generating the forwarding flow table to the container network interface plug-in running in a user mode in the network equipment, and sends the forwarding flow table to the hardware data plane, so that a subsequent message can be forwarded through the hardware data plane, and the forwarding flow table can be forwarded through the hardware data plane. The fast and slow path architecture with high-performance forwarding is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device and medium for processing a message based on a container network. Background Art

[0002] The fast and slow paths are a common high-performance network forwarding architecture. In the scenario of software and hardware combined, the slow path runs on the user-mode software data plane and the fast path runs on the hardware data plane. When the network device forwards a message, if the message cannot match the forwarding flow table on the current hardware data plane, the message will be sent to the software data plane for forwarding. If the software data plane wants subsequent messages to go directly to the hardware data plane, the corresponding forwarding flow table will be sent down to the hardware data plane so that subsequent messages can be directly forwarded by hardware acceleration.

[0003] However, it is currently impossible to switch between fast and slow paths in container network scenarios, and the technical advantages of this high-performance network forwarding architecture cannot be brought into play. Therefore, how to achieve high-performance network forwarding functions in container network scenarios is a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a message processing method, device and medium based on a container network, so as to introduce a hardware offloading function in a container scenario so as to realize the switching of fast and slow paths.

[0005] To achieve the above purpose, the technical solutions provided by the embodiments of the present application are as follows:

[0006] In a first aspect of the present application, a method for processing a message based on a container network is provided, the method comprising:

[0007] Sending a first message to a first forwarding component in kernel state mounted on the first network device through a first container on the first network device;

[0008] Sending the first message to the first network card on the first network device through the first forwarding component, and sending the first message to the second network device through the first network card;

[0009] Determine, by the first forwarding component, first forwarding information required to forward the first message according to the first message, and send the first forwarding information to a first container network interface plug-in in user mode mounted on the first network device;

[0010] Determine a forwarding flow table according to the first forwarding information through the first container network interface plug-in, and send the forwarding flow table to the first network card, where the forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card.

[0011] In a second aspect of the present application, a network device is provided, the network device being a first network device, the network device comprising: a first container, a first forwarding component, a first container network interface plug-in, and a first network card; wherein the first forwarding component is mounted in the kernel state of the first network device, and the first container network interface plug-in is mounted in the user state of the first network device;

[0012] The first container is used to send a first message to the first forwarding component;

[0013] The first forwarding component is used to send the first message to the first network card;

[0014] The first network card is used to send the first message to the second network device;

[0015] The first forwarding component is used to determine first forwarding information required to forward the first message according to the first message, and send the first forwarding information to the first container network interface plug-in;

[0016] The first container network interface plug-in is used to determine a forwarding flow table according to the first forwarding information, and send the forwarding flow table to the first network card, where the forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card.

[0017] In the third aspect of the present application, an electronic device is provided, comprising: a processor and a memory; the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes the method described in the first aspect or the second aspect.

[0018] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a device, the device executes the method described in the first aspect or the second aspect.

[0019] In a fifth aspect of the present application, a computer program product is provided, wherein the computer program product comprises a computer program / instructions, and when the computer program / instructions are executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0020] It can be seen that the embodiments of the present application have the following beneficial effects:

[0021] In the present application, when the first container in the first network device sends a first message to the outside, the first container first sends the first message to the first forwarding component mounted in the kernel state of the first network device. Since the first forwarding component includes a forwarding flow table used to forward the first message, after receiving the first message, the first forwarding component sends the first message to the first network card according to the forwarding flow table, and forwards the first message to the second network device through the first network card. At the same time, the first forwarding component sends the first forwarding information required to forward the first message to the first container network interface plug-in in the user state mounted on the first network device, and the first container network interface plug-in determines the forwarding flow table based on the first forwarding information, and sends the forwarding flow table to the first network card on the first network device, so that the first network card can know how to forward the subsequent messages corresponding to the first message to the outside. Among them, the forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card. That is, after receiving the first message, the first forwarding component is triggered to send the forwarding information required to forward the first message to the first container network interface plug-in, so that the first container network interface plug-in generates a corresponding forwarding flow table based on the forwarding information, and sends the forwarding flow table to the first network card to complete the construction of the fast path.

[0022] Through the technical solution provided by this application, in the container network, for the software data plane running in kernel state in the network device that cannot directly send the forwarding flow table to the hardware data plane on the network device, the software data plane sends the forwarding information required to generate the forwarding flow table to the container network interface plug-in running in user state in the network device, triggers the container network interface plug-in to generate the forwarding flow table, and sends the forwarding flow table to the hardware data plane, completing the construction of the fast path, so that subsequent messages can be directly forwarded through the hardware data plane, so that the container network has a high-performance forwarding function. At the same time, through this technical solution, there is no need to introduce more functional modules, and it can be achieved only through communication between basic network elements in the container network scenario. The implementation method is simple, reliable and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1a A schematic diagram of a fast and slow path forwarding architecture;

[0025] Figure 1b This is a schematic diagram of container network forwarding;

[0026] Figure 1c Forwarding intent for another container network;

[0027] Figure 2 A flow chart of a method for processing messages based on a container network provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of fast and slow path forwarding in a container network provided in an embodiment of the present application;

[0029] Figure 4 A flowchart of another method for processing packets based on a container network provided in an embodiment of the present application;

[0030] Figure 5 A container network provided in an embodiment of the present application constructs multiple forwarding flows;

[0031] Figure 6 A network device structure diagram provided for an embodiment of the present application;

[0032] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0034] In non-container networks, the corresponding fast and slow path switching methods are as follows: Figure 1a As shown in the figure, the software data plane sends a forwarding flow table to the hardware data plane to build a fast path. For subsequent traffic, it can be directly forwarded through the hardware data plane along the fast path.

[0035] In the container network, the container is virtualized by the host machine, not a real network device, and cannot be addressed by the external network. If you want to be accessible by the external network, you need to configure the mapping relationship between the container port and the host port. The container network refers to the key component for achieving efficient, reliable and secure communication between containers. By using a matching network architecture, it can better manage the communication and connection between containers and provide a stable operating environment for applications.

[0036] Currently, the data plane of the container network mainly uses the Extended Berkeley Packet Filter (eBPF) technology, so that the outbound traffic in the container passes through a customized eBPF program to implement the corresponding message processing. For example, Figure 1b As shown in the figure, the upper-layer application generates a data packet, and the container forwards the data packet from the virtual network card to the software data plane eBPF module through the socket. The eBPF module processes the message and forwards it to other devices through the host's physical network card by redirecting it.

[0037] However, in the data plane of the container network, the eBPF module is mounted in the kernel as a software data plane. In order to implement a fast-slow path architecture with high-performance forwarding, the software data plane of the container network needs to send the forwarding flow table used by the forwarding message to the hardware (the host's physical network card). However, since the eBPF module runs in the kernel, it is limited by the kernel and cannot send the forwarding flow table to the hardware. For example Figure 1c As shown in the figure, the container first sends the first packet of the traffic to the hardware data plane. After the hardware data plane cannot match the forwarding flow table, it sends the first packet of the traffic to the eBPF module and informs it that there is no forwarding flow table. After receiving the first packet of the traffic, the eBPF module sends it out according to the forwarding flow table stored in itself. However, due to the limitation of the kernel, the eBPF module cannot send the forwarding flow table to the hardware data plane.

[0038] In order to meet the demand for hardware unloading in a container network, the present application provides a method for message processing based on a container network. When a container in a network device receives the first packet of a service to be processed, the container sends the message to a forwarding component in the network device. After the forwarding component processes the message, it forwards it through the physical network card of the network device. At the same time, the forwarding component determines the forwarding information required to process the message, and sends the forwarding information to the container network interface plug-in running in the user state of the network device. The container network interface plug-in determines the forwarding flow table required to process the message based on the forwarding information, and sends the forwarding flow table to the physical network card of the network device, so that the physical network card has the ability to process messages, thereby establishing a fast path for message forwarding and improving message forwarding performance. Moreover, this implementation method only requires minimal changes to the original first forwarding component to ensure the stability of the original functions of the network device.

[0039] To facilitate understanding of the technical solution of the present application, the technical terms involved in the present application will be explained below.

[0040] User state and kernel state are two operating states of the operating system.

[0041] Kernel state: The CPU in kernel state can access any data, including peripheral devices such as network cards, hard disks, etc., and the CPU in kernel state can switch from one program to another, and there will be no preemption of the CPU, and it is generally at a privileged level.

[0042] User state: The CPU in user state can only access restricted resources and cannot directly access hardware devices such as memory. It must enter the kernel through system calls to access privileged resources.

[0043] Hardware offloading refers to the transfer of certain tasks or calculations from the computer's main processor (CPU) to dedicated hardware components, such as network interface cards (NICs), to improve system performance and efficiency. Among them, network interface cards are referred to as network cards or physical network cards.

[0044] Containers do not run directly on the host machine, but in an isolated environment of the host machine. This isolated environment is achieved through virtualization technology, including the use of virtual network cards. The network communication of containers is mainly carried out through virtual network cards, which allow containers to communicate with each other, between containers and the host machine, and between containers and external networks.

[0045] The container network interface (CNI) plug-in is mainly used to manage and configure the network connection of the container, including the creation and deletion of the corresponding network interface of the container, the allocation and recycling of Internet Protocol (IP) addresses and Media Access Control (MAC) addresses, and the configuration and cleanup of related network resources.

[0046] eBPF is a virtual machine technology running in the Linux kernel, which provides a flexible and secure way to extend kernel functions. eBPF provides a virtual machine in the kernel, allowing developers to run their own programs without modifying the kernel code, thereby achieving efficient processing of network packets.

[0047] The forwarding flow table is used to specify the forwarding path of the data packet. Each forwarding flow table consists of matching fields, operations and other information. The matching fields are used to specify the characteristics of the data packet, such as the source IP address, destination IP address, source port, destination port, etc. The operation refers to the behavior when matching the forwarding flow table, such as forwarding the data packet to a specific port, discarding the data packet, etc.

[0048] The technical solution provided by this application will be described below in conjunction with the accompanying drawings.

[0049] See also Figure 2, the figure shows a method for forwarding packets based on a container network provided by an embodiment of the present application, the method is applied to a first network device, the first network device includes a first container, a first forwarding component, a first CNI plug-in and a first network card. The first forwarding component is mounted in the kernel state of the first network device, and the first CNI plug-in is mounted in the user state of the first network device.

[0050] Specifically, the method includes:

[0051] S201: Send a first message to a first forwarding component through a first container.

[0052] In this embodiment, the first container obtains the first message generated by the upper layer application, and forwards the first message to the first forwarding component through its corresponding virtual network card. The first forwarding component includes a forwarding flow table corresponding to processing the first message.

[0053] S202: Send a first message to the first network card through the first forwarding component, and send the first message to the second network device through the first network card.

[0054] S203: Determine, by the first forwarding component, first forwarding information required for forwarding the first message according to the first message, and send the first forwarding information to the first CNI plug-in.

[0055] In this embodiment, the processing process of the first network device for the first message includes: after receiving the first message, the first forwarding component sends the first message to the second network device through the first network card according to the forwarding flow table corresponding to the first message. At the same time, the first forwarding component will determine the first forwarding information required to process the first message, and send the first forwarding information to the first CNI plug-in running in user mode. Among them, the first forwarding information includes key information required to generate the forwarding flow table, specifically, the network identification information of the first network device and the network identification information of the second network device. The network identification information is used to uniquely indicate a network device. For example, the first forwarding information may include one or more of the source IP address, source MAC address, source port, destination IP address, destination MAC address, destination port, etc.

[0056] For the first forwarding component running in kernel mode (such as Figure 1beBPF module in Linux), if there is a real-time event message that needs to be notified to the user-state program, the perf_event event mechanism can be used. Perf_event event is a mechanism for interaction between the kernel and user-state provided by the Linux system, mainly used for monitoring performance analysis in kernel state. That is, the eBPF module uses the perf_event event mechanism to communicate between the kernel module and the user-state program. Specifically, the eBPF module sends a message to the user-state program through perf_event, and needs to use a special map, namely the BPF_MAP_TYPE_PERF_EVENT_ARRAY type map, to carry the required first forwarding information through the map.

[0057] Therefore, in this embodiment, the first forwarding component fills the first forwarding information in the perf_event event, and sends the first forwarding information from the kernel to the user state through the perf_event event, thereby making up for the deficiency that the first forwarding component cannot directly send down the forwarding flow table.

[0058] It should be noted that the execution order of S202 and S203 is not subject to the above restrictions, and S203 may be executed first, then S202, or both may be executed simultaneously. That is, in this embodiment, the first message triggers the first forwarding component to send forwarding information to the first container network interface.

[0059] S203: Determine a forwarding flow table according to the first forwarding information through the first CNI plug-in, and send the forwarding flow table to the first network card.

[0060] In this embodiment, the first CNI plug-in monitors the perf_event event, and after monitoring the perf_event event, obtains the first forwarding information by parsing the event, and then obtains the forwarding flow table after parsing and processing the first forwarding information, and sends the forwarding flow table to the first network card. The forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card. The outbound message of the first container refers to the message sent outward by the first container, and the inbound message of the first container refers to the message received by the first container.

[0061] Specifically, the forwarding flow table includes a first forwarding flow table, which instructs the first network device to directly forward the outgoing message sent by the first container through the first network card, that is, it instructs the first network device to directly forward the outgoing message sent by the first container to the second network device through the first network card. , wherein the outgoing message sent by the first container belongs to the same service flow as the first message, the first message can be the first data packet of the service flow, and the outgoing message is the subsequent data packet of the service flow. That is, the sending time of the outgoing message is later than the first message, the first message is forwarded through the slow path, and the outgoing message can be forwarded through the fast path. That is, the first forwarding flow table indicates the fast path corresponding to the outward forwarding message of the first network device.

[0062] When the first network card receives the first forwarding flow table issued by the first CNI plug-in, the first container sends the second message to the first network card after receiving the second message, and the first network card sends the second message to the second network device according to the first forwarding flow table. The second message and the first message belong to the same service flow, that is, the second message belongs to the target message. That is, the second message is forwarded through the fast path.

[0063] It should be noted that in actual applications, the first network device can pre-configure the forwarding path of the message according to the application scenario requirements, such as configuring the message to be forwarded through a fast path or the message to be forwarded through a slow path. After receiving the second message sent by the container, the hardware data plane determines the forwarding method of the second message according to the configuration information. If the forwarding method is forwarding through a fast path, it can be forwarded directly through the first network card; if the forwarding method is forwarding through a slow path, the second message is sent to the first forwarding component, and the first forwarding component sends the second message to the first network card to be forwarded outward through the first network card.

[0064] For example, Figure 3 The framework diagram of the first network card obtaining the first forwarding flow table shown in FIG. Figure 3As shown, the first message in the business flow is sent by the container through the virtual network card eh0 to the first forwarding component. After receiving the first message, the first forwarding component will trigger the first forwarding component to send the first forwarding information to the first CNI plug-in through the perf_event event. The first CNI plug-in generates a first forwarding flow table based on the first forwarding information, and sends the first forwarding flow table to the physical network card of the hardware data plane. At the same time, the first forwarding component sends the received first message to the physical network card to forward it to other devices through the physical network card. When the container obtains the second message, the container directly forwards the second message to the physical network card located on the hardware data plane, and the physical network card processes the second message using the first forwarding flow table. It can be seen that the above scheme can realize the eBPF data plane indirectly sending the forwarding flow table to the hardware, thereby adding a fast path based on hardware offloading to the container network, greatly optimizing the message forwarding performance of the container network, and saving the message overhead in the kernel state.

[0065] In this embodiment, a fast path for the first network device to send a message to the second network device can be constructed through the first forwarding flow table. To further improve the message processing performance, the first network device can also send the message to the target container through the fast path after receiving the message sent by the second network device.

[0066] Based on this, the first CNI plug-in can also generate a second forwarding flow table according to the first forwarding information, and send the second forwarding flow table to the first network card, the second forwarding flow table instructs the first network device to directly forward the incoming message sent by the second network device through the first network card, that is, the second forwarding flow table instructs the first network device to directly send the message sent by the second network device to the first container through the first network card, without passing through the first forwarding component, thereby improving the forwarding performance of the message. That is, in this implementation, the first forwarding information also includes the forwarding information required to generate the second forwarding flow table.

[0067] After receiving the third message sent by the second network device, the first network card directly sends the third message to the first container using the second forwarding flow table to achieve fast forwarding. The third message is a message sent by the second network device for the service flow corresponding to the first message.

[0068] It should be noted that after receiving the third message sent by the second network device, the first network card can also forward it according to the pre-configured forwarding method. For example, if the forwarding method is forwarding through a slow path, the first network card sends the third message to the first forwarding component, which then sends it to the first container. If the forwarding method is forwarding through a fast path, the first network card directly sends the third message to the first container according to the second forwarding flow table.

[0069] In this embodiment, when the first network device and the second network device communicate, the communication protocol used can be configured according to actual application conditions, for example, a Network Address Translation (NAT) protocol or an overlay protocol can be configured.

[0070] When the protocol used when the first network device communicates with the second network device is a first type of communication protocol, the source IP address, source port, destination IP address and destination port may need to be modified when the message is transmitted using this type of communication protocol. For example, when performing address conversion in the NAT protocol, it is necessary to convert the virtual source IP address (IP address corresponding to the container) into a real IP address (IP address of the physical network card corresponding to the host), and convert the virtual source port into a real port. In response to this situation, the first forwarding component needs to write the source and destination (IP and port) information to be modified into the pref_event event, so that the first CNI plug-in obtains the information to be modified from the event, and then generates the first forwarding flow table. That is, the first forwarding information includes the converted source IP address, source port, destination IP address and destination port.

[0071] Under the first type of communication protocol, the first forwarding flow table includes the source MAC address (the MAC address of the first network card), the destination MAC address (the MAC address of the second network device, the MAC address of the next hop is obtained from the neighbor table), the source IP address, the source port, the destination IP address and the destination port. Among them, the source IP address, the source port, the destination IP address and the destination port are all obtained from the first forwarding information.

[0072] The second forwarding flow table includes the source MAC address (the MAC address of the second network device), the destination MAC address (the MAC address of the first container, obtained from the first forwarding information), the source IP address and the source port, which are respectively consistent with the destination IP address and the destination port in the first forwarding flow table, and the destination IP address and the destination port are consistent with the source IP address and the source port in the first forwarding flow table. In addition, the second forwarding flow table may also include the identifier of the network card corresponding to the destination container (the identifier index of the network card corresponding to the first container), which can be obtained from the socket buffer (skb).

[0073] For other communication protocols, namely the second type of communication protocols, when the message is transmitted using the communication protocol, except for the MAC address, other information of the message does not need to be modified, but the message needs to be encapsulated in the outer layer, such as the overlay protocol. In this case, the first forwarding component needs to write the outer layer encapsulation information into the pref_event event, so that the first CNI plug-in obtains the outer layer encapsulation information from the event, and then generates the first forwarding flow table. That is, the first forwarding information includes the information required for encapsulation.

[0074] Under the second type of communication protocol, the first forwarding flow table includes: an outer source MAC address (the MAC address of the first network card), an outer destination MAC address (the MAC address of the second network device, the MAC address of the next hop obtained from the neighbor table), an outer source IP address (the IP address of the first network device), an outer destination IP address, an outer source port, and an outer destination port. Among them, the outer destination IP address, the outer source port, and the outer destination port are all obtained from the first forwarding information.

[0075] The second forwarding flow table includes: the memory destination MAC address (the MAC address of the first container) and the identifier of the network card corresponding to the destination container (the identifier index of the network card corresponding to the first container). Both of the above information can be obtained from the first forwarding information.

[0076] It can be seen that in a communication network including containers, for the software data plane running in kernel state that cannot directly send forwarding flow tables to the hardware data plane, the software data plane triggers the container network interface plug-in to generate a forwarding flow table by sending the forwarding information required to generate the forwarding flow table to the container network interface plug-in running in user state, and sends the forwarding flow table to the hardware data plane, so that subsequent messages can be forwarded through the hardware data plane, realizing a fast and slow path architecture with high-performance forwarding, greatly optimizing the message forwarding performance of the container network, saving the message overhead in the kernel state of the host machine, and improving the CPU utilization of the entire machine.

[0077] The above embodiment introduces the process of the first network device establishing a fast path through the first message. In order to further realize that after the second network device receives the first message, it can also forward the same service message through the fast path subsequently, the second network device will also trigger the establishment of the fast path after receiving the first message. The process will be explained below.

[0078] See also Figure 4 , which is a flow chart of another message forwarding method provided in an embodiment of the present application, such as Figure 4 As shown, the method is applied to a second network device, which includes a second container, a second forwarding component, a second CNI plug-in and a second network card. The second forwarding component is mounted in the kernel state of the second network device, and the second CNI plug-in is mounted in the user state of the second network device.

[0079] Specifically, the method includes:

[0080] S401: Receive a first message sent by a first network device through a second network card, and send the first message to a second forwarding component.

[0081] In this embodiment, after receiving the first message sent by the first network device, the second network card sends the first message to the second forwarding component because the hardware data plane of the second network device does not have a forwarding flow table for forwarding the first message, so that the second forwarding component forwards the first message to the destination container, that is, the second container.

[0082] S402: Send the first message to the second container through the second forwarding component.

[0083] S403: Determine, by the second forwarding component, second forwarding information required for forwarding the first message according to the first message, and send the second forwarding information to the second CNI plug-in.

[0084] In this embodiment, after the second network device receives the first message through the second forwarding component, the second forwarding component determines the second forwarding information required to process the first message according to the first message, and sends the second forwarding information to the second CNI plug-in running in the user state. The second forwarding information includes key information required to generate the forwarding flow table, specifically, the network identification information of the source network device (the first network device) and the network identification information of the destination network device (the second network device), such as one or more of the source IP address, source MAC address, source port, destination IP address, destination MAC address, destination port, etc.

[0085] The second forwarding component fills in the second forwarding information in the perf_event event, and the second forwarding information is sent from the kernel to the user state through the perf_event event. For the specific implementation of the second forwarding component sending the second forwarding information to the second CNI plug-in, please refer to Figure 2 Related description in the embodiments.

[0086] The execution order of S402 and S403 is not subject to the above restrictions, and the two can be executed simultaneously, or S403 can be executed first and then S402.

[0087] S404: Determine a forwarding flow table according to the second forwarding information through the second CNI plug-in, and send the forwarding flow table to the second network card.

[0088] In this embodiment, the second CNI plug-in monitors the perf_event event. After monitoring the perf_event event, the second forwarding information is obtained by parsing the event, and then a forwarding flow table is obtained through encapsulation and other processing, and the forwarding flow table is sent to the second network card. The forwarding flow table is used to instruct the second network device to directly forward the inbound and outbound messages of the second container through the second network card. The inbound and outbound messages belong to the same service flow as the first message. The first message can be the first data packet of the service flow, and the inbound and outbound messages are subsequent data packets of the service flow. The receiving time of the inbound message is later than the receiving time of the first message. The forwarding path after the second network device receives the first message is a slow path, and the forwarding path after receiving the inbound message is a fast path.

[0089] The forwarding flow table includes a third forwarding flow table, which indicates that the second network device directly forwards the incoming message sent by the first network device through the second network card. That is, the third forwarding table indicates that the second network device directly forwards the message sent by the first network device to the second container through the second network card.

[0090] Based on this, after the second network card receives the third forwarding flow table sent by the second CNI plug-in, the second network card receives the second message sent by the first network device, and sends the second message directly to the second container according to the third forwarding flow table without passing through the second forwarding component, thereby improving forwarding performance.

[0091] In this embodiment, after receiving the first message, the second network device can build a fast path for forwarding subsequent messages. In order to further improve the processing performance of the message, a fast path for the second network device to send the message to the first network device can also be built. That is, the second network device can also generate a fourth forwarding flow table according to the second forwarding information through the second CNI plug-in, and send the fourth forwarding flow table to the second network card. Among them, the fourth forwarding flow table is used to instruct the second network device to send the message sent by the second container to the first network device through the second network card without passing through the second forwarding component. That is, the fourth forwarding flow table is used to instruct the second network device to directly forward the outgoing message sent by the second container through the second network card. Among them, the second forwarding information also includes the forwarding information required to generate the fourth forwarding flow table.

[0092] Based on this, the second network device sends a third message to the second network card, and the second network card sends the third message to the first network device according to the fourth forwarding flow table. The third message is a message for the service flow corresponding to the first message.

[0093] In some application scenarios, if the first network device and the second network device transmit messages using the first type of communication protocol, the first forwarding information includes information such as the converted source IP address, source port, destination IP address, and destination port.

[0094] Under the first type of communication protocol, the third forwarding flow table includes:

[0095] Source MAC address (source MAC address obtained from the first message), destination MAC address (MAC address of the second container obtained from the second forwarding information), source IP address, source port, destination IP address, destination port, and identifier of the network card corresponding to the destination container (obtained from the second forwarding information). Among them, the source IP address, source port, destination IP address, and destination port are obtained from the second forwarding information, and the identifier of the network card corresponding to the destination container is the identifier index of the network card corresponding to the second container, and the identifier index of the network card can also be obtained from the second forwarding information.

[0096] The fourth forwarding flow table includes:

[0097] The source MAC address (the MAC address of the second network card), the destination MAC address (the MAC address of the first network device, that is, the source MAC address in the first message), the source IP address, and the source port are consistent with the destination IP address and destination port in the third forwarding flow table.

[0098] If the first network device and the second network device transmit messages via the second type of communication protocol, the first forwarding information includes information required for outer layer encapsulation.

[0099] Under the second type of communication protocol, the third forwarding flow table includes:

[0100] The inner destination MAC address (the MAC address of the second container, obtained from the second forwarding message) and the identifier of the network card corresponding to the destination container (the index of the network card corresponding to the second container, which can be obtained from the skb).

[0101] The fourth forwarding flow table includes:

[0102] The outer source MAC address (the MAC address of the second network card), the outer destination MAC (the MAC address of the first network device, that is, the MAC address of the next hop in the local neighbor table), the outer source IP address, and the source port are consistent with the outer destination IP and destination port of the first message. The outer destination IP and destination port are consistent with the outer source IP and source port of the first message.

[0103] See also Figure 5 , which is a schematic diagram of the construction of four forwarding flow tables triggered by a message provided in an embodiment of the present application. The client host sends a first message to the server host, and the first message triggers the eBPF module 1 to send the first forwarding information to the first CNI plug-in, and then the first CNI plug-in generates the first forwarding flow table and the second forwarding flow table, and sends them to the hardware data plane.

[0104] At the same time, the client host forwards the first message to the server host through the eBPF module 1. After receiving the first message, the server host sends the second forwarding information to the second CNI plug-in. The second CNI plug-in generates a third forwarding flow table and a fourth forwarding flow table according to the second forwarding information, and sends them to the hardware data plane.

[0105] For the first container, the first message is an outgoing message; for the second container, the first message is an incoming message.

[0106] Based on the above method embodiments, the present application also provides a device for message processing based on a container network, which will be described below in conjunction with the accompanying drawings.

[0107] See also Figure 6 , which is a network device structure diagram provided by an embodiment of the present application, such as Figure 6 As shown, the network device 600 includes: a container 601, a forwarding component 602, a container network interface plug-in 603 and a network card 604. Among them, the forwarding component 602 is mounted in the kernel state of the network device 600, and the container network interface plug-in 603 is mounted in the user state of the network device 600.

[0108] The network device 600 can implement the functions of the first network device or the second network device in the above method embodiment, and thus can also achieve the beneficial effects possessed by the above method embodiment.

[0109] In some embodiments, the network device 600 is used to execute the method executed by the first network device in the aforementioned embodiment. For this case:

[0110] The container 601 is used to send a first message to the forwarding component 602;

[0111] The forwarding component 602 is used to send the first message to the network card 604;

[0112] The network card 604 is used to send the first message to the second network device;

[0113] The forwarding component 602 is further used to determine first forwarding information required to forward the first message according to the first message, and send the first forwarding information to the container network interface plug-in 603;

[0114] The container network interface plug-in 603 is used to determine a forwarding flow table according to the first forwarding information, and send the forwarding flow table to the network card 604, where the forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card.

[0115] In some implementations, the forwarding flow table includes a first forwarding flow table, and the first forwarding flow table indicates that the first network device directly forwards the outgoing message sent by the first container through the first network card;

[0116] The container 601 is further used to send a second message to the network card 604, where the second message and the first message belong to the same service flow;

[0117] The network card 604 is further configured to send the second message to the second network device by using the first forwarding flow table.

[0118] In some implementations, the forwarding flow table further includes a second forwarding flow table, and the second forwarding flow table is used to instruct the first network device to directly forward the incoming message sent by the second network device through the first network card;

[0119] The network card 604 is further configured to receive a third message sent by the second network device, and send the third message to the container 601 using the second forwarding flow table, wherein the third message and the first message belong to the same service flow.

[0120] In some embodiments, if the first network device communicates with the second network device via a first type of communication protocol, the first type of communication protocol refers to a protocol that requires address conversion, and the first forwarding information includes the converted source Internet Protocol IP address, source port, destination IP address and destination port.

[0121] In some implementations, the first forwarding flow table includes: a source media access control MAC address, a destination MAC address, a source IP address, a destination IP address, a source port, and a destination port;

[0122] The source MAC address is the MAC address of the network card 604, the destination MAC address is the MAC address of the second network device, and the source IP address, source port, destination IP address, and destination port are obtained from the first forwarding information;

[0123] The second forwarding flow table includes: source MAC address, destination MAC address, source IP address, destination IP address, source port, destination port, and an identifier of a network card corresponding to the destination container;

[0124] Among them, the source MAC address is the MAC address of the second network device, the destination MAC address is the MAC address of the container 601, the source IP and source port are consistent with the destination IP and destination port in the first forwarding flow table, the destination IP and destination port are consistent with the source IP and source port in the first forwarding flow table, and the identifier of the network card corresponding to the destination container is the identifier of the network card corresponding to the container 601.

[0125] In some implementations, if the first network device communicates with the second network device via a second type of communication protocol, the second type of communication protocol refers to a protocol that requires encapsulation and decapsulation of messages, and the first forwarding information includes information required for encapsulation.

[0126] In some implementations, the first forwarding flow table includes: an outer source MAC address, an outer destination MAC address, an outer source IP address, an outer destination IP address, an outer source port, and an outer destination port;

[0127] The outer source MAC address is the MAC address of the network card 604, the outer destination MAC address is the MAC address of the second network device, the outer source IP address is the IP address of the first network device, and the outer destination IP address and the outer source / destination port are obtained from the first forwarding information;

[0128] The second forwarding flow table includes: an inner destination MAC address and an identifier of a network card corresponding to a destination container;

[0129] The inner destination MAC address is the MAC address of the container 601 obtained from the first forwarding information, and the identifier of the network card corresponding to the destination container is the identifier of the network card corresponding to the container 601.

[0130] In some other embodiments, the network device 600 is used to execute the method executed by the second network device in the aforementioned embodiment. For this case:

[0131] The network card 604 is used to receive a first message sent by a first network device, and send the first message to the forwarding component 602;

[0132] The forwarding component 602 is used to send a first message to the container 601;

[0133] The forwarding component 602 is further configured to determine, according to the first message, second forwarding information required to forward the first message, and send the second forwarding information to the container network interface plug-in 603;

[0134] The container network interface plug-in 603 is used to determine a forwarding flow table according to the second forwarding information, and send the forwarding flow table to the network card 604, where the forwarding flow table is used to instruct the second network device to directly forward the inbound and outbound messages of the second container through the network card.

[0135] In some embodiments, the forwarding flow table includes a third forwarding flow table, wherein the third forwarding flow table indicates that the second network device directly forwards the incoming message sent by the first network device to the container through the network card;

[0136] The network card 604 is further configured to receive a second message sent by the first network device, and send the second message to the container 601 using the third forwarding flow table, wherein the first message and the second message belong to the same service flow.

[0137] In some implementations, the forwarding flow table further includes a fourth forwarding flow table, and the fourth forwarding flow table is used to instruct the second network device to forward the outgoing message sent by the second container directly to the first network device through the network card;

[0138] The container 601 is further used to send a third message to the network card 604, where the third message is a message for the service flow;

[0139] The network card 604 is further configured to send the third message to the first network device by using the fourth forwarding flow table.

[0140] In some embodiments, if the second network device communicates with the first network device via a first type of communication protocol, the first type of communication protocol refers to a protocol that requires address conversion, and the second forwarding information includes: the converted source IP address, source port, destination IP address, destination port, and destination MAC address.

[0141] In some implementations, the third forwarding flow table includes: a source MAC address, a destination MAC address, a source IP address, a source port, a destination IP address, a destination port, and an identifier of a network card corresponding to a destination container;

[0142] The source MAC address is the source MAC address in the first message, the destination MAC is the MAC address of the container 601 obtained from the second forwarding information, the source IP address, source port, destination IP address, and destination port are obtained from the second forwarding information, and the identifier of the network card corresponding to the destination container is the identifier of the network card corresponding to the container 601;

[0143] The fourth forwarding flow table includes: source MAC address, destination MAC address, source IP address, source port, destination IP address and destination port;

[0144] Among them, the source MAC address is the MAC address of the network card 604, the destination MAC address is the source MAC address obtained from the first message, the source IP address and the source port are consistent with the destination IP address and the destination port in the third forwarding flow table, and the destination IP address and the destination port are consistent with the source IP address and the source port in the third forwarding flow table.

[0145] In some implementations, if the second network device communicates with the first network device via a second type of communication protocol, the second type of communication protocol refers to a protocol that requires encapsulation and decapsulation of messages, and the second forwarding information includes information required for encapsulation.

[0146] In some implementations, the third forwarding flow table includes: an inner destination MAC address, an identifier of a network card corresponding to a destination container;

[0147] The inner destination MAC address is the MAC address of the container 601 obtained from the second forwarding message, and the identifier of the network card corresponding to the destination container is the identifier of the network card corresponding to the container 601;

[0148] The fourth forwarding flow table includes: outer source MAC address, outer destination MAC address, outer source IP, outer source port, outer destination IP, and outer destination port;

[0149] The outer source MAC address is the MAC address of the network card 604, the outer destination MAC address is the MAC address of the first network device, the outer source IP and outer source port are consistent with the outer destination IP address and outer destination port of the first message, and the outer destination IP address and outer destination port are consistent with the outer source IP and outer source port of the first message.

[0150] It should be noted that the specific implementation of each module in this embodiment can refer to the relevant description in the above method embodiment. The division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional modules in the embodiment of the present application can be integrated in one processing unit, or each module can exist physically separately, or two or more units can be integrated in one module.

[0151] See also Figure 7, which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0152] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0153] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0154] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0155] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept, and the technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0156] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method provided by the above embodiments is implemented.

[0157] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0158] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0159] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0160] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device can execute the method.

[0161] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0162] The units / modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the unit / module does not, in some cases, constitute a limitation on the unit itself.

[0163] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0164] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0165] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0166] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A message processing method based on container network, It is characterized in that include: Sending a first message to a first forwarding component in kernel state mounted on the first network device through a first container on the first network device; Sending the first message to the first network card on the first network device through the first forwarding component, and sending the first message to the second network device through the first network card; Determine, by the first forwarding component, first forwarding information required to forward the first message according to the first message, and send the first forwarding information to a first container network interface plug-in in user mode mounted on the first network device; Determine a forwarding flow table according to the first forwarding information through the first container network interface plug-in, and send the forwarding flow table to the first network card, where the forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card.

2. The method according to claim 1, It is characterized in that The forwarding flow table includes a first forwarding flow table, the first forwarding flow table instructing the first network device to directly forward the outgoing message sent by the first container through the first network card, and the method further includes: Sending a second message to the first network card through the first container, where the second message and the first message belong to the same service flow; The second message is sent to the second network device through the first network card using the first forwarding flow table.

3. The method according to claim 1 or 2, It is characterized in that The forwarding flow table further includes a second forwarding flow table, where the second forwarding flow table is used to instruct the first network device to directly forward the incoming message sent by the second network device through the first network card, and the method further includes: A third message sent by the second network device is received through the first network card, and the third message is sent to the first container by using the second forwarding flow table, where the third message and the first message belong to the same service flow.

4. The method according to any one of claims 1 to 3, It is characterized in that If the first network device communicates with the second network device via a first type of communication protocol, the first type of communication protocol refers to a protocol that requires address conversion, and the first forwarding information includes the converted source Internet Protocol IP address, source port, destination IP address and destination port.

5. The method according to claim 4, It is characterized in that The first forwarding flow table includes: a source media access control MAC address, a destination MAC address, a source IP address, a destination IP address, a source port, and a destination port; The source MAC address is the MAC address of the first network card, the destination MAC address is the MAC address of the second network device, and the source IP address, source port, destination IP address, and destination port are obtained from the first forwarding information; The second forwarding flow table includes: source MAC address, destination MAC address, source IP address, destination IP address, source port, destination port, and the identifier of the network card corresponding to the destination container; Among them, the source MAC address is the MAC address of the second network device, the destination MAC address is the MAC address of the first container, the source IP and the source port are consistent with the destination IP and the destination port in the first forwarding flow table, the destination IP and the destination port are consistent with the source IP and the source port in the first forwarding flow table, and the identifier of the network card corresponding to the destination container is the identifier of the network card corresponding to the first container.

6. The method according to any one of claims 1 to 3, It is characterized in that If the first network device communicates with the second network device via a second type of communication protocol, the second type of communication protocol refers to a protocol that requires encapsulation and decapsulation of messages, and the first forwarding information includes information required for encapsulation.

7. The method according to claim 6, It is characterized in that The first forwarding flow table includes: an outer source MAC address, an outer destination MAC address, an outer source IP address, an outer destination IP address, an outer source port, and an outer destination port; The outer source MAC address is the MAC address of the first network card, the outer destination MAC address is the MAC address of the second network device, the outer source IP address is the IP address of the first network device, and the outer destination IP address and the outer source / destination port are obtained from the first forwarding information; The second forwarding flow table includes: the inner destination MAC address and the identifier of the network card corresponding to the destination container; The inner destination MAC address is the MAC address of the first container obtained from the first forwarding information, and the identifier of the network card corresponding to the destination container is the identifier of the network card corresponding to the first container.

8. A network device, It is characterized in that The network device is a first network device, including: a first container, a first forwarding component, a first container network interface plug-in and a first network card; wherein the first forwarding component is mounted in the kernel state of the first network device, and the first container network interface plug-in is mounted in the user state of the first network device; The first container is used to send a first message to the first forwarding component; The first forwarding component is used to send the first message to the first network card; The first network card is used to send the first message to the second network device; The first forwarding component is further used to determine first forwarding information required to forward the first message according to the first message, and send the first forwarding information to the first container network interface plug-in; The first container network interface plug-in is used to determine a forwarding flow table according to the first forwarding information, and send the forwarding flow table to the first network card, where the forwarding flow table is used to instruct the first network device to directly forward the inbound and outbound messages of the first container through the first network card.

9. An electronic device, It is characterized in that The electronic device comprises: a processor and a memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a device, the device executes the method according to any one of claims 1 to 7.