Remote debugging control method, device, system, storage medium and computer equipment

By creating a VxLAN tunnel in the routing device, remote debugging control of devices without public network IP address is realized, and the problem of remote debugging in the existing technology is solved, the equipment maintenance efficiency and flexibility are improved, and the cost and difficulty are reduced.

CN118714177BActive Publication Date: 2024-11-29GUANGZHOU TOZED KANGWEI INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411183004.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-29
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

In the prior art, routing devices without public IP addresses cannot achieve remote debugging, which limits the efficiency and speed of equipment maintenance and troubleshooting.

Method used

By adding the Ethernet interface and VxLAN virtual interface to the bridge of the routing device, a VxLAN tunnel is created to realize the interoperability between the device without public network IP address and external devices, and transmit debugging instructions and results through VxLAN packets to remotely Debugging control.

Benefits of technology

It realizes efficient and secure remote debugging functions for public-network-free IP address devices, reduces deployment costs and maintenance difficulties, improves the flexibility of remote debugging, and avoids the needs of complex network configurations and additional hardware devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714177B_ABST
    Figure CN118714177B_ABST
Patent Text Reader

Abstract

The present invention relates to a remote debugging control method, device, system, storage medium and computer equipment, the method is used for a routing device without a public IP address, the routing device includes a bridge, the method includes: adding an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and creating a VxLAN tunnel, wherein the Ethernet interface is used to connect to a user device, and the VxLAN virtual interface is used to communicate with a network device through the VxLAN tunnel; judging whether a first VxLAN message is received; if so, unsealing the first VxLAN message to obtain a first overlay message, the first overlay message being included in the first VxLAN message; judging whether the first overlay message contains a UDP message carrying a debugging instruction; if so, debugging is performed according to the debugging instruction. The present invention realizes an efficient and secure remote debugging function for a routing device without a public IP address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a remote debugging control method, device, system, storage medium and computer equipment. Background Art

[0002] With the rapid development of network technology, remote debugging technology plays an increasingly important role in equipment maintenance, troubleshooting and software development. Especially in complex network environments, such as corporate intranets and data centers, remote debugging technology allows technicians to perform efficient and accurate debugging operations on equipment without having to visit the site, greatly improving work efficiency and response speed.

[0003] However, in actual applications, many routing devices are not assigned public IP addresses due to various reasons (such as network architecture restrictions, etc.), which directly limits the application scope of remote debugging technology. Traditional remote debugging methods rely on public IP addresses and debug by directly accessing the device, but in scenarios without public IP addresses, this method is obviously no longer applicable.

[0004] In order to solve this problem, it is urgent to find a remote debugging solution for routing devices without public IP addresses. Summary of the invention

[0005] The main purpose of the present invention is to provide a remote debugging control method, device, system, storage medium and computer equipment to solve the problem in the prior art that routing devices without public network IP cannot realize remote debugging.

[0006] To achieve the above object, the first aspect of the present invention provides a remote debugging control method, the method is used for a routing device without a public IP address, the routing device includes a bridge, and the method includes:

[0007] Add an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and create a VxLAN tunnel, wherein the Ethernet interface is used to connect to the user device, and the VxLAN virtual interface is used to communicate with the network device through the VxLAN tunnel;

[0008] Determine whether the first VxLAN message is received;

[0009] If yes, unpack the first VxLAN message to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message;

[0010] Determine whether the first overlay message contains a UDP message carrying a debugging instruction;

[0011] If yes, debugging is performed according to the debugging instruction.

[0012] Furthermore, the routing device further includes a debugging module, and the step of debugging according to the debugging instruction includes:

[0013] Passing the first VxLAN message and the first overlay message to the debugging module;

[0014] The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries a debugging result;

[0015] Modify the first VxLAN message according to the second overlay message to generate a second VxLAN message;

[0016] Send the second VxLAN message to the network device through the VxLAN tunnel.

[0017] Further, the step of generating the second overlay message includes:

[0018] Replacing the debugging instruction in the first overlay message with the debugging result;

[0019] Swapping the destination MAC and the source MAC in the first overlay message;

[0020] swapping the destination IP and the source IP in the first overlay message; and,

[0021] The destination port and the source port in the first overlay message are swapped to obtain the second overlay message.

[0022] Furthermore, the step of modifying the first VxLAN message according to the second overlay message to generate the second VxLAN message includes:

[0023] Replacing a first overlay message in the first VxLAN message with the second overlay message;

[0024] Swap the destination MAC and source MAC of the external Ethernet header in the first VxLAN message;

[0025] Interchanging the destination IP and the source IP in the external IP header of the first VxLAN message; and,

[0026] Change the destination port and source port of the external UDP header in the first VxLAN message to the preset destination port of VxLAN to obtain the second overlay message.

[0027] Furthermore, the step of determining whether the first overlay message contains a UDP message carrying a debugging instruction includes:

[0028] Determining whether the first overlay message contains a custom message identifier;

[0029] If yes, it is determined that the first overlay message contains a UDP message;

[0030] Determining, according to the position of the custom message identifier, UDP data content included in the first overlay message;

[0031] Determine whether the UDP data content conforms to a preset format; the preset format sequentially includes the custom message identifier, instruction length, debugging instruction and check code;

[0032] If so, it is determined that the first overlay message carries the debugging instruction.

[0033] A second aspect of the present invention provides a remote debugging control system, the system comprising a user device, a routing device, a network device and an external device, the routing device having no public IP address, the routing device comprising a bridge, the routing device adding an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and creating a VxLAN tunnel, wherein the Ethernet interface is used to connect to the user device, and the VxLAN virtual interface is used to communicate with the network device through the VxLAN tunnel; the network device communicates with the external device through the public network;

[0034] The external device sends a UDP message to the user device, wherein the UDP message carries a debugging instruction;

[0035] The user equipment is routed and forwarded to the network device via the routing device;

[0036] The network device encapsulates the UDP message into a first VxLAN message, and sends the first VxLAN message to the routing device through the VxLAN tunnel;

[0037] The routing device determines whether a first VxLAN message is received; if the first VxLAN message is received, the routing device unpacks the first VxLAN message to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message; and determines whether the first overlay message contains a UDP message carrying a debugging instruction; if so, debugging is performed according to the debugging instruction.

[0038] Furthermore, the routing device also includes a debugging module.

[0039] The step of debugging the routing device according to the debugging instruction includes:

[0040] Passing the first VxLAN message and the first overlay message to the debugging module;

[0041] The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries a debugging result;

[0042] Modify the first VxLAN message according to the second overlay message to generate a second VxLAN message;

[0043] Sending the second VxLAN message to the network device through the VxLAN tunnel;

[0044] The network device sends the second VxLAN message to the external device through the public network.

[0045] A third aspect of the present invention provides a remote debugging control device, the device having no public IP address, the device comprising a bridge, and the device comprising:

[0046] A construction module is used to add an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and to create a VxLAN tunnel, wherein the Ethernet interface is used to connect to a user device, and the VxLAN virtual interface is used to communicate with a network device through the VxLAN tunnel;

[0047] A first judgment module is used to judge whether a first VxLAN message is received;

[0048] A decapsulation module, configured to decapsulate a first VxLAN message if a first VxLAN message is received, to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message;

[0049] A second judgment module is used to judge whether the first overlay message contains a UDP message carrying a debugging instruction;

[0050] The debugging module is used to perform debugging according to the debugging instruction if a UDP message carrying the debugging instruction is contained.

[0051] A fourth aspect of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned remote debugging control method when executing the computer program.

[0052] A fifth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above-mentioned remote debugging control method when executed by a processor.

[0053] The remote debugging control method, device, system, storage medium and computer equipment provided by the present invention realize an efficient and secure remote debugging function for routing devices without public IP addresses. By adding Ethernet interfaces and VxLAN virtual interfaces to the bridge of the routing device and creating a VxLAN tunnel, intercommunication between the routing device without a public IP address and the external device is realized. The external device sends the debugging instruction to the network device, and the network device encapsulates it as a first VxLAN message, thereby realizing the remote control of the routing device without a public IP address by the external device, and sending the first VxLAN message to the routing device through the VxLAN tunnel, thereby realizing remote debugging control of the routing device. In addition, the debugging instructions of the present invention can be flexibly defined and extended remotely, thereby improving the flexibility of remote debugging, without the need for complex network configuration and additional hardware equipment, and reducing deployment costs and maintenance difficulties. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flow chart of a remote debugging control method in one embodiment of the present invention;

[0055] Figure 2 It is a schematic diagram of the framework structure of a remote debugging control system in one embodiment of the present invention;

[0056] Figure 3 It is a schematic diagram of the framework structure of a remote debugging control device in one embodiment of the present invention;

[0057] Figure 4 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0058] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0060] Reference Figure 1 The embodiment of the present invention provides a remote debugging control method, the method is used for a routing device without a public IP address, the routing device includes a bridge, and the method includes:

[0061] S1. Add an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and create a VxLAN tunnel, wherein the Ethernet interface is used to connect to a user device, and the VxLAN virtual interface is used to communicate with a network device through the VxLAN tunnel;

[0062] S2. Determine whether the first VxLAN message is received;

[0063] S3. If yes, unpack the first VxLAN message to obtain a first overlay message, where the first overlay message is included in the first VxLAN message;

[0064] S4. Determine whether the first overlay message contains a UDP message carrying a debugging instruction;

[0065] S5. If yes, debug according to the debugging instruction.

[0066] In step S1 of this embodiment, the routing device includes a bridge, a debugging module, and a mobile communication link interface (including, for example, 4G, 5G, etc.). The Ethernet interface and the VxLAN virtual interface of the routing device are added to the bridge. The Ethernet interface is used to establish a connection with the user device, and the VxLAN virtual interface is used to communicate with the network device through the VxLAN tunnel. The network device and the routing device build a VxLAN tunnel through the link of the underlay private network, realizing the second-layer interconnection between the user device and the network device, and the network device acts as a gateway device for the user device to provide the user device with the function of connecting to the external network. Among them, the user device can be, for example, a user CE device, and the network device can be, for example, an MSE device. The network device communicates with an external device through a public network, and the external device can be, for example, a public network server. VxLAN is a network virtualization technology used to build a logical virtual local area network (VLAN) on an IP network. The bridge is used to connect multiple network segments in a local area network to realize communication between different network segments.

[0067] In step S2, the routing device detects whether the first VxLAN message is received. The external device sends a UDP message carrying a custom debugging instruction to the user device, and then routes and forwards the UDP message to the network device, which encapsulates the VxLAN message and sends it to the routing device through the VxLAN tunnel. Using UDP messages to transmit debugging instructions also increases the reliability of data transmission.

[0068] In step S3, if the first VxLAN message is received, the routing device will decapsulate it and extract the first overlay message from it. The first overlay message is encapsulated by the network device inside the first VxLAN message, and includes a UDP message sent by an external device and carrying a custom debugging instruction.

[0069] In steps S4-S5, the above-mentioned routing device will check whether the first overlay message contains a UDP message carrying debugging instructions. When the routing device unpacks the first VxLAN message and finds a UDP message with a custom debugging instruction, the routing device will perform corresponding debugging operations according to the content of the debugging instruction. If the first overlay message does not contain a UDP message carrying debugging instructions, the routing device submits the first overlay message to the bridge, which is further processed by the bridge. The bridge forwards it to the Ethernet interface based on the MAC forwarding table, and further sends it to the user device to realize VxLAN bridge transparent transmission.

[0070] Through the above steps, this embodiment realizes an efficient and secure remote debugging function for routing devices without public IP addresses. By adding Ethernet interfaces and VxLAN virtual interfaces to the bridge of the routing device and creating a VxLAN tunnel, the intercommunication between the routing device without a public IP address and the external device is realized. The external device sends the debugging instruction to the network device, and the network device encapsulates it as a first VxLAN message, thereby realizing the remote control of the routing device without a public IP address by the external device, and sending the first VxLAN message to the routing device through the VxLAN tunnel, thereby realizing remote debugging control of the routing device. In addition, the debugging instructions of the present invention can be flexibly defined and extended remotely, thereby improving the flexibility of remote debugging, without the need for complex network configuration and additional hardware equipment, and reducing deployment costs and maintenance difficulties.

[0071] In one embodiment, the routing device further includes a debugging module, and the step S5 of debugging according to the debugging instruction includes:

[0072] S501. Pass the first VxLAN message and the first overlay message to the debugging module;

[0073] S502, the debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries a debugging result;

[0074] S503. Modify the first VxLAN message according to the second overlay message to generate a second VxLAN message;

[0075] S504. Send the second VxLAN message to the network device through the VxLAN tunnel.

[0076] In this embodiment, the debugging module is used to debug the routing device according to the debugging instruction, thereby realizing remote debugging of the routing device without a public IP address.

[0077] In step S501, after receiving the first VxLAN message and decapsulating to obtain the first overlay message, the routing device passes the two messages to the debugging module. Specifically, the first VxLAN message includes an external Ethernet header, an external IP header, an external UDP header, and a first overlay message in sequence. The external Ethernet header includes the destination MAC, source MAC, and Ethernet type in sequence, the external IP header includes the destination IP and source IP in sequence, and the external UDP header includes the source port and destination port in sequence. The encapsulation and decapsulation of the message only need to construct or interpret the message according to the standard convention.

[0078] Step S502 implements the execution of debugging instructions and the generation of debugging results. After receiving the first overlay message, the debugging module parses the debugging instructions therein and performs corresponding debugging operations according to the content of the debugging instructions. Exemplarily, the debugging instructions can be for querying the system memory usage, querying the system running time, querying the system CPU usage, etc. For example, for the debugging instruction of "querying the system memory usage", the debugging module will collect information such as the total system memory, system available memory, memory cache, etc. to generate debugging results. After the debugging is completed, the debugging module generates a second overlay message according to the debugging results.

[0079] Specifically, in one embodiment, the step S502 of generating the second overlay message includes:

[0080] S5021. Replace the debugging instruction in the first overlay message with the debugging result;

[0081] S5022. Swap the destination MAC and the source MAC in the first overlay message;

[0082] S5023, swapping the destination IP and the source IP in the first overlay message; and,

[0083] S5024. Exchange the destination port and the source port in the first overlay message to obtain the second overlay message.

[0084] The above-mentioned first overlay message includes an internal Ethernet header, an internal IP header, an internal UDP header and UDP data content in sequence, the above-mentioned internal Ethernet header includes the destination MAC, source MAC and Ethernet type in sequence, the above-mentioned internal IP header includes the destination IP and source IP in sequence, the above-mentioned internal UDP header includes the source port and destination port in sequence, and the above-mentioned UDP data content includes a custom message identifier, instruction length, debugging instruction and check code in sequence.

[0085] In this embodiment, the above steps S5021-S5024 are not limited to a specific order and can be performed simultaneously or separately, which is not limited in this embodiment of the present invention. By performing the above steps S5021-S5024, a second overlay message is generated according to the first overlay message, and the second overlay message carries information about the debugging result.

[0086] The above step S503 is used to implement the encapsulation of the debugging result so as to send it back to the external device through the network device. The routing device modifies the first VxLAN message according to the second overlay message to generate a new second VxLAN message.

[0087] Specifically, in one embodiment, the step S503 of modifying the first VxLAN message according to the second overlay message to generate the second VxLAN message includes:

[0088] S5031. Replace the first overlay message in the first VxLAN message with the second overlay message;

[0089] S5032. Exchange the destination MAC and source MAC of the external Ethernet header in the first VxLAN message;

[0090] S5033, swapping the destination IP and source IP in the external IP header of the first VxLAN message; and,

[0091] S5034. Change the destination port and source port of the external UDP header in the first VxLAN message to the preset destination port of VxLAN to obtain the second overlay message.

[0092] In this embodiment, the above steps S5031-S5034 are not limited to a specific order, and can be performed simultaneously or separately, and the embodiment of the present invention does not limit this. Exemplarily, the preset destination port of the above VxLAN can be preset to 4789, and the destination port and source port of the external UDP header are both changed to 4789 in S5034.

[0093] In step S504, the routing device sends the second VxLAN message to the network device through the VxLAN tunnel. After receiving the second VxLAN message, the network device can send it to the external device, so that the external device can receive the debugging result, thereby realizing remote transmission and reception of the debugging result.

[0094] In one embodiment, the step S4 of determining whether the first overlay message contains a UDP message carrying a debugging instruction includes:

[0095] S401. Determine whether the first overlay message contains a custom message identifier;

[0096] S402: If yes, determine that the first overlay message contains a UDP message;

[0097] S403: Determine the UDP data content included in the first overlay message according to the position of the custom message identifier;

[0098] S404, determining whether the UDP data content conforms to a preset format; the preset format sequentially includes the custom message identifier, instruction length, debugging instruction and check code;

[0099] S405: If yes, determine whether the first overlay message carries the debugging instruction.

[0100] In this embodiment, the first overlay message includes an internal Ethernet header, an internal IP header, an internal UDP header and UDP data content in sequence, the above-mentioned internal Ethernet header includes the destination MAC, the source MAC and the Ethernet type in sequence, the above-mentioned internal IP header includes the destination IP and the source IP in sequence, the above-mentioned internal UDP header includes the source port and the destination port in sequence, and the preset format of the above-mentioned UDP data content includes a custom message identifier, an instruction length, a debugging instruction and a checksum in sequence.

[0101] By identifying the custom message identifier, it can be determined that the first overlay message contains a UDP message, and then the UDP data content can be identified, and the debugging instruction can be extracted from the UDP data content.

[0102] Reference Figure 2, an embodiment of the present invention further provides a remote debugging control system, the system comprising a user device 1, a routing device 2, a network device 3 and an external device 4, the routing device 2 having no public IP address, the routing device 2 comprising a bridge 201, the routing device 2 respectively adds an Ethernet interface 202 and a VxLAN virtual interface 203 to the bridge 201, and creates a VxLAN tunnel 5, wherein the Ethernet interface 202 is used to connect to the user device 1, and the VxLAN virtual interface 203 is used to communicate with the network device 3 through the VxLAN tunnel 5; the network device 3 communicates with the external device 4 through the public network;

[0103] The external device 4 sends a UDP message to the user device 1, wherein the UDP message carries a debugging instruction;

[0104] The user equipment 1 is routed and forwarded to the network equipment 3 via the routing device 2;

[0105] The network device 3 encapsulates the UDP message into a first VxLAN message, and sends the first VxLAN message to the routing device 2 through the VxLAN tunnel 5;

[0106] The routing device 2 determines whether the first VxLAN message is received; if the first VxLAN message is received, the first VxLAN message is unsealed to obtain a first overlay message, which is included in the first VxLAN message; it determines whether the first overlay message contains a UDP message carrying a debugging instruction; if so, debugging is performed according to the debugging instruction.

[0107] In this embodiment, the routing device includes a bridge, a debugging module, and a mobile communication link interface (including, for example, 4G, 5G, etc.). The Ethernet interface 202 and the VxLAN virtual interface 203 of the routing device 2 are added to the bridge 201. The Ethernet interface 202 is used to establish a connection with the user device 1, and the VxLAN virtual interface 203 is used to communicate with the network device 3 through the VxLAN tunnel 5. The network device 3 and the routing device 2 build a VxLAN tunnel 5 through the link of the underlay private network, realizing the second-layer interconnection between the user device 1 and the network device 3, and the network device 3 serves as the gateway device of the user device 1 to provide the user device 1 with the function of connecting to the external network. Among them, the user device 1 can be, for example, a user CE device, the network device 3 can be, for example, an MSE device, and the network device 3 is connected to the external device 4 through the public network. The external device 4 can be, for example, a public network server. VxLAN is a network virtualization technology used to build a logical virtual local area network (VLAN) on an IP network. The bridge 201 is used to connect multiple network segments in a local area network to realize communication between different network segments.

[0108] Routing device 2 detects whether the first VxLAN message has been received. External device 4 sends a UDP message carrying a custom debugging instruction to user device 1, and then routes and forwards the UDP message to network device 3, which encapsulates the VxLAN message and sends it to routing device 2 through VxLAN tunnel 5. Using UDP messages to transmit debugging instructions also increases the reliability of data transmission. If the first VxLAN message is received, routing device 2 will unpack it and extract the first overlay message from it. The first overlay message is encapsulated by network device 3 inside the first VxLAN message, and contains a UDP message carrying a custom debugging instruction sent by external device 4. The above-mentioned routing device 2 will check whether the first overlay message contains a UDP message carrying a debugging instruction. When routing device 2 unpacks the first VxLAN message and finds a UDP message with a custom debugging instruction, routing device 2 will perform corresponding debugging operations according to the content of the debugging instruction. If the first overlay message does not contain a UDP message carrying debugging instructions, routing device 2 submits the first overlay message to the bridge, which is further processed by bridge 201. Bridge 201 forwards it to the Ethernet interface based on the MAC forwarding table, and further sends it to user device 1 to realize VxLAN bridging transparent transmission.

[0109] This embodiment implements an efficient and secure remote debugging function for routing devices without public IP addresses. By adding Ethernet interfaces and VxLAN virtual interfaces to the bridge of the routing device and creating a VxLAN tunnel, intercommunication between the routing device without a public IP address and external devices is implemented. The external device sends the debugging instruction to the network device, and the network device encapsulates it as a first VxLAN message, thereby realizing the remote control of the routing device without a public IP address by the external device, and sending the first VxLAN message to the routing device through the VxLAN tunnel, thereby realizing remote debugging control of the routing device. In addition, the debugging instructions of the present invention can be flexibly defined and extended remotely, thereby improving the flexibility of remote debugging, eliminating the need for complex network configuration and additional hardware equipment, and reducing deployment costs and maintenance difficulties.

[0110] In a specific embodiment, the routing device 2 further includes a debugging module 204.

[0111] The step of debugging the routing device 2 according to the debugging instruction includes:

[0112] Passing the first VxLAN message and the first overlay message to the debugging module;

[0113] The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries a debugging result;

[0114] Modify the first VxLAN message according to the second overlay message to generate a second VxLAN message;

[0115] Sending the second VxLAN message to the network device through the VxLAN tunnel;

[0116] The network device sends the second VxLAN message to the external device through the public network.

[0117] In this embodiment, the steps of the routing device 2 executing debugging according to the debugging instruction are the same as the specific steps in the aforementioned remote debugging control method. Please refer to the description in the above method embodiment, and no further description will be given here.

[0118] The embodiment of the present invention further discloses a remote debugging control device, the device has no public IP address, the device includes a network bridge, and the device includes:

[0119] A construction module 10 is used to add an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and to create a VxLAN tunnel, wherein the Ethernet interface is used to connect to a user device, and the VxLAN virtual interface is used to communicate with a network device through the VxLAN tunnel;

[0120] A first judgment module 20 is used to judge whether a first VxLAN message is received;

[0121] The decapsulation module 30 is configured to decapsulate the first VxLAN message if a first VxLAN message is received, and obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message;

[0122] A second judging module 40 is used to judge whether the first overlay message contains a UDP message carrying a debugging instruction;

[0123] The debugging module 50 is used to perform debugging according to the debugging instruction if a UDP message carrying the debugging instruction is contained.

[0124] For the specific implementation of each module in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0125] Reference Figure 4 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned remote debugging control method is implemented.

[0126] The steps of the processor executing the remote debugging control method include:

[0127] The method is used for a routing device without a public IP address, the routing device includes a bridge, and the method includes:

[0128] The processor adds an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and creates a VxLAN tunnel, wherein the Ethernet interface is used to connect to a user device, and the VxLAN virtual interface is used to communicate with a network device through the VxLAN tunnel;

[0129] Determine whether the first VxLAN message is received;

[0130] If yes, unpack the first VxLAN message to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message;

[0131] Determine whether the first overlay message contains a UDP message carrying a debugging instruction;

[0132] If yes, debugging is performed according to the debugging instruction.

[0133] In a specific embodiment, the routing device further includes a debugging module, and the step of debugging according to the debugging instruction includes:

[0134] The processor transmits the first VxLAN message and the first overlay message to the debugging module;

[0135] The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries a debugging result;

[0136] Modify the first VxLAN message according to the second overlay message to generate a second VxLAN message;

[0137] Send the second VxLAN message to the network device through the VxLAN tunnel.

[0138] In a specific embodiment, the step of generating the second overlay message includes:

[0139] The processor replaces the debugging instruction in the first overlay message with the debugging result;

[0140] Swapping the destination MAC and the source MAC in the first overlay message;

[0141] swapping the destination IP and the source IP in the first overlay message; and,

[0142] The destination port and the source port in the first overlay message are swapped to obtain the second overlay message.

[0143] In a specific embodiment, the step of modifying the first VxLAN message according to the second overlay message to generate the second VxLAN message includes:

[0144] The processor replaces the first overlay message in the first VxLAN message with the second overlay message;

[0145] Swap the destination MAC and source MAC of the external Ethernet header in the first VxLAN message;

[0146] Interchanging the destination IP and the source IP in the external IP header of the first VxLAN message; and,

[0147] Change the destination port and source port of the external UDP header in the first VxLAN message to the preset destination port of VxLAN to obtain the second overlay message.

[0148] In a specific embodiment, the step of determining whether the first overlay message contains a UDP message carrying a debugging instruction includes:

[0149] The processor determines whether the first overlay message contains a custom message identifier;

[0150] If yes, it is determined that the first overlay message contains a UDP message;

[0151] Determining, according to the position of the custom message identifier, UDP data content included in the first overlay message;

[0152] Determine whether the UDP data content conforms to a preset format; the preset format sequentially includes the custom message identifier, instruction length, debugging instruction and check code;

[0153] If so, it is determined that the first overlay message carries the debugging instruction.

[0154] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0155] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0157] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0158] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A remote debugging control method, characterized in that: The method is used for a routing device without a public IP address, the routing device includes a bridge and a debugging module, and the method includes: Add an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and create a VxLAN tunnel, wherein the Ethernet interface is used to connect to the user device, and the VxLAN virtual interface is used to communicate with the network device through the VxLAN tunnel; Determine whether the first VxLAN message is received; If yes, unpack the first VxLAN message to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message; Determine whether the first overlay message contains a UDP message carrying a debugging instruction; If yes, debug according to the debugging instruction; The step of debugging according to the debugging instruction includes: Passing the first VxLAN message and the first overlay message to the debugging module; The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries the debugging result; wherein the step of generating the second overlay message includes: replacing the debugging instruction in the first overlay message with the debugging result; swapping the destination MAC and the source MAC in the first overlay message; swapping the destination IP and the source IP in the first overlay message; and swapping the destination port and the source port in the first overlay message to obtain the second overlay message; According to the second overlay message, modify the first VxLAN message to generate a second VxLAN message; wherein, according to the second overlay message, modify the first VxLAN message to generate a second VxLAN message, the step of: replacing the first overlay message in the first VxLAN message with the second overlay message; swapping the destination MAC and the source MAC of the external Ethernet header in the first VxLAN message; swapping the destination IP and the source IP of the external IP header in the first VxLAN message; and changing the destination port and the source port of the external UDP header in the first VxLAN message to the preset destination port of VxLAN, to obtain the second overlay message; Send the second VxLAN message to the network device through the VxLAN tunnel.

2. The remote debugging control method according to claim 1, characterized in that: The step of determining whether the first overlay message contains a UDP message carrying a debugging instruction includes: Determine whether the first overlay message contains a custom message identifier; If yes, it is determined that the first overlay message contains a UDP message; Determining, according to the position of the custom message identifier, UDP data content included in the first overlay message; Determine whether the UDP data content conforms to a preset format; the preset format sequentially includes the custom message identifier, instruction length, debugging instruction and check code; If so, it is determined that the first overlay message carries the debugging instruction.

3. A remote debugging control system, characterized in that: The system includes a user device, a routing device, a network device and an external device, the routing device has no public IP address, the routing device includes a bridge and a debugging module, the routing device adds an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and creates a VxLAN tunnel, wherein the Ethernet interface is used to connect to the user device, and the VxLAN virtual interface is used to communicate with the network device through the VxLAN tunnel; the network device communicates with the external device through the public network; The external device sends a UDP message to the user device, wherein the UDP message carries a debugging instruction; The user equipment is routed and forwarded to the network equipment via the routing device; The network device encapsulates the UDP message into a first VxLAN message, and sends the first VxLAN message to the routing device through the VxLAN tunnel; The routing device determines whether a first VxLAN message is received; if the first VxLAN message is received, the first VxLAN message is unsealed to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message; determines whether the first overlay message contains a UDP message carrying a debugging instruction; if so, debugs according to the debugging instruction; wherein the step of debugging according to the debugging instruction by the routing device includes, Passing the first VxLAN message and the first overlay message to the debugging module; The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries the debugging result; wherein the step of generating the second overlay message includes: replacing the debugging instruction in the first overlay message with the debugging result; swapping the destination MAC and the source MAC in the first overlay message; swapping the destination IP and the source IP in the first overlay message; and swapping the destination port and the source port in the first overlay message to obtain the second overlay message; According to the second overlay message, modify the first VxLAN message to generate a second VxLAN message; wherein, according to the second overlay message, modify the first VxLAN message to generate a second VxLAN message, the step of: replacing the first overlay message in the first VxLAN message with the second overlay message; swapping the destination MAC and the source MAC of the external Ethernet header in the first VxLAN message; swapping the destination IP and the source IP of the external IP header in the first VxLAN message; and changing the destination port and the source port of the external UDP header in the first VxLAN message to the preset destination port of VxLAN, to obtain the second overlay message; Sending the second VxLAN message to the network device through the VxLAN tunnel; The network device sends the second VxLAN message to the external device through the public network.

4. A remote debugging control device, characterized in that: The device has no public IP address, the device includes a bridge and a debugging module, and the device includes: A construction module is used to add an Ethernet interface and a VxLAN virtual interface to the bridge respectively, and to create a VxLAN tunnel, wherein the Ethernet interface is used to connect to a user device, and the VxLAN virtual interface is used to communicate with a network device through the VxLAN tunnel; A first judgment module is used to judge whether a first VxLAN message is received; A decapsulation module, configured to decapsulate a first VxLAN message if a first VxLAN message is received, to obtain a first overlay message, wherein the first overlay message is included in the first VxLAN message; A second judgment module is used to judge whether the first overlay message contains a UDP message carrying a debugging instruction; A debugging module, configured to perform debugging according to a debugging instruction if a UDP message carrying a debugging instruction is contained; wherein the first VxLAN message and the first overlay message are transmitted to the debugging module; The debugging module performs debugging according to the debugging instruction and generates a second overlay message, wherein the second overlay message carries the debugging result; wherein the step of generating the second overlay message includes: replacing the debugging instruction in the first overlay message with the debugging result; swapping the destination MAC and the source MAC in the first overlay message; swapping the destination IP and the source IP in the first overlay message; and swapping the destination port and the source port in the first overlay message to obtain the second overlay message; According to the second overlay message, modify the first VxLAN message to generate a second VxLAN message; wherein, according to the second overlay message, modify the first VxLAN message to generate a second VxLAN message, the step of: replacing the first overlay message in the first VxLAN message with the second overlay message; swapping the destination MAC and the source MAC of the external Ethernet header in the first VxLAN message; swapping the destination IP and the source IP of the external IP header in the first VxLAN message; and changing the destination port and the source port of the external UDP header in the first VxLAN message to the preset destination port of VxLAN, to obtain the second overlay message; Send the second VxLAN message to the network device through the VxLAN tunnel.

5. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the remote debugging control method according to any one of claims 1 to 2 are implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the remote debugging control method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • 4G (The Fourth Generation Telecommunication) network management system

    CN102752149A

  • Dialing tunnel broker device and method for NAT traversal by means of dialing tunnel

    CN104468625A

  • Data packet sending method and device, and network architecture

    CN107770062A

  • VxLAN NAT traversal method, system and device

    CN114567616A

  • Communication method and device and computer readable storage medium

    CN115706682A