A message transmission method, device and system
By adding the initiator device's identification to the detection message, it ensures that the destination address of the response message contains the initiator device's identification, which solves the problem that the initiator device of the detection message cannot receive the response message, and improves the accuracy of tunnel detection and network compatibility.
Patent Information
- Application Number
- CN202010890127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-28
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2040-08-28
AI Technical Summary
In the EVPN VPWS system, the initiator device of the detection message cannot guarantee the reception of the response message of the issued detection message, resulting in low accuracy of tunnel detection.
By adding the initiator device's identification to the detection message, the receiving device of the detection message adds the identification as the destination address of the response message of the detection message, thereby ensuring that the non-initiator device can forward the response message when it receives. Initiator device.
It improves the probability that the initiator device of the detection message receives the response message, enhances the accuracy of tunnel detection, and maintains network compatibility and friendliness.
Smart Images

Figure CN114189564B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular, to a message transmission method, device, and system. Background Art
[0002] In an Ethernet virtual private network (EVPN) virtual private wire service (VPWS) system, if an EVPN VPWS tunnel is abnormal, for example, a Label Switched Path (LSP) fails to forward data, the EVPN VPWS control plane cannot detect the error, making network maintenance difficult.
[0003] The EVPN VPWS packet internet groper (Ping) provides an EVPN VPWS tunnel detection solution for the EVPN VPWS scenario, which is used to detect whether the EVPN tunnel from the initiating device to the receiving device is normal. The process includes: the initiating device generates a probe (echo request) message, which carries the identifier (ID) information of the tunnel to be detected, and sends the probe message to the receiving device through the EVPN VPWS tunnel. The receiving device receives the probe message, performs detection and verification according to the identifier information of the tunnel to be detected in the probe message, and determines whether the tunnel to be detected is normal or abnormal; and encapsulates the detection and verification result of this time in a response (echo reply) message, and then sends the response message to the initiating device through the EVPN VPWS tunnel. The initiating device receives the response message and obtains the detection and verification result of this time in the response message. The initiating device sends the probe message multiple times and receives the response message, and determines whether the EVPN VPWS tunnel from the initiating device to the receiving device is normal according to the detection and verification results in the multiple response messages.
[0004] In the message transmission system of EVPN VPWS dual-homing dual-active scenario, Figure 1As shown, customer edge device (CE) 1 is dual-homed to provider edge device (PE) 1 and PE2, CE2 is single-homed to PE3, and PE1 and PE2 are set to active-active mode; PE1 can communicate with PE3 through the EVPN VPWS tunnel, and PE2 can also communicate with PE3 through the EVPN VPWS tunnel; the EVPN VPWS tunnel identifier (local EVPNVPWS ID) on the PE1 and PE2 sides is 100, and the EVPN VPWS tunnel identifier (remote EVPN VPWS ID) on the PE3 side is 200. In this scenario, if PE1 initiates tunnel detection, it is used to detect whether the EVPN VPWS tunnels with tunnel identifiers from 100 to 200 are normal. PE1 sends a detection message to PE3 through the EVPN VPWS tunnel, PE3 receives the detection message, obtains the detection result according to the detection message, and then sends a response message including the detection result to the tunnel exit device through the EVPN VPWS tunnel. Since the tunnel identifiers of PE1 and PE2 in this scenario are the same, PE1 may receive the response message normally or may not receive the response message, that is, the response message is received by PE2.
[0005] In the above tunnel detection scheme, there is no guarantee that the initiator device PE1 of the probe message can receive the response message of the sent probe message. If PE1 cannot receive the response message normally, the EVPN VPWS tunnel from 100 to 200 is determined to be abnormal. In this case, the tunnel from 100 to 200 may be normal, but the response message is received by PE2 and cannot reach PE1, resulting in PE1 detection error, making the accuracy of tunnel detection low. Summary of the invention
[0006] The present application provides a message transmission method, device and system, which improves the probability that the initiator device of the detection message receives a response message to the sent detection message, and improves the accuracy of tunnel detection when the detection message is used to detect the tunnel status.
[0007] This application adopts the following technical solutions:
[0008] In a first aspect, the present application provides a message transmission method, which is executed by a first network device, and the method may include: sending a probe message to a second network device, the probe message may include an identifier of the first network device, the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device in the destination address of a response message of the probe message; receiving a response message from the second network device, the destination address of the response message is the identifier of the first network device; or, receiving an updated response message from a third network device, the destination address of the updated response message is the identifier of the first network device, and the third network device and the first network device are both connected to the same user-side network device.
[0009] The message transmission method provided by the embodiment of the present application adds the identifier of the initiating end device to the detection message, and the receiving end device of the detection message adds the identifier as the destination address of the response message of the detection message. In this way, even if the non-initiating end device receives the response message, the response message can be forwarded to the initiating end device of the detection message according to the destination address of the response message, and it is ensured that the initiating end device of the detection message can receive the response message of the sent detection message. When the detection message is used to detect the tunnel status, the detection error caused by the initiating end device of the detection message being unable to receive the response message of the detection message is avoided, and the accuracy of the tunnel detection is improved. In addition, since the location where the identifier is added is the destination address field of the response message, the non-initiating end device can directly forward the response message to the initiating end device of the detection message according to the traditional routing forwarding mechanism when receiving the response message, without having to change the message forwarding behavior of the non-initiating end device too much, which is conducive to improving the operation compatibility and friendliness of the network.
[0010] In conjunction with the first aspect, in a possible implementation, the identifier of the first network device may include: an Internet Protocol (IP) address of the first network device; or a Media Access Control (MAC) address of the first network device. In this possible implementation, the IP address or the MAC address may be used as the identifier of the first network device, which has high implementation flexibility.
[0011] In combination with the first aspect or one of the above possible implementations, in another possible implementation, the IP address of the first network device may include: the interface IP address of the first network device; or the loopback interface IP address of the first network device; or the segment identifier (SID) in the form of the IP address of the first network device. In this possible implementation, different forms of IP addresses can be configured according to actual needs to adapt to different application scenarios.
[0012] In combination with the first aspect or any of the above possible implementations, in another possible implementation, before sending the detection message to the second network device, the method may also include: generating a detection message; wherein the identifier of the first network device may be encapsulated in the data portion of the detection message in a type-length-value TLV format; or, the identifier of the first network device may be encapsulated in the source IP address of the IP header of the detection message. In this possible implementation, the identifier of the first network device may be stored in different locations of the detection message according to actual needs, and has a wide range of applications.
[0013] In combination with the first aspect or any of the above possible implementations, in another possible implementation, the detection message may also include an adding indication, and the identifier of the first network device may be used to instruct the second network device to add the identifier of the first network device in the destination address of the response message of the detection message, which may include: the identifier of the first network device and the adding indication may be used to jointly instruct the second network device to add the identifier of the first network device in the destination address of the response message. In this possible implementation, the second network device may add the identifier of the first network device in the destination address of the response message by adding the indication, which is simple to implement.
[0014] In combination with the first aspect or any of the above possible implementations, in another possible implementation, the method may further include: receiving other response messages; forwarding the other response messages to the network devices indicated by the destination addresses of the other response messages according to the destination addresses of the other response messages being addresses other than the identifier of the first network device, and the network devices indicated by the destination addresses of the other response messages are connected to the user-side network device. The network devices indicated by the destination addresses of the other response messages may be, for example, the third network device in a multi-homing multi-active scenario, or one or more other network devices that have a multi-homing relationship with the first network device.
[0015] In combination with the first aspect or any one of the foregoing possible implementations, in another possible implementation, the first network device, the second network device, and the third network device may be operator edge devices PE, and the user-side network device may be a user edge device CE.
[0016] In combination with the first aspect or any one of the foregoing possible implementations, in another possible implementation, the probe message may be a probe message for an Ethernet virtual private area network (EVPN) virtual private wireless service (VPWS) scenario, and the response message may be a response message for an EVPN VPWS scenario.
[0017] In a second aspect, the present application provides another message transmission method, which can be executed by a second network device, and the method may include: receiving a detection message sent by a first network device, the detection message including an identifier of the first network device; generating a response message to the detection message, the destination address of the response message including the identifier of the first network device; sending a response message to the first network device or a third network device, the third network device and the first network device are both connected to the same user-side network device.
[0018] The message transmission method provided by the embodiment of the present application adds the identifier of the initiating end device to the detection message, and the receiving end device of the detection message adds the identifier as the destination address of the response message of the detection message. In this way, even if the non-initiating end device receives the response message, the response message can be forwarded to the initiating end device of the detection message according to the destination address of the response message, thereby ensuring that the initiating end device of the detection message can receive the response message of the sent detection message. When the detection message is used to detect the tunnel status, the detection error caused by the initiating end device of the detection message being unable to receive the response message of the detection message is avoided, thereby improving the accuracy of the tunnel detection. In addition, by adding the identifier to the destination address field of the response message, it can also be ensured that when the non-initiating end device receives the response message, the response message can be directly forwarded to the initiating end device of the detection message according to the traditional routing forwarding mechanism, which is conducive to improving the operation compatibility and friendliness of the network.
[0019] In conjunction with the second aspect, in a possible implementation, the identifier of the first network device may include: an Internet Protocol IP address of the first network device; or a Media Access Control MAC address of the first network device. In this possible implementation, the IP address or the MAC address may be used as the identifier of the first network device, which has high implementation flexibility.
[0020] In combination with the second aspect or one of the above possible implementations, in another possible implementation, the IP address of the first network device may include: the interface IP address of the first network device; or the loopback interface IP address of the first network device; or the segment identifier SID in the form of the IP address of the first network device. In this possible implementation, different forms of IP addresses can be configured according to actual needs to adapt to different application scenarios.
[0021] In combination with the second aspect or any of the above possible implementations, in another possible implementation, the identifier of the first network device can be encapsulated in the data part of the detection message in the type-length-value TLV format; or, the identifier of the first network device can be encapsulated in the source IP address of the IP header of the detection message. In this possible implementation, the identifier of the first network device can be stored in different locations of the detection message according to actual needs, and has a wide range of applications.
[0022] In combination with the second aspect or any of the above possible implementations, in another possible implementation, the detection message may further include an addition instruction, and the method may further include: adding the identifier of the first network device to the destination address of the response message according to the addition instruction and the identifier of the first network device. In this possible implementation, the second network device may add the identifier of the first network device to the destination address of the response message by adding the instruction, which is simple to implement.
[0023] In combination with the second aspect or any one of the above possible implementations, in another possible implementation, generating a response message to the probe message may include: adding the IP address of the first network device to the destination IP address of the response message; or, adding the MAC address of the first network device to the destination MAC address of the response message.
[0024] In combination with the second aspect or any one of the above possible implementations, in another possible implementation, sending a response message to the first network device or the third network device may include: sending a response message to the first network device or the third network device according to a load sharing algorithm.
[0025] In combination with the second aspect or any of the foregoing possible implementations, in another possible implementation, the first network device, the second network device, and the third network device may be operator edge devices PE, and the user-side network device may be a user edge device CE.
[0026] In combination with the second aspect or any one of the foregoing possible implementations, in another possible implementation, the probe message may be a probe message for an Ethernet virtual private area network EVPN virtual private wireless service VPWS scenario, and the response message may be a response message for an EVPN VPWS scenario.
[0027] In a third aspect, the present application further provides a message transmission device, which may be the first network device in the first aspect or any possible implementation of the first aspect, or the device may be deployed on the first network device. The device may include a first sending unit and a first receiving unit. Among them:
[0028] The first sending unit is used to send a detection message to the second network device, where the detection message includes an identifier of the first network device, and the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device to a destination address of a response message of the detection message.
[0029] The first receiving unit is used to receive a response message from the second network device, the destination address of the response message is the identifier of the first network device; or, to receive an updated response message from the third network device, the destination address of the updated response message is the identifier of the first network device, and the third network device and the first network device are both connected to the same user-side network device.
[0030] In conjunction with the third aspect, in a possible implementation manner, the identifier of the first network device includes:
[0031] The Internet Protocol IP address of the first network device; or the Media Access Control MAC address of the first network device.
[0032] In combination with the third aspect or any one of the above possible implementations, in another possible implementation, the IP address of the first network device includes: the interface IP address of the first network device; or, the loopback interface IP address of the first network device; or, the segment identifier SID in the form of the IP address of the first network device.
[0033] In combination with the third aspect or any one of the foregoing possible implementations, in another possible implementation, before the first sending unit sends the detection message to the second network device, the apparatus further includes:
[0034] A processing unit, used to generate the detection message; wherein the identifier of the first network device is encapsulated in the data part of the detection message in type-length-value TLV format; or, the identifier of the first network device is encapsulated in the source IP address of the IP header of the detection message.
[0035] In combination with the third aspect or any one of the above possible implementations, in another possible implementation, the detection message also includes an adding indication, and the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device in the destination address of the response message of the detection message, including: the identifier of the first network device and the adding indication are used to jointly instruct the second network device to add the identifier of the first network device in the destination address of the response message.
[0036] In combination with the third aspect or any one of the above possible implementations, in another possible implementation, the device also includes: a second receiving unit, used to receive other response messages; a second sending unit, used to forward the other response messages to the network device indicated by the destination address of the other response messages based on the destination address of the other response messages being an address other than the identifier of the first network device, and the network device indicated by the destination address of the other response messages is connected to the user-side network device.
[0037] In combination with the third aspect or any one of the above possible implementations, in another possible implementation, the first network device, the second network device and the third network device are operator edge devices PE, and the user-side network device is a user edge device CE.
[0038] In combination with the third aspect or any one of the above possible implementations, in another possible implementation, the detection message is a detection message of an Ethernet virtual private area network EVPN virtual private wireless service VPWS scenario, and the response message is a response message of the EVPN VPWS scenario.
[0039] It should be noted that the message transmission device provided in the third aspect is used to execute the message transmission method provided in the first aspect, and the specific implementation can refer to the specific implementation of the first aspect.
[0040] In a fourth aspect, the present application provides a message transmission device, which may be a second network device in the second aspect or any possible implementation of the second aspect, or the device may be deployed in the second network device. The device may include: a receiving unit, a processing unit, and a sending unit. Among them:
[0041] The receiving unit is used to receive a detection message sent by the first network device, where the detection message includes an identifier of the first network device.
[0042] The processing unit is used to generate a response message to the detection message, wherein the destination address of the response message includes the identifier of the first network device.
[0043] The sending unit is used to send a response message to the first network device or the third network device, and the third network device and the first network device are both connected to the same user-side network device.
[0044] In combination with the fourth aspect, in a possible implementation manner, the identifier of the first network device includes: an Internet Protocol IP address of the first network device; or a Media Access Control MAC address of the first network device.
[0045] In combination with the fourth aspect or any one of the above possible implementations, in another possible implementation, the IP address of the first network device includes: the interface IP address of the first network device; or, the loopback interface IP address of the first network device; or, the segment identifier SID in the form of the IP address of the first network device.
[0046] In combination with the fourth aspect or any one of the above possible implementations, in another possible implementation, the identifier of the first network device is encapsulated in the data part of the detection message in type-length-value TLV format; or, the identifier of the first network device is encapsulated in the source IP address of the IP header of the detection message.
[0047] In combination with the fourth aspect or any one of the above possible implementations, in another possible implementation, the detection message also includes an adding indication, and the device also includes: an adding unit, used to add the identifier of the first network device in the destination address of the response message according to the adding indication and the identifier of the first network device.
[0048] In combination with the fourth aspect or any one of the possible implementations above, in another possible implementation, the processing unit is specifically used to: add the IP address of the first network device to the destination IP address of the response message; or, add the MAC address of the first network device to the destination MAC address of the response message.
[0049] In combination with the fourth aspect or any one of the above possible implementations, in another possible implementation, the sending unit is specifically used to: send the response message to the first network device or the third network device according to a load sharing algorithm.
[0050] In combination with the fourth aspect or any one of the above possible implementations, in another possible implementation, the first network device, the second network device and the third network device are operator edge devices PE, and the user-side network device is a user edge device CE.
[0051] In combination with the fourth aspect or any one of the above possible implementations, in another possible implementation, the detection message is a detection message of an Ethernet virtual private area network EVPN virtual private wireless service VPWS scenario, and the response message is a response message of the EVPN VPWS scenario.
[0052] It should be noted that the message transmission device provided in the fourth aspect is used to execute the message transmission method provided in the second aspect, and the specific implementation can refer to the specific implementation of the second aspect.
[0053] In a fifth aspect, an embodiment of the present application provides a first network device, which may include a processor for implementing the message transmission method described in the first aspect above. The device may also include a memory, which is coupled to the processor. When the processor executes instructions stored in the memory, the message transmission method described in the first aspect or any possible implementation of the first aspect may be implemented. The device may also include a communication interface, which is used for the device to communicate with other devices. Exemplarily, the communication interface may be a transceiver, circuit, bus, module or other type of communication interface. In one possible implementation, the device may include:
[0054] A memory for storing instructions;
[0055] A processor is used to send a probe message to a second network device, where the probe message may include an identifier of the first network device, and the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device in the destination address of a response message of the probe message; receive a response message from the second network device, where the destination address of the response message is the identifier of the first network device; or receive an updated response message from a third network device, where the destination address of the updated response message is the identifier of the first network device, and both the third network device and the first network device are connected to the same user-side network device.
[0056] It should be noted that the instructions in the memory in the present application can be pre-stored or downloaded from the Internet and stored when the device is used. The present application does not specifically limit the source of the instructions in the memory. The coupling in the embodiments of the present application is an indirect coupling or connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
[0057] In a sixth aspect, an embodiment of the present application provides a second network device, which may include a processor for implementing the message transmission method described in the second aspect or any possible implementation of the second aspect. The device may also include a memory, which is coupled to the processor, and when the processor executes instructions stored in the memory, the message transmission method described in the second aspect may be implemented. The device may also include a communication interface, which is used for the device to communicate with other devices. Exemplarily, the communication interface may be a transceiver, circuit, bus, module or other type of communication interface. In one possible implementation, the device includes:
[0058] A memory for storing instructions;
[0059] A processor is used to receive a detection message sent by a first network device, the detection message includes an identifier of the first network device; generate a response message to the detection message, the destination address of the response message includes the identifier of the first network device; send a response message to the first network device or a third network device, the third network device and the first network device are both connected to the same user-side network device.
[0060] It should be noted that the instructions in the memory in the present application can be pre-stored or downloaded from the Internet and stored when the device is used. The present application does not specifically limit the source of the instructions in the memory. The coupling in the embodiments of the present application is an indirect coupling or connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
[0061] In the seventh aspect, a message transmission system is provided, which may include a first device for message transmission and a second device for message transmission in the communication system. The first device for message transmission may be a device in the third aspect or any possible implementation of the third aspect, and the second device for message transmission may be a device in the fourth aspect or any possible implementation of the fourth aspect.
[0062] In the eighth aspect, a message transmission system is provided, which may include a first network device and a second network device in the communication system. The first network device may be an apparatus in the fifth aspect or any possible implementation of the fifth aspect, and the second network device may be an apparatus in the sixth aspect or any possible implementation of the sixth aspect.
[0063] In the ninth aspect, an embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the message transmission method described in any one of the above aspects or any one of the possible implementation methods.
[0064] In the tenth aspect, a computer program product is also provided in an embodiment of the present application. When the computer is run on a computer, the computer executes the message transmission method described in any one of the above aspects or any one of the possible implementation methods.
[0065] In an eleventh aspect, an embodiment of the present application provides a chip system, which includes a processor and may also include a memory, for implementing the function performed by the first network device in the above method. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0066] In a twelfth aspect, an embodiment of the present application provides a chip system, which includes a processor and may also include a memory, for implementing the function performed by the second network device in the above method. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0067] The solutions provided in the third to twelfth aspects are used to implement the message transmission methods provided in the first to second aspects, and therefore can achieve the same beneficial effects as the first to second aspects, and will not be repeated here.
[0068] It should be noted that various possible implementation methods of any of the above aspects can be combined under the premise that the solutions are not contradictory. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A structural diagram of a message transmission system for an EVPN VPWS dual-homing dual-active scenario provided in an embodiment of the present application;
[0070] Figure 2 A schematic diagram of the structure of a message transmission system provided in an embodiment of the present application;
[0071] Figure 3 A structural diagram of another message transmission system for an EVPN VPWS dual-homing dual-active scenario provided in an embodiment of the present application;
[0072] Figure 4 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0073] Figure 5 A schematic diagram of a flow chart of a message transmission method provided in an embodiment of the present application;
[0074] Figure 6 A schematic diagram of a detection message structure provided in an embodiment of the present application;
[0075] Figure 7 A schematic diagram of a response message structure provided in an embodiment of the present application;
[0076] Figure 8 Another schematic diagram of a response message structure provided in an embodiment of the present application;
[0077] Fig. 9 A flowchart of another message transmission method provided in an embodiment of the present application;
[0078] Fig.10 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;
[0079] Fig.11 A schematic diagram of the structure of another message transmission device provided in an embodiment of the present application;
[0080] Fig.12 A schematic diagram of a first network device structure provided in an embodiment of the present application;
[0081] Fig.13 A schematic diagram of the structure of another message transmission device provided in an embodiment of the present application;
[0082] Fig.14 A schematic diagram of the structure of another message transmission device provided in an embodiment of the present application;
[0083] Fig.15 A schematic diagram of the structure of a second network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects rather than to limit a specific order.
[0085] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0086] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0087] In the embodiments of the present application, at least one can also be described as one or more, and multiple can be two, three, four or more, which is not limited in the present application.
[0088] As mentioned above, the existing tunnel detection scheme cannot guarantee that the initiating device of the detection message can receive the response message of the sent detection message, so that the accuracy of tunnel detection is low. Based on this, the embodiment of the present application provides a message transmission method, by adding the identifier of the initiating device in the detection message, the receiving device of the detection message adds the identifier as the destination address of the response message of the detection message, so that even if the non-initiating device receives the response message, the response message can be forwarded to the initiating device of the detection message according to the destination address of the response message, and it is guaranteed that the initiating device of the detection message can receive the response message of the sent detection message. When the detection message is used to detect the tunnel status, the detection error caused by the initiating device of the detection message being unable to receive the response message of the detection message is avoided, and the accuracy of tunnel detection is improved. In addition, since the identifier of the initiating device is added to the destination address part of the response message, the non-initiating device can directly forward the response message to the initiating device according to the traditional routing forwarding mechanism when receiving the response message, thereby ensuring the compatibility and friendliness of network operation.
[0089] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0090] The solution provided in the embodiment of the present application can be applied to Figure 2 In the message transmission system 20 shown in FIG. Figure 2 As shown, the message transmission system 20 may include multiple user-side network devices 201 and multiple operator-side network devices 202. One user-side network device 201 may be connected to one or more operator-side network devices 202. The user-side network device 201 and the operator-side network device 202 may communicate via IP routing; the operator-side network devices 202 and the operator-side network devices 202 may communicate via tunnels, IP routing, or other methods.
[0091] The user-side network device 201 may be a CE or other. Exemplarily, the user-side network device 201 may be a router or a switch. The user-side network device 201 may communicate with another user-side network device 201 accessed through other operator-side network devices 202 through one or more operator-side network devices 202 . Figure 2 The manner in which the user-side network device 201 is directly connected to the operator-side network device 202 is shown as only a possible example. The user-side network device 201 may also be connected to the operator-side network device 202 via one or more other network devices.
[0092] The operator-side network device 202 may be a PE or other. For example, the operator-side network device 202 may be a router or a switch, or other product forms.
[0093] In one possible implementation, the operator-side network device 202 may send a detection message according to the scheme provided in the present application, and / or receive a response message; or, the operator-side network device 202 may receive a detection message according to the scheme provided in the present application, and send a response message to the received detection message. The specific processing process is described in detail in the following method embodiment.
[0094] The tunnel can be of the following types: iterative multi-protocol label switching (MPLS), segment routing (SR), SRv6, etc.
[0095] It should be noted that the message transmission system 20 can be used for message transmission in different scenarios, and the embodiments of the present application are not solely limited to this.
[0096] For example, the message transmission system 20 can be applied to message transmission in an EVPN VPWS multi-homing scenario, where a user-side network device 201 is connected to multiple operator-side network devices 202, and the operator-side network device 202 is set to multi-active mode.
[0097] For example, Figure 3 The structure of the message transmission system 20 applied to the EVPN VPWS dual-homing dual-active scenario is shown. Figure 3 As shown, the message transmission system 20 may include a first PE 301 , a second PE 302 , a third PE 303 , a first CE 304 , and a second CE 305 .
[0098] Among them, the first CE304 dual-homes to the first PE301 and the third PE303; the second CE305 single-homes to the second PE302; the first PE301 communicates with the second PE302 through the EVPN VPWS tunnel, the second PE302 communicates with the third PE303 through the EVPNVPWS tunnel, and the first PE301 communicates with the third PE303 through IP routing or tunnel or other methods.
[0099] Similarly, other PEs can communicate directly, or other PEs can communicate through other nodes.
[0100] It is understandable that the second CE 305 is single-homed to the second PE 302. In practical applications, the second CE 305 can also be dual-homed to two PEs; more CEs can also be connected to the third PE 303. The embodiment of the present application does not specifically limit the number of CEs and PEs included in the scenario, and the connection mode between CE and PE, and between PE and PE.
[0101] Exemplarily, the first PE301 can be used to send a probe message, and receive a response message to the probe message sent by the second PE302 or the third PE303; the second PE302 can be used to receive a probe message sent by the first PE301, and send a response message to the probe message to the first PE301 or the third PE303; the third PE303 can be used to receive a response message to the probe message sent by the second PE302, and forward the response message to the probe message to the first PE301.
[0102] The solution provided by the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.
[0103] On the one hand, the embodiment of the present application provides a network device 40, which is used to execute the message transmission method provided by the present application. The network device 40 can be Figure 2 The operator-side network device 202 is shown.
[0104] Figure 4 The structure diagram of the network device 40 provided in the embodiment of the present application is shown. Figure 4 As shown, the network device 40 may include a processor 401 , a memory 402 , and a transceiver 403 .
[0105] Combine the following Figure 4 The components of the network device 40 are described in detail:
[0106] The memory 402 may be a volatile memory, such as a random-access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, for storing application code, configuration files, data information or other content that can implement the method of the present application.
[0107] The transceiver 403 is used for information exchange between the network device 40 and other devices. For example, the transceiver 403 can be used to exchange information with other network devices.
[0108] The processor 401 may be a control center of the network device 40. For example, the processor 401 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more microprocessors (digital singnal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0109] In a possible implementation, the network device 40 is an initiator device of the detection message, and the processor 401 runs or executes the software program and / or module stored in the memory 402, so that the network device 40 performs the following functions as a first network device:
[0110] A probe message is sent to a second network device, the probe message includes an identifier of the first network device, and the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device in the destination address of a response message to the probe message; a response message is received from the second network device, and the destination address of the response message is the identifier of the first network device; or, an updated response message is received from a third network device, and the destination address of the updated response message is the identifier of the first network device, and both the third network device and the first network device are connected to the same user-side network device.
[0111] In this implementation, the network device 40 may be, for example, Figure 3 A first PE301 is shown.
[0112] In another possible implementation, the network device 40 is a receiving end device of the detection message, and the processor 401 runs or executes the software program and / or module stored in the memory 402, so that the network device 40 performs the following functions as a second network device:
[0113] Receive a detection message sent by the first network device, the detection message includes the identification of the first network device; generate a response message to the detection message, the destination address of the response message includes the identification of the first network device; send a response message to the first network device or the third network device, the third network device and the first network device are both connected to the same user-side network device.
[0114] In this implementation, the network device 40 may be, for example, Figure 3 A second PE 302 is shown.
[0115] In the above two possible implementation methods, the processor 401 can perform all the described functions by running or executing software programs and / or modules stored in the memory 402; it can also perform all the described functions by running or executing software programs and / or modules stored in the memory 402, in cooperation with other components or modules in the network device 40, for example, the processor 401 executes the function of generating a detection message or a response message, and sends and receives the corresponding detection message or response message through the transceiver 403.
[0116] On the other hand, the embodiment of the present application provides a message transmission method, which can be applied to the interaction process between the first network device and the second network device. Figure 2 The operator-side network device in the message transmission system shown in the figure. The first network device and the third network device are both connected to the first user-side network device, and the second network device is connected to the second user-side network device. Exemplarily, the first network device can be Figure 3 The first PE 301 shown in the figure, the second network device can be Figure 3 The second PE 302 shown in FIG. 1 and the third network device may be Figure 3 The third PE303 is shown in FIG.
[0117] It should be noted that the message transmission method provided in the embodiment of the present application can be used in the tunnel detection process between network devices on the operator side, or other network processing processes by sending a detection message and receiving a response message, and the present application does not specifically limit this. Among them, in the embodiment of the present application, the message transmission method provided in the present application is described in detail by taking the detection message used for tunnel detection as an example, and the scenarios where the detection message is used for other purposes are not described one by one.
[0118] like Figure 5 As shown, the message transmission method provided in the embodiment of the present application may include:
[0119] S501: A first network device generates a detection message.
[0120] Specifically, the first network device performs the operation of S501 to generate a detection message when it needs to send a detection message to receive a response message for network processing. The timing may be a user instruction or a periodic moment or other, and the network processing may be a tunnel detection or other.
[0121] The detection message is a message sent by the initiating device during the network processing process of sending a detection message and receiving a response message. Exemplarily, the detection message can be used to detect whether the tunnel connected to the first network device is normal.
[0122] Among them, the application scenario and the function of the detection message can be configured according to the actual situation. The embodiment of the present application does not limit the application scenario and the specific function of the detection message.
[0123] In a possible implementation manner, the detection message may be a message used in an EVPN VPWS scenario to detect whether a tunnel connected to the first network device is normal.
[0124] Among them, the detection message may include the identifier of the first network device. The identifier of the first network device included in the detection message can be used to instruct the network device (for example, the second network device) receiving the detection message to add the identifier of the first network device in the destination address of the response message of the detection message to ensure that the first network device can receive the response message corresponding to the sent detection message. In the EVPN VPWS scenario, the first network device can be an end device on one side of the tunnel, and the device receiving the detection message can be, for example, an end device on the other side of the tunnel. The tunnel can be a single-segment tunnel or a segmented tunnel.
[0125] Specifically, the identifier of the first network can be used to uniquely indicate the first network device. This application does not limit the type of the identifier of the first network device.
[0126] In a possible implementation manner, the identifier of the first network device may include an IP address of the first network device.
[0127] Exemplarily, the IP address of the first network device may be an interface IP address of the first network device; or, a loopback interface IP address of the first network device, or, a SID in the form of an IP address of the first network device.
[0128] The IP address may be an IPv4 address, an IPv6 address, or others.
[0129] In another possible implementation manner, the identifier of the first network device may include: a MAC address of the first network device.
[0130] Optionally, the encapsulation position of the identifier of the first network device in the detection message may include but is not limited to the following implementation A or implementation B.
[0131] Implementation A: Encapsulate the identifier of the first network device in the data part of the detection message in TLV format.
[0132] For example, Figure 6 The following figure shows the structure of a detection message. Figure 6As shown, the detection message structure includes a data part and a header. The header may include: a user datagram protocol (UDP) header, an IP header, a label stack, and a link header. Figure 6 As shown, the UDP header may include a source port and a destination port; the IP header may include a source IP address, a destination IP address, and a reserved bit; and the label stack may include a public network path label and a tunnel label.
[0133] For example, the identifier of the first network device may be encapsulated in a TLV format such as Figure 6 The data part of the detection message of the structure shown in the figure. The TLV includes the TLV type, the length of the identifier of the first network device and the identifier of the first network device.
[0134] It should be noted that the structure of the TLV can be configured according to actual needs, and the embodiments of the present application do not specifically limit this.
[0135] For example, when the identifier of the first network device is an IPv4 address, the TLV type (tag, T) can be configured as 26, the length (length, L) of the TLV can be configured as the length of the IPv4 address of the first network device, and the value (value, V) of the TLV can be configured as the IPv4 address of the first network device. Among them, the type T occupies 1 byte, the length L occupies 1 byte, and the value V occupies 4 bytes.
[0136] For another example, when the identifier of the first network device is an IPv6 address, the T of the TLV can be configured as 26, the L of the TLV can be configured as the length of the IPv6 address of the first network device, and the V of the TLV can be configured as the IPv6 address of the first network device, where T occupies 1 byte, L occupies 1 byte, and V occupies 16 bytes.
[0137] For another example, when the identifier of the first network device is a MAC address, the T of the TLV can be configured as 26, the L of the TLV can be configured as the length of the MAC address of the first network device, and the V of the TLV can be configured as the MAC address of the first network device, where T occupies 1 byte, L occupies 1 byte, and V occupies 6 bytes.
[0138] Implementation B: encapsulate the identifier of the first network device in the source IP address of the IP header of the detection message.
[0139] Specifically, in implementation B, the identifier of the first network device is the IP address of the first network device.
[0140] For example, in implementation B, the IP address of the first network device may be encapsulated in Figure 6The source IP address of the IP header of the detection message with the structure shown.
[0141] It is understandable that the identifier of the first network device may be encapsulated in other locations of the detection message according to actual needs, and the above implementation A or implementation B does not constitute the only limitation.
[0142] Optionally, the detection message may also include an indication of the type of the identifier of the first network device. The indication of the identifier type of the first network device is used to indicate the type of the identifier of the first network device carried in the detection message. For example, the identifier type of the first network device may include but is not limited to any of the following: IPv4, IPv6, MAC. In some possible applications, the second network device may determine a network application environment that matches the type based on the indication of the identifier type.
[0143] Optionally, the detection message may further include an adding indication, and the identifier of the first network device and the adding indication are used to jointly instruct the second network device to add the identifier of the first network device to the destination address of the response message of the detection message.
[0144] It should be noted that the user can configure the form of adding the indication and its position in the detection message according to actual conditions, and this application does not impose the sole limitation on this.
[0145] Exemplarily, the addition indication may be in the form of a value of one or more bits.
[0146] In a possible implementation, the added indication may be one or more reserved bits in the header of the detection message.
[0147] For example, adding instructions can be as follows Figure 6 A reserved bit, or multiple reserved bits, in the IP header of the detection message of the structure shown.
[0148] Exemplarily, the added indication may be three reserved bits in the IP header of the detection message, whose values are 001.
[0149] For example, in a scenario where the detection message is used to detect the tunnel status, the implementation of S501 can be: the first network device obtains the identification information of the tunnel to be detected, uses the identification information of the tunnel to be detected as the data part of the detection message, and then adds the identification of the first network device through the method in the above implementation A or implementation B, or adds the identification of the first network device and adds an indication, and encapsulates the message with a UDP header, an IP header, a label stack, and a link header to generate Figure 6 A probe message with the structure shown.
[0150] Among them, the first network device can configure the source port in the UDP header of the detection message to a random port number, and configure the destination port in the UDP header to 3503; configure the source IP address in the IP header of the detection message to the IP address of the first network device, and the destination IP address to the IP address of the second network device, or according to the provisions of RFC8029, configure the IP address of the IP header destination to 127 / 8, for example, 127.0.0.1; configure the public network label in the label stack to the path label of the tunnel detected by the first network device, and configure the tunnel label to the tunnel entrance label and the tunnel exit label.
[0151] S502: The first network device sends a detection message to the second network device.
[0152] The second network device is a network device that receives the detection message.
[0153] In a possible implementation, when the destination IP address in the detection message is configured as the IP address of the destination device, the second network device may be the destination device when the first network device sends the detection message.
[0154] For example, when the destination IP address in the detection message is filled with the IP address of the second network device, when the second network device receives the detection message, it determines that the destination IP address in the detection message is the same as its own IP address, and then considers itself (the second network device) as the destination device.
[0155] In another possible implementation, when the destination IP address in the detection message is configured to indicate an IP address, the tunnel identifier to be detected is used as the destination tunnel identifier of the detection message, and the detection message is sent on the tunnel to which it is connected. Any of the multiple network devices at the other end of the tunnel may receive the detection message, and the opposite network device that receives the detection message is the second network device.
[0156] The indication IP address is used to instruct the network device that has received the detection message not to forward the detection message any more and to process the detection message itself.
[0157] In a possible implementation, according to the provisions of RFC8029, the indicated IP address may be 127 / 8, for example, 127.0.0.1.
[0158] For example, in a tunnel detection scenario, the other end of the tunnel connected to the first network device is a multi-homing scenario, and the destination IP address in the detection message is configured as 127 / 8, for example, 127.0.0.1; the tunnel identifier to be detected is used as the destination tunnel identifier of the detection message, and the detection message is sent on the tunnel to which it is connected. Any of the multiple network devices at the other end of the tunnel may receive the detection message. The opposite network device that receives the detection message determines that the destination IP address in the detection message is configured as 127 / 8, and then considers itself (the second network device) to be the opposite network device that receives the detection message.
[0159] Specifically, S502 may be implemented as follows: the first network device sends the detection message generated in S501 through the tunnel to which it is connected.
[0160] In a possible implementation manner, when the detection message is a detection message of an EVPN VPWS scenario, the first network device may send the detection message generated in S501 through the EVPN VPWS tunnel.
[0161] For example, the first network device directly sends the detection message generated in S501 to the second network device through the tunnel, wherein the first network device and the second network device are two end devices of the tunnel, or there are multiple tunnels between the first network device and the second network device, the first network device is the end device of the first tunnel, and the second network device is the end device of the last tunnel.
[0162] For another example, the first network device sends the detection message generated in S501 through a tunnel, and the detection message reaches the second network device after being forwarded by one or more network devices.
[0163] Exemplarily, the first network device forwards the detection message generated in S501 to the second network device through the EVPNVPWS tunnel of the iterative MPLS or SR public network and then through the network device 1 and the network device 2.
[0164] S503: The second network device receives the detection message sent by the first network device.
[0165] Specifically, the network device can identify the purpose of the message by the port number of the received message. For example, the message received by a certain port can be configured as a detection message, and the second network device identifies the receiving port when receiving the message to determine whether the received message is a detection message.
[0166] For example, assuming that the protocol stipulates that port 3503 receives a detection message used to detect whether the tunnel is normal, when the second network device receives the message in S503, it identifies that the port number for receiving the message is 3503, and can determine that the message is a detection message used to detect whether the tunnel is normal. Then, the second network device identifies the destination IP address of the detection message. If the IP address is its own IP address or the destination IP is 127 / 8, it uploads it to the local machine for processing; the second network device decapsulates the detection message and obtains the data information in the detection message to execute S504. If the destination address of the detection message is not its own address, the second network device can forward the message according to the destination IP address to forward the message to the network device that can execute S504.
[0167] S504: The second network device generates a response message to the detection message.
[0168] Specifically, in S504, the second network device performs corresponding processing according to the purpose of the received detection message. For example, when the detection message is used to detect whether the tunnel is normal, the second network device in S504 detects whether the tunnel is normal and obtains the detection result. The second network device uses the result of the executed processing as the data part in S504 to generate a response message.
[0169] In a possible implementation, the second network device obtains the identifier of the first network device at the location where the identifier of the first network device is encapsulated in the detection message, and uses the identifier of the first network device as the destination address of the response message according to the indication of the identifier of the first network device to generate a response message. The encapsulation location of the identifier of the first network device is known to the second network device, and the known method may be that the second network device directly knows the encapsulation location of the identifier of the first network device, or the second network device determines the encapsulation location of the identifier of the first network device through the identifier indication information.
[0170] In another possible implementation, the second network device obtains the identifier of the first network device at the location where the identifier of the first network device is encapsulated in the detection message (the encapsulation location of the identifier of the first network device is known to the second network device), obtains the adding indication at the location where the indication is added in the detection message (the location where the indication is added is known to the second network device), and generates a response message based on the common indication of the obtained identifier of the first network device and the adding indication, using the identifier of the first network device as the destination address of the response message. The adding indication can be used to indicate whether the second network device needs to add the identifier of the first network device in the response message.
[0171] It should be understood that if the second network device does not obtain the identifier of the first network device at the location where the identifier of the first network device is encapsulated in the detection message, or the second network device obtains the identifier of the first network device at the location where the identifier of the first network device is encapsulated in the detection message, but does not obtain the adding indication at the location where the indication is added in the detection message, or the second network device does not obtain the identifier of the first network device at the location where the identifier of the first network device is encapsulated in the detection message, and does not obtain the adding indication at the location where the indication is added in the detection message, the response message generated by the second network device in S504 may not carry the identifier of the first network device.
[0172] For example, in S504, when the second network device generates a response message to the detection message, it can use the processing result as the data part of the response message, use the identifier of the first network device as the destination address of the response message, perform UDP, IP, Ethernet, label stack and link layer encapsulation on the data part of the response message, and generate a response message to the detection message. For example, the message structure of the response message can be as follows: Figure 7 Schematic diagram. The response message may include a data part and a header, and the header may include a UDP header, an IP header, an Ethernet header, a label stack, and a link header. The UDP header may include a source port and a destination port; the IP header may include a source IP address, a destination IP address, and a reserved bit; the Ethernet header may include a source MAC address and a destination MAC address; and the label stack may include a public network path label and a tunnel label.
[0173] In a possible implementation, the detection message may be a detection message of an EVPN VPWS scenario, and correspondingly, in S504, the response message of the detection message may be a response message of the detection message of the EVPN VPWS scenario. Figure 7 The tunnel label of the response message of the structure shown is the EVPN VPWS tunnel label.
[0174] In a possible implementation manner, when the identifier of the first network device is the IP address of the first network device, the second network device uses the IP address of the first network device as the destination IP address of the response message.
[0175] In another possible implementation manner, when the identifier of the first network device is the MAC address of the first network device, the second network device uses the MAC address of the first network device as the destination MAC address of the response message.
[0176] For example, in a scenario where a probe message is used to detect whether a tunnel is normal, S504 can be implemented as follows: the second network device obtains the exit identifier of the tunnel to be detected in the data portion of the probe message. If the identifier is the same as its own tunnel identifier, it determines that the tunnel to be detected is normal; if the identifier is different from its own tunnel identifier, it determines that the tunnel to be detected is abnormal. The second network device uses the detection result of the normal or abnormal tunnel as the data portion of the response message of the probe message, or the second network device converts the detection result of the normal or abnormal tunnel into a corresponding code as the data portion of the response message of the probe message. Then, the second network device obtains the identifier of the first network device carried in the probe message, and uses the identifier of the first network device as the destination address of the response message of the probe message; and performs UDP, IP, Ethernet, label stack, and link layer encapsulation on the data portion of the response message to generate a response message of the probe message.
[0177] Further optionally, when the second network device determines whether the tunnel to be detected is normal, it can also add packet loss and delay judgment on the basis of judging whether the exit identifier of the tunnel to be detected is the same as its own tunnel identifier. Specifically, if the second network device judges that the exit identifier of the tunnel to be detected is the same as its own tunnel identifier, and the received detection message has no packet loss, and the delay is less than a preset threshold, and the exit identifier of the tunnel to be detected in the detection message is the same as its own tunnel identifier, it is determined that the tunnel to be detected is normal, otherwise, it is determined that the tunnel to be detected is abnormal.
[0178] It should be noted that the above process of determining whether the tunnel to be detected is normal is an example and does not constitute a sole limitation.
[0179] Exemplarily, assuming that the probe message carries the IP address of the first network device, in a scenario where the probe message is used to detect whether the tunnel is normal, S504 can be implemented as follows: the second network device obtains the exit identifier of the tunnel to be detected in the probe message, determines that the identifier is the same as its own tunnel identifier, and then counts the delay and number of packets of the received probe message. If there is no packet loss and the delay is less than a preset threshold, the EVPN VPWS tunnel communication is considered normal; otherwise, the EVPN VPWS tunnel communication is considered abnormal; the second network device converts the detection result of the tunnel being normal or abnormal into a code corresponding to the detection result as the data part of the response message of the probe message. Then, the second network device fills in the source port in the UDP header of the response message of the probe message with 3503 and the destination port number with 65004; fills in the source IP address in the IP header of the response message of the probe message with the IP address of the second network device, and after obtaining the IP address of the first network device carried in the probe message, fills in the destination IP address in the IP header of the response message of the probe message with the IP address of the first network device; fills in the source MAC address in the Ethernet header of the response message of the probe message with the MAC address of the second network device, and after obtaining the MAC address of the first network device by looking up the route, fills in the destination MAC address in the Ethernet header of the response message of the probe message with the MAC address of the first network device; then adds an MPLS label or an SR label, as well as information such as an EVPN VPWS tunnel label to the response message of the probe message to generate a response message of the probe message.
[0180] By adding the IP address of the first network device to the destination IP address of the response message, the second network device can ensure that the response message can eventually be smoothly forwarded to the first network device as the initiator of the detection message, without the problem that the response message may not be able to smoothly reach the initiator of the detection message due to the default value shared by the first network device and the third network device in the traditional implementation method. In addition, since the IP address of the first network device is added to the destination IP address field of the response message, the device as the non-initiator can also continue to forward the response message according to the traditional forwarding rules after receiving the response message, thereby improving the compatibility of network operation.
[0181] S505: The second network device sends the response message to the first network device or the third network device.
[0182] The third network device and the first network device are both connected to the same first user-side network device. The third network device is any network device other than the first network device connected to the same user-side network device. In the EVPN VPWS multi-home multi-active scenario, Figure 3As shown, the first network device may be a first PE 301 , the second network device may be a second PE 302 , and the third network device may be a third PE 303 .
[0183] For example, the second network device may select a network device from multiple network devices connected to the first user-side network device according to a load sharing algorithm, and send a response message to the detection message generated in S504 to the selected network device through a tunnel. Figure 3 For example, the second PE 302 may send a response message to one of the first PE 301 or the second PE 303 according to the load sharing algorithm.
[0184] It should be noted that the user can configure the load sharing algorithm according to actual needs. For example, in one possible implementation, the network device with the smallest load is selected according to the load sharing algorithm, or any network device with a load less than the first threshold is selected according to the load sharing algorithm.
[0185] It should be noted that the user can configure the first threshold according to actual needs, and this embodiment of the present application is not limited to this.
[0186] The second network device may also send a response message to the first network device or the third network device according to other preset mechanisms.
[0187] Exemplarily, the second network device sends the response message of the detection message generated in S504 to the first network device or the third network device through a tunnel of the iterated MPLS or SR public network.
[0188] S506: The first network device receives a response message from the second network device; or receives an updated response message from the third network device.
[0189] The destination addresses of the response message and the updated response message are identifiers of the first network device.
[0190] In one possible implementation, S506 can be implemented as follows: the first network device receives a response message to the detection message sent by the second network device in S505, the first network device obtains the destination address in the response message of the detection message, determines that the destination address is the identifier of the first network device, and then decapsulates the response message to obtain the data information in the response message.
[0191] In another possible implementation, the third network device receives the response message of the probe message sent by the second network device in S505, the third network device obtains the destination address in the response message, determines that the destination address is the identifier of the first network device, which is different from its own network device identifier, and then updates the response message, and forwards the updated response message of the probe message to the first network device indicated by the destination address through IP routing or other methods such as tunnels. The first network device receives the response message of the updated probe message forwarded by the third network device, obtains the destination address in the response message of the updated probe message, determines that the destination address is the identifier of the first network device, and then decapsulates the response message of the updated probe message, and obtains the data information in the response message of the updated probe message. For the operation of updating the response message, its specific implementation can be to modify the received message in some way, such as removing the label stack and link layer encapsulation in the response message of the probe message, or further adding other necessary information to the message. Alternatively, in another possible scenario, the update may also be understood as requiring the third network device to perform any substantial changes on the message, but directly transparently transmitting the message to the first network device through the third network device.
[0192] Exemplarily, if in S505 the second network device sends to the third network device Figure 7 The response message of the structure shown in FIG. 1 is sent by the third network device to the first network device. The destination address of the response message is the identifier of the first network device. The updated response message sent by the third network device to the first network device can be as follows: Figure 8 shown.
[0193] Optionally, in a scenario where the detection message is used to detect whether the tunnel is normal, the first network device determines whether the tunnel to be detected is normal according to data information in the acquired response message.
[0194] The embodiment of the present application provides a message transmission method, by adding the identifier of the initiating end device to the detection message, the receiving end device of the detection message adds the identifier as the destination address of the response message of the detection message, so that even if the non-initiating end device receives the response message, the response message can be forwarded to the initiating end device of the detection message according to the destination address of the response message, and it is ensured that the initiating end device of the detection message can receive the response message of the sent detection message. When the detection message is used to detect the tunnel status, the detection error caused by the initiating end device of the detection message being unable to receive the response message of the detection message is avoided, thereby improving the accuracy of tunnel detection.
[0195] Furthermore, in actual applications, the first network device may also receive a response message to a detection message sent by other network devices, such as Fig. 9 As shown, the message transmission method provided in the embodiment of the present application may also include the following S507 and S508.
[0196] S507: The first network device receives other response messages.
[0197] It can be understood that the initiator device of the detection message can also be a network device other than the first network device. When the initiator device of the detection message is a network device other than the first network device connected to the first user-side network device, the first network device may also receive other response messages sent by the remote network device (such as the second network device) through the tunnel.
[0198] Among them, the format and content of other response messages can refer to the description of the aforementioned response message and will not be repeated here.
[0199] S508: The first network device forwards the other response message to the network device indicated by the destination address of the other response message based on the destination address of the other response message being an address other than the identifier of the first network device.
[0200] Among them, the network devices indicated by the destination addresses of other response messages are connected to the first user-side network device.
[0201] Specifically, S508 can be implemented as follows: the first network device obtains the destination address of other response messages received in S507, determines that the destination address of other response messages is different from its own destination address, and after updating the other response messages, the first network device forwards them to the network device indicated by the destination address of other response messages through IP routing or tunnel.
[0202] Optionally, after receiving the updated other response message, other network devices may further obtain the updated other response message data information.
[0203] Below Figure 1 Taking the message transmission system of the EVPN VPWS dual-homing dual-active scenario as an example, the message transmission process provided by the embodiment of the present application is described.
[0204] like Figure 1 As shown, if PE1 initiates tunnel detection to detect whether the EVPN tunnels with tunnel identifiers 100 to 200 are normal, the process may include:
[0205] In one case, PE1 obtains the IP address of PE1 and the exit end identifier of the tunnel to be detected, and uses the IP address of PE1 and the exit end identifier of the tunnel to be detected stored in TLV format as the data part of the detection message, and then encapsulates the data part to generate a detection message. PE1 sends the detection message to the exit end device of the tunnel through the EVPN VPWS tunnel from 100 to 200; PE3 receives the detection message, decapsulates the detection message, obtains the identifier of the tunnel to be detected in the data part of the detection message, obtains the detection result of this tunnel according to the identifier, and uses the detection result of this tunnel as the data part of the response message of the detection message; PE3 obtains the IP address of PE1 in the detection message in the data part of the detection message, adds the destination IP address of the response message of the detection message as the IP address of PE1, encapsulates the response message of the detection message, and sends it through the EVPN The VPWS tunnel is sent to the tunnel exit device. If PE1 receives the response message, it obtains the tunnel detection result according to the response message. If PE2 receives the response message, PE2 updates the response message and forwards it to PE1 through IP routing. PE1 receives the response message forwarded by PE2 and obtains the tunnel detection result.
[0206] In another case, PE1 obtains the exit end identifier of the tunnel to be detected, uses the exit end identifier of the tunnel to be detected as the data part of the message, obtains the IP address of PE1, configures the source IP address of the IP header of the message as the source IP address of PE1, configures three reserved bits in the message as 001 as an addition indication, and then encapsulates the message to generate a detection message; PE1 sends the detection message to the exit end device of the tunnel through the EVPN VPWS tunnel from 100 to 200; PE3 receives the detection message, decapsulates the detection message, obtains the end identifier of the tunnel to be detected in the data part of the detection message, obtains the detection result of this tunnel according to the identifier, and uses it as the data part of the response message of the detection message; PE1 finds that there is an addition indication 001 in the detection message, obtains the IP address of PE1 from the source IP address in the IP header of the detection message, adds the destination IP address of the response message of the detection message as the IP address of PE1, encapsulates the response message of the detection message and sends it through EVPN The VPWS tunnel is sent to the tunnel exit device. If PE1 receives the response message, it obtains the tunnel detection result according to the response message. If PE2 receives the response message, PE2 updates the response message and forwards it to PE1. PE1 receives the response message forwarded by PE2 and obtains the tunnel detection result.
[0207] In another case, PE1 obtains the MAC address of PE1 and the exit end identifier of the tunnel to be detected, uses the MAC address of PE1 and the exit end identifier of the tunnel to be detected stored in TLV format as the data part of the message, configures three reserved bits in the message to 001 as an addition indication, and then encapsulates the message to generate a detection message; PE1 sends the detection message to the exit end device of the tunnel through the EVPN VPWS tunnel 100 to 200; PE3 receives the detection message, decapsulates the detection message, obtains the end identifier of the tunnel to be detected in the data part of the detection message, obtains the detection result of this tunnel according to the identifier, and uses it as the data part of the response message of the detection message; PE1 finds that there is an addition indication 001 in the detection message, searches for the MAC address of PE1 stored in TLV format in the data part of the detection message, adds the destination MAC address of the response message of the detection message as the MAC address of PE1, encapsulates the response message of the detection message and sends it through EVPN The VPWS tunnel is sent to the tunnel exit device. If PE1 receives the response message, it obtains the tunnel detection result according to the response message. If PE2 receives the response message, PE2 updates the response message and forwards it to PE1. PE1 receives the response message forwarded by PE2 and obtains the tunnel detection result.
[0208] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the interaction between the first network device and the second network device in the message transmission system. It can be understood that each message transmission device, such as the first network device, the second network device, etc., in order to realize the above functions, includes a hardware structure and / or software module corresponding to each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0209] The embodiment of the present invention can divide the functional modules of the message transmission device, etc. according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0210] In the case of dividing each functional module into corresponding functional modules, Fig.10 The embodiment of the present application provides a message transmission device 100, which is used to implement the function of the first network device in the above embodiment. The message transmission device 100 may be the first network device or the message transmission device 100 may be deployed in the first network device. Fig.10 As shown, the message transmission device 100 may include: a first sending unit 1001 and a first receiving unit 1002. The first sending unit 1001 is used to perform Figure 5 or Fig. 9 S502 in; the first receiving unit 1002 is used to execute Figure 5 or Fig. 9 S506 in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0211] Further, such as Fig.11 As shown, the message transmission device 100 may further include: a processing unit 1003, a second receiving unit 1004, and a second sending unit 1005. The processing unit 1003 is used to execute Figure 5 or Fig. 9 S501; the second receiving unit 1004 is used to execute Fig. 9 S507; the second sending unit 1005 is used to execute Fig. 9 S508. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0212] In the case of integrated units, such as Fig.12 The first network device 120 provided in the embodiment of the present application is shown, which is used to implement the function of the first network device in the above method. The first network device 120 includes at least one processing module 1201, which is used to implement the function of the first network device in the embodiment of the present application. Exemplarily, the processing module 1201 can be used to execute Figure 5 For details of process S501 in the method example, please refer to the detailed description, which will not be repeated here.
[0213] The first network device 120 may also include at least one storage module 1202 for storing program instructions and / or data. The storage module 1202 is coupled to the processing module 1201. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processing module 1201 may operate in coordination with the storage module 1202. The processing module 1201 may execute program instructions stored in the storage module 1202. At least one of the at least one storage module may be included in the processing module.
[0214] The first network device 120 may further include a communication module 1203, which is used to communicate with other devices via a transmission medium, so as to determine whether the first network device 120 can communicate with other devices. The communication module 1203 is used for the device to communicate with other devices. Exemplarily, the processor 1201 may use the communication module 1203 to execute Figure 5 or Fig. 9 Processes S502, S506, S507, and S508.
[0215] When the processing module 1201 is a processor, the storage module 1202 is a memory, and the communication module 1203 is a transceiver, the embodiment of the present application Fig.12 The first network device 120 involved may be Figure 4 A network device 40 is shown.
[0216] As mentioned above, the message transmission device 100 or the first network device 120 provided in the embodiment of the present application can be used to implement the function of the first network device in the method implemented by the above-mentioned embodiments of the present application. For the convenience of explanation, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the embodiments of the present application.
[0217] In the case of dividing each functional module into corresponding functional modules, such as Fig.13 The message transmission device 130 provided in the embodiment of the present application is shown, which is used to implement the function of the second network device in the above embodiment. The message transmission device 130 can be the second network device or the message transmission device 130 can be deployed in the second network device. Fig.13 As shown, the message transmission device 130 may include: a receiving unit 1301, a processing unit 1302 and a sending unit 1303. The receiving unit 1301 is used to perform Figure 5 or Fig. 9 S503; processing unit 1302 is used to execute Figure 5 or Fig. 9 S504; the sending unit 1303 is used to execute Figure 5 or Fig. 9S505. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0218] Further, such as Fig.14 As shown, the message transmission device 130 may further include: an adding unit 1304. The adding unit 1304 is used to perform Figure 5 or Fig. 9 S504. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0219] In the case of integrated units, such as Fig.15 The second network device 150 provided in the embodiment of the present application is shown, which is used to implement the functions of the second network device in the above embodiment. The second network device 150 may include at least one processing module 1501, which is used to implement the functions of the second network device in the embodiment of the present application. For details, please refer to the detailed description in the method example, which will not be repeated here.
[0220] The second network device 150 may also include at least one storage module 1502 for storing program instructions and / or data. The storage module 1502 is coupled to the processing module 1501. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processing module 1501 may operate in coordination with the storage module 1502. The processing module 1501 may execute program instructions stored in the storage module 1502. At least one of the at least one storage module may be included in the processing module.
[0221] The second network device 150 may further include a communication module 1503, which is used to communicate with other devices via a transmission medium, so as to determine that the second network device 150 can communicate with other devices. The communication module 1503 is used for the device to communicate with other devices. Exemplarily, the processor 1501 executes the communication module 1503 Figure 5 or Fig. 9 S503 and S505 in the process.
[0222] When the processing module 1501 is a processor, the storage module 1502 is a memory, and the communication module 1503 is a transceiver, the embodiment of the present application Fig.15 The second network device 150 involved may be Figure 4 A network device 40 is shown.
[0223] As mentioned above, the message transmission device 130 or the second network device 150 provided in the embodiment of the present application can be used to implement the function of the second network device in the above-mentioned embodiment of the present application. For the convenience of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the embodiments of the present application.
[0224] Some other embodiments of the present application provide a message transmission system, which may include a first device for message transmission and a second device for message transmission, wherein the first device for message transmission may implement the function of the first network device in the above-mentioned embodiment, and the second device for message transmission may implement the function of the second network device. For example, the first device for message transmission may be the first network device described in the embodiment of the present application, and the second device for message transmission may be the second network device described in the embodiment of the present application.
[0225] Some other embodiments of the present application provide a chip system, which includes a processor and may also include a memory, for implementing the above Figure 5 or Fig. 9 The function of the first network device in the embodiment shown. The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0226] Some other embodiments of the present application provide a chip system, which includes a processor and may also include a memory, for implementing the above Figure 5 or Fig. 9 The function of the second network device in the illustrated embodiment. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0227] Some other embodiments of the present application further provide a computer-readable storage medium, which may include a computer program. When the computer program is run on a computer, the computer executes the above Figure 5 or Fig. 9 The various steps in the embodiment are shown.
[0228] Some other embodiments of the present application further provide a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute the above Figure 5 or Fig. 9 The various steps in the embodiment are shown.
[0229] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0230] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0231] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0232] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0233] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0234] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A message transmission method, characterized in that: The method is performed by a first network device, and the method includes: Sending a detection message to a second network device, wherein the detection message includes an identifier of the first network device, and the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device to a destination address of a response message to the detection message; Receive the response message from the second network device, the destination address of the response message is the identifier of the first network device; or receive the updated response message from the third network device, the destination address of the updated response message is the identifier of the first network device, the third network device and the first network device are both connected to the first user-side network device, and the second user-side network device is single-homed to the second network device.
2. The method according to claim 1, characterized in that The identifier of the first network device includes: The Internet Protocol IP address of the first network device; or, A media access control (MAC) address of the first network device.
3. The method according to claim 2, characterized in that The IP address of the first network device includes: The interface IP address of the first network device; or, The loopback interface IP address of the first network device; or, A segment identifier SID in the form of an IP address of the first network device.
4. The method according to any one of claims 1 to 3, characterized in that: Before sending the detection message to the second network device, the method further includes: Generate the detection message; wherein, The identifier of the first network device is encapsulated in the data part of the detection message in a type-length-value TLV format; or, The identifier of the first network device is encapsulated in the source IP address of the IP header of the detection message.
5. The method according to any one of claims 1 to 3, characterized in that: The detection message also includes an adding instruction, and the identifier of the first network device is used to instruct the second network device to add the identifier of the first network device to the destination address of the response message of the detection message, including: The identifier of the first network device and the adding instruction are used to jointly instruct the second network device to add the identifier of the first network device to the destination address of the response message.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Receive other response messages; According to the destination address of the other response message being an address other than the identifier of the first network device, the other response message is forwarded to the network device indicated by the destination address of the other response message, and the network device indicated by the destination address of the other response message is connected to the user-side network device.
7. The method according to any one of claims 1 to 3, characterized in that: The first network device, the second network device and the third network device are provider edge devices PE, and the user-side network device is a customer edge device CE.
8. The method according to any one of claims 1 to 3, characterized in that: The detection message is a detection message of an Ethernet virtual private area network EVPN virtual private wireless service VPWS scenario, and the response message is a response message of the EVPN VPWS scenario.
9. A message transmission method, characterized in that: The method is performed by a second network device, and the method includes: receiving a detection message sent by a first network device, wherein the detection message includes an identifier of the first network device; Generate a response message to the detection message, wherein the destination address of the response message includes the identifier of the first network device; The response message is sent to the first network device or the third network device, the third network device and the first network device are both connected to the first user-side network device, and the second user-side network device is single-homed to the second network device.
10. The method according to claim 9, characterized in that The identifier of the first network device includes: The Internet Protocol IP address of the first network device; or, A media access control (MAC) address of the first network device.
11. The method according to claim 10, characterized in that The IP address of the first network device includes: The interface IP address of the first network device; Or, the loopback interface IP address of the first network device; Alternatively, the segment identifier SID of the first network device is in the form of an IP address.
12. The method according to any one of claims 9 to 11, characterized in that: The identifier of the first network device is encapsulated in the data part of the detection message in a type-length-value TLV format; or, The identifier of the first network device is encapsulated in the source IP address of the IP header of the detection message.
13. The method according to any one of claims 9 to 11, characterized in that: The detection message also includes an adding instruction, and the method further includes: According to the adding indication and the identifier of the first network device, the identifier of the first network device is added to the destination address of the response message.
14. The method according to claim 10, characterized in that Generating a response message to the detection message, including: Add the IP address of the first network device to the destination IP address of the response message; or, The MAC address of the first network device is added to the destination MAC address of the response message.
15. The method according to any one of claims 9 to 11, characterized in that: The sending the response message to the first network device or the third network device includes: According to the load sharing algorithm, the response message is sent to the first network device or the third network device.
16. The method according to any one of claims 9 to 11, characterized in that: The first network device, the second network device and the third network device are provider edge devices PE, and the user-side network device is a customer edge device CE.
17. The method according to any one of claims 9 to 11, characterized in that: The detection message is a detection message of an Ethernet virtual private area network EVPN virtual private wireless service VPWS scenario, and the response message is a response message of the EVPN VPWS scenario.
18. A first network device, characterized in that: The device comprises: a processor and a memory; The memory is connected to the processor; the memory is used to store computer instructions, and when the processor executes the computer instructions, the device executes the message transmission method as described in any one of claims 1 to 8.
19. A second network device, characterized in that: The device comprises: a processor and a memory; The memory is connected to the processor; the memory is used to store computer instructions, and when the processor executes the computer instructions, the device executes the message transmission method as described in any one of claims 9 to 17.
20. A message transmission system, characterized in that: The method comprises the first network device as claimed in claim 18 and the second network device as claimed in claim 19.
21. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, enable the computer to execute the message transmission method according to any one of claims 1 to 17.
22. A computer program product, characterized in that The method comprises instructions which, when executed on a computer, enable the computer to execute the message transmission method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Fast convergence of EVPN networks for multi homing topologies
CN107040443A
Cited By
Message transmission method, apparatus, and system
WO2022042503A1
