Network dial testing method and device, server and computer readable storage medium

By switching from the host machine's network namespace to the target container's network namespace for network probing, the problem of network probing in containerized clusters interfering with the container's internal environment is solved, achieving non-intrusive network probing and ensuring the stability and accuracy of the probing.

CN122053429APending Publication Date: 2026-05-15BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2026-03-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

When performing network probing in a containerized cluster, existing technologies require entering the container to execute commands, which may change the operating environment of the components inside the container, causing business processes to be disrupted, and is highly intrusive.

Method used

By switching from the host machine's network namespace to the target container's network namespace for network probing, the network environment of the target container can be reused without entering the container, thus achieving non-intrusive network probing.

Benefits of technology

It ensures the security of the target container's internal environment, avoids interference with business processes, and provides reliable network connectivity verification data, improving the stability and efficiency of network testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053429A_ABST
    Figure CN122053429A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud servers, in particular to a network dial testing method and device, a server and a computer readable storage medium. According to the method and the device, the network dial test is performed by switching to the network namespace corresponding to the target container, the network environment of the target container is reused, the network dial test can be performed in the network environment of the target container without entering the container, the safety of the internal environment of the target container is ensured, and non-intrusive network dial test is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of cloud server technology, and in particular to a network dialing test method, apparatus, server, and computer-readable storage medium. Background Technology

[0002] In containerized clusters, it is often necessary to perform network probing to verify the network connectivity between nodes and target addresses, such as verifying that a node can access a specified external service.

[0003] Currently, network testing requires developers to use command-line tools (kubectl) to enter the container and execute relevant network testing commands. However, this process alters the runtime environment of components within the container, potentially interfering with normal business processes, and also requires exposing container access permissions, making it highly intrusive. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a network dialing test method, apparatus, server, and computer-readable storage medium to achieve non-intrusive network dialing test.

[0005] In a first aspect, embodiments of this disclosure provide a network dialing test method, applied to a first working process, including: Upon receiving a probe task targeting a target container, the identifier of the target container and the target probe address are obtained. The target container and the first working process correspond to the same host machine. Based on the identifier of the target container, the network namespace of the first working process is switched from the original network namespace to the target network namespace corresponding to the target container. The original network namespace is the network namespace of the first working process when it receives the probe task. Perform network probes on the target address within the target network namespace.

[0006] In some embodiments, after performing network probing on the target probe address in the target network namespace, the method includes: Based on the target handle, the network namespace of the first working process is switched from the target network namespace to the original network namespace, where the target handle is the handle of the original network namespace.

[0007] In some embodiments, before switching the network namespace of the first worker process from the original network namespace to the target network namespace corresponding to the target container, the method further includes: When the first worker process is in the original network namespace, it sends a first request to the host kernel. The first request is used to obtain the target handle. Obtain the first feedback message corresponding to the first request. The first feedback message includes the target handle.

[0008] In some embodiments, switching to the target network namespace corresponding to the target container based on the target container's identifier includes: Based on the identifier of the target container, the process identifier of the second worker process is determined, and the second worker process is the worker process running on the target container; The target network namespace of the second worker process is determined based on the process identifier, and then the process is switched to the target network namespace.

[0009] In some embodiments, determining the process identifier corresponding to the target container based on the target container's identifier includes: Write the identifier of the target container into the target interface, which is the container runtime interface of the host machine; Obtain the process identifier returned by the target interface.

[0010] In some embodiments, obtaining the identifier of the target container and the target probe address includes: The detection mission is analyzed to determine the identifier of the target container and the target detection address.

[0011] In some embodiments, the probe task further includes a task identifier, and after performing network dialing on the target probe address in the target network namespace, the method further includes: The task results are reported to the sender of the probe mission. The task results include the connectivity detection results of the target probe address and the task identifier.

[0012] Secondly, embodiments of this disclosure provide a network dialing test device, in which a first working process runs, and the device includes: The first acquisition module is used to acquire the identifier of the target container and the target probe address when a probe task for the target container is received. The target container and the first working process correspond to the same host machine. The first switching module is used to switch the network namespace of the first working process from the original network namespace to the target network namespace corresponding to the target container according to the identifier of the target container. The original network namespace is the network namespace where the first working process is located when it receives the probe task. The probe module is used to perform network probes on the target probe address in the target network namespace.

[0013] Thirdly, embodiments of this disclosure provide a server, including: Memory; Processor; and Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in the first aspect.

[0014] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method described in the first aspect.

[0015] Fifthly, embodiments of this disclosure also provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the network dialing test method as described above.

[0016] The network testing method, apparatus, server, and computer-readable storage medium provided in this disclosure switch to the network namespace corresponding to the target container to perform network testing, reuse the network environment of the target container, and perform network testing in the network environment of the target container without entering the container, thus ensuring the security of the internal environment of the target container and realizing non-intrusive network testing. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of a network dialing test method provided in an embodiment of the present disclosure; Figure 2 A schematic diagram illustrating an application scenario provided by an embodiment of this disclosure; Figure 3 This is a schematic diagram of the network dialing test device provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the server structure provided in an embodiment of this disclosure. Detailed Implementation

[0020] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0021] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0022] This disclosure provides a network dialing test method, which will be described below with reference to specific embodiments.

[0023] Figure 1 This is a flowchart illustrating a network dialing test method provided in an embodiment of this disclosure. This method can be applied to... Figure 2 The application scenario shown includes at least one host machine in the cluster and a probe task distribution program running in the control plane. The cluster can be a Kubernetes (K8s) cluster.

[0024] like Figure 2 As shown, the cluster includes three host machines, denoted as Node A, Node B, and Node C. Each host machine runs a first worker process (Agent) and the target network namespace corresponding to the container, denoted as First Worker Process A, First Worker Process B, and First Worker Process C, and the target network namespaces A, B, and C, respectively. The first worker process is used to receive probe tasks issued by the probe task issuing program, or to report task results to the probe task issuing program.

[0025] The following example uses one of the host machines to illustrate the network dialing test method. The specific steps of the method are as follows: S101. Upon receiving a probe task targeting the target container, obtain the identifier of the target container and the target probe address.

[0026] The target container and the first working process share the same host machine.

[0027] A probe task is a task generated and distributed to various host machines by a probe task dispatcher. It contains the identifier of the target container and the target probe address. The target probe address is the address where connectivity needs to be verified.

[0028] The first worker process is a service process that resides on the host machine and is deployed on the same host machine as the target container. The first worker process parses the probe task to determine the identifier of the target container and the target probe address.

[0029] S102. Based on the identifier of the target container, switch the network namespace of the first working process from the original network namespace to the target network namespace corresponding to the target container.

[0030] The original network namespace is the network namespace where the first working process is located when it receives the probe task.

[0031] Network namespaces are a network isolation mechanism provided by the host operating system kernel to provide each process or container with an independent network stack, including interfaces, routing rules, etc.

[0032] The network namespace in which the first worker process resides before performing the network namespace switching operation is called the original network namespace. It is usually the host machine's default global network namespace, including the host machine's network interfaces, routing rules, etc., so that the first worker process can receive the probe tasks issued by the probe task issuing program.

[0033] The target network namespace is a network isolation environment exclusive to the target container, containing the container's independent network stack.

[0034] The first worker process switches its network namespace from the original network namespace to the target network namespace by calling the network namespace interface provided by the host machine's operating system kernel.

[0035] S103. Perform network probe on the target address in the target network namespace.

[0036] Network dialing refers to the operation of verifying network connectivity. The first worker process is currently in the target network namespace and directly uses the target container's network configuration. All network operations it performs are equivalent to those performed by the target container, ultimately obtaining the connectivity test results between the target container and the target address.

[0037] This embodiment of the disclosure performs network probing by switching to the network namespace corresponding to the target container, reusing the network environment of the target container. This allows network probing to be performed in the network environment of the target container without entering the container, ensuring the security of the internal environment of the target container and achieving non-intrusive network probing.

[0038] Meanwhile, by performing dialing tests in the target network namespace, this embodiment of the invention directly uses the container's network configuration. The detection results for the target address can accurately reflect the connectivity between the container and the target address, providing reliable data support for network policy verification and fault location.

[0039] Based on the above embodiments, after performing network probing on the target probe address in the target network namespace, the network namespace where the first working process is located is switched from the target network namespace to the original network namespace based on the target handle.

[0040] A handle is a unique identifier for the original network namespace, assigned by the host machine's operating system kernel. The target handle is a handle to the original network namespace.

[0041] Since the first worker process is a resident service on the host machine, it needs to handle multiple probe tasks, each of which may correspond to a different target container. The original network namespace and the target network namespace are isolated from each other. If the first worker process resides in the target network namespace for an extended period, its network operations may consume the target container's network resources or be restricted by the target container's network policies, leading to abnormalities in the first worker process itself. Furthermore, the network behavior of the first worker process may also interfere with the normal operation of the target container.

[0042] Therefore, in the target network namespace, after the first working process completes the network probe of the target address, it calls the network namespace switching interface provided by the host kernel and switches the network namespace of the first working process from the target network namespace back to the original network namespace corresponding to the target handle through its own pre-stored target handle.

[0043] After the switch is complete, the network environment of the first working process is restored to the host machine's default network environment, and it can continue to receive the next probe task or perform subsequent operations.

[0044] This embodiment of the present disclosure, after completing the network probe test of the target probe address in the target network namespace, switches the network namespace of the first working process from the target network namespace to the original network namespace, quickly restores the network capability of the first working process itself, does not affect the probe task of the subsequent receiving control end, and improves the stability and reliability of the network probe test.

[0045] In some embodiments, the target handle is obtained as follows: when the first working process is in the original network namespace, a first request is sent to the host kernel, the first request being used to obtain the target handle; a first feedback message corresponding to the first request is obtained, the first feedback message including the target handle.

[0046] The first worker process calls the namespace operation interface provided by the operating system kernel to send the first request to the host kernel.

[0047] After receiving the first request, the host kernel verifies the permissions of the first worker process. If it determines that the first worker process has permission to access the host container runtime, it queries the original network namespace currently bound to the first worker process and extracts the handle of that namespace, i.e., the target handle. The kernel then encapsulates the target handle into a first feedback message and returns it to the first worker process.

[0048] The first worker process receives the first feedback message, parses it to obtain the target handle, and stores it in local memory for subsequent network namespace switching operations.

[0049] This embodiment of the present disclosure interacts with the host kernel before switching the network namespace of the first working process from the original namespace to the target network namespace to obtain and save the target handle corresponding to the original namespace, so that the original network namespace can be restored after the detection task is completed. This eliminates the need to copy the network configuration data of the original network namespace and reduces the occupation of host resources.

[0050] In some embodiments, switching to the target network namespace corresponding to the target container based on the identifier of the target container includes: determining the process identifier of the second worker process based on the identifier of the target container, wherein the second worker process is the worker process running the target container; determining the target network namespace where the second worker process is located based on the process identifier, and switching to the target network namespace.

[0051] The second worker process refers to the underlying process corresponding to the target container's operation, which is created and managed by the container runtime.

[0052] The process identifier is a unique identifier assigned by the host kernel to each second worker process, used to locate and manage the second worker process.

[0053] Specifically, based on the identifier of the target container, the process identifier corresponding to the target container is determined, including: writing the identifier of the target container into the target interface, where the target interface is the container runtime interface of the host machine; and obtaining the process identifier returned by the target interface.

[0054] The target interface is the standard interaction interface provided by the container runtime on which the target container depends. The first worker process obtains the identifier of the target container by parsing the probe task issued by the probe task issuing program, writes the identifier of the target container into the target interface, and queries to obtain the process identifier corresponding to the target container returned by the target interface.

[0055] Furthermore, since each second worker process is assigned a specific network namespace upon creation, and the second worker process is the running process of the target container, its associated network namespace is the target network namespace corresponding to the target container. Therefore, the target network namespace corresponding to the target container can be determined and switched to by the process identifier.

[0056] This embodiment of the disclosure obtains the process identifier corresponding to the target container by interacting with the target interface provided by the first working process and the container runtime, and further determines and switches to the target network namespace corresponding to the target container based on the process identifier. This ensures that the probe operation of the first working process and the operation executed inside the target container have a consistent network perspective, and the process can be executed automatically without manual intervention. While ensuring the accuracy of network probe, it improves the efficiency and automation of network probe.

[0057] Based on any of the above embodiments, the probe task further includes a task identifier. After performing network probing on the target probe address in the target network namespace, the method further includes: reporting the task results to the sender of the probe task. The task results include the connectivity detection results of the target probe address and the task identifier.

[0058] The sender of a probe mission is the probe mission issuing program. The probe mission issued by the probe mission issuing program includes at least the target container identifier, the target probe address, and the mission identifier.

[0059] After receiving the probe mission, the first working process parses the probe mission to obtain the identifier of the target container, the target probe address, and the mission identifier.

[0060] While in the original network namespace, the first worker process sends a first request to the host kernel to obtain and store the target handle of the original network namespace. Subsequently, it switches to the target network namespace based on the target container's identifier, performs probes on the target probe address within it, and obtains the connectivity test results of the target probe address.

[0061] After the test is completed, the first worker process encapsulates the data according to a preset format. The encapsulated data includes at least the connectivity detection result and the task identifier, thus obtaining the task result. The first worker process pushes the task result to the probe task issuing program through the cluster's preset communication channel, such as through the log upload channel or the return interface.

[0062] Afterwards, the first working process switches back from the target network namespace to the original network namespace based on the pre-stored target handle, waiting to process the next probe task.

[0063] This embodiment of the disclosure enables the detection task issuing program to associate the connectivity detection results with the corresponding detection task through the task identifier by actively reporting the task identifier, thereby automating the traceability of detection results and providing support for the batch execution of detection tasks and the collection of corresponding results.

[0064] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0065] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0066] Figure 3 This is a schematic diagram of a network dialing test device provided in an embodiment of the present disclosure. The network dialing test device runs a first working process as described in the above embodiment. The network dialing test device provided in this embodiment of the present disclosure can execute the processing flow provided in the network dialing test method embodiment, such as… Figure 3 As shown, the network probe device 30 includes: a first acquisition module 31, a first switching module 32, and a probe module 33; wherein, the first acquisition module 31 is used to acquire the identifier of the target container and the target probe address when a probe task for the target container is received, and the target container and the first working process correspond to the same host machine; the first switching module 32 is used to switch the network namespace of the first working process from the original network namespace to the target network namespace corresponding to the target container according to the identifier of the target container, wherein the original network namespace is the network namespace of the first working process when the probe task is received; the probe module 33 is used to perform network probe on the target probe address in the target network namespace.

[0067] In some embodiments, the network probing device 30 further includes a second switching module, which, after performing network probing on the target probe address in the target network namespace, switches the network namespace where the first working process is located from the target network namespace to the original network namespace based on the target handle, wherein the target handle is the handle of the original network namespace.

[0068] In some embodiments, the network testing device 30 further includes a second acquisition module, which includes a sending unit and a first acquisition unit. The sending unit is used to send a first request to the host machine kernel when the first working process is in the original network namespace. The first request is used to acquire a target handle. The first acquisition unit is used to acquire a first feedback message corresponding to the first request. The first feedback message includes the target handle.

[0069] In some embodiments, the first switching module 32 includes a first determining unit and a second determining unit; the first determining unit is used to determine the process identifier of the second working process based on the identifier of the target container, wherein the second working process is a working process running on the target container; the second determining unit is used to determine the target network namespace where the second working process is located according to the process identifier, and switch to the target network namespace.

[0070] In some embodiments, the first determining unit is specifically used to write the identifier of the target container into the target interface, where the target interface is the container runtime interface of the host machine; and to obtain the process identifier returned by the target interface.

[0071] In some embodiments, the first acquisition module 31 is specifically used to parse the probe task to determine the identifier of the target container and the target probe address.

[0072] In some embodiments, the probe task further includes a task identifier, and the network probe device 30 further includes a reporting module, which is used to report the task results to the sender of the probe task after performing network probe on the target probe address in the target network namespace. The task results include the connectivity detection results of the target probe address and the task identifier.

[0073] Figure 3 The network dialing test device shown in the embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0074] Figure 4 This is a schematic diagram of the server provided in an embodiment of the present disclosure. The server can be a host machine as described in the above embodiments. The server provided in this embodiment of the present disclosure can execute the processing flow provided in the network dialing test method embodiments, such as... Figure 4 As shown, server 40 includes: memory 41, processor 42, computer program and communication interface 43; wherein, the computer program is stored in memory 41 and configured to be executed by processor 42 using the network dialing method described above.

[0075] In addition, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the network dialing test method described in the above embodiments.

[0076] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0077] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0078] Furthermore, this disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the network dialing test method described above.

[0079] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0081] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A network dialing test method, characterized in that, Applied to the first working process, the method includes: Upon receiving a probe task targeting a target container, the identifier of the target container and the target probe address are obtained, wherein the target container and the first working process correspond to the same host machine; Based on the identifier of the target container, the network namespace of the first working process is switched from the original network namespace to the target network namespace corresponding to the target container, wherein the original network namespace is the network namespace of the first working process when it receives the probe task; Network probes are performed on the target probe address within the target network namespace.

2. The method according to claim 1, characterized in that, After performing network probes on the target probe address in the target network namespace, the method includes: Based on the target handle, the network namespace where the first working process is located is switched from the target network namespace to the original network namespace, wherein the target handle is the handle of the original network namespace.

3. The method according to claim 2, characterized in that, Before switching the network namespace of the first working process from its original network namespace to the target network namespace corresponding to the target container, the method further includes: When the first working process is in the original network namespace, it sends a first request to the kernel of the host machine. The first request is used to obtain the target handle. Obtain the first feedback message corresponding to the first request, wherein the first feedback message includes the target handle.

4. The method according to any one of claims 1-3, characterized in that, The step of switching to the target network namespace corresponding to the target container based on the identifier of the target container includes: Based on the identifier of the target container, the process identifier of the second worker process is determined, and the second worker process is the worker process running the target container; The target network namespace where the second working process is located is determined based on the process identifier, and the process is switched to the target network namespace.

5. The method according to claim 4, characterized in that, Determining the process identifier corresponding to the target container based on the target container's identifier includes: Write the identifier of the target container into the target interface, where the target interface is the container runtime interface of the host machine; Obtain the process identifier returned by the target interface.

6. The method according to any one of claims 1-3, characterized in that, The step of obtaining the identifier of the target container and the target probe address includes: The detection task is parsed to determine the identifier of the target container and the target detection address.

7. The method according to any one of claims 1 to 3, characterized in that, The detection task also includes a task identifier. After performing network dialing on the target detection address in the target network namespace, the method further includes: The task results are reported to the sender of the detection task, and the task results include the connectivity detection results of the target detection address and the task identifier.

8. A network dialing test device, characterized in that, The device operates a first working process, and the device includes: The first acquisition module is used to acquire the identifier of the target container and the target probe address when a probe task for the target container is received, wherein the target container and the first working process correspond to the same host machine. The first switching module is used to switch the network namespace of the first working process from the original network namespace to the target network namespace corresponding to the target container according to the identifier of the target container, wherein the original network namespace is the network namespace in which the first working process is located when it receives the probe task; The probe module is used to perform network probes on the target probe address in the target network namespace.

9. A server, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.