A message diversion method, network device and storage medium under 5G network
By setting multiple network ports in the processor core of the UPF device and using protocol address matching to determine the sending network port, the problem in the existing technology that the UPF device cannot send and receive different core messages at the same time is solved, and flexible message sending is achieved.
Patent Information
- Application Number
- CN202210481313.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-05-05
AI Technical Summary
The UPF devices in the existing 5G network cannot simultaneously transmit and receive multiple different messages for different cores on a single physical network port.
By setting the first physical network port and the second physical network port respectively on the first core and the second core of the processor, and configuring the first virtual network port and the second virtual network port, the sending network port of the internal message is determined by using the matching situation of the source Internet Protocol address and the Internet Protocol address, flexible sending of the message is achieved.
It enables the message of a single processor core to be sent through any physical network port of the UPF device, solving the problem of network port correspondence limitation in the prior art.
Smart Images

Figure CN114900862B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular to a message diversion method, network equipment, and storage medium in a 5G network. Background Art
[0002] Currently, 5G user plane function (UPF) devices use multi-core processors to process incoming packets and send them out through the corresponding network ports. Furthermore, to improve processor efficiency, typical software architectures use one processor core to handle a single service. Furthermore, the network interface card (NIC) used by UPF devices is multi-channel, presenting multiple physical Ethernet ports.
[0003] However, in the UPF device in the related art, each physical network port corresponds one-to-one to each core of the processor. For example, on a processor with two cores, CPU0 and CPU1, the core numbered CPU0 is only responsible for processing data messages, and the core numbered CPU1 is only responsible for processing management messages. The two physical network ports set on CPU0 can only realize the sending and receiving of data messages for CPU0 or the sending and receiving of management messages for CPU1 respectively, and cannot realize the sending and receiving of multiple different messages for different cores at the same time on one physical network port. Summary of the Invention
[0004] In view of this, the present invention provides a message diversion method, network device, and storage medium in a 5G network, which are used to solve the problem that UPF devices in the prior art cannot simultaneously transmit and receive multiple different messages for different cores on a single physical network port. To achieve one, some, or all of the above objectives or other objectives, the specific embodiments are as follows:
[0005] An embodiment of the first aspect of the present invention provides a message diversion method under a 5G network, which is applied to a network device, and is characterized in that the network device is provided with a processor, the processor includes a first core and a second core, the first core is provided with a first physical network port and a second physical network port, the first core is provided with a first virtual network port, and the second core is provided with a second virtual network port; the first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with the first Internet Protocol address and the second Internet Protocol address at the same time; the method includes: obtaining an internal message from the first virtual network port from the second virtual network port, wherein the internal message carries a source Internet Protocol address; determining the sending network port corresponding to the internal message according to the matching situation of the source Internet Protocol address with the first Internet Protocol address and the second Internet Protocol address; and sending the internal message to the outside of the network device through the sending network port.
[0006] Preferably, the first physical network port and the second virtual network port are both configured with a first media access control address, and the second physical network port is configured with a second media access control address.
[0007] Preferably, the internal message also carries a source media access control address, wherein the source media access control address is consistent with the first media access control address; the determining of the sending network port corresponding to the internal message based on the matching of the source Internet Protocol address with the first Internet Protocol address and the second Internet Protocol address includes: when the source Internet Protocol address is inconsistent with the first Internet Protocol address, detecting whether the source Internet Protocol address is consistent with the second Internet Protocol address; when the source Internet Protocol address is consistent with the second Internet Protocol address, determining that the sending network port is the second physical network port, and changing the source media access control address of the internal message so that the changed source media access control address is consistent with the second media access control address.
[0008] Preferably, determining the sending network port corresponding to the internal message based on the matching of the source Internet Protocol address with the first Internet Protocol address and the second Internet Protocol address also includes: when the source Internet Protocol address is consistent with the first Internet Protocol address, determining that the sending network port is the first physical network port.
[0009] Preferably, the embodiment of the present invention further comprises: submitting the internal message to the protocol stack of the first core when the source Internet Protocol address is inconsistent with both the first Internet Protocol address and the second Internet Protocol address.
[0010] Preferably, an embodiment of the present invention also includes: obtaining a first external message from the first physical network port, wherein the first external message carries a first destination media access control address, and the first destination media access control address is consistent with the first media access control address; detecting the type of the first external message; when the type of the first external message is a management message, sending the first external message to the second core through the first virtual network port; when the type of the first external message is not a management message, submitting the first external message to the protocol stack of the first core.
[0011] Preferably, an embodiment of the present invention also includes obtaining a second external message from the second physical network port, wherein the second external message carries a second destination media access control address, and the second destination media access control address is consistent with the first media access control address; detecting the type of the second external message; when the type of the second external message is a management message, changing the second destination media access control address so that the second destination media access control address is consistent with the first media access control address; and sending the second external message to the second core through the first virtual network port.
[0012] Preferably, the embodiment of the present invention further includes, when the type of the second external message is not a management message, submitting the second external message to the protocol stack of the first core for processing.
[0013] The second aspect of the present invention provides a network device, comprising: a memory, a processor, and a computer program stored in the memory and runnable on the processor, characterized in that when the processor executes the computer program, it implements a message diversion method under a 5G network as described in the first aspect of the present invention.
[0014] An embodiment of the third aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute a message diversion method under a 5G network as described in the embodiment of the first aspect of the present invention.
[0015] The implementation of the present invention will have the following beneficial effects:
[0016] The network device of the embodiment of the present invention has a first core provided with a first physical network port and a second physical network port, the first core provided with a first virtual network port, and the second core provided with a second virtual network port; the first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with both the first Internet Protocol address and the second Internet Protocol address; therefore, the message diversion method under the 5G network of the embodiment of the present invention obtains the internal message from the second virtual network port from the first virtual network port, and the sending network port corresponding to the internal message is confirmed by matching the source Internet Protocol address with the first Internet Protocol address and the second Internet Protocol address. Therefore, the method provided by the embodiment of the present invention enables the message of a single processor core to be sent at any physical network port of the UPF device.
[0017] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the contents particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] in:
[0020] Figure 1 A schematic diagram of a network device provided in an embodiment of the present invention;
[0021] Figure 2 A flowchart of a method for packet offloading in a 5G network provided by an embodiment of the present invention;
[0022] Figure 3 A specific flow chart of a message offloading method under a 5G network provided by an embodiment of the present invention;
[0023] Figure 4 A specific flow chart of a message offloading method under a 5G network provided by an embodiment of the present invention;
[0024] Figure 5 A specific flow chart of a message offloading method under a 5G network provided by an embodiment of the present invention;
[0025] Figure 6A specific flow chart of a message offloading method under a 5G network provided by an embodiment of the present invention;
[0026] Figure 7 A specific flow chart of a message offloading method under a 5G network provided by an embodiment of the present invention;
[0027] Figure 8 A specific flow chart of a message offloading method under a 5G network provided by an embodiment of the present invention;
[0028] Figure 9 A schematic diagram of another network device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0030] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0031] The present invention provides a message diversion method, network device and storage medium under a 5G network. The message diversion method under a 5G network of an embodiment of the present invention is applied to a network device, and is characterized in that the network device is provided with a processor, the processor includes a first core and a second core, the first core is provided with a first physical network port and a second physical network port, the first core is provided with a first virtual network port, and the second core is provided with a second virtual network port; the first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with the first Internet Protocol address and the second Internet Protocol address at the same time; the method includes: obtaining an internal message from the first virtual network port from the second virtual network port, wherein the internal message carries a source Internet Protocol address; determining a sending network port corresponding to the internal message according to a matching condition between the source Internet Protocol address and the first Internet Protocol address and the second Internet Protocol address; and sending the internal message to the outside of the network device through the sending network port. The network device of the embodiment of the present invention has a first core provided with a first physical network port and a second physical network port, the first core provided with a first virtual network port, and the second core provided with a second virtual network port; the first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with both the first Internet Protocol address and the second Internet Protocol address; therefore, the message diversion method under the 5G network of the embodiment of the present invention obtains the internal message from the second virtual network port from the first virtual network port, and the sending network port corresponding to the internal message is confirmed by matching the source Internet Protocol address with the first Internet Protocol address and the second Internet Protocol address. Therefore, the method provided by the embodiment of the present invention enables the message of a single processor core to be sent at any physical network port of the UPF device.
[0032] The embodiments of the present invention are further described below with reference to the accompanying drawings.
[0033] like Figure 1 As shown, Figure 1 A schematic diagram of a network device provided in an embodiment of the present invention, Figure 1 In the example, the network device includes a first core and a second core, the first core is provided with a first physical network port, a second physical network port and a first virtual network port, wherein the first physical network port and the second physical network port are used for the first core to send messages to the outside or receive messages from the outside; the second core is provided with a second virtual network port, and the first virtual network port and the second virtual network port are used for communication between the first core and the second core.
[0034] Specifically, network devices typically use multi-core processors to process messages received by network ports and send the processed messages out the corresponding network ports. Furthermore, to improve processor efficiency, typical software architectures allow one processor core to handle a single task. Furthermore, the network cards used by network devices are multi-channel, presenting multiple physical Ethernet-facing network ports. In related art network devices, each physical network port corresponds one-to-one to each processor core.
[0035] Based on Figure 1 In a specific example provided by the illustrated network device 100, the first core 110 is only responsible for processing data packets, the second core 120 is only responsible for processing management packets, and the Internet Protocol (IP) address and Media Access Control (MAC) address of the first physical network port 111 correspond to the second core 120. That is, the IP address and MAC address of the second virtual network port 121 are consistent with the IP address and MAC address of the first physical network port 111, and the IP address and MAC address of the second physical network port 112 correspond to the first core 110. Therefore, the first physical network port 111 can only send and receive management packets, while the second physical network port 112 can only send and receive data packets. This results in the network device 100 in the prior art being unable to simultaneously transmit and receive multiple different packets for different cores on a single physical network port.
[0036] For example, the first physical network port 111 is configured with an IP address of 10.8.8.112 / 24 and a MAC address of 00:11:22:33:44:55; the second physical network port 112 is configured with an IP address of 192.168.1.2 / 24 and a MAC address of 00:11:22:33:44:66; the second virtual network port 121 of the second core 120 is configured with an IP address of 10.8.8.112 / 24 and a MAC address of 00:11:22:33:44:55.
[0037] In one embodiment, the first virtual network port 113 and the second virtual network port 121 are both virtual network ports (MIPC Network Device, MND) used for inter-core communication. After the first core 110 receives a management message from the first physical network port 111, it forwards the message to the second core 120 via the first virtual network port 113, and the message is ultimately processed by an application on the second core 120. The processing result of the application on the second core 120 is forwarded to the first virtual network port 113 of the first core 110 via the second virtual network port 121 of the second core 120, and is ultimately sent out via the first physical network port 111.
[0038] The network device 100 and application scenarios described in the embodiment of the present invention are intended to more clearly illustrate the technical solutions of the embodiment of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiment of the present invention. Those skilled in the art will appreciate that with the evolution of communication technology and the emergence of new application scenarios, the technical solutions provided by the embodiment of the present invention are also applicable to similar technical problems.
[0039] It will be understood by those skilled in the art that Figure 1 The network device 100 shown in the figure does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0040] Based on the above-mentioned network equipment, various embodiments of a message diversion method under a 5G network of the present invention are proposed.
[0041] like Figure 2 As shown, Figure 2 A flowchart of a message splitting method under a 5G network provided by an embodiment of the present invention, Figure 2 In the example of , it includes but is not limited to step S100, step S200 and step S300:
[0042] Step S100: obtaining an internal message from the second virtual network port through the first virtual network port, wherein the internal message carries an active Internet Protocol address;
[0043] Step S200, determining a sending network port corresponding to the internal message based on a match between the source Internet Protocol address and the first Internet Protocol address and the second Internet Protocol address;
[0044] Step S300: Send the internal message to the outside of the network device through the sending network port.
[0045] Since the first core is provided with a first physical network port and a second physical network port, the first core is provided with a first virtual network port, and the second core is provided with a second virtual network port; the first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with both the first Internet Protocol address and the second Internet Protocol address; therefore, the message diversion method under the 5G network of an embodiment of the present invention obtains the internal message from the second virtual network port from the first virtual network port, and the sending network port corresponding to the internal message is confirmed by matching the source Internet Protocol address with the first Internet Protocol address and the second Internet Protocol address. Therefore, the method provided by the embodiment of the present invention enables the message of a single processor core to be sent through any physical network port of the UPF device.
[0046] like Figure 3 As shown, Figure 3This is a specific flow chart of a message diversion method under a 5G network provided by an embodiment of the present invention. Figure 3 In the example, step S200 also includes but is not limited to step S210 and step S220:
[0047] Step S210, if the source Internet Protocol address is inconsistent with the first Internet Protocol address, detecting whether the source Internet Protocol address is consistent with the second Internet Protocol address;
[0048] Step S220: if the source IP address is consistent with the second IP address, determine the sending network port as the second physical network port, and change the source MAC address of the internal message so that the changed source MAC address is consistent with the second MAC address.
[0049] like Figure 4 As shown, Figure 4 This is a specific flow chart of a message diversion method under a 5G network provided by an embodiment of the present invention. Figure 4 In the example, step S200 further includes step S230:
[0050] Step S230: When the source Internet Protocol address is consistent with the first Internet Protocol address, determine that the sending network port is the first physical network port.
[0051] Specifically, the first physical network port is configured with an IP address of 10.8.8.112 / 24 and a MAC address of MAC0 00:11:22:33:44:55. The second physical network port is configured with an IP address of 192.168.1.2 / 24 and a MAC address of MAC1 00:11:22:33:44:66. The second virtual network port of the second core is configured with an IP address of 10.8.8.112 / 24 and a MAC address of MAC0 00:11:22:33:44:55. A new IP address of 192.168.1.2 / 24 is also added. At this point, the second virtual network port of the second core is configured with two IP addresses. When the second core's protocol stack or an application running on the second core wants to send a message to a peer host or device, since both IP addresses configured for the second core are assigned to the second virtual network port, the messages sent by the second core's protocol stack must be processed by the second virtual network port's send interface, and the first virtual network port must receive all messages sent by the second core through the second virtual network port. This conversion process is performed by the first core. After receiving the message, the first virtual network port of the first core determines that the message's source IP address is 10.8.8.112 / 24, indicating that it is a message corresponding to the first physical network port. The message is then directly sent through the first physical network port's network driver send function. If the message's source IP address is 192.168.1.2 / 24, it is determined to be a message corresponding to the second physical network port. Therefore, the message's source MAC address must be modified to 00:11:22:33:44:66, and the message is then directly sent through the second physical network port's network driver send function. Therefore, the embodiment of the present invention can implement the sending of management messages from the second core on both the first physical network port and the second physical network port.
[0052] like Figure 5 As shown, Figure 5 This is a specific flow chart of a message diversion method under a 5G network provided by an embodiment of the present invention. Figure 5 In the example, the embodiment of the present invention further includes step S400:
[0053] Step S400: When the source Internet Protocol address is inconsistent with both the first Internet Protocol address and the second Internet Protocol address, submit the internal message to the protocol stack of the first core.
[0054] Specifically, when the source Internet Protocol address of the internal message is inconsistent with both the first Internet Protocol address and the second Internet Protocol address, it indicates that the internal message is an inter-core communication message and therefore does not need to be sent externally. Therefore, it can be directly submitted to the protocol stack of the first core.
[0055] like Figure 6 As shown, Figure 6This is a specific flow chart of a message diversion method under a 5G network provided by an embodiment of the present invention. Figure 6 In the example of FIG. 5 , the embodiment of the present invention further includes but is not limited to steps S500 , S600 , S700 and S800 :
[0056] Step S500: Acquire a first external message from a first physical network port, wherein the first external message carries a first destination media access control address, and the first destination media access control address is consistent with the first media access control address;
[0057] Step S600, detecting the type of the first external message;
[0058] Step S700: When the type of the first external message is a management message, the first external message is sent to the second core through the first virtual network port;
[0059] Step S800: When the type of the first external message is not a management message, submit the first external message to the protocol stack of the first core.
[0060] Specifically, since the first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with both the first Internet Protocol address and the second Internet Protocol address, when the first physical network port receives a management message, it can directly forward the management message to the second virtual network port of the second core through the first virtual network port of the first core. At this time, the protocol stack of the second core and the applications running on the second core cannot perceive the existence of the inter-core forwarding process, so it is equivalent to the second core receiving the management message directly from the first physical network port.
[0061] like Figure 7 As shown, Figure 7 This is a specific flow chart of a message diversion method under a 5G network provided by an embodiment of the present invention. Figure 7 In the example of FIG, the embodiment of the present invention further includes but is not limited to step S900, step S1000, step S1100, and step S1200:
[0062] Step S900: Acquire a second external message from the second physical network port, wherein the second external message carries a second destination media access control address, and the second destination media access control address is consistent with the first media access control address;
[0063] Step S1000, detecting the type of the second external message;
[0064] Step S1100: When the type of the second external message is a management message, change the second destination media access control address so that the second destination media access control address is consistent with the first media access control address;
[0065] Step S1200: Send the second external message to the second core through the first virtual network port.
[0066] like Figure 8 As shown, Figure 8 This is a specific flow chart of a message diversion method under a 5G network provided by an embodiment of the present invention. Figure 8 In the example, the embodiment of the present invention further includes but is not limited to step S1300:
[0067] Step S1300: When the type of the second external message is not a management message, the second external message is submitted to the protocol stack of the first core for processing.
[0068] Specifically, the first physical network port is configured with an IP address of 10.8.8.112 / 24 and a MAC address of MAC0 00:11:22:33:44:55. The second physical network port is configured with an IP address of 192.168.1.2 / 24 and a MAC address of MAC1 00:11:22:33:44:66. The second virtual network port of the second core is configured with an IP address of 10.8.8.112 / 24 and a MAC address of MAC0 00:11:22:33:44:55. A new IP address of 192.168.1.2 / 24 is also added. At this point, the second virtual network port of the second core is configured with two IP addresses. When the second physical network port receives a management message, the destination MAC address of the message must be the MAC address of the second physical network port, that is, 00:11:22:33:44:66. The destination MAC address of the message needs to be modified to the MAC address of the second virtual network port of the second core, that is, 00:11:22:33:44:55. The message is then forwarded to the second virtual network port of the second core through the first virtual network port. The Layer 3 IP address of this message belongs to 192.168.1.2 / 24. Since the second virtual network port is also configured with this IP address, the protocol stack of the second core can process the message normally. This inter-core forwarding process is completely transparent.
[0069] In summary, the embodiments of the present invention can simultaneously implement the sending and receiving of multiple different messages for different cores on one physical network port.
[0070] In addition, refer to Figure 9The embodiment of the present invention further provides a network device 200, which is provided with a processor 201 and a memory 202, and the processor 201 and the memory 202 are connected via a bus. Specifically, the processor 201 is used to provide computing and control capabilities to support the operation of the entire network device 200. The processor 201 can be a central processing unit (CPU), and the processor 201 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0071] Specifically, the memory 202 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0072] Those skilled in the art will understand that Figure 9 The structure shown in the figure is merely a block diagram of a portion of the structure related to the embodiment of the present invention, and does not constitute a limitation on the network device 200 to which the embodiment of the present invention is applied. A specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0073] The processor is used to run a computer program stored in the memory, and to implement any one of the message diversion methods under the 5G network provided by the embodiments of the present invention when executing the computer program.
[0074] In one embodiment, the processor is configured to execute a computer program stored in the memory.
[0075] It should be noted that, those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the network device 200 described above can refer to the corresponding process in the aforementioned embodiment of the message diversion method under the 5G network, and will not be repeated here.
[0076] In addition, an embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any message diversion method under a 5G network provided in the specification of the present invention.
[0077] The storage medium may be an internal storage unit of the electronic device of the aforementioned embodiment, such as a hard disk or memory of the electronic device. The storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the electronic device.
[0078] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0079] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above implementation. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A message diversion method in a 5G network, applied to a network device, characterized in that: The network device is provided with a processor, the processor includes a first core and a second core, the first core is provided with a first physical network port and a second physical network port, the first core is provided with a first virtual network port, and the second core is provided with a second virtual network port; The first physical network port is configured with a first Internet Protocol address, the second physical network port is configured with a second Internet Protocol address, and the second virtual network port is configured with both the first Internet Protocol address and the second Internet Protocol address; the first physical network port and the second virtual network port are both configured with a first media access control address, and the second physical network port is configured with a second media access control address, and the method includes: Obtaining, from the first virtual network port, an internal message from the second virtual network port, wherein the internal message carries a source Internet Protocol address; the internal message also carries a source media access control address, wherein the source media access control address is consistent with the first media access control address; Determining a sending network port corresponding to the internal message according to a matching condition between the source Internet Protocol address and the first Internet Protocol address and the second Internet Protocol address; Sending the internal message to the outside of the network device through the sending network port; The determining, according to a matching condition between the source Internet Protocol address and the first Internet Protocol address and the second Internet Protocol address, a sending network port corresponding to the internal message includes: In a case where the source Internet Protocol address is inconsistent with the first Internet Protocol address, detecting whether the source Internet Protocol address is consistent with the second Internet Protocol address; When the source Internet Protocol address is consistent with the second Internet Protocol address, determining that the sending network port is the second physical network port, and changing the source media access control address of the internal message so that the changed source media access control address is consistent with the second media access control address; When the source Internet Protocol address is consistent with the first Internet Protocol address, determining that the sending network port is the first physical network port; In a case where the source Internet Protocol address is inconsistent with both the first Internet Protocol address and the second Internet Protocol address, the internal message is submitted to the protocol stack of the first core.
2. The method for packet offloading in a 5G network according to claim 1, wherein: Also includes: Obtaining a first external message from the first physical network port, wherein the first external message carries a first destination media access control address, and the first destination media access control address is consistent with the first media access control address; detecting a type of the first external message; In a case where the type of the first external message is a management message, sending the first external message to the second core through the first virtual network port; When the type of the first external message is not a management message, the first external message is submitted to the protocol stack of the first core.
3. The method for packet diversion in a 5G network according to claim 1, characterized in that ; The method further comprises: Obtaining a second external message from the second physical network port, wherein the second external message carries a second destination media access control address, and the second destination media access control address is consistent with the second media access control address; detecting a type of the second external message; When the type of the second external message is a management message, changing the second destination media access control address so that the second destination media access control address is consistent with the first media access control address; The second external message is sent to the second core through the first virtual network port.
4. The method for packet offloading in a 5G network according to claim 3, wherein: Also includes: When the type of the second external message is not a management message, the second external message is submitted to the protocol stack of the first core for processing.
5. A network device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, a message diversion method under a 5G network as described in any one of claims 1 to 4 is implemented.
6. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and the computer-executable instructions are used to execute a message diversion method under a 5G network as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Transparent Ethernet message transmission method and system based on dual-core AMP system architecture
CN106254578A
Data transmission method, server and computer readable storage medium
CN110932890A
Data transmission method and device, electronic equipment and medium
CN113194162A