Error message transmission method and device
By adding the public network address to the load of the error message in the public network node, the problem that the source device cannot accurately detect the delay of the intermediate node and locate the abnormal node is solved, and the accurate calculation and rapidity of the delay of the service message transmission is achieved. Repackage.
Patent Information
- Application Number
- CN202310857969.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-01-14
AI Technical Summary
When private network traffic is transmitted through segment routing public networks based on IPv6 forwarding plane, the source device cannot accurately detect the delay of the intermediate node and cannot accurately locate the nodes where abnormalities occur, resulting in inaccurate delay of the abnormal traffic transmission.
When the service message is transmitted abnormally, the public network node that detects the abnormality will add the public network address of the local machine to the load of the error message, and return the original service message as the load of the error message directly to the source side without any further transmission to the tail node, so that the source private network device can accurately calculate the service message transmission delay.
Through this method, the source private network device can accurately locate nodes where packet transmission abnormalities occur, improve the accuracy of service packet transmission delay, and ensure that service packets can be re-encapsulated and transmitted more quickly.
Smart Images

Figure CN119316088A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for transmitting an error message. Background Art
[0002] The Internet Control Message Protocol (ICMP) is a connectionless network layer protocol that returns error messages to the source device when problems such as message length or timeout occur during service data transmission. The source device can then determine how to repackage and transmit service data based on the error type indicated in the error message.
[0003] In the related technology, when private network traffic is transmitted through the public network of Segment Routing IPv6 (SRv6) based on the IPv6 forwarding plane, the customer edge device (Customer Edge, CE) in the private network encapsulates the service message and transmits it to the network edge device (Provider Edge, PE) in the public network. The PE will use the received service message as the load, encapsulate a layer of IPv6 message header on the outer layer of the service message, and transmit it in the public network based on the outer IPv6 message header. When the service message is transmitted abnormally at a certain PE, the PE will generate an error message, replace the source address and destination address in the inner message header, and will not modify the outer message header and will still forward it according to the original rules. Therefore, the error message will continue to be transmitted to the last hop, and the message will be returned to the source CE by querying the private network routing table at the last hop.
[0004] It can be seen that in the current traditional error message transmission method, since the error message needs to be returned from the tail node to the source device, when the node where the abnormality occurs is an intermediate node, the source device will not be able to accurately detect the delay, and the source device cannot accurately locate the node where the abnormality occurs based on the received error message. Summary of the invention
[0005] The present application provides a method and apparatus for transmitting an error message, which is used by a private network device to accurately locate a node where an abnormal message transmission occurs, so that the message can be repackaged better.
[0006] In a first aspect, the present application provides a method for transmitting an error message, the method being applied to a first public network node in a service message transmission path, comprising:
[0007] Receiving a service message from a second public network node; the second public network node is a previous hop node of the first public network node;
[0008] When determining that the service message transmission is abnormal, generating an error message; the destination address of the error message is the address of the second public network node, and the load of the error message includes the service message and the public network address of the first public network node;
[0009] Send the error message to the second public network node.
[0010] In some embodiments, the service message is sent from a source private network device to a destination private network device, and includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the source address included in the inner message header is the address of the source private network device, and the destination address is the address of the destination private network device; the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
[0011] In some embodiments, the outer layer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; the source public network node is a public network node connected to the source private network device. The private network indication information is added by the source public network node.
[0012] In some embodiments, generating an error message includes:
[0013] Determine the message header of the error message according to the source address included in the outer message header;
[0014] The public network address of the first public network node and the service message are encapsulated using a determined message header to obtain the error message.
[0015] In a second aspect, the present application provides another method for transmitting an error message, the method being applied to a second public network node in a service message transmission path, the service message being transmitted from a source private network device to a destination private network device, the second public network node being any public network node in the transmission path except the source public network node, the source public network node being a public network node connected to the source private network device, the method comprising:
[0016] Receiving a first error message from a first public network node; the first public network node is a next hop node of the second public network node; the first error message is generated by the second public network node when determining that the service message transmission is abnormal, and the payload of the first error message includes the service message and the public network address of the first public network node;
[0017] Parsing the first error message, and extracting the public network address of the source public network node from a message header of the first error message;
[0018] Generate a second error message according to the first error message and the public network address of the source public network node;
[0019] Send the second error message to the source public network node.
[0020] In some embodiments, the service message is sent from a source private network device to a destination private network device, and includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the source address included in the inner message header is the address of the source private network device, and the destination address is the address of the destination private network device; the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
[0021] In some embodiments, the outer layer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; the source public network node is a public network node connected to the source private network device. The private network indication information is added by the source public network node.
[0022] In some embodiments, generating a second error message according to the first error message and the public network address of the source public network node includes:
[0023] Determine a message header of the second error message according to the public network address of the source public network node;
[0024] The payload of the first error message is encapsulated using a determined message header to obtain the second error message.
[0025] In a third aspect, the present application provides another method for transmitting an error message, the method being applied to a source public network node in a service message transmission path, the service message being transmitted from a source private network device to a destination private network device, the source public network node being a public network node connected to the source private network device, the method comprising:
[0026] Receive an original error message from a next-hop public network node; the original error message is generated when the service message is transmitted abnormally, and the payload of the original error message includes the service message and the address of the public network node that determines the service message transmission abnormality;
[0027] Parsing the original error message, and extracting the address of the source private network device from the message header of the original error message;
[0028] Generate a target error message according to the original error message and the address of the source private network device;
[0029] Send the target error message to the source private network device.
[0030] In some embodiments, generating a target error message according to the original error message and the address of the source private network device includes:
[0031] Determine the target private network to which the source private network device bound to the source public network node belongs, and query the private network address of the source public network node for the target private network;
[0032] Determine the message header of the target error message according to the private network address of the source public network node and the address of the source private network device;
[0033] The payload of the original error message is encapsulated using a determined message header to obtain the target error message.
[0034] In some embodiments, determining the target private network to which the source private network device bound to the source public network node belongs includes:
[0035] Parsing the original error message, and extracting the private network indication information from the message header of the original error message;
[0036] The target private network to which the source public network node is bound is determined according to the private network indication information.
[0037] In some embodiments, before receiving the original error message from the next-hop public network node, the method further includes:
[0038] Receiving a service message from the source private network device;
[0039] Adding an outer message header to the service message from the source private network device; the outer message header includes the private network indication information; the service message from the source private network device includes an inner message header, and the inner message header is set by the source private network device;
[0040] The service message after adding the outer message header is forwarded to the next-hop public network node.
[0041] In a fourth aspect, the present application provides a transmission device for an error message, the device being applied to a first public network node in a service message transmission path, the device comprising:
[0042] A communication unit, configured to receive a service message from a second public network node; the second public network node is a previous hop node of the first public network node;
[0043] A processing unit, configured to generate an error message when determining that the service message transmission is abnormal; the destination address of the error message is the address of the second public network node, and the load of the error message includes the service message and the public network address of the first public network node;
[0044] The communication unit is further used to send the error message to the second public network node.
[0045] In some embodiments, the service message is sent from a source private network device to a destination private network device, and includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the source address included in the inner message header is the address of the source private network device, and the destination address is the address of the destination private network device; the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
[0046] In some embodiments, the outer layer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; the source public network node is a public network node connected to the source private network device. The private network indication information is added by the source public network node.
[0047] In some embodiments, the processing unit is specifically configured to:
[0048] Determine the message header of the error message according to the source address included in the outer message header;
[0049] The public network address of the first public network node and the service message are encapsulated using a determined message header to obtain the error message.
[0050] In a fifth aspect, the present application provides another error message transmission device, the device is applied to a second public network node in a service message transmission path, the service message is transmitted from a source private network device to a destination private network device, the second public network node is any public network node in the transmission path except the source public network node, the source public network node is a public network node connected to the source private network device, and the device includes:
[0051] A communication unit, configured to receive a first error message from a first public network node; the first public network node is a next hop node of the second public network node; the first error message is generated by the second public network node when determining that the service message transmission is abnormal, and the payload of the first error message includes the service message and the public network address of the first public network node;
[0052] A processing unit, configured to parse the first error message and extract the public network address of the source public network node from a message header of the first error message;
[0053] The processing unit is further configured to generate a second error message according to the first error message and the public network address of the source public network node;
[0054] The communication unit is further used to send the second error message to the source public network node.
[0055] In some embodiments, the service message is sent from a source private network device to a destination private network device, and includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the source address included in the inner message header is the address of the source private network device, and the destination address is the address of the destination private network device; the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
[0056] In some embodiments, the outer layer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; the source public network node is a public network node connected to the source private network device. The private network indication information is added by the source public network node.
[0057] In some embodiments, the processing unit is specifically configured to:
[0058] Determine a message header of the second error message according to the public network address of the source public network node;
[0059] The payload of the first error message is encapsulated using a determined message header to obtain the second error message.
[0060] In a sixth aspect, the present application provides another error message transmission device, the device is applied to a source public network node in a service message transmission path, the service message is transmitted from a source private network device to a destination private network device, the source public network node is a public network node connected to the source private network device, and the device includes:
[0061] A communication unit, configured to receive an original error message from a next-hop public network node; the original error message is generated when the service message transmission is abnormal, and the payload of the original error message includes the service message and the address of the public network node that determines the service message transmission abnormality;
[0062] A processing unit, configured to parse the original error message and extract the address of the source private network device from a message header of the original error message;
[0063] The processing unit is further used to generate a target error message according to the original error message and the address of the source private network device;
[0064] The communication unit is further used to send the target error message to the source private network device.
[0065] In some embodiments, the processing unit is specifically configured to:
[0066] Determine the target private network to which the source private network device bound to the source public network node belongs, and query the private network address of the source public network node for the target private network;
[0067] Determine the message header of the target error message according to the private network address of the source public network node and the address of the source private network device;
[0068] The payload of the original error message is encapsulated using a determined message header to obtain the target error message.
[0069] In some embodiments, the processing unit is specifically configured to:
[0070] Parsing the original error message, and extracting the private network indication information from the message header of the original error message;
[0071] The target private network to which the source public network node is bound is determined according to the private network indication information.
[0072] In some embodiments, before receiving the original error message from the next-hop public network node, the communication unit is further used to receive a service message from the source private network device;
[0073] The processing unit is further used to add an outer message header to the service message from the source private network device; the outer message header includes the private network indication information; the service message from the source private network device includes an inner message header, and the inner message header is set by the source private network device;
[0074] The communication unit is also used for the next-hop public network node to forward the service message after the outer message header is added.
[0075] In a seventh aspect, an electronic device is provided, the electronic device comprising a controller and a memory. The memory is used to store computer-executable instructions, and the controller executes the computer-executable instructions in the memory to use hardware resources in the controller to perform the operation steps of any possible implementation method of the first aspect, the second aspect, or the third aspect.
[0076] In an eighth aspect, a computer-readable storage medium is provided, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the methods in the above aspects.
[0077] In the present application, a public network node that detects an abnormality in the transmission of a service message will add the public network address of the local machine to the load of the error message, so that the source-end device can accurately locate the node where the message transmission abnormality occurs based on the error message. In addition, when the public network node that detects the abnormality generates an error message, it uses the original service message as the load of the error message, and does not modify the source address and destination address in the message header of the original service message, but sets the source address of the outer public network message header as the destination address. The difference message can be directly returned from the public network node that detects the abnormality to the previous hop node, and finally transmitted to the source end, without the need to be transmitted to the tail node and returned by the tail node, so that the source private network device can accurately calculate the service message transmission delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0079] Figure 1 It is a schematic diagram of the transmission process of an ICMP message;
[0080] Figure 2 A schematic diagram of the architecture of a communication scenario provided in an embodiment of the present application;
[0081] Figure 3 It is a schematic diagram of a process of transmitting an error message;
[0082] Figure 4 A schematic diagram of a method for transmitting an error message provided in an embodiment of the present application;
[0083] Figure 5 A schematic diagram of the structure of a message generated by each node provided in an embodiment of the present application;
[0084] Figure 6 A schematic diagram of another error message transmission method flow provided in an embodiment of the present application;
[0085] Figure 7 A schematic diagram of a transmission process of an error message provided in an embodiment of the present application;
[0086] Figure 8 A schematic diagram of the structure of a transmission device for an error message provided in an embodiment of the present application;
[0087] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0088] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
[0089] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented using sequences other than those illustrated or described herein. In addition, the term "and / or" herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " herein, unless otherwise specified, generally indicates that the previously associated objects are in an "or" relationship.
[0090] In order to facilitate understanding of the solution of this application, the technical terms involved in this application are first introduced:
[0091] (1) ICMP protocol: a network layer protocol used to detect whether a service message can be delivered normally, and the error reasons that lead to non-delivery. The ICMP message includes a field (type field) used to characterize the category of service message transmission anomaly, and a field (code field) that further explains the type field, which is used to indicate the unique identifier of the session. The source device can locate the specific problem of the service message transmission failure based on the ICMP message, so as to better repackage and send the service message according to the problem. For example, when the ICMP message includes type=11 and code=0, the type of service message transmission anomaly is characterized by the time to live (TTL) during transmission being 0, and the service message transmission timeout. Therefore, when the source device receives the ICMP message, it can set a higher value for TTL to avoid transmission timeout. The ICMP message is generated by a node that determines the service message transmission anomaly. For example, when a forwarding node detects TTL=0, it can generate a service message and transmit it back to the source device. For example, see Figure 1 , is a schematic diagram of the transmission process of an ICMP message. Figure 1As shown in the figure, the type of service message transmission exception is the destination address unreachable. The source device sends the service message to the destination device through the forwarding node. However, the destination address indicated in the message header of the service message is 10.0.0.0 / 24, while the actual address of the destination device is 20.0.0.0 / 24. Therefore, the service message cannot reach the destination device. As a result, the last hop in the transmission path generates an ICMP message and returns it to the source device.
[0092] (2) Virtual Private Network (VPN): It is a network communication technology that establishes a private network on the public network to perform encrypted communication. For example, when the headquarters and branches of a company in two locations need to communicate through the Internet, both parties need to have fixed public IP addresses. However, due to the scarcity of public IP addresses, network operators generally provide networks through hierarchical dynamic IP addresses. Therefore, the network IP addresses of the headquarters and branches are not fixed and cannot be directly accessed. In order to solve this problem, VPN technology came into being. The so-called VPN is to establish a virtual private network in the public network to achieve point-to-point communication, which is equivalent to building a private and dedicated network transmission channel on the Internet to meet the needs of remote visits. VPN technology is divided into Layer 2 VPN (Layer 2 Virtual Private Network, L2 VPN) and Layer 3 VPN (Layer 3 Virtual Private Network, L3 VPN).
[0093] (3) Segment Routing (SR): A routing method based on source address, which carries a Segment Routing Header (SRH) in the packet header of Multi-Protocol Label Switching (MPLS) network or Internet Protocol Version 6 (IPv6) packet header. The SRH carries a series of indication operations (also called segment operations) for data routing and transmission in the network. SR divides the network path into segments and assigns segment IDs (SIDs) to these segments and forwarding nodes in the network. In the actual data transmission process, the Segment List is obtained by orderly arranging the segments and network nodes to indicate the forwarding path of the data.
[0094] (4) SRv6: A routing method for data forwarding based on IPv6, which is implemented by adding an extended header to the service message. SRv6 does not change the encapsulation structure of the original service message, but only encapsulates an IPv6 header in the outer layer of the original service message. The outer header includes SRH. The main contents of SRH are: SegmentList, which is used to store multiple SIDs. Multiple SIDs are stored in reverse order in Segment List. Segment Left (SL), which is used to indicate the number of remaining segments. The minimum SL value is 0. For example, when SL = 2, it indicates that the next hop node is the third SID in SegmentList. In specific routing, the forwarding node determines the end of the current instruction through the End field included in SRH and starts to execute the next instruction. The corresponding forwarding action is to reduce the SL value by 1 and copy the SID pointed to by SL to the newly added outer IPv6 header as the destination address.
[0095] There are two working modes of SRv6: SRv6 Best Effort (BE) and SRv6 Traffic Engineering Policy (TE Policy). Both modes can be used to carry traditional services, such as L3VPN, L2VPN, and Ethernet VPN (EVPN).
[0096] (5) SRv6 BE: This is a method of calculating the SRv6 path based on the shortest path algorithm. It only uses one SID to guide the forwarding of service messages in the link. It is a best-effort working mode. It is generally used to carry ordinary VPN services and is used to quickly open services.
[0097] (6) SRv6 TE Policy: Utilizes the SR source routing mechanism to guide packets through the network by encapsulating an ordered instruction list in the head node. During configuration, the controller can pre-calculate multiple SRv6 TE Policy tunnels based on the node link information, link overhead, bandwidth, latency and other attributes in the network, and send the calculated multiple SRv6 TE Policy tunnels to the head node, so that the head node can select the appropriate SRv6 TE Policy tunnel for forwarding different service packets. During the forwarding process, each forwarding node executes the corresponding forwarding or processing instructions according to the information carried in the SRH.
[0098] (7) Open Shortest Path First (OSPF): It is a local gateway protocol used to make routing decisions within a single autonomous system (AS).
[0099] (8) Autonomous System Boundary Routers (ASBR): Used to exchange routing information between ASs and use a variety of routing protocols. ASBRs are located between the OSPF autonomous system and the OSPF network. As long as an OSPF router imports external routing information, it can become an ASBR.
[0100] (9) Binding Segment Identifier (BSID): It is an important component of the SR policy. The BSID has three main functions. First, it serves as an identifier of the SR policy. Through the BSID, traffic is clearly directed to a specific SR policy. Second, it replaces the complete path information SID List. Third, as an external SR policy identifier, it can shield the security risks caused by SID-list leakage for security reasons.
[0101] The following describes the scenarios in which the error message transmission scheme proposed in this application is used. This application scheme is applied to the scenario in which network traffic is transmitted through public network nodes. Figure 2 , is a schematic diagram of the architecture of a communication scenario provided in an embodiment of the present application. Figure 2 The scenario shown includes a source private network device, a destination private network device, and multiple public network nodes. Figure 2 As an example only, this application does not limit the number of private network devices and public network nodes included in the scenario. Figure 2 Only two private network devices and three public network nodes are shown in the figure as an example, wherein the public network node A is connected to the source private network device, and the public network node B is connected to the destination private network device.
[0102] exist Figure 2 In the example, the source private network device or the destination private network device may be a CE device, including a switch, a router, a routing switch, etc. to which the user terminal device is connected. The source private network device or the destination private network device has a variety of interfaces and can be connected to various devices. Figure 2 The public network nodes connected to the private network devices, such as public network node A and public network node C, can be PE devices with the ability to encapsulate and decapsulate, and are used to receive data from the private network and transmit data to the private network. During the private network data transmission process, the public network node A connected to the source private network device can also be called the head node, and the public network node C connected to the destination private network device can also be called the tail node. Figure 2Only two private networks are shown as examples. It should be noted that the head node (or tail node) can be bound to multiple private networks at the same time, and has a private network address for each private network, and a private network routing table storing each private network. The private network address of the head node (or tail node) and the stored private network routing table are used to communicate with devices in the private network.
[0103] For example, in Figure 2 In the scenario shown, on the path where the source private network device transmits data to the destination private network device, each public network node can forward data based on the SRv6 BE working mode, or pre-establish an SRv6 TE Policy tunnel. For example, an SRv6 TE Policy tunnel can be pre-established from public network node A to public network node C via public network node B. After receiving the data from the source private network device, public network node A can directly transmit the data to the destination private network device through the SRv6 TE Policy tunnel.
[0104] During the transmission of private network service messages on the public network, if a public network node detects that the service message transmission is abnormal, the public network node will generate an ICMP error message and replace the source address and destination address in the inner message header of the original service message. The source address and destination address in the outer message header are still forwarded hop by hop according to the SRH. Therefore, the error message will be transmitted to the tail node, which will parse the inner message header and return the error message to the source private network device. The source private network device can know the error information and the source of the error message (i.e., the tail node) based on the error message, but cannot accurately locate the public network node where the abnormality occurs.
[0105] For example, see Figure 3 , is a flow chart of error message transmission in a traditional scheme. Figure 3 In the description, the transmission abnormality type indicated by the error message is transmission timeout as an example for introduction, specifically the problem that the TTL is 0 in the transmission timeout type. Figure 3 The process shown specifically includes:
[0106] S301: CE1 sends a service message to PE1.
[0107] For example, the structure of the service message can be found in Figure 3 In A31, the message header of the service message includes a source address of CE1 and a destination address of CE2. Assume that the TTL in the message header is 2.
[0108] S302, the PE1 node receives the service message, re-encapsulates the service message to obtain a new message, and sends the new message to the P node.
[0109] Optionally, the PE1 node can determine that the service message comes from a private network device through an interface receiving the service message. Further, the PE1 node can parse the service message, determine that its destination address is CE2, and query the route of CE2 according to the stored private network routing table.
[0110] For example, after determining the SRv6 TE Policy tunnel for transmitting the service message, the PE1 node can encapsulate the service message with a public network IPv6 message header again, and use the original service message as the payload of the new message. For example, the structure of the new message can be found in Figure 3 A32 in the header of the new message includes the forwarding path in the SRv6 TE Policy, that is, the SRH included in the header is: P END, PE2 END, PE2 END.DT4. Among them, the SIDs in the SRH are stored in reverse order, PE2END.DT4 is used to indicate a private network address in PE2. This application does not limit the type of private network address. For example, it can also be a private network address of the END.DT6 type. Here, only the END DT4 type is used as an example for introduction. Furthermore, the SL value can be set to 2 in the header of the new message to point to SID[2]: P END, and the TTL value in the header of the new message can be set to 1, which is consistent with the TTL value in the header of the original service message. It is known that the TTL in the header of the original service message is 2 in CE1, so after passing through the PE1 node, the TTL value is reduced by one and becomes 1. Furthermore, the PE1 node can point to the P node according to the SL, query the route of the P node in the public network routing table, and send a new message from the interface specified by the route (that is, the interface directly connected to the P node).
[0111] S303, the P node receives a message from the PE1 node, determines that the message transmission has timed out, and generates a first error message.
[0112] When the P node generates the first error message, it will replace the source address and destination address in the inner message header of the original message, that is, set the source address to CE2 and the destination address to CE1, so that the message can return to CE1 after reaching the tail node. Furthermore, the P node can modify the outer message header of the original message to obtain a new outer message header. It is known that the SL value in the outer message header of the original message is 2. After transmission to the local machine, the SL can be reduced by one so that SL=1 points to the PE2 node. The P node can use the PE2 node as the destination address of the outer message header of the first error message, and use the local public network address as the source address. After determining the message header of the first error message, the P node can use the determined message header to encapsulate the error information to obtain the first error message. The error information is information indicating the type of message transmission exception, such as fields such as type and code included in the ICMP message introduced in the aforementioned embodiment. By way of example, the structure of the first error message can be found in Figure 3 B31 in.
[0113] S304: The P node sends a first error message to the PE2 node.
[0114] Since the P node does not replace the source address and the destination address of the outer public network IPv6 message header, the P node will send the first error message to the PE2 node according to the instruction of the SL in the SRH.
[0115] S305: The PE2 node receives the first error message, and parses the first error message to determine that the destination address of the first error message is CE1.
[0116] For example, after receiving the first error message, the PE2 node can parse the first error message, subtract one from the SL in its message header, determine that the SL value is 0, and point to PE2 END.DT4. After determining that PE2 END.DT4 is a local END.DT4 type SID, the PE2 node can obtain the private network routing table corresponding to the SID, and query the destination address in the inner message header, that is, the route of CE1, through the private network routing table.
[0117] S306: The PE2 node generates a second error message according to the queried route of CE1 and the first error message, and forwards the second error message to the PE1 node through the P node.
[0118] For example, the structure of the second error message can be found in Figure 3 B32 in.
[0119] S307, PE1 receives the second error message, generates a third error message according to the second error message, and forwards the third error message to CE1.
[0120] For example, the structure of the third error message can be found in Figure 3 B33 in.
[0121] After receiving the third error message, CE1 can parse the third error message and determine that the type of service message transmission anomaly is transmission timeout. However, since the source address in the message is CE2, CE1 cannot know which forwarding node has timed out and cannot locate the node where the message anomaly occurs.
[0122] from Figure 3 It can be seen from the process shown that in the traditional error message transmission scheme, the source private network device cannot accurately locate the node where the message transmission is abnormal, and the error message needs to be transmitted to the tail node and then returned to the source private network device, resulting in inaccurate delay detection by the source private network device. In view of this, the present application proposes a method for transmitting an error message, in which a public network node that detects an abnormality in the transmission of a service message will add the public network address of the local machine to the load of the error message, so that the source end device can accurately locate the node where the message transmission is abnormal according to the error message. In addition, when the public network node that detects the abnormality in the transmission of the service message generates an error message, it uses the original service message as the load of the error message, and does not modify the source address and destination address in the inner layer message header of the original service message, but sets the source address of the outer layer public network message header to the destination address. The error message can be directly transmitted from the public network node that detects the abnormality to the source end, without having to be transmitted to the tail node and returned by the tail node, so that the source private network device can accurately calculate the service message transmission delay.
[0123] The following, combined Figure 2 The communication scenario shown in the figure specifically introduces the error message transmission method proposed in this application. Figure 4 , is a flow chart of a method for transmitting an error message provided in an embodiment of the present application. For example, Figure 4 The method flow shown can be Figure 2 The communication scenario shown in the figure is performed by any public network node. For the convenience of description, Figure 4 The execution subject of the method flow shown is referred to as the first public network node for short. Figure 4 The method flow shown specifically includes:
[0124] 401. A first public network node receives a service message from a second public network node.
[0125] The second public network node is the previous hop node of the first public network node in the service message transmission path. The service message is sent from the source private network device to the destination private network device. As an example, the structure of the service message from the second public network node can be seen in Figure 5 As shown in (a) in Figure 5In the figure, PE1 represents the second public network node, and P represents the first public network node.
[0126] 402. When determining that the service message transmission is abnormal, the first public network node generates an error message.
[0127] The error message payload includes the public network address of the first public network node, so that the source private network device can accurately locate the public network node where the message transmission is abnormal according to the error message.
[0128] Optionally, the first public network node may determine error information based on the type of abnormal transmission of the service message, and encapsulate the error information and the public network address of the first public network node using the local public network address as the source address and the address of the second public network node as the destination address to obtain an error message. Exemplarily, the payload of the error message may include, in addition to the error information and the public network address of the first public network node, a service message from the second public network node. For example, the first public network node may copy the received service message intact to the payload of the error message. As an example, the structure of the error message generated by the first public network node can be found in Figure 5 Optionally, the public network address of the first public network node included in the load may be encapsulated in the error message based on the RFC4884 standard.
[0129] 403. The first public network node sends an error message to the second public network node.
[0130] Exemplarily, the first public network node may query the route of the second public network node in the public network routing table according to the destination address in the message header of the error message, and send the error message to the second public network node through the interface indicated by the route.
[0131] Based on the above scheme, in this application, the public network node that detects the abnormality in the transmission of the service message will add the public network address of the local machine to the load of the error message, so that the source end device can accurately locate the node where the message transmission is abnormal based on the error message. In addition, when the public network node that detects the abnormality generates an error message, it uses the original service message as the load of the error message, and does not modify the source address and destination address in the inner message header of the original service message, but sets the source address of the outer public network message header as the destination address. The error message can be directly returned to the previous hop node by the public network node that detects the abnormality, and finally transmitted to the source end, without having to be transmitted to the tail node and returned by the tail node, so that the source private network device can accurately calculate the service message transmission delay.
[0132] In some scenarios, the above Figure 4The second public network node introduced in the above may be a source public network node, that is, a public network node connected to the source private network device in the service message transmission path, for example, Figure 2 Public network node A in the communication scenario shown. When the second public network node is the source public network node, the source public network node can parse the error message from the first public network node, extract the address of the source private network device included therein, generate a new error message based on the extracted address of the source private network device, and send the new error message to the source private network device. For ease of description, the error message from the second public network node is referred to as the original error message, and the new error message generated by the source public network node based on the original error message is referred to as the target error message.
[0133] In a possible implementation, when the source public network node generates a target error message and determines the destination address of the target error message, the original error message from the first public network node can be parsed, and the address of the original private network device can be extracted from the message header. Since the first public network node uses the complete service message as the load of the original error message when generating the original error message, the source public network node parses the message header of the service message included in the original error message, and determines that the source address included in the message header of the service message is the address of the source private network device. Exemplarily, the ICMP proxy function can be pre-configured in the source public network node, and the forwarding module (or forwarding plane) of the source public network node can pass the received original error message to the control module (or control plane) of the source public network node, and the control plane parses the original error message to extract the address of the source private network device. The source public network node can use the extracted address of the source private network device as the destination address of the target error message.
[0134] Furthermore, when determining the source address of the target error message, the source public network device can determine the target private network to which the source private network device bound to the source public network device belongs, and determine the private network address of the source public network device for the target private network, and use the determined private network address as the source address of the target error message. Still further, when determining the load of the target error message, the source public network device can delete the public network IPv6 message header and SRH part of the original error message, and the remaining error information, service message, and the public network address of the first public network node encapsulated using the RFC4884 standard protocol. The source public network node can use the remaining information as the load of the target error message. Thus, the source public network node can use the address of the private network device as the destination address and the private network address of the local machine as the source address, and encapsulate the above-mentioned remaining information to obtain the target error message. As an example, the structure of the target error message generated by the source public network device can be seen in Figure 5 (c) in .
[0135] As an optional method, when determining the target private network to be bound, the source public network node may parse the original error message, and extract the private network indication information from the SRH in the message header of the original error message. The private network indication information may be a SID of the source public network node, and the SID is bound to the target private network. Thus, the source public network node may determine the target private network to be bound based on the parsed private network indication information. Optionally, the private network indication information may be added by the source public network node in the service message, specifically: the source public network node may be configured with an SR-enabled header node information function, which may enable the addition of private network indication information to the SRH encapsulated outside the service message when receiving a service message from a source private network device. The private network indication information may be added to the SL[N] position in the SRH. For example, the service message for adding private network indication information may refer to Figure 5 As shown in (d) in .
[0136] It should be noted that the addition of private network indication information in the SRH in the message header of the service message introduced in the above embodiment is implemented based on the ordinary SRv6 TE scenario (excluding the reduce, path segment and other modes in the SRv6 TE scenario). The solution can also be applied to other scenarios, and in other scenarios, the location of adding the private network indication information is variable. For example, in the SRv6 BE scenario, since the outer message header in the BE scenario usually does not contain the SID list, the SID of the tail node is directly encapsulated as the destination address of the outer message header. Therefore, in the SRv6 BE scenario, a new encapsulation SIDlist can be added to encapsulate the private network indication information of the head node on SL[N]. In the reduce mode scenario, since the SID list does not include the first hop SID, the first hop SID is directly encapsulated at the destination address of the message header. Therefore, in the reduce mode scenario, the head node private network indication information can be encapsulated at the SL[N] position, which does not conflict with this patent. In the path segment scenario, since the head node information logically belongs to the path information, the private network indication information can be encapsulated at the position of SL[N], and the path segment information belongs to the additional path indication information, so the path segment information can also be encapsulated at the position of SL[N+1]. In the END.X scenario, if the head node encapsulation END.X function is configured, END.X as the first hop SID needs to be encapsulated at the position of SL[N], so the private network indication information can be encapsulated at SL[N+1]; determine whether it contains the path segment identifier (P-Flag). If it does, encapsulate the path segment information at the position of SL[N+2].
[0137] In order to further understand the solutions described in the above embodiments, the following is an introduction in conjunction with specific embodiments. Figure 6 , is a flow chart of an error message transmission method provided in an embodiment of the present application. Figure 6 In the process shown, the service message transmission abnormality type is transmission timeout, and the specific problem is TTL=0. For the convenience of description, Figure 6 The process shown in the figure takes the SRv6 TE scenario as an example, in which an SRv6 TE Policy tunnel is established between PE1 and PE2. Figure 6 The method flow shown specifically includes:
[0138] S601, CE1 sends a service message to PE1.
[0139] For example, the structure of the service message can be found in Figure 3 In A31, the message header of the service message includes a source address of CE1 and a destination address of CE2. In order to simulate the scenario of message transmission timeout, TTL in the message header is exemplarily set to 2.
[0140] S602: The PE1 node receives a service message and adds a public network IPv6 message header to the service message to generate a new message.
[0141] For example, the process of PE1 node encapsulating a new message can be referred to above. Figure 3 Step S302 in .
[0142] S603, the PE1 node sends a new message to the P node.
[0143] The specific process of determining the route and sending can also be found in the above Figure 3 Step S302 in .
[0144] S604, the P node receives a new message, determines that the message transmission has timed out, and generates an original error message.
[0145] Exemplarily, the P node can determine the message transmission timeout according to the TTL in the public network message header and determine the error information. Further, the P node uses the received new message, the public network address of the P node and the error information as the load, uses the local public network address as the source address and the public network address of PE1 as the destination address to encapsulate the load and obtain the original error message.
[0146] S605: The P node sends the original error message to the PE1 node.
[0147] Optionally, the P node may query the address of the PE1 node in the public network routing table, determine the route of the PE1 node, and send the original error message to the PE1 node from the interface specified by the route.
[0148] S606: PE1 node receives the original error message and generates a target error message.
[0149] For example, the process of generating the target error message can refer to the process of the source public network node generating the target error message described in the above embodiment, which will not be described in detail here. Figure 5 (c) in .
[0150] S607: PE1 sends a target error message to CE1.
[0151] In some scenarios, the number of private networks bound to the PE1 node is more than one, and the number of private network devices connected is more than one. Therefore, in order to ensure that PE1 can accurately send the target error message to CE1, the embodiment of the present application proposes to configure the SR-enabled header node information function for PE1, which is used for the PE1 node to add the private network address bound to the private network to which CE1 belongs in the message header of the service message. And because the present application sets the original error message generated by the P node to include a complete service message, the PE1 node can parse the message header of the inner service message after receiving the original error message from the P node, obtain the private network address included therein, and determine the private network to which CE1 belongs based on the private network address, thereby accurately sending the generated target error message to CE1. Exemplarily, PE1 can implement this function when executing the above step S602. When PE1 generates a new message according to the service message from CE1, it can add the private network address of the local machine bound to the private network to which CE1 belongs in the SRH included in the message header of the new message. For example, the local private network address can be encapsulated in the SL[N] position in the SRH, where N is used to indicate the last SID in the SRH. As an example, the structure of the new message can be seen in Figure 5 (d) in.
[0152] Exemplarily, the solution of the present application can also be applied to VPN cross-domain scenarios, involving BSID-related multi-level SRH situations. In the multi-level BSID scenario, each level only processes the public network IPv6 extension header of the current level. When the ASBR of each VPN domain forwards the error message, it is necessary to delete the public network IPv6 extension header of the current level in the original service message. In the solution proposed in the present application, for the scenario of multi-level error message forwarding, the source public network node is configured to have the function of enabling the header node information and the ICMP proxy function, and the public network nodes (such as other PE nodes or ASBR nodes, hereinafter referred to as intermediate nodes) for the transmission of other parameter service messages are configured to have the ICMP proxy function.
[0153] In some embodiments, for VPN cross-domain scenarios, when the previous hop node of the public network node that detects abnormal service message transmission is an intermediate node, the intermediate node can parse the received error message, extract the public network address of the source public network node, and send an error message to the source public network node based on the extracted public network address. After receiving the error message, the source public network node can send an error message to the source private network device based on the local private network address and the address of the source private network device included in the SRH message header. The following is an introduction to the transmission scheme of error messages in VPN cross-domain scenarios in this application in conjunction with specific embodiments. See. Figure 7 , is a schematic diagram of a transmission process of an error message provided in an embodiment of the present application, specifically including:
[0154] S701, CE1 sends a service message to node P2.
[0155] For example, the private network service message generated by CE1 will add multiple SRH message headers during the forwarding process through the multi-level public network nodes. For the specific process, please refer to Figure 7 It should be noted that the embodiment of the present application proposes to configure the PE1 node with the function of enabling the header node information, so the SRH added at the PE1 node also includes the private network address of PE1: PE1 END.DT4.
[0156] S702, the P2 node receives a service message, determines that the message transmission has timed out, and generates a first error message.
[0157] Exemplarily, the payload of the first error message includes the public network address of the P2 node, the service message received by the P2 node, and the error information. The destination address of the first error message is the ASBR2 node (that is, the previous hop node of the P2 node), and the source address of the first error message is the public network address of the P2 node. As an example, the structure of the first error message can be found in Figure 7 The B71 in.
[0158] S703: Node P2 sends a first error message to node ASBR2.
[0159] S704: ASBR2 receives the first error message, and generates a second error message according to the first error message.
[0160] Exemplarily, the ASBR2 node is configured with the ICMP proxy function, and the forwarding plane sends the received first error message to the control plane for parsing. When the control plane determines that the first error message includes multiple public network IPv6 message headers, it deletes the outermost IPv6 message header and extracts the source address (that is, the public network address of PE1) in the second outer IPv6 message header. Furthermore, the ASBR2 node uses the public network address of PE1 as the destination address to encapsulate the payload of the first error message to obtain a second error message. As an example, the structure of the generated second error message can be seen in Figure 7 B72 in.
[0161] S705: ASBR2 sends a second error message to PE1.
[0162] S706, PE1 receives the second error message and generates a target error message.
[0163] For example, the specific process can refer to the above Figure 6 Step S606 in the above description will not be described in detail here. As an example, the structure of the target error message can be found in Figure 7 B73 in.
[0164] S707, PE1 sends a target error message to CE1.
[0165] After receiving the target error message, CE1 can parse the target error message to determine that the node where the transmission is abnormal is the P node, and determine the accurate message transmission delay according to the sending time of the service message and the receiving time of the target error message.
[0166] The END types of the private network address introduced in the above embodiments include END.DT4 and END DT6. These two types can solve the problem of private network traffic transmitting error messages in SRv6 public network nodes in L3VPN scenarios. However, in scenarios such as EVPN or VXLAN, SRH cannot carry enough private network information. Based on this, the present application proposes that a new predefined head node attribute type SID can be used to encapsulate different private network information using a unified SID. It is known that SRv6 SID is a 128-bit value in the form of an IPv6 address, consisting of Locator, Function, and Arguments, where the meaning of each part is:
[0167] Locator: It has the positioning function and provides IPv6 routing capability. The message is forwarded through addressing through this field.
[0168] Function: used to represent the forwarding action to be performed by the device command. Different forwarding behaviors are expressed by different Functions.
[0169] Arguments: An optional field that supplements the Function field and is the corresponding parameter of the instruction when it is executed.
[0170] Based on the characteristics that each SRv6 segment is 128 bits, can be flexibly divided into multiple segments, and the function and length of each segment can be customized, the embodiment of the present application proposes to add private network information in each VPN scenario in the Arguments field, and can specifically set which bits carry which private network information. As an example, the Arguments field is set to 8 bits, and the private network information carried in different VPN scenarios may include:
[0171] bit0: END X output interface
[0172] bit1: Private network information in L3VPN scenario
[0173] bit2: Private network information in EVPN scenario
[0174] bit3: Private network information in VXLAN scenario
[0175] bit4-7: reserved field
[0176] Based on the same concept as the above method, see Figure 8 , is a transmission device 800 of an error message provided in an embodiment of the present application, the device 800 is used to implement each step in the above method embodiment, and in order to avoid repetition, it will not be described again here. The device 800 includes: a communication unit 801 and a processing unit 802.
[0177] In one possible scenario:
[0178] The communication unit 801 is configured to receive a service message from a second public network node; the second public network node is a previous hop node of the first public network node;
[0179] The processing unit 802 is configured to generate an error message when determining that the service message transmission is abnormal; the destination address of the error message is the address of the second public network node, and the payload of the error message includes the service message and the public network address of the first public network node;
[0180] The communication unit 801 is further configured to send the error message to the second public network node.
[0181] In some embodiments, the service message is sent from a source private network device to a destination private network device, and includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the source address included in the inner message header is the address of the source private network device, and the destination address is the address of the destination private network device; the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
[0182] In some embodiments, the outer layer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; the source public network node is a public network node connected to the source private network device. The private network indication information is added by the source public network node.
[0183] In some embodiments, the processing unit 802 is specifically configured to:
[0184] Determine the message header of the error message according to the source address included in the outer message header;
[0185] The public network address of the first public network node and the service message are encapsulated using a determined message header to obtain the error message.
[0186] In another possible scenario:
[0187] The communication unit 801 is configured to receive a first error message from a first public network node; the first public network node is a next hop node of the second public network node; the first error message is generated by the second public network node when determining that the service message transmission is abnormal, and the payload of the first error message includes the service message and the public network address of the first public network node;
[0188] The processing unit 802 is configured to parse the first error message and extract the public network address of the source public network node from a message header of the first error message;
[0189] The processing unit 802 is further configured to generate a second error message according to the first error message and the public network address of the source public network node;
[0190] The communication unit 801 is further configured to send the second error message to the source public network node.
[0191] In some embodiments, the service message is sent from a source private network device to a destination private network device, and includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the source address included in the inner message header is the address of the source private network device, and the destination address is the address of the destination private network device; the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
[0192] In some embodiments, the outer layer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; the source public network node is a public network node connected to the source private network device. The private network indication information is added by the source public network node.
[0193] In some embodiments, the processing unit 802 is specifically configured to:
[0194] Determine a message header of the second error message according to the public network address of the source public network node;
[0195] The payload of the first error message is encapsulated using a determined message header to obtain the second error message.
[0196] In another possible scenario:
[0197] The communication unit 801 is used to receive an original error message from a next-hop public network node; the original error message is generated when the service message transmission is abnormal, and the payload of the original error message includes the service message and the address of the public network node that determines the service message transmission abnormality;
[0198] The processing unit 802 is configured to parse the original error message and extract the address of the source private network device from the message header of the original error message;
[0199] The processing unit 802 is further configured to generate a target error message according to the original error message and the address of the source private network device;
[0200] The communication unit 801 is further configured to send the target error message to the source private network device.
[0201] In some embodiments, the processing unit 802 is specifically configured to:
[0202] Determine the target private network to which the source private network device bound to the source public network node belongs, and query the private network address of the source public network node for the target private network;
[0203] Determine the message header of the target error message according to the private network address of the source public network node and the address of the source private network device;
[0204] The payload of the original error message is encapsulated using a determined message header to obtain the target error message.
[0205] In some embodiments, the processing unit 802 is specifically configured to:
[0206] Parsing the original error message, and extracting the private network indication information from the message header of the original error message;
[0207] The target private network to which the source public network node is bound is determined according to the private network indication information.
[0208] In some embodiments, before receiving the original error message from the next-hop public network node, the communication unit 801 is further used to receive a service message from the source private network device;
[0209] The processing unit 802 is further configured to add an outer message header to the service message from the source private network device; the outer message header includes the private network indication information; the service message from the source private network device includes an inner message header, and the inner message header is set by the source private network device;
[0210] The communication unit 801 is also used for the next-hop public network node to forward the service message after the outer message header is added.
[0211] Fig. 9 The electronic device 900 provided in the embodiment of the present application is shown in the structural diagram. The electronic device 900 in the embodiment of the present application may also include a communication interface 903, which is, for example, a network port, through which the electronic device can transmit data, for example, the communication interface 903 can implement the functions of the communication unit 801 introduced in the above embodiment.
[0212] In the embodiment of the present application, the memory 902 stores instructions that can be executed by at least one controller 901. The at least one controller 901 can be used to execute each step in the above method by executing the instructions stored in the memory 902. For example, the controller 901 can implement the above Figure 8 The function of the processing unit 802 in.
[0213] Among them, the controller 901 is the control center of the electronic device, which can use various interfaces and lines to connect various parts of the entire electronic device, by running or executing instructions stored in the memory 902 and calling data stored in the memory 902. Optionally, the controller 901 may include one or more processing units, and the controller 901 may integrate an application controller and a modem controller, wherein the application controller mainly processes the operating system and application programs, and the modem controller mainly processes wireless communications. It is understandable that the above-mentioned modem controller may not be integrated into the controller 901. In some embodiments, the controller 901 and the memory 902 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0214] The controller 901 may be a general controller, such as a central processing unit (CPU), a digital signal controller, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general controller may be a microcontroller or any conventional controller, etc. The step of adjusting the bandwidth of the data transmission channel during data transmission disclosed in the embodiments of the present application may be performed directly by a hardware controller, or may be performed by a combination of hardware and software modules in the controller.
[0215] The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 902 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, referred to as: RAM), a static random access memory (English: Static Random Access Memory, referred to as: SRAM), a programmable read-only memory (English: Programmable Read Only Memory, referred to as: PROM), a read-only memory (English: Read Only Memory, referred to as: ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, referred to as: EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 902 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0216] By designing and programming the controller 901, for example, the code corresponding to the data transmission method introduced in the aforementioned embodiment can be solidified into the chip, so that the chip can execute the steps of the aforementioned data transmission method during operation. How to design and program the controller 901 is a technology well known to those skilled in the art and will not be repeated here.
[0217] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0218] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a controller of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the controller of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0219] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0220] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0221] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0222] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for transmitting an error message, characterized in that: The method is applied to a first public network node in a service message transmission path, and the method includes: Receiving a service message from a second public network node; the second public network node is a previous hop node of the first public network node; When determining that the service message transmission is abnormal, generating an error message; the destination address of the error message is the address of the second public network node, and the load of the error message includes the service message and the public network address of the first public network node; Send the error message to the second public network node.
2. The method according to claim 1, characterized in that The service message is sent from the source private network device to the destination private network device, including an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
3. The method according to claim 2, characterized in that The outer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs; The source public network node is a public network node connected to the source private network device.
4. The method according to claim 2 or 3, characterized in that: The generating of the error message comprises: Determine the message header of the error message according to the source address included in the outer message header; The public network address of the first public network node and the service message are encapsulated using a determined message header to obtain the error message.
5. A method for transmitting an error message, characterized in that: The method is applied to a second public network node in a service message transmission path, the service message is transmitted from a source private network device to a destination private network device, the second public network node is any public network node in the transmission path except the source public network node, the source public network node is a public network node connected to the source private network device, and the method includes: Receiving a first error message from a first public network node; the first public network node is a next hop node of the second public network node; the first error message is generated by the second public network node when determining that the service message transmission is abnormal, and the payload of the first error message includes the service message and the public network address of the first public network node; Parsing the first error message, and extracting the public network address of the source public network node from a message header of the first error message; Generate a second error message according to the first error message and the public network address of the source public network node; Send the second error message to the source public network node.
6. The method according to claim 5, characterized in that The service message includes an inner message header and an outer message header; wherein the inner message header is set by the source private network device, and the outer message header is set by the second public network node and the public network node before the second public network node in the transmission path.
7. The method according to claim 6, characterized in that The outer message header includes private network indication information, and the private network indication information is used by the source public network node to determine the target private network to which the bound source private network device belongs.
8. The method according to any one of claims 5 to 7, characterized in that: The generating a second error message according to the first error message and the public network address of the source public network node includes: Determine a message header of the second error message according to the public network address of the source public network node; The payload of the first error message is encapsulated using a determined message header to obtain the second error message.
9. A method for transmitting an error message, characterized in that: The method is applied to a source public network node in a service message transmission path, the service message is transmitted from a source private network device to a destination private network device, and the source public network node is a public network node connected to the source private network device, and the method includes: Receive an original error message from a next-hop public network node; the original error message is generated when the service message is transmitted abnormally, and the payload of the original error message includes the service message and the address of the public network node that determines the service message transmission abnormality; Parsing the original error message, and extracting the address of the source private network device from the message header of the original error message; Generate a target error message according to the original error message and the address of the source private network device; Send the target error message to the source private network device.
10. The method according to claim 9, characterized in that The generating a target error message according to the original error message and the address of the source private network device includes: Determine the target private network to which the source private network device bound to the source public network node belongs, and query the private network address of the source public network node for the target private network; Determine the message header of the target error message according to the private network address of the source public network node and the address of the source private network device; The payload of the original error message is encapsulated using a determined message header to obtain the target error message.
11. The method according to claim 10, characterized in that The determining the target private network to which the source private network device bound to the source public network node belongs includes: Parsing the original error message, and extracting the private network indication information from the message header of the original error message; The target private network to which the source public network node is bound is determined according to the private network indication information.
12. The method according to claim 11, characterized in that Before receiving the original error message from the next-hop public network node, the method further includes: Receiving a service message from the source private network device; Adding an outer message header to the service message from the source private network device; the outer message header includes the private network indication information; the service message from the source private network device includes an inner message header, and the inner message header is set by the source private network device; The service message after adding the outer message header is forwarded to the next-hop public network node.
13. A transmission device for an error message, characterized in that: The device is applied to a first public network node in a service message transmission path, and the device includes: A communication unit, configured to receive a service message from a second public network node; the second public network node is a previous hop node of the first public network node; A processing unit, configured to generate an error message when determining that the service message transmission is abnormal; the destination address of the error message is the address of the second public network node, and the load of the error message includes the service message and the public network address of the first public network node; The communication unit is further used to send the error message to the second public network node.
14. A transmission device for an error message, characterized in that: The device is applied to a second public network node in a service message transmission path, the service message is transmitted from a source private network device to a destination private network device, the second public network node is any public network node in the transmission path except the source public network node, the source public network node is a public network node connected to the source private network device, and the device includes: A communication unit, configured to receive a first error message from a first public network node; the first public network node is a next hop node of the second public network node; the first error message is generated by the second public network node when determining that the service message transmission is abnormal, and the payload of the first error message includes the service message and the public network address of the first public network node; A processing unit, configured to parse the first error message and extract the public network address of the source public network node from a message header of the first error message; The processing unit is further configured to generate a second error message according to the first error message and the public network address of the source public network node; The communication unit is further used to send the second error message to the source public network node.
15. A transmission device for an error message, characterized in that: The device is applied to a source public network node in a service message transmission path, the service message is transmitted from a source private network device to a destination private network device, the source public network node is a public network node connected to the source private network device, and the device includes: A communication unit, configured to receive an original error message from a next-hop public network node; the original error message is generated when the service message transmission is abnormal, and the payload of the original error message includes the service message and the address of the public network node that determines the service message transmission abnormality; A processing unit, configured to parse the original error message and extract the address of the source private network device from a message header of the original error message; The processing unit is further used to generate a target error message according to the original error message and the address of the source private network device; The communication unit is further used to send the target error message to the source private network device.
16. An electronic device, characterized in that: The electronic device comprises a controller and a memory, The memory is used to store computer programs or instructions; The controller is used to execute the computer program or instructions in the memory so that the method of any one of claims 1-4, 5-8 or 9-12 is performed.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when called by a computer, enable the computer to execute the method according to any one of claims 1-4, 5-8 or 9-12.