Message forwarding method, device, electronic device and storage medium
By deleting the first header of the target message and adding the header of the second network, the problem of complex network configuration and low efficiency when forwarding messages between different networks is solved, and efficient message forwarding is achieved.
Patent Information
- Application Number
- CN202210365312.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-04-07
AI Technical Summary
When forwarding packets between different networks, it is necessary to search the virtual routing forwarding table (VRF) for the forwarding header information of the network to be forwarded in the packet encapsulation, resulting in complex network configuration and low packet forwarding efficiency.
By receiving the target packet, deleting its first packet header, adding the packet header of the second network based on the packet forwarding information, and forwarding it to the second network, the VRF decapsulation and re-encapsulation process is simplified.
It simplifies network configuration, improves packet forwarding efficiency, and enables packets to be efficiently forwarded between different networks.
Smart Images

Figure CN114615197B
Abstract
Description
Background Art
[0002] With the continuous development of the Internet, there are more and more cases of communication between different networks. Since the message needs to pass through a variety of different networks from the user end to the server end, it is inevitable to encapsulate the message with the corresponding forwarding headers of different networks when forwarding the message. At present, when the existing user message is forwarded between different networks, it is necessary to find the corresponding forwarding header information of the network to be forwarded in the virtual routing forwarding table (Virtual Routing Forwarding, VRF).
[0003] Since forwarding messages on different networks requires searching the VRF for the corresponding forwarding header information of the message encapsulation network to be forwarded, this may lead to complex network configuration and low message forwarding efficiency.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a message forwarding method, device, electronic device and storage medium, which at least to a certain extent overcome the problem in the related art that message forwarding in different networks requires searching the VRF for the corresponding forwarding header information of the message encapsulation network to be forwarded, resulting in complex network configuration and low message forwarding efficiency.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, there is provided a message forwarding method, comprising: receiving a target message from a first network, wherein the target message comprises: message forwarding information, message data content, and a first message header encapsulated by the first network for the message data content; deleting the first message header of the target message to obtain the message forwarding information and message data content of the target message; adding a second message header of a second network to the message data content of the target message according to the first message header of the target message; and forwarding the target message to which the second message header is added to the second network according to the first message header of the target message.
[0008] In one embodiment of the present disclosure, after receiving the target message from the first network, the method further includes: identifying, according to a first message header of the target message, whether the target message is a message to be sent to the second network.
[0009] In one embodiment of the present disclosure, the first network is a segment routing SRv6 network based on an IPv6 forwarding plane, and the second network is a network implemented based on a General Radio Packet Service User Plane Tunneling Protocol GTPU tunnel.
[0010] In one embodiment of the present disclosure, the deleting the first message header of the target message to obtain the message forwarding information and message data content of the target message includes: deleting the outer sixth version of the Internet Protocol IPv6 message header of the target message to obtain the message forwarding information and message data content of the target message; the adding the second message header of the second network to the message data content of the target message according to the first message header of the target message includes: identifying the destination address of the target message according to the first message header of the target message; obtaining the GTPU tunnel information of the second network forwarding the target message according to the destination address of the target message; and adding the GTPU message header to the message data content of the target message according to the GTPU tunnel information of the second network forwarding the target message.
[0011] In one embodiment of the present disclosure, the first network is a network implemented based on a GTPU tunnel, and the second network is an SRv6 network.
[0012] In one embodiment of the present disclosure, the deleting the first message header of the target message to obtain the message forwarding information and message data content of the target message includes: deleting the GTPU message header of the target message to obtain the message forwarding information and message data content of the target message; the adding the second message header of the second network to the message data content of the target message according to the first message header of the target message includes: identifying the destination address of the target message according to the first message header of the target message; obtaining the routing information for forwarding the target message by the second network according to the destination address of the target message; and adding the second message header of the second network to the message data content of the target message according to the routing information for forwarding the target message by the second network.
[0013] According to another aspect of the present disclosure, a message forwarding device is provided, including: a message receiving module, used to receive a target message from a first network, wherein the target message includes: message forwarding information, message data content and a first message header encapsulated by the first network for the message data content; a decapsulation module, used to delete the first message header of the target message to obtain the message forwarding information and message data content of the target message; an encapsulation module, used to add a second message header of a second network to the message data content of the target message according to the first message header of the target message; and a message forwarding module, used to forward the target message to which the second message header is added to the second network according to the message forwarding information of the target message.
[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned message forwarding methods by executing the executable instructions.
[0015] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the message forwarding method described in any one of the above is implemented.
[0016] The embodiments of the present invention provide a message forwarding method, device, electronic device and storage medium. By deleting the first message header in the target message and then adding the second message header to the message data content of the target message according to the message forwarding information of the target message, the message can be forwarded to a second network different from the first network to which the first message header is applied, thereby simplifying the steps of VRF decapsulation, searching for encapsulation information and message re-capsulation, simplifying network configuration and improving message forwarding efficiency.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0019] Figure 1 A schematic diagram showing a communication system structure in an embodiment of the present disclosure;
[0020] Figure 2 A flow chart of a message forwarding method in an embodiment of the present disclosure is shown;
[0021] Figure 3 A flowchart showing another message forwarding method in an embodiment of the present disclosure is shown;
[0022] Figure 4 A schematic diagram of a first message header structure in an embodiment of the present disclosure is shown;
[0023] Figure 5 A schematic diagram of the structure of a segment list in a message in an embodiment of the present disclosure is shown;
[0024] Figure 6 A schematic diagram showing decapsulation and recapsulation of an IPv6 header into a GTPU header in message forwarding in an embodiment of the present disclosure is shown;
[0025] Figure 7 A schematic diagram of a message forwarding device in an embodiment of the present disclosure is shown;
[0026] Figure 8 A schematic diagram of another message forwarding device in an embodiment of the present disclosure is shown;
[0027] Fig. 9 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown.
[0028] Wherein, the reference numerals are:
[0029] 10: First Network
[0030] 110: Forwarding node
[0031] 111: Forwarding node
[0032] 112: Forwarding node
[0033] 20: Second Network
[0034] 21: Terminal equipment
[0035] 22: Base Station
[0036] 221: Communication Tunnel
[0037] 23: First Network Element
[0038] 24: Second network element
[0039] 25: Third network element
[0040] 70: Message receiving module
[0041] 71: Message identification module
[0042] 72: Decapsulation module
[0043] 74: Encapsulation module
[0044] 76: Message forwarding module
[0045] 900: Electronic equipment
[0046] 910: Processing unit
[0047] 920: Storage unit
[0048] 9201: Random Access Memory (RAM)
[0049] 9202: Cache storage unit
[0050] 9203: Read-only memory unit (ROM)
[0051] 9204: Programs / Utilities
[0052] 9205: Program module
[0053] 930: Bus
[0054] 940: External devices
[0055] 950: Input / Output (I / O) Interface
[0056] 960: Network adapter
[0057] S10-S16: Steps DETAILED DESCRIPTION
[0058] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0059] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0060] Figure 1A schematic diagram of a communication system structure in an embodiment of the present disclosure is shown. The communication system includes a first network 10 and a second network 20. The first network 10 is used to provide a communication medium between forwarding nodes 110-112. Forwarding nodes 110, 111 and 112 are located in the first network 10.
[0061] The forwarding nodes 110-112 are multiple nodes inside the first network 10, which can be used for segmented forwarding of the target message within the first network 10. In addition, the number of forwarding nodes 110-112 is only illustrative, and any number of forwarding nodes can be provided according to actual needs, which is not limited in the embodiments of the present disclosure. The connection mode of the forwarding nodes is also not limited, and the chain connection in the figure is only an example, and the forwarding nodes can also be connected to each other in a ring shape, which is not limited in the embodiments of the present disclosure.
[0062] The terminal device 21, the base station 22, the second network element 24, and the third network element 25 are located in the second network 20, and the first network element 23 is located between the first network 10 and the second network 20. There is a communication tunnel 221 between the base station 22 and the first network element 23 for transmitting information therebetween. The second network element 24 and the third network element 25 are used to manage the base station 22 and the first network element 23, respectively.
[0063] The second network 20 is different from the first network 10 and is used to provide a medium of a communication tunnel 221 between the terminal device 21 and the first network element 23 .
[0064] Optionally, the first network 10 and the second network 20 can be a wired network or a wireless network. The wireless network or wired network mentioned above uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0065] The terminal device 21 can be various electronic devices. The figure shows a desktop computer but is not limited to this. It can also be a smart phone, a tablet computer, a laptop computer, a wearable device, an augmented reality device, a virtual reality device, etc.
[0066] Optionally, when the number of terminal devices 21 exceeds one, the client of the application installed in the terminal device 21 is the same, or the client of the same type of application based on different operating systems. Based on different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc. The types of terminal devices 21 can be the same or different.
[0067] Those skilled in the art will know that Figure 1 The number of terminal devices 21 and second networks 20 is merely illustrative. According to actual needs, there may be any number of terminal devices 21 and second networks 20, which is not limited in the embodiments of the present disclosure.
[0068] The base station 22, i.e. the public mobile communication base station, is the interface device for the terminal device 21 to access the Internet. It is also a form of radio station, which refers to a radio transceiver station that transmits information with the terminal device 21 through a mobile communication exchange center in a certain radio coverage area.
[0069] As an optional implementation, the execution subject of the step is the first network element 23, which is a physical device that stores instruction data information internally and can perform various processing on the target message. It exists between the first network 10 and the second network 20. It can be said that the first network element 23 exists both in the first network 10 and in the second network 20. In this embodiment, the second network 20 can be a 5G network, and the first network element 23 can be a user plane function (User Plane Function, UPF) network element for managing all user plane functions in the 5G core network, and the functions include:
[0070] Anchor points for movement within and between systems;
[0071] An external Protocol Data Unit (PDU) session point connected to a data network;
[0072] Packet routing and forwarding;
[0073] Packet inspection and user plane policy rule enforcement part;
[0074] Traffic usage report;
[0075] an uplink classifier to support routing of traffic flows to a data network;
[0076] Support branching points for multi-host PDU sessions;
[0077] Used for user-plane Quality of Service (QoS) processing, such as packet filtering, gating, and uplink and downlink rate enforcement;
[0078] Uplink service verification;
[0079] Downlink packet buffering and downlink data notification triggering.
[0080] The second network element 24 is located in the second network 20 and exchanges data information with the base station 22 through a communication tunnel. Its function is to manage the access and mobility functions of the base station 22. In this embodiment where the second network 20 is a 5G network, the second network element 24 may be an access and mobility management function (AMF) network element, which may perform the following functions:
[0081] Non-Access Stratum (NAS) signaling terminal;
[0082] NAS signaling security;
[0083] Access layer security control;
[0084] Used for inter-core network node signaling for mobility between 3rd Generation Partnership Project (3GPP) access networks;
[0085] Idle mode User Equipment (UE) reachability (including control and execution of paging retransmissions);
[0086] Registration area management;
[0087] Supports mobility within and between systems;
[0088] Access authentication;
[0089] Access authorization, including roaming rights checks;
[0090] Mobility management control (subscription and policy);
[0091] Support network slicing.
[0092] The third network element 25 is located in the second network 20 and exchanges data information with the first network element 23 through a communication tunnel. Its function is to manage the user's session. In this embodiment where the second network 20 is a 5G network, the third network element 25 can be a session management function (SMF) network element, which can perform the following functions:
[0093] Session management;
[0094] UE IP address allocation and management;
[0095] UPF selection and control;
[0096] Configure traffic control in UPF to route traffic to the appropriate destination;
[0097] Policy execution and QoS control part;
[0098] Downlink data notification.
[0099] The communication tunnel 221 is located in the second network 20, between the first network element 23 and the base station 22, and is used to support data information exchange between the first network element 23 and the base station 22. The protocol used by the communication tunnel 221 is applicable to the second network 20. In this embodiment, the communication tunnel 221 can be a General Packet Radio Service Tunneling Protocol User Plane (GTPU) tunnel.
[0100] The above is a detailed description of each part of the overall system structure of message forwarding. The following is a detailed description of the target message processing process:
[0101] First, a message forwarding method is provided in an embodiment of the present disclosure, and the method can be executed by any electronic device with computing and processing capabilities. In some embodiments, the message forwarding method provided in an embodiment of the present disclosure can be applied but not limited to Figure 1 In the first network element shown.
[0102] Figure 2 A flow chart of a message forwarding method in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the message forwarding method provided in the embodiment of the present disclosure includes the following steps:
[0103] S10, receiving a target message from the first network, wherein the target message includes: message forwarding information, message data content, and a first message header encapsulated by the first network for the message data content.
[0104] The first network is used to provide a communication medium for the devices located therein. In some embodiments, the first network may be a virtual private network (VPN). Figure 1 In the example, the first network 10 is a segment routing SRv6 VPN network based on the Internet Protocol version 6 (IPv6) forwarding plane.
[0105] The target message is a data packet sent by the terminal device, and because it needs to be transmitted in different networks, it needs to encapsulate a message header of a corresponding network format. In this embodiment, the target message can be, but is not limited to, an IPv4 (Internet Protocol version 4) message, an IPv6 message, etc.
[0106] The message forwarding information is a forwarding header fixedly carried by the target message, and is used to implement the forwarding function in the network. In one embodiment of the present disclosure, when the target message is a message of an IPv4 network, the message forwarding information is address information such as a source address and a destination address required for the IPv4 network to forward the target message, but is not limited thereto. The message forwarding information is different from the first message header and the second message header to be mentioned below in that the applied protocols are different, and the internal formats and the operations that can be performed are also different.
[0107] The message data content is the data content contained in the target message, which is the data that the user wants to send or / and receive. In this embodiment, the message data content can be IPv4 data information.
[0108] The first message header is a forwarding header in the first network format. Figure 1 In the embodiment, the first network is an SRv6 VPN network, and the first message header is an IPv6 header. Figure 4 , which is a schematic diagram of the first message header structure in the embodiment of the present disclosure. In the embodiment of the present disclosure, the IPv6 header consists of three parts: the top-level IPv6 standard header, the middle IPv6 extension header (Segment Routing Header, SRH) and the bottom-level IPv6 data payload (IPv6 payload). The composition of a message includes a forwarding header and a data field. In an SRv6 message, the forwarding header is an IPv6 header and an IPv6 extension header (SRH), which are used for message forwarding. The data field is the IPv6 payload, and the data contained therein is the data that the user needs to transmit. The internal fields and functions of the IPv6 header are as follows:
[0109] IPv6 standard header:
[0110] Version:
[0111] The version field is used to identify which protocol the IP datagram uses.
[0112] Traffic class:
[0113] The communication classification field is used to identify the communication flow category corresponding to IPv6.
[0114] Flow label:
[0115] The flow label field can be used to mark the data flow type of the message so as to distinguish different messages at the network layer.
[0116] Payload length:
[0117] The payload length field identifies the total length of the payload portion (including all extension header portions) in the IPv6 datagram in bytes.
[0118] Next header:
[0119] The next header field is used to identify the next header type of the current header (or extended header), occupies 8 bits, and each header type has a preset value.
[0120] Hop limit:
[0121] The hop limit field specifies the number of times a message can be effectively forwarded. Each time it passes through a router node, the value decreases by one. When it is zero, the message is directly discarded.
[0122] Source address:
[0123] The source address identifies the address information of the source node from which the message is sent.
[0124] Destination address:
[0125] The destination address identifies the address information of the receiving node of the message.
[0126] IPv6 extension header part:
[0127] Next header:
[0128] Identifies the type of the packet header following the SRH.
[0129] Header extension length (hdr ext len):
[0130] Identifies the length of the SRH header, that is, the length of the segment list segment list[0]-segment list[n].
[0131] Segments left:
[0132] The number of intermediate nodes visited before reaching the destination address.
[0133] Routing type:
[0134] Identifies the routing header type. The SRH type is 4.
[0135] Last entry:
[0136] The index identifying the last element of the segment list.
[0137] Flags:
[0138] Some identifiers of the data packet.
[0139] Tag:
[0140] Identifies packets in the same group.
[0141] Segment list (segment list[0]-segment list[n]):
[0142] As the name implies, represents each segment on the path.
[0143] Optional type length value item (optional TLV object):
[0144] When a message is transmitted in the network, some irregular information needs to be encapsulated, which can be accomplished through the flexible combination of this item.
[0145] Internet Protocol Version 6 Payload (IPv6 Payload):
[0146] The data information that the user wants to transfer.
[0147] Please refer to Figure 4 and Figure 1, assuming that the target message is located at the forwarding node 212 at this time and is to be sent to the first network element 13, then there will be three segments from the forwarding node 212 to the first network element 13, namely, the forwarding node 212 to the forwarding node 211, the forwarding node 211 to the forwarding node 210, and the forwarding node 210 to the first network element 13. At this time, the parameter segment remaining (segmentsleft) in the SRH will be preset to 2, that is, segments left = 2. segments left represents how many segments are left to reach the destination address. It is worth noting that although the value of segments left changes from 1 to 0 at the previous node before reaching the destination address, it still needs to be forwarded to the next node to reach the destination address. This is because, if the value of segments left changes from 1 to 0 when reaching the destination address, the node's judgment on the SRH is still based on the value of segments left being 1, which will reach an unexpected address. At the same time, forwarding node 211 and forwarding node 210 will both set forwarding information in the form of a 128-bit address. The 128-bit address information can be called a segment ID (SID), and the address information of segment list [2]-[1] is set according to the SID. In fact, there are many types of SIDs, and the forwarding information inside the forwarding node can be set to the corresponding SID according to actual needs. Network element 13 will also set transfer information in the form of a 128-bit address, and the address information of segment list [0] is set according to the transfer information. For example, the SID inside node 211 is fc00: a:: 2, and segment list [2] is also set to fc00: a:: 2. In this way, when the target message is sent from forwarding node 212 to forwarding node 211, forwarding node 211 will search its internally stored SID table according to the address information of segment list [2]. The SID table contains SIDs of various functions. When the address information of segment list[2] is found to correspond to the SID function in its own SID table, the following operations are performed: the value of segment left is subtracted by 1, and the pointer is pointed to the upper layer segment list[1] of segment list[2], and the DA is updated to segment list[1]. Since the DA is changed to node 210, the target message is sent from node 211 to node 210, and then sent to network element 13 after node 210 performs the same operations as above. In this way, network element 13 receives the target message from the first network 10.
[0148] S12, deleting the first message header of the target message, and obtaining message forwarding information and message data content of the target message.
[0149] In one embodiment of the present disclosure, when the first network 10 is a segmented routing SRv6 network based on an IPv6 forwarding plane, step S12 becomes: deleting the outer sixth Internet Protocol IPv6 message header of the target message to obtain the message forwarding information and message data content of the target message.
[0150] In another embodiment of the present disclosure, the first network 10 is a network implemented based on a GTPU tunnel, and step S12 becomes: deleting the GTPU message header of the target message to obtain the message forwarding information and message data content of the target message.
[0151] S14: Add a second message header of the second network to the message data content of the target message according to the first message header of the target message.
[0152] The second network is a network that uses a different protocol than the first network. Figure 1 In the embodiment, the second network 20 may be a fifth generation mobile communication technology (5G) network.
[0153] In an embodiment of the present disclosure, the second network 20 is a network implemented based on a general radio packet service user plane tunneling protocol GTPU tunnel, and the second message header is a general radio packet service user plane tunneling protocol GTPU header.
[0154] See also Figure 6 , which is a schematic diagram of decapsulating and re-capsulating an IPv6 header into a GTPU header in a message forwarding in an embodiment of the present disclosure. The GTPU message header includes three parts: an outer Internet Protocol header (Outer IP header), a user datagram protocol header (User Datagram Protocol header, UDP header) and a general wireless packet service tunneling protocol header (GTP header). The IP forwarding header and the UDP header are used together to forward the GTPU message header within the second network 10, and the GTP header is used to identify the GTP tunnel. Although the IPv6 header is deleted in the aforementioned steps, its segment list [0], i.e., the address information of the DA, has been identified by the first network element 23. Therefore, the first network element 23 can identify the destination address of the target message based on the first message header IPv6 header of the target message.
[0155] See also Figure 5 , is a schematic diagram of a segment list structure in a message in an embodiment of the present disclosure. The programmable 128-bit numerical segment list is also called a segment identifier (Segment Identifier, SID), which includes three parts: locator, function and argument.
[0156] Locator has a routing positioning function. Other nodes in the network can locate this node through the Locator network segment routing. At the same time, all SIDs published by this node can also be reached through the Locator network segment routing.
[0157] Function represents the device's instruction, which is used to instruct the SID node to perform the corresponding functional operation. For example, End.DX6 SID: This operation requires that Segments Left is 0 and the data packet encapsulated with IPv6 removes the outer IPv6 header and forwards the internal user message to the specified next hop address.
[0158] The parameter Argument field can define some message-related information, or other information required for functions related to SRv6SID. In this embodiment, the SID is End.GTPU SID, and the included Argument is a tunnel endpoint identifier (teid). Teid corresponds to a string of numbers that uniquely identifies a GTPU tunnel corresponding to a network element when the network element is used as a terminal. In other words, according to the teid information in the DA (here equal to SID) of the first message header of the target message, the GTPU tunnel information of the second network 20 forwarding the target message can be obtained, and the GTPU tunnel is the communication tunnel 221 that the message needs to pass through when forwarding in the second network, and the GTPU message header of the second network 20 can be added to the message data content of the target message.
[0159] In another embodiment of the present disclosure, the second network is an SRv6 network, and the second message header is an IPv6 message header. Correspondingly, the first message header is a GTPU message header. The first network element 13 identifies the destination address of the target message according to the message forwarding information of the target message; obtains the routing information of the second network forwarding the target message according to the destination address of the target message; and adds the second message header of the second network to the message data content of the target message according to the routing information of the second network forwarding the target message.
[0160] S16: forward the target message with the second message header added thereto to the second network according to the message forwarding information of the target message.
[0161] The message forwarding information carries the destination address information of the target message, which can help the first network forward the target message to the second network.
[0162] As an optional implementation, Figure 3 As shown, after receiving the target message from the first network, the message forwarding method provided in the embodiment of the present disclosure may further include the following steps:
[0163] S11, identifying, according to a first message header of the target message, whether the target message is a message to be sent to the second network.
[0164] Specifically, the first network element 23 will determine the value of segments left in the SRH of the first message header. When the value of segments left is 0, it means that the target message has been forwarded to the first network element 23 and has been forwarded in the first network 10, and is waiting to be sent to the second network 20. The first network element 13 will also determine whether the destination address (DestinationAddress, DA) in the IPv6 standard header is the same as the execution function address pre-configured internally. The method for determining whether the destination address and the execution function address are the same is, for example: DA is a string of 128-bit values, for example: fc00:a::2. The first network element 23 pre-configures the execution function address fc00:a::2, and when it is identified that the DA of the target message is the same as the data, it is determined to be the target message and execute the above steps S12-S16.
[0165] Based on the same inventive concept, a message forwarding device is also provided in the embodiments of the present disclosure, such as the following embodiments.
[0166] Figure 7 A schematic diagram of a message forwarding device in an embodiment of the present disclosure is shown. Figure 7 As shown, the device comprises:
[0167] The message receiving module 70 is used to receive a target message from the first network, wherein the target message includes: message forwarding information, message data content, and a first message header encapsulated by the first network for the message data content;
[0168] The decapsulation module 72 is used to delete the first message header of the target message and obtain the message data content of the target message;
[0169] An encapsulation module 74, configured to add a second message header of a second network to the message data content of the target message according to the message forwarding information of the target message; and
[0170] The message forwarding module 76 is used to forward the target message with the second message header added to the second network.
[0171] In some embodiments, in the message forwarding device provided in the embodiments of the present disclosure, the first network may be a segmented routing SRv6 network based on the IPv6 forwarding plane, and the second network may be a network implemented based on the General Radio Packet Service User Plane Tunnel Protocol GTPU tunnel.
[0172] In some embodiments, the above-mentioned decapsulation module 72 is also used to: delete the sixth version of the Internet Protocol IPv6 message header of the target message to obtain the message forwarding information and message data content of the target message; the above-mentioned encapsulation module 74 is also used to: identify the destination address of the target message based on the first message header of the target message; obtain the GTPU tunnel information of forwarding the target message to the second network based on the destination address of the target message; add a GTPU message header to the message data content of the target message based on the GTPU tunnel information of forwarding the target message to the second network.
[0173] In other embodiments, in the message forwarding device provided in the embodiments of the present disclosure, the first network is a network implemented based on a GTPU tunnel, and the second network is an SRv6 network.
[0174] In some embodiments, the above-mentioned decapsulation module 72 is also used to: delete the GTPU message header of the target message to obtain the message forwarding information and message data content of the target message; the above-mentioned encapsulation module 74 is also used to: identify the destination address of the target message according to the first message header of the target message; obtain the routing information of the second network forwarding the target message according to the destination address of the target message; add the second message header of the second network to the message data content of the target message according to the routing information of the second network forwarding the target message.
[0175] like Figure 8 In some embodiments, the message forwarding device provided in the embodiment of the present disclosure may further include: a message identification module 71, which is used to identify whether the target message is a message to be sent to the second network according to the first message header of the target message.
[0176] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0177] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0178] like Fig. 9, which is a block diagram of an electronic device in an embodiment of the present disclosure. The electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0179] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 910, so that the processing unit 910 executes the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 910 can execute the following steps of the above method embodiment: receiving a target message from a first network, wherein the target message includes: message forwarding information, message data content, and a first message header encapsulated by the first network for the message data content; deleting the first message header of the target message to obtain the message forwarding information and message data content of the target message; adding a second message header of the second network to the message data content of the target message according to the message forwarding information of the target message; forwarding the target message with the second message header added to the second network.
[0180] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .
[0181] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0182] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0183] The electronic device 900 may also communicate with one or more external devices 940 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0184] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0185] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.
[0186] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, 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), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0187] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a 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.
[0188] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0189] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0190] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0191] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0192] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0193] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A message forwarding method, characterized in that: include: Receiving a target message from a first network, wherein the target message includes: message forwarding information, message data content, and a first message header encapsulated by the first network for the message data content; Deleting the first message header of the target message, and obtaining message forwarding information and message data content of the target message; According to the first message header of the target message, adding a second message header of the second network to the message data content of the target message; forwarding the target message to which the second message header is added to the second network according to the message forwarding information of the target message; Among them, when the first network is a segmented routing SRv6 network based on the IPv6 forwarding plane and the second network is a network implemented based on the general radio packet service tunneling protocol user plane GTPU tunnel, the first message header includes a segment identifier SID, and the value of the Argument parameter in the SID is a tunnel endpoint identifier TEID, and adding the second message header of the second network to the message data content of the target message according to the first message header of the target message includes: obtaining the GTPU tunnel information according to the TEID; adding the second message header of the second network to the message data content of the target message according to the GTPU tunnel information.
2. The message forwarding method according to claim 1, characterized in that: After receiving the target message from the first network, the method further includes: According to the first message header of the target message, it is identified whether the target message is a message to be sent to the second network.
3. The message forwarding method according to claim 1 or 2, characterized in that: The first network is an SRv6 network, and the second network is a network implemented based on a GTPU tunnel.
4. The message forwarding method according to claim 3, characterized in that: The deleting the first message header of the target message and obtaining the message forwarding information and message data content of the target message includes: The outer sixth version of the Internet Protocol IPv6 message header of the target message is deleted to obtain the message forwarding information and message data content of the target message.
5. The message forwarding method according to claim 4, characterized in that: The adding, according to the first message header of the target message, the second message header of the second network to the message data content of the target message comprises: Identifying a destination address of the target message according to a first message header of the target message; According to the destination address of the target message, obtain the GTPU tunnel information of the second network forwarding the target message; According to the GTPU tunnel information of the target message forwarded by the second network, a GTPU message header is added to the message data content of the target message.
6. The message forwarding method according to claim 1 or 2, characterized in that: The first network is a network implemented based on a GTPU tunnel, and the second network is an SRv6 network.
7. The message forwarding method according to claim 6, characterized in that: The deleting the first message header of the target message to obtain the message forwarding information and message data content of the target message includes: deleting the GTPU message header of the target message to obtain the message forwarding information and message data content of the target message; The adding, according to the first message header of the target message, the second message header of the second network to the message data content of the target message comprises: Identifying a destination address of the target message according to a first message header of the target message; According to the destination address of the target message, obtain the routing information for forwarding the target message by the second network; A second message header of the second network is added to message data content of the target message according to routing information for forwarding the target message by the second network.
8. A message forwarding device, characterized in that: include: A message receiving module, configured to receive a target message from a first network, wherein the target message includes: message forwarding information, message data content, and a first message header encapsulated by the first network for the message data content; A decapsulation module, used to delete the first message header of the target message, and obtain message forwarding information and message data content of the target message; an encapsulation module, configured to add a second message header of a second network to the message data content of the target message according to the first message header of the target message; and a message forwarding module, configured to forward the target message with the second message header added thereto to the second network according to the message forwarding information of the target message; Among them, when the first network is a segmented routing SRv6 network based on the IPv6 forwarding plane and the second network is a network implemented based on the general wireless packet service tunneling protocol user plane GTPU tunnel, the first message header includes a segment identifier SID, and the value of the Argument parameter in the SID is a tunnel endpoint identifier TEID. The encapsulation module is used to obtain the GTPU tunnel information according to the TEID; and add a second message header of the second network to the message data content of the target message according to the GTPU tunnel information.
9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the message forwarding method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the message forwarding method according to any one of claims 1 to 7 is implemented.
