Communication method and device
By encapsulating the network layer and data link layer between the operating system kernel and the target processing module, and sending messages in combination with the network card, the system complexity and resource waste caused by VPP not taking over the protocol surface communication interface is solved, and the cost reduction is achieved and resource optimization.
Patent Information
- Application Number
- CN202411378455.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-29
AI Technical Summary
When the data plane uses a vector packet processing engine (VPP) for forwarding and protocol-side communication uses the Linux kernel, if the VPP does not take over the protocol-side communication interface, the system is complex and costly; if the VPP takes over, it needs to be in the Linux kernel and VPP Synchronize ARP neighbors and routing tables between them, resulting in waste of resources.
The data to be sent is encapsulated through the operating system kernel and transmitted to the target processing module. The data link layer is encapsulated by the target processing module. The encapsulated packets are sent through the set network card without the need to be in the operating system kernel and the target processing module. Deploy secure communication policies separately to avoid duplicate encapsulation.
Reduces implementation and maintenance costs, avoids waste of resources, and simplifies system complexity.
Smart Images

Figure CN119254851A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art
[0002] The current access controller (AC) products use Vector Packet Processing (VPP) as the data forwarding plane. In addition, the AC control plane, portal server and other services run outside the VPP, which runs as an independent process on the Linux system.
[0003] In the operation of the above services, it is necessary to communicate with the outside of the system using the TCP / IP protocol. When VPP is used for forwarding on the data plane and Linux kernel communication is used for protocol plane communication, if VPP does not take over the interface for protocol plane communication, it is necessary to deploy secure communication policies on the Linux kernel and VPP respectively, and set a management port on VPP to achieve LAN management, which will make the system complex and have high implementation and maintenance costs. If VPP takes over the interface for protocol plane communication, it is necessary to map all VPP interfaces on the Linux kernel, and ARP neighbors and routing tables must be synchronized between VPP and the Linux kernel. When the Linux kernel sends a message outward, the message will be forwarded and encapsulated again when it reaches VPP after the Linux protocol stack forwards and encapsulates it, which causes a waste of resources. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a communication method and device.
[0005] In a first aspect, an embodiment of the present application provides a communication method, including:
[0006] Performing network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message;
[0007] Transmitting the first transmission message to a target processing module, wherein the target processing module is communicatively connected to the operating system kernel;
[0008] Performing data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message;
[0009] The second sending message is sent through a network card, and the network card is arranged in the target processing module.
[0010] In a possible implementation manner, performing network layer encapsulation on the data to be sent by the operating system kernel to obtain the first sending message includes:
[0011] Obtaining an Internet Protocol address corresponding to a first virtual interface, where the first virtual interface is created in advance;
[0012] The operating system kernel performs network layer encapsulation on the data to be sent based on the Internet Protocol address to obtain a first sending message.
[0013] In a possible implementation, the performing network layer encapsulation on the data to be sent based on the Internet Protocol address includes:
[0014] Based on the Internet Protocol address, generating a direct route, the direct route is used to map the first virtual interface to a network layer interface on the target processing module;
[0015] Based on the Internet Protocol address and the direct route, network layer encapsulation is performed on the data to be sent.
[0016] In a possible implementation manner, transmitting the first send message to the target processing module includes:
[0017] Based on the direct route, the first transmission message is transmitted from the operating system kernel to the target processing module through the first virtual interface and the network layer interface corresponding to the first virtual interface.
[0018] In a possible implementation manner, the transmitting the first sending message from the operating system kernel to the target processing module includes:
[0019] When there are multiple first sent messages, determine the number of queues, where the number of queues is set in the operating system kernel;
[0020] According to the number of queues, the first send message is transmitted from the operating system kernel to the target processing module.
[0021] In a possible implementation manner, performing data link layer encapsulation on the first transmission message by the target processing module to obtain a second transmission message includes:
[0022] Based on the physical address, the target processing module performs data link layer encapsulation on the first transmission message to obtain a second transmission message;
[0023] The physical address is the address of the network card.
[0024] In a possible implementation manner, the communication method further includes:
[0025] Obtaining a received message through the network card;
[0026] The received message is transmitted to the operating system kernel through the first virtual interface corresponding to the received message.
[0027] In a possible implementation manner, the communication method further includes:
[0028] The virtual local area network corresponding to the operating system kernel is controlled through a second virtual interface set on the operating system kernel, wherein the second virtual interface corresponds to a network layer interface on the target processing module.
[0029] In a second aspect, an embodiment of the present application further provides a communication device, including:
[0030] A first encapsulation module is configured to perform network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message;
[0031] A first transmission module, configured to transmit the first transmission message to a target processing module, the target processing module being communicatively connected to the operating system kernel;
[0032] A second encapsulation module, configured to perform data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message;
[0033] The sending module is configured to send the second sending message through a network card, and the network card is arranged in the target processing module.
[0034] In a possible implementation manner, the first encapsulation module is specifically configured as follows:
[0035] Obtaining an Internet Protocol address corresponding to a first virtual interface, where the first virtual interface is created in advance;
[0036] The operating system kernel performs network layer encapsulation on the data to be sent based on the Internet Protocol address to obtain a first sending message.
[0037] In an embodiment of the present application, for the data to be sent, network layer encapsulation is performed through the operating system kernel and data link layer encapsulation is performed through the target processing module, and the second sending message obtained after encapsulation is sent through the network card set on the target processing module. There is no need to deploy secure communication strategies on the operating system kernel and the target processing module respectively, and there is no need to repeatedly encapsulate on the operating system kernel and the target processing module, which reduces the implementation cost and maintenance cost while avoiding waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present application or 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 labor.
[0039] Figure 1 A flow chart of a communication method provided by the present application is shown;
[0040] Figure 2 A flow chart of receiving an external message in a communication method provided by the present application is shown;
[0041] Figure 3 A schematic diagram showing the structure of a communication device provided by the present application is shown;
[0042] Figure 4 A schematic structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION
[0043] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0044] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of the embodiments. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0045] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0046] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0047] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.
[0048] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0049] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0050] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0051] To facilitate the understanding of the present application, a communication method provided by the present application is first introduced in detail. Here, the communication method of an embodiment of the present application is applied to a scenario in which the data plane adopts a vector packet processing engine (Vector Packet Processing, VPP) for forwarding and the protocol plane communication adopts Linux kernel communication. Figure 1 A flow chart of a communication method provided in an embodiment of the present application is shown, wherein specific steps include S101-S104.
[0052] S101, performing network layer encapsulation on data to be sent through an operating system kernel to obtain a first sending message.
[0053] In a specific implementation, when it is determined that the upper layer application needs to forward data through the network, the operating system kernel performs network layer encapsulation on the data to be sent to obtain a first sending message.
[0054] As one example, when the network layer encapsulation of the data to be sent is performed through the operating system kernel, the Internet Protocol address corresponding to the first virtual interface is first obtained, wherein the first virtual interface is pre-created, and the first virtual interface is located in the operating system kernel and corresponds to the network layer interface in the target processing module, and the Internet Protocol address corresponding to the first virtual interface is generated while creating the first virtual interface, and the route corresponding to the Internet Protocol address is generated. Here, the target processing module includes a vector packet processing engine (Vector Packet Processing, VPP).
[0055] In the embodiment of the present application, the route corresponding to the Internet Protocol address of the first virtual interface is a direct route, that is, after determining the Internet Protocol address of the first virtual interface, the direct route is automatically generated based on the Internet Protocol address. In addition, the direct route is used to map the first virtual interface to the network layer interface on the target processing module, that is, based on the direct route, the purpose of transmitting the first transmission message after network layer encapsulation between the target processing module and the operating system kernel is achieved.
[0056] Afterwards, the operating system kernel performs network layer encapsulation on the data to be sent based on the Internet Protocol address corresponding to the first virtual interface and the direct route to obtain a first sending message.
[0057] S102, transmitting the first sending message to a target processing module, and the target processing module is communicatively connected to an operating system kernel.
[0058] After obtaining the first transmission message, the first transmission message is transmitted to the target processing module. Optionally, based on direct routing, the first transmission message is transmitted from the upper layer protocol stack of the operating system kernel to the target processing module.
[0059] The first transmission message after network layer encapsulation includes the Internet Protocol address of the first virtual interface and its corresponding direct route. Based on this, when the first transmission message is transmitted to the target processing module, the first transmission message is transmitted from the operating system kernel to the target processing module based on the direct route through the first virtual interface and the network layer interface corresponding to the first virtual interface.
[0060] In another example, there is a case where there are multiple first transmission messages. In this case, when the first transmission message is transmitted from the operating system kernel to the target processing module, the number of queues is first determined, wherein the number of queues is set in the operating system kernel. Then, according to the number of queues, the first transmission message is transmitted from the operating system kernel to the target processing module.
[0061] Specifically, a user space is provided in the operating system kernel, such as an iptables component, and the target port corresponding to the target processing module is configured through the NFQUEUE function in the iptables component. At the same time, the target processing module is configured to obtain rules and queue parameters accordingly, and then when there is a message that meets the acquisition rule in the upper protocol stack of the operating system kernel, the message that meets the acquisition rule is intercepted through the target port and transmitted to the target processing module. Among them, the acquisition rule includes at least the source address, the destination address and the transmission protocol, and the queue parameters include the number of queues and the load parameter.
[0062] In a specific implementation, after obtaining the first transmission message, the target port is determined based on the acquisition rule, and the number of queues corresponding to the target port is determined, and then the first transmission message is transmitted from the operating system kernel to the target processing module according to the number of queues.
[0063] Correspondingly, when receiving the first transmission message, the target processing module creates a transmission task according to the number of queues, that is, the number of transmission tasks is the same as the number of queues.
[0064] S103, performing data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message.
[0065] After the first transmission message is transmitted to the target processing module, the first transmission message is encapsulated at the data link layer by the target processing module to obtain a second transmission message. Wherein, based on the physical address, the first transmission message is encapsulated at the data link layer by the target processing module to obtain the second transmission message. Wherein, the physical address is the address of the network card such as the Media Access Control (MCA) address, and the network card is set in the target processing module.
[0066] Here, data link layer encapsulation is performed through the target processing module, that is, the target processing module uses the Address Resolution Protocol (ARP) to resolve the physical address (that is, the MAC address) according to the Internet Protocol address in the first sent message, so as to ensure that the message can be sent, and there is no need for the operating system kernel to execute ARP and perform data link layer encapsulation, thereby avoiding the waste of resources caused by repeated encapsulation in the operating system kernel and the target processing module.
[0067] S104, sending a second sending message through the network card.
[0068] Afterwards, the second transmission message is sent through the network card arranged in the target processing module, so that the terminal corresponding to the destination address corresponding to the second transmission message receives the second transmission message and parses it to obtain the data to be sent.
[0069] In a specific implementation, before sending the second transmission message, the network card port is determined according to the destination address included in the second transmission message, so as to send the second transmission message through the network card port corresponding to the destination address, so as to ensure that the second transmission message can reach the terminal corresponding to the target address. The destination address is the destination address corresponding to the second transmission message, that is, the data to be sent.
[0070] In an embodiment of the present application, for the data to be sent, network layer encapsulation is performed through the operating system kernel and data link layer encapsulation is performed through the target processing module, and the second sending message obtained after encapsulation is sent through the network card set on the target processing module. There is no need to deploy secure communication strategies on the operating system kernel and the target processing module respectively, and there is no need to repeatedly encapsulate on the operating system kernel and the target processing module, which reduces the implementation cost and maintenance cost while avoiding waste of resources.
[0071] The communication method of the embodiment of the present application also includes a method step of receiving an external message. Figure 2 The flowchart shown, wherein the specific steps include S201 and S202.
[0072] S201, obtaining a received message through a network card.
[0073] S202: Transmit the received message to the operating system kernel through the first virtual interface corresponding to the received message.
[0074] When obtaining external data sent by an external terminal, the receiving message is first obtained through the network card set on the target processing module. The receiving message is sent by the external terminal, which includes external data, source address (Internet Protocol address and physical address of the external terminal) and destination address (Internet Protocol address and physical address corresponding to the device to which the operating system kernel belongs).
[0075] The received message is parsed by the target processing module to obtain an Internet Protocol address, a first virtual interface is determined according to the Internet Protocol address, and the received message is transmitted to the operating system kernel through the first virtual interface, thereby completing the data reception.
[0076] In the embodiment of the present application, a second virtual interface is also provided on the operating system kernel, and the virtual local area network corresponding to the operating system kernel is controlled through the second virtual interface provided on the operating system kernel, wherein the second virtual interface corresponds to the network layer interface on the target processing module. Through the second virtual interface, a management interface can be called up to facilitate operations such as configuration of the current virtual local area network based on the management interface.
[0077] Optionally, the second virtual interface and the first virtual interface can be set as the same interface, and there is no need to establish a separate management interface, which reduces implementation costs and maintenance costs to a certain extent.
[0078] The second aspect of the present application also provides a communication device corresponding to a communication method. Since the principle of solving the problem by the communication device in the present application is similar to the above-mentioned communication method of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0079] Figure 3 A schematic diagram of a communication device provided in an embodiment of the present application is shown, specifically comprising:
[0080] A first encapsulation module 301 is configured to perform network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message;
[0081] A first transmission module 302, configured to transmit the first transmission message to a target processing module, the target processing module being communicatively connected to the operating system kernel;
[0082] A second encapsulation module 303, configured to perform data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message;
[0083] The sending module 304 is configured to send the second sending message through a network card, and the network card is set in the target processing module.
[0084] In yet another embodiment, the first encapsulation module 301 is specifically configured as follows:
[0085] Obtaining an Internet Protocol address corresponding to a first virtual interface, where the first virtual interface is created in advance;
[0086] The operating system kernel performs network layer encapsulation on the data to be sent based on the Internet Protocol address to obtain a first sending message.
[0087] In yet another embodiment, the first encapsulation module 301 is further configured as:
[0088] Based on the Internet Protocol address, generating a direct route, the direct route is used to map the first virtual interface to a network layer interface on the target processing module;
[0089] Based on the Internet Protocol address and the direct route, network layer encapsulation is performed on the data to be sent.
[0090] In yet another embodiment, the first transmission module 302 is specifically configured as follows:
[0091] Based on the direct route, the first transmission message is transmitted from the operating system kernel to the target processing module through the first virtual interface and the network layer interface corresponding to the first virtual interface.
[0092] In yet another embodiment, the first transmission module 302 is further configured to:
[0093] When there are multiple first sent messages, determine the number of queues, where the number of queues is set in the operating system kernel;
[0094] According to the number of queues, the first send message is transmitted from the operating system kernel to the target processing module.
[0095] In yet another embodiment, the second encapsulation module 303 is specifically configured as follows:
[0096] Based on the physical address, the target processing module performs data link layer encapsulation on the first transmission message to obtain a second transmission message;
[0097] The physical address is the address of the network card.
[0098] In yet another embodiment, the communication device further comprises:
[0099] An acquisition module 305, configured to acquire a received message through the network card;
[0100] The second transmission module 306 is configured to transmit the received message to the operating system kernel through the first virtual interface corresponding to the received message.
[0101] In yet another embodiment, the communication device further includes a control module 307 configured to:
[0102] The virtual local area network corresponding to the operating system kernel is controlled through a second virtual interface set on the operating system kernel, wherein the second virtual interface corresponds to a network layer interface on the target processing module.
[0103] In an embodiment of the present application, for the data to be sent, network layer encapsulation is performed through the operating system kernel and data link layer encapsulation is performed through the target processing module, and the second sending message obtained after encapsulation is sent through the network card set on the target processing module. There is no need to deploy secure communication strategies on the operating system kernel and the target processing module respectively, and there is no need to repeatedly encapsulate on the operating system kernel and the target processing module, which reduces the implementation cost and maintenance cost while avoiding waste of resources.
[0104] The present application also provides an electronic device. The structural diagram of the electronic device can be as follows: Figure 4 As shown, at least a memory 401 and a processor 402 are included, the memory 401 stores a computer program, and the processor 402 implements the method provided by any embodiment of the present application when executing the computer program on the memory 401. Exemplarily, the steps of the electronic device computer program are as follows S11-S14:
[0105] S11, performing network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message;
[0106] S12, transmitting the first transmission message to a target processing module, wherein the target processing module is communicatively connected with the operating system kernel;
[0107] S13, performing data link layer encapsulation on the first transmission message by the target processing module to obtain a second transmission message;
[0108] S14, sending the second sending message through a network card, where the network card is arranged in the target processing module.
[0109] An embodiment of the present application provides a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, the method provided in any embodiment of the present application is implemented, including the following steps S21-S24:
[0110] S21, performing network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message;
[0111] S22, transmitting the first transmission message to a target processing module, wherein the target processing module is communicatively connected to the operating system kernel;
[0112] S23, performing data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message;
[0113] S24, sending the second sending message through a network card, where the network card is set in the target processing module.
[0114] In an embodiment of the present application, for the data to be sent, network layer encapsulation is performed through the operating system kernel and data link layer encapsulation is performed through the target processing module, and the second sending message obtained after encapsulation is sent through the network card set on the target processing module. There is no need to deploy secure communication strategies on the operating system kernel and the target processing module respectively, and there is no need to repeatedly encapsulate on the operating system kernel and the target processing module, which reduces the implementation cost and maintenance cost while avoiding waste of resources.
[0115] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk. Optionally, in this embodiment, the processor executes the method steps recorded in the above-mentioned embodiment according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment can refer to the examples described in the above-mentioned embodiment and the optional implementation mode, and this embodiment is not repeated here. Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented with a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with executable program codes of computing devices, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps in them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0116] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.
[0117] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.
[0118] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.
Claims
1. A communication method, comprising: Performing network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message; Transmitting the first transmission message to a target processing module, wherein the target processing module is communicatively connected to the operating system kernel; Performing data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message; The second sending message is sent through a network card, and the network card is arranged in the target processing module.
2. The communication method according to claim 1, wherein the step of performing network layer encapsulation on the data to be sent through the operating system kernel to obtain the first sending message comprises: Obtaining an Internet Protocol address corresponding to a first virtual interface, where the first virtual interface is created in advance; The operating system kernel performs network layer encapsulation on the data to be sent based on the Internet Protocol address to obtain a first sending message.
3. The communication method according to claim 2, wherein the network layer encapsulation of the data to be sent based on the Internet Protocol address comprises: Based on the Internet Protocol address, generating a direct route, the direct route is used to map the first virtual interface to a network layer interface on the target processing module; Based on the Internet Protocol address and the direct route, network layer encapsulation is performed on the data to be sent.
4. The communication method according to claim 3, wherein the step of transmitting the first transmission message to the target processing module comprises: Based on the direct route, the first transmission message is transmitted from the operating system kernel to the target processing module through the first virtual interface and the network layer interface corresponding to the first virtual interface.
5. The communication method according to claim 4, wherein the step of transmitting the first transmission message from the operating system kernel to the target processing module comprises: When there are multiple first sent messages, determine the number of queues, where the number of queues is set in the operating system kernel; According to the number of queues, the first send message is transmitted from the operating system kernel to the target processing module.
6. The communication method according to claim 1, wherein the step of performing data link layer encapsulation on the first transmission message by the target processing module to obtain a second transmission message comprises: Based on the physical address, the target processing module performs data link layer encapsulation on the first transmission message to obtain a second transmission message; The physical address is the address of the network card.
7. The communication method according to claim 1, further comprising: Obtaining a received message through the network card; The received message is transmitted to the operating system kernel through the first virtual interface corresponding to the received message.
8. The communication method according to any one of claims 1 to 7, further comprising: The virtual local area network corresponding to the operating system kernel is controlled through a second virtual interface set on the operating system kernel, wherein the second virtual interface corresponds to a network layer interface on the target processing module.
9. A communication device, comprising: A first encapsulation module is configured to perform network layer encapsulation of the data to be sent through the operating system kernel to obtain a first sending message; A first transmission module, configured to transmit the first transmission message to a target processing module, wherein the target processing module is communicatively connected to the operating system kernel; A second encapsulation module, configured to perform data link layer encapsulation on the first transmission message through the target processing module to obtain a second transmission message; A sending module is configured to send the second sending message through a network card, and the network card is arranged in the target processing module.
10. The communication device according to claim 9, wherein the first encapsulation module is specifically configured as follows: Obtaining an Internet Protocol address corresponding to a first virtual interface, where the first virtual interface is created in advance; The operating system kernel performs network layer encapsulation on the data to be sent based on the Internet Protocol address to obtain a first sending message.
Citation Information
Patent Citations
Method and system for communication of user state and inner core
CN103428226A
Data processing method applied to electronic equipment, electronic equipment and medium
CN111182063A
Message forwarding method and device, nonvolatile storage medium and processor
CN114640627A
Network communication method and device
CN115834665A
Data forwarding method and system, switching device, medium and equipment
CN117459454A
