Network element equipment testing method and device, computer equipment and storage medium

By configuring the namespace in the network management device in the cloud platform, the traffic packet flows between the namespace and external ports is solved, and the problem of low testing efficiency of network element equipment in traditional technology is achieved, and the rapid deployment and efficient testing environment are achieved. test process.

CN119484355AActive Publication Date: 2025-02-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411781497.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-02-18
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

In traditional technology, the testing methods for network element devices have problems with low testing efficiency, requiring the deployment of a large number of components and resources, resulting in a long deployment cycle, high investment cost, and a single test scenario, unable to flexibly form the network, and unable to carry out various abnormal tests.

Method used

Provide a test method for network element devices. By configuring a namespace in a network management device in a cloud platform, receiving traffic packets in the test request, controlling traffic packets flowing between the namespace and external ports, obtaining forwarding results, and Determine the test results of the network element device based on the results.

Benefits of technology

This method can realize the rapid deployment of the test environment and the efficient execution of the test process without relying on the cloud management platform, computing controller, network controller, storage controller, and K8S cluster, and improve the testing of network element devices efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484355A_ABST
    Figure CN119484355A_ABST
Patent Text Reader

Abstract

The invention relates to a network element equipment testing method and device, computer equipment and a storage medium. The method comprises the following steps: receiving a test request for network element equipment in a cloud platform; the test request comprises a flow packet used for testing the network element equipment; controlling the flow of the traffic packet between the namespace and the external port, and obtaining a forwarding result of the traffic packet; the forwarding result is used for representing whether the traffic packet is successfully forwarded; and determining a test result of the network element equipment according to the forwarding result. The namespace is configured in the network management equipment in the embodiment of the invention, so that the test of the network element equipment can be realized by directly controlling the flow of the flow packet between the namespace and the external port, and therefore, the test efficiency of the network element equipment is improved. According to the invention, the rapid deployment of the test environment and the efficient execution of the test process can be realized without depending on a cloud management platform, a computing controller, a network controller, a storage controller and a K8S cluster, so that the efficiency of testing the network element equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a testing method, device, computer equipment and storage medium for network element equipment. Background Art

[0002] With the development of cloud computing technology, software defined networks (SDN) have emerged. SDN includes computing controllers, network controllers, storage controllers, and K8S (Kubernetes, an open source container orchestration system). Network element devices can usually be tested by the cooperation of various components in the SDN.

[0003] However, the testing method for network element equipment in traditional technology has the problem of low testing efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a network element device testing method, apparatus, computer equipment and storage medium that can improve the testing efficiency of network element devices in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for testing a network element device, the method being applied to a network management device in a cloud platform; a namespace is configured in the network management device, the method comprising:

[0006] Receiving a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device;

[0007] Controlling the flow packet to flow between the namespace and the external port, and obtaining a forwarding result of the flow packet; the forwarding result is used to indicate whether the flow packet is successfully forwarded;

[0008] A test result of the network element device is determined according to the forwarding result.

[0009] In one embodiment, the forwarding result includes a first forwarding result or a second forwarding result, and the test request includes a type identifier; and controlling the flow packet to flow between the namespace and the external port to obtain the forwarding result of the flow packet includes:

[0010] If the type of the test request is determined to be the first type according to the type identifier, the traffic packet is forwarded from the external port to the namespace to obtain a first forwarding result; the flow direction of the traffic packet in the first type of test request is from the external port to the namespace;

[0011] If the type of the test request is determined to be the second type according to the type identifier, the traffic packet is forwarded from the namespace to the external port to obtain the second forwarding result; the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

[0012] In one embodiment, forwarding the traffic packet from the external port to the namespace to obtain a first forwarding result includes:

[0013] Determine the source identifier and the destination identifier of the flow packet by using the lookup flow table in the network management device;

[0014] According to the source identifier, forwarding the traffic packet to the service scheduling flow table in the network management device through the lookup flow table;

[0015] The traffic packet is forwarded to the namespace corresponding to the target end identifier through the service scheduling flow table to obtain the first forwarding result.

[0016] In one of the embodiments, forwarding the traffic packet to the service scheduling flow table in the network management device through the lookup flow table according to the source identifier includes:

[0017] Determine the Internet Protocol IP address information of the return port of the traffic packet according to the source identifier;

[0018] If the IP address information is different from the IP address information of the external port, forwarding the traffic packet to the service scheduling flow table through the lookup flow table;

[0019] If the IP address information is the same as the IP address information of the external port, the traffic packet is forwarded to the homologous flow table in the network management device through the lookup flow table, the source identifier is recorded in the register of the network management device, and the traffic packet is forwarded to the service scheduling flow table.

[0020] In one embodiment, forwarding the traffic packet from the namespace to an external port to obtain the second forwarding result includes:

[0021] Determine the target end identifier of the traffic packet by using the service scheduling flow table in the network management device;

[0022] According to the target end identifier, the traffic packet is forwarded from the namespace to the external port to obtain the second forwarding result.

[0023] In one embodiment, forwarding the traffic packet from the namespace to the external port according to the target end identifier to obtain the second forwarding result includes:

[0024] Determine, according to the target end identifier, whether the traffic packet needs to be forwarded to the external port by way of backhaul;

[0025] If the traffic packet does not need to be forwarded to the external port by way of backhaul, forward the traffic packet to the external port corresponding to the target end identifier to obtain the second forwarding result;

[0026] If the traffic packet needs to be forwarded to the external port by way of backhaul, the traffic packet is sent to the homologous flow table in the network management device, and the IP address information of the backhaul port of the traffic packet is obtained from the register of the network management device. The traffic packet is forwarded to the external port corresponding to the IP address information to obtain the second forwarding result.

[0027] In one of the embodiments, before forwarding the traffic packet from the namespace to the external port, the method further includes:

[0028] Sending an acquisition request to the address acquisition flow table in the network management device; the acquisition request is used to request to obtain the Ethernet address of the next traffic packet;

[0029] The Ethernet address is carried in the traffic packet.

[0030] In a second aspect, the present application also provides a testing device for a network element device, including:

[0031] A receiving module, used to receive a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device;

[0032] An acquisition module, used to control the flow of the traffic packet between the namespace and the external port in the cloud platform, and to obtain a forwarding result of the traffic packet; the forwarding result is used to indicate whether the traffic packet is successfully forwarded;

[0033] A determination module is used to determine the test result of the network element device according to the forwarding result.

[0034] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect are implemented.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the embodiments of the first aspect are implemented.

[0036] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the embodiments of the first aspect are implemented.

[0037] The above-mentioned network element device testing method, device, computer device and storage medium receive a test request for the network element device in the cloud platform; the test request includes a traffic packet for testing the network element device; the traffic packet is controlled to flow between the namespace and the external port, and the forwarding result of the traffic packet is obtained; the forwarding result is used to characterize whether the traffic packet is successfully forwarded; and the test result of the network element device is determined according to the forwarding result. Since the network management device in the embodiment of the present application is configured with a namespace, the embodiment of the present application can directly implement the test of the network element device by controlling the flow of the traffic packet between the namespace and the external port. In this way, the rapid deployment of the test environment and the efficient execution of the test process can be achieved without relying on the cloud management platform, computing controller, network controller, storage controller, and K8S cluster, so the efficiency of testing the network element device can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 An application environment diagram of a method for testing a network element device in an embodiment;

[0040] Figure 2 A schematic diagram of a flow chart of a method for testing a network element device in an embodiment;

[0041] Figure 3 is an overall flow chart of testing a network element device in an exemplary embodiment;

[0042] Figure 4 A schematic diagram of a simplified flow table of OVS in an exemplary embodiment;

[0043] Figure 5 A schematic diagram of a flow chart of a flow forwarding test step in an embodiment;

[0044] Figure 6 A flowchart of a step of forwarding a traffic packet from an external port to a namespace in one embodiment;

[0045] Figure 7 A flowchart of a step of forwarding a traffic packet from a namespace to an external port in one embodiment;

[0046] Figure 8 A schematic diagram of a flow chart of a method for testing a network element device in another embodiment;

[0047] Fig. 9 is a structural block diagram of a testing device for a network element device in an embodiment;

[0048] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0051] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0053] With the development of cloud computing technology, software defined networks (SDN) have emerged. The software defined network includes computing controllers, network controllers, storage controllers, and K8S (Kubernetes, an open source container orchestration system). Among them, the computing controller is responsible for the creation, destruction, and scheduling of cloud hosts in the software defined network. The network controller is responsible for the sending of forwarding table items, routing transmission and reception, and other operations of network devices in the cloud in the software defined network. The storage controller is responsible for cloud disk, storage, and backup operations. At the same time, K8S is responsible for completing the resource scheduling, upgrading, and service provision of the entire cluster in the software defined network. Usually, the network element equipment can be tested through the mutual cooperation of various components in the software defined network, thereby ensuring the normal operation of various devices in the software defined network.

[0054] However, the testing methods for network element devices in traditional technologies are all carried out in a standard test environment that mirrors the production environment 1:1. Therefore, it is necessary to deploy a full range of components and resources such as computing controllers, network controllers, storage controllers, K8S clusters, and even cloud management platforms before testing can begin. This results in a long deployment cycle for the testing methods, high investment costs, and a large degree of mutual dependence between different resources. When a component needs to be upgraded or has problems, it will affect the overall testing work and thus the progress of the test. In addition, for the testing methods of the network element data plane, the test implementation process can only configure services through the standard API (Application Programming Interface) provided by the cloud management platform or network service, resulting in a single test scenario, inability to flexibly network, and inability to carry out various abnormal tests. In summary, the testing methods for network element devices in traditional technologies have the problem of low testing efficiency.

[0055] After introducing the background technology of the network element device testing method provided by the embodiment of the present application, the implementation environment involved in the network element device testing method provided by the embodiment of the present application will be briefly described below. The network element device testing method provided by the embodiment of the present application can be applied to Figure 1In the network management device in the cloud platform shown. The cloud platform includes a network management device 11 and a network element device 12, and the network management device 11 is configured with at least one namespace (Namespace, NS). The network management device 11 can be a fully connected device in a resource pool in the cloud platform. The network management device 11 is used to log in to the network element device 12. The network management device 11 can communicate with the network element device 12 and each server node in the cloud platform, perform data transmission and information interaction and other operations. Among them, the network management device 11 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. Exemplarily, each physical server can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.

[0056] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the distributed storage system to which the scheme of the present application is applied. The specific distributed storage system may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0057] In one embodiment, Figure 2 As shown, a method for testing a network element device is provided, and the method is applied to Figure 1 The network management device in the cloud platform is used as an example to illustrate the process, including the following steps:

[0058] S201, receiving a test request for a network element device in a cloud platform; the test request includes a traffic packet for testing the network element device.

[0059] Among them, namespace refers to Net NS (Network namespace). Namespace can be used to isolate network resources in the Linux operating system. It is usually allowed to run multiple network namespaces on the same host machine. Each network namespace can have its own network devices, IP addresses, routing tables and other network-related configurations. Test request refers to a request for testing network element devices in the cloud platform. The test request includes traffic packets for testing network element devices.

[0060] In the present application embodiment, Figure 3 As shown, Figure 3 The overall flow chart for testing a network element device in an exemplary embodiment is as follows: S301, the device information of the resource pool in the cloud platform can be obtained in advance, and the device information of the resource pool can be filled into the configuration file of the test framework in the network management device. Optionally, the device information may include but is not limited to server planning information, network configuration information, etc. After the configuration of the configuration file is completed, S302, the above configuration file can be loaded, and the corresponding validity check of the above configuration file can be performed. In addition, S303, the device status, availability, connectivity, etc. of the network management device can also be checked, and the configuration of the network element device can also be added, deleted, modified or checked through the CLI (command-line interface, command line interface) command line. In this way, the configuration and distribution of the device can be realized without relying on the network controller. When all checks are passed, S304, a network namespace can be created in the host of the network management device, and the network namespace and the interface of the network namespace can be added to the ovs (Open vSwitch, open source virtual switch) in the host to simulate a real cloud host. Afterwards, S305, the user terminal may send a test request for the network element device in the cloud platform to the network management device, so that the network management device may receive the test request for the network element device in the cloud platform and obtain the traffic packet used for testing the network element device in the test request.

[0061] S202, control the flow of traffic packets between the namespace and the external port, and obtain the forwarding result of the traffic packet; the forwarding result is used to indicate whether the traffic packet is successfully forwarded.

[0062] The external port refers to a port outside the network management device that is connected to the network management device for communication, and the forwarding result of the traffic packet is used to indicate whether the traffic packet is forwarded successfully.

[0063] In the present application embodiment, combined Figure 3 As shown, after receiving the test request for the network element device in the cloud platform, S306, the network management device can issue the service configuration to the network element device through the command line, and issue a simplified flow table to OVS, so that the network management device can control the flow of the traffic packet between the namespace and the external port based on the service configuration and the simplified flow table, obtain the flow result of the traffic packet, and determine the forwarding result of the traffic packet according to the flow result of the traffic packet. Optionally, if the traffic packet successfully completes the flow between the namespace and the external port, the forwarding result of the traffic packet can be determined as a successful forwarding of the traffic packet; if the traffic packet fails to successfully complete the flow between the namespace and the external port, the forwarding result of the traffic packet can be determined as a failure to forward the traffic packet.

[0064] Among them, Figure 4 As shown, Figure 4 This is a schematic diagram of a simplified flow table of OVS in an exemplary embodiment. The simplified flow table of OVS may include but is not limited to an input flow table (Input), a lookup flow table (L3 Lookup), a service dispatch flow table (Service Dispatch), a homologous flow table (Homologous), an output dispatch flow table (Output Dispatch), an address acquisition flow table (ARP flow table or NDP flow table), etc. It should be noted that the simplified flow table of OVS in the embodiment of the present application eliminates the security group, speed limit, monitoring and other functions of the OVS flow table in the standard environment, and only retains the basic forwarding part. In this way, the structure of the OVS flow table can be simplified, making the configuration process before the test more concise.

[0065] S203: Determine the test result of the network element device according to the forwarding result.

[0066] In the present application embodiment, combined Figure 3 As shown, S307, the network management device can determine the test result of the network element device according to the forwarding result of the traffic packet. Optionally, if the traffic packet is forwarded successfully, the test result of the network element device can be determined as a passed test; if the traffic packet is forwarded unsuccessfully, the test result of the network element device can be determined as a failed test. After the test result of the network element device is determined, it indicates that the test is over. At this time, S308, the network management device can delete its own various network device configurations, S309, and can destroy the network namespace and the corresponding OVS simplified flow table. Thus, S310, the network management device can generate a visual test report based on the test results of the network element device, and send the above-mentioned visual test report to the user terminal. It should be noted that the tests performed on the network element device in the embodiment of the present application may include but are not limited to data-plane business tests such as abnormal traffic.

[0067] In the above-mentioned network element device testing method, a test request for a network element device in a cloud platform is received; the test request includes a traffic packet for testing the network element device; the traffic packet is controlled to flow between the namespace and the external port, and the forwarding result of the traffic packet is obtained; the forwarding result is used to characterize whether the traffic packet is successfully forwarded; and the test result of the network element device is determined based on the forwarding result. Since the network management device in the embodiment of the present application is configured with a namespace, the embodiment of the present application can directly implement the test of the network element device by controlling the flow of the traffic packet between the namespace and the external port. In this way, the rapid deployment of the test environment and the efficient execution of the test process can be achieved without relying on the cloud management platform, computing controller, network controller, storage controller, and K8S cluster, so the efficiency of testing the network element device can be improved.

[0068] In one embodiment, the forwarding result includes a first forwarding result or a second forwarding result, and the test request also includes a type identifier. Based on this, a method for implementing traffic forwarding is provided, that is, "controlling the flow of traffic packets between the namespace and the external port to obtain the forwarding result of the traffic packet" in the above S202, such as Figure 5 As shown, including:

[0069] S401, determining whether the type of the test request is the first type according to the type identifier. If the type of the test request is determined to be the first type according to the type identifier, S402 is executed; if the type of the test request is determined to be the second type according to the type identifier, S403 is executed.

[0070] S402, forwarding the traffic packet from the external port to the namespace to obtain a first forwarding result; the flow direction of the traffic packet in the first type of test request is from the external port to the namespace.

[0071] S403, forwarding the traffic packet from the namespace to the external port, and obtaining a second forwarding result; the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

[0072] The forwarding result includes a first forwarding result or a second forwarding result. The first forwarding result is used to characterize whether the traffic packet is successfully transferred from the external port to the namespace, and the second forwarding result is used to characterize whether the traffic packet is successfully transferred from the namespace to the external port. The test request also includes a type identifier, which is used to characterize the type of the test request. The type of the test request may include but is not limited to the first type or the second type. The flow direction of the traffic packet in the first type of test request is from the external port to the namespace, and the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

[0073] In an embodiment of the present application, the network management device can determine whether the type of the test request is the first type according to the type identification. If it is determined that the type of the test request is the first type according to the type identification, the network management device can execute the test process corresponding to the first type, for example, the network management device can forward the traffic packet from the external port to the namespace through the simplified flow table of ovs, so that it can be determined whether the traffic packet is successfully forwarded from the external port to the namespace, and the first forwarding result can be obtained. If it is determined that the type of the test request is not the first type, but the second type according to the type identification, the network management device can execute the test process corresponding to the second type, for example, the network management device can forward the traffic packet from the namespace to the external port through the simplified flow table of ovs, so that it can be determined whether the traffic packet is successfully forwarded from the namespace to the external port, and the second forwarding result can be obtained.

[0074] In this embodiment, the type of the test request can be accurately determined based on the type identifier, so that the traffic forwarding test process corresponding to the type of the test request can be executed, and the forwarding result corresponding to the type of the test request can be obtained. In this way, different tests can be performed on the network element device according to the types of different test requests, which can improve the diversity of testing on the network element device.

[0075] In one embodiment, a method for implementing forwarding a traffic packet from an external port to a namespace is provided, namely, “forwarding the traffic packet from the external port to the namespace to obtain a first forwarding result” in the above S402. Figure 6 As shown, including:

[0076] S501, using the lookup flow table in the network management device to determine the source identifier and the target terminal identifier of the flow packet.

[0077] In the present application embodiment, combined Figure 4 As shown, the network management device can transfer the traffic packet from the external port to the physical network card of the host machine, and then flow the traffic packet from the physical network card of the host machine into the input flow table (Input) in the ovs of the network management device. After that, the traffic packet flows from the input flow table (Input) into the lookup flow table (L3 Lookup) in the ovs of the network management device, and uses the lookup flow table (L3 Lookup) in the network management device to determine the source identifier and target end identifier of the traffic packet. Among them, the source identifier is used to represent the IP address and / or MAC address of the external port, and the target end identifier is used to represent the traffic packet vni+inner destination MAC address and / or the traffic packet vni+inner destination IP address.

[0078] S502: forward the traffic packet to the service scheduling flow table in the network management device by searching the flow table according to the source identifier.

[0079] In the present application embodiment, combined Figure 4 As shown, optionally, the network management device can forward the traffic packet and the source identification and target end identification of the traffic packet directly to the service dispatch flow table (Service Dispatch) in the ovs of the network management device by looking up the flow table according to the source identification; or, the network management device can also forward the traffic packet and the source identification and target end identification of the traffic packet to the homologous flow table (Homologous) in the ovs of the network management device by looking up the flow table according to the source identification, and then forward the traffic packet and the source identification and target end identification of the traffic packet from the homologous flow table (Homologous) to the service dispatch flow table (Service Dispatch). Of course, the embodiment of the present application does not limit the specific implementation method of forwarding the traffic packet to the service dispatch flow table in the network management device.

[0080] S503: forward the traffic packet to the namespace corresponding to the target end identifier through the service scheduling flow table to obtain a first forwarding result.

[0081] In the present application embodiment, combined Figure 4 As shown, the network management device can determine the outbound interface identifier of the namespace corresponding to the target end identifier according to the target end identifier of the traffic packet, and record the outbound interface identifier in the ovs register, and the network management device can forward the traffic packet to the output dispatch flow table (Output Dispatch) through the service dispatch flow table (Service Dispatch), and then forward the traffic packet from the output dispatch flow table (Output Dispatch) to the namespace corresponding to the target end identifier, thereby determining whether the outbound traffic packet is successfully forwarded from the external port to the namespace, and obtaining the first forwarding result. For example, the outbound interface identifier may include but is not limited to any one of an ID (Identity document, identity identification number), a sequence number, etc.

[0082] In the present embodiment, the flow table search in the network management device is used to determine the source identification and target end identification of the flow packet; According to the source identification, the flow packet is forwarded to the service scheduling flow table in the network management device by searching the flow table; The flow packet is forwarded to the namespace corresponding to the target end identification by the service scheduling flow table, and the first forwarding result is obtained. In this way, the test process of forwarding the flow packet from the external port to the namespace can be easily realized using the simplified flow table of ovs.

[0083] In one embodiment, a method for implementing forwarding a traffic packet to a service scheduling flow table in a network management device is provided, that is, the “forwarding the traffic packet to the service scheduling flow table in the network management device by searching the flow table according to the source identifier” in S502 above, including:

[0084] According to the source identifier, the Internet Protocol IP address information of the return port of the traffic packet is determined.

[0085] If the IP address information is different from the IP address information of the external port, the traffic packet is forwarded to the service scheduling flow table by looking up the flow table.

[0086] If the IP address information is the same as the IP address information of the external port, the flow packet is forwarded to the same source flow table in the network management device by looking up the flow table, and the source identifier is recorded in the register of the network management device, and the flow packet is forwarded to the service scheduling flow table.

[0087] In the present application embodiment, combined Figure 4As shown, the network management device can determine the IP (Internet Protocol Address) address information of the return port corresponding to the traffic packet based on the source identifier when the traffic packet needs to be returned to the external port. If it is determined that the IP address information of the return port corresponding to the traffic packet can be the same as the IP address information of the external port that transmits the traffic packet during the current traffic forwarding test, or it can be different, that is, it can be understood that there is no restriction on the return port corresponding to the traffic packet, that is, the traffic packet does not need to have the same source and destination when returning, then the network management device can directly forward the traffic packet to the service dispatch flow table (Service Dispatch) by looking up the flow table (L3 Lookup). If it is determined that the IP address information of the return port corresponding to the traffic packet needs to be the same as the IP address information of the external port of the incoming traffic packet during the current traffic forwarding test, it can be understood that there is a restriction on the return port corresponding to the traffic packet, that is, the traffic packet needs to have the same source and destination when returning. The network management device can first forward the traffic packet to the homologous flow table (Homologous) in the network management device by looking up the flow table (L3 Lookup), and at the same time, the source identifier of the traffic packet can be recorded in the register in the ovs of the network management device through the homologous flow table (Homologous). After that, the traffic packet can be forwarded from the homologous flow table (Homologous) to the service dispatch flow table (ServiceDispatch).

[0088] In this embodiment, the IP address information of the return port of the traffic packet can be determined based on the source identifier, and based on the IP address information of the return port and the IP address information of the external port, it can be determined whether the traffic packet needs to have the same source and destination during the return trip. This allows corresponding traffic forwarding tests to be performed based on the requirements of different traffic packets for the return port, thereby enriching the test scenarios and improving the diversity of test methods.

[0089] In one embodiment, a method for implementing forwarding a traffic packet from a namespace to an external port is provided, namely, “forwarding the traffic packet from the namespace to the external port to obtain a second forwarding result” in the above S403, such as Figure 7 As shown, including:

[0090] S601, using the service scheduling flow table in the network management device to determine the target end identifier of the traffic packet.

[0091] In the present application embodiment, combined Figure 4As shown, the network management device can flow the traffic packet from the network namespace into the input flow table (Input) in the ovs of the network management device, and then transfer the traffic packet from the input flow table (Input) to the service dispatch flow table (Service Dispatch) in the ovs of the network management device, and use the service dispatch flow table (Service Dispatch) in the network management device to determine the source identifier and target end identifier of the traffic packet. Among them, the source identifier is used to represent the IP address and / or MAC address of the external port, and the target end identifier is used to represent the traffic packet vni+inner destination MAC address and / or the traffic packet vni+inner destination IP address.

[0092] S602: forward the traffic packet from the namespace to the external port according to the target end identifier, and obtain a second forwarding result.

[0093] In the present application embodiment, combined Figure 4 As shown, optionally, the network management device can directly forward the traffic packet from the namespace to the service dispatch flow table (Service Dispatch) according to the target end identifier of the traffic packet, and then forward the traffic packet from the service dispatch flow table (Service Dispatch) to the external port to obtain a second forwarding result; or, the network management device can first forward the traffic packet from the namespace to the service dispatch flow table (Service Dispatch) according to the target end identifier of the traffic packet, and then forward the traffic packet from the service dispatch flow table (Service Dispatch) to the homologous flow table (Homologous) in the ovs of the network management device, and then forward the traffic packet from the homologous flow table (Homologous) to the external port to obtain a second forwarding result. Of course, the embodiment of the present application does not limit the specific implementation method of forwarding the traffic packet to the external port.

[0094] In this embodiment, the service scheduling flow table in the network management device is used to determine the target end identification of the traffic packet; According to the target end identification, the traffic packet is forwarded from the namespace to the external port, and the second forwarding result is obtained. In this way, the test process of forwarding the traffic packet from the namespace to the external port can be conveniently realized using the simplified flow table of ovs.

[0095] In one embodiment, a method for implementing forwarding a traffic packet to an external port is provided, that is, the step of “forwarding the traffic packet from the namespace to the external port according to the target end identifier to obtain a second forwarding result” in S602 above, including:

[0096] According to the target end identifier, determine whether the traffic packet needs to be forwarded to the external port by backhauling.

[0097] If the traffic packet does not need to be forwarded to the external port by way of backhaul, the traffic packet is forwarded to the external port corresponding to the target end identifier to obtain a second forwarding result.

[0098] If the traffic packet needs to be forwarded to an external port via backhaul, the traffic packet is sent to the homologous flow table in the network management device, and the IP address information of the backhaul port of the traffic packet is obtained from the register of the network management device. The traffic packet is then forwarded to the external port corresponding to the IP address information to obtain a second forwarding result.

[0099] In the present application embodiment, combined Figure 4 As shown, the network management device can determine whether the traffic packet needs to be forwarded to the external port by way of backhaul according to the target end identifier, that is, it can be understood as determining whether there are restrictions on the backhaul port corresponding to the traffic packet, that is, it is necessary to determine whether the traffic packet needs to have the same source and destination during the return trip. If it is determined that the outgoing traffic packet does not need to be forwarded to the external port by way of backhaul, that is, it can be understood as there is no restriction on the backhaul port corresponding to the traffic packet, that is, the traffic packet does not need to have the same source and destination during the return trip, then the network management device can record the outgoing interface identifier corresponding to the target end identifier into the OVS register, and directly forward the traffic packet from the service dispatch flow table (Service Dispatch) to the output dispatch flow table (Output Dispatch), and then forward the traffic packet from the output dispatch flow table (Output Dispatch) to the external port corresponding to the target end identifier, thereby determining whether the outgoing traffic packet is successfully forwarded from the namespace to the external port, and obtaining the second forwarding result. For example, the outgoing interface identifier may include but is not limited to any one of an ID (Identity Document, identity identification number), a sequence number, etc. For example, the outgoing interface identifier may be the ID of a vxlan interface.

[0100] If it is determined that the outgoing traffic packet needs to be forwarded to the external port by way of backhaul, it can be understood that there is a restriction on the backhaul port corresponding to the traffic packet, that is, the traffic packet needs to have the same source and destination during the return trip, then the network management device can forward the traffic packet from the service dispatch flow table (Service Dispatch) to the homologous flow table (Homologous) in the network management device, and at the same time, the homologous flow table (Homologous) can be used to obtain the IP address information of the backhaul port corresponding to the pre-stored traffic packet from the register in the ovs of the network management device, and the traffic packet is forwarded from the homologous flow table (Homologous) to the output dispatch flow table (Output Dispatch), and then the traffic packet is forwarded from the output dispatch flow table (Output Dispatch) to the external port corresponding to the IP address information of the backhaul port, thereby determining whether the outgoing traffic packet is successfully forwarded from the namespace to the external port, and obtaining the second forwarding result.

[0101] In this embodiment, it can be determined based on the target end identifier whether the traffic packet needs to be forwarded to the external port by way of backhaul, so that it can be accurately determined whether the traffic packet needs to have the same source and destination during the return trip. Therefore, corresponding traffic forwarding tests can be performed based on the requirements of different traffic packets for the backhaul port, thereby enriching the test scenarios and improving the diversity of test methods.

[0102] In one embodiment, a method for implementing obtaining a MAC address of a traffic packet is provided, that is, before “forwarding the traffic packet from the namespace to the external port” in S403, the test method of the network element device further includes:

[0103] An acquisition request is sent to the address acquisition flow table in the network management device; the acquisition request is used to request the Ethernet address of the next traffic packet.

[0104] Carry the Ethernet address in the traffic packet.

[0105] In the present application embodiment, combined Figure 4As shown, the network management device can flow the initial traffic packet carrying the acquisition request from the network namespace into the input flow table (Input) in the ovs of the network management device, and then transfer the initial traffic packet from the input flow table (Input) to the service dispatch flow table (Service Dispatch) in the ovs of the network management device, and forward the initial traffic packet to the address acquisition flow table through the service dispatch flow table (Service Dispatch) in the network management device, so that the address acquisition flow table in the ovs of the network management device receives the acquisition request, and answers the acquisition request on behalf of the address acquisition flow table to obtain the Ethernet address of the next traffic packet. Thus, the network namespace in the network management device can receive the Ethernet address of the next traffic packet sent by the address acquisition flow table, carry the Ethernet address in the traffic packet, and execute subsequent test processes.

[0106] The address acquisition flow table may include but is not limited to the ARP flow table or the NDP flow table, etc. The acquisition request is used to request the Ethernet address (MAC address, Media Access Control Address) of the next traffic packet, and the next traffic packet refers to the traffic packet that needs to be tested for traffic forwarding at the next hop. Optionally, if the IP address of the external port is 4, the network management device can send an acquisition request to the ARP (Address Resolution Protocol) flow table; if the IP address of the external port is 6, the network management device can send an acquisition request to the NDP (Neighbor Discovery Protocol) flow table.

[0107] In this embodiment, an acquisition request can be sent to the address acquisition flow table in the network management device, where the acquisition request is used to request the Ethernet address of the next traffic packet. Thus, by carrying the Ethernet address in the traffic packet, the network management device can accurately determine the next traffic packet that requires traffic forwarding testing.

[0108] Based on all the above embodiments, the present application also provides a complete network element device testing method, such as Figure 8 As shown, the method includes:

[0109] S701, receiving a test request for a network element device in a cloud platform; the test request includes a traffic packet for testing the network element device;

[0110] S702, determining the type of the test request according to the type identifier; if the type of the test request is determined to be the first type according to the type identifier, executing S703-S708; if the type of the test request is determined to be the second type according to the type identifier, executing S709-S714;

[0111] S703, using the lookup flow table in the network management device to determine the source identifier and the target terminal identifier of the flow packet;

[0112] S704, determining the Internet Protocol IP address information of the return port of the traffic packet according to the source identifier;

[0113] S705, determining whether the IP address information is the same as the IP address information of the external port; if the IP address information is different from the IP address information of the external port, executing S706; if the IP address information is the same as the IP address information of the external port, executing S707;

[0114] S706, forwarding the traffic packet to the service scheduling flow table by searching the flow table;

[0115] S707, forwarding the traffic packet to the same source flow table in the network management device by searching the flow table, recording the source identifier in the register of the network management device, and forwarding the traffic packet to the service scheduling flow table;

[0116] S708, forwarding the traffic packet to the namespace corresponding to the target end identifier through the service scheduling flow table, and obtaining a first forwarding result;

[0117] S709, sending an acquisition request to the address acquisition flow table in the network management device; the acquisition request is used to request to obtain the Ethernet address of the next traffic packet;

[0118] S710, carries the Ethernet address in the traffic packet;

[0119] S711, using the service scheduling flow table in the network management device to determine the target end identifier of the traffic packet;

[0120] S712, according to the target end identifier, determine whether the traffic packet needs to be forwarded to the external port by way of backhaul; if the traffic packet does not need to be forwarded to the external port by way of backhaul, execute S713; if the traffic packet needs to be forwarded to the external port by way of backhaul, execute S714;

[0121] S713, forwarding the traffic packet to the external port corresponding to the target end identifier, and obtaining a second forwarding result;

[0122] S714, while sending the traffic packet to the homologous flow table in the network management device, obtain the IP address information of the return port of the traffic packet from the register of the network management device, and forward the traffic packet to the external port corresponding to the IP address information to obtain a second forwarding result;

[0123] S715: Determine a test result of the network element device according to the first forwarding result or the second forwarding result.

[0124] In the above-mentioned network element device testing method, a test request for a network element device in a cloud platform is received; the test request includes a traffic packet for testing the network element device; the traffic packet is controlled to flow between the namespace and the external port, and the forwarding result of the traffic packet is obtained; the forwarding result is used to characterize whether the traffic packet is successfully forwarded; and the test result of the network element device is determined according to the forwarding result. Since the network management device in the embodiment of the present application is configured with a namespace, the embodiment of the present application can directly realize the test of the network element device by controlling the flow of the traffic packet between the namespace and the external port. In this way, it is possible to replace the virtual machine with the network namespace of the Linux operating system itself to simulate the cloud host and related services without relying on the cloud management platform, computing controller, network controller, storage controller, and K8S cluster. Since the network namespace has the characteristics of network resource isolation, fast creation and destruction time, and small resource occupation, the network namespace is used instead of the virtual machine for lightweight network testing, which can effectively improve the test efficiency, reduce the dependence on external components, and do not require virtual machine images, and can realize the rapid deployment of the test environment and the efficient execution of the test process, so it can improve the efficiency of testing the network element device. In addition, the embodiments of the present application can also simplify the ovs flow table and adopt the CLI command line tool, further ensuring that the testing of the network data plane no longer depends on the cloud management, K8S, and various controller components. Compared with the current network data plane testing method within the cloud, it effectively reduces the deployment cycle, reduces testing costs, avoids external dependencies, improves testing efficiency, enriches testing methods and business scenarios, and effectively ensures the stability of the network data plane within the cloud.

[0125] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0126] Based on the same inventive concept, the embodiment of the present application also provides a network element device testing device for implementing the network element device testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the testing device for one or more network element devices provided below can refer to the limitations of the network element device testing method above, and will not be repeated here.

[0127] In an exemplary embodiment, Fig. 9 As shown, a testing device for a network element device is provided, comprising: a receiving module 31, an acquiring module 32 and a determining module 33, wherein:

[0128] The receiving module 31 is used to receive a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device.

[0129] The acquisition module 32 is used to control the flow of traffic packets between the namespace and the external port in the cloud platform, and obtain the forwarding result of the traffic packet; the forwarding result is used to indicate whether the traffic packet is successfully forwarded.

[0130] The determination module 33 is used to determine the test result of the network element device according to the forwarding result.

[0131] In one embodiment, the forwarding result includes a first forwarding result or a second forwarding result, and the test request includes a type identifier; the acquisition module 32 includes:

[0132] A first forwarding unit is used to forward the traffic packet from the external port to the namespace to obtain a first forwarding result when the type of the test request is determined to be the first type according to the type identifier; the flow direction of the traffic packet in the first type of test request is from the external port to the namespace;

[0133] The second forwarding unit is used to forward the traffic packet from the namespace to the external port to obtain a second forwarding result when the type of the test request is determined to be the second type according to the type identifier; the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

[0134] In one embodiment, the first forwarding unit includes:

[0135] A first identification determination subunit is used to determine the source identification and the target end identification of the flow packet by using the lookup flow table in the network management device;

[0136] A first forwarding subunit, configured to forward the traffic packet to a service scheduling flow table in the network management device by looking up the flow table according to the source identifier;

[0137] The second forwarding subunit is used to forward the traffic packet to the namespace corresponding to the target end identifier through the service scheduling flow table to obtain a first forwarding result.

[0138] In one embodiment, the first forwarding subunit is specifically configured to:

[0139] Determine the Internet Protocol IP address information of the return port of the traffic packet according to the source identifier;

[0140] When the IP address information is different from the IP address information of the external port, the flow packet is forwarded to the service scheduling flow table by looking up the flow table;

[0141] When the IP address information is the same as the IP address information of the external port, the flow packet is forwarded to the same-source flow table in the network management device by looking up the flow table, the source identifier is recorded in the register of the network management device, and the flow packet is forwarded to the service scheduling flow table.

[0142] In one embodiment, the second forwarding unit includes:

[0143] The second identification determination subunit is used to determine the target end identification of the flow packet by using the service scheduling flow table in the network management device;

[0144] The third forwarding subunit is used to forward the traffic packet from the namespace to the external port according to the target end identifier to obtain a second forwarding result.

[0145] In one embodiment, the third forwarding subunit is specifically configured to:

[0146] According to the target end identifier, determine whether the traffic packet needs to be forwarded to the external port by backhauling;

[0147] When the traffic packet does not need to be forwarded to the external port by way of backhaul, the traffic packet is forwarded to the external port corresponding to the target end identifier to obtain a second forwarding result;

[0148] When the traffic packet needs to be forwarded to an external port via backhaul, the traffic packet is sent to the homologous flow table in the network management device, and the IP address information of the backhaul port of the traffic packet is obtained from the register of the network management device. The traffic packet is forwarded to the external port corresponding to the IP address information to obtain a second forwarding result.

[0149] In one of the embodiments, before forwarding the traffic packet from the namespace to the external port, the testing device of the network element device further includes:

[0150] The sending module is used to send an acquisition request to the address acquisition flow table in the network management device; the acquisition request is used to request to obtain the Ethernet address of the next flow packet;

[0151] The carrying module is used to carry the Ethernet address in the traffic packet.

[0152] Each module in the test device of the network element device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a test method for a network element device is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0154] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0155] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0156] Receiving a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device;

[0157] Control the flow of traffic packets between the namespace and the external port, and obtain the forwarding results of the traffic packets; the forwarding results are used to indicate whether the traffic packets are forwarded successfully;

[0158] Determine the test result of the network element device based on the forwarding result.

[0159] In one embodiment, the forwarding result includes a first forwarding result or a second forwarding result, and the test request includes a type identifier; the flow packet is controlled to flow between the namespace and the external port to obtain the forwarding result of the flow packet, and the processor further implements the following steps when executing the computer program:

[0160] If the type of the test request is determined to be the first type according to the type identifier, the traffic packet is forwarded from the external port to the namespace to obtain a first forwarding result; the flow direction of the traffic packet in the first type of test request is from the external port to the namespace;

[0161] If the type of the test request is determined to be the second type according to the type identifier, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result; the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

[0162] In one embodiment, a traffic packet is forwarded from an external port to a namespace to obtain a first forwarding result, and the processor further implements the following steps when executing the computer program:

[0163] Use the lookup flow table in the network management device to determine the source identifier and target identifier of the traffic packet;

[0164] According to the source identifier, the flow packet is forwarded to the service scheduling flow table in the network management device by looking up the flow table;

[0165] The traffic packet is forwarded to the namespace corresponding to the target end identifier through the service scheduling flow table to obtain a first forwarding result.

[0166] In one embodiment, according to the source identifier, the flow packet is forwarded to the service scheduling flow table in the network management device by looking up the flow table, and the processor further implements the following steps when executing the computer program:

[0167] Determine the Internet Protocol IP address information of the return port of the traffic packet according to the source identifier;

[0168] If the IP address information is different from the IP address information of the external port, the traffic packet is forwarded to the service scheduling flow table by looking up the flow table;

[0169] If the IP address information is the same as the IP address information of the external port, the flow packet is forwarded to the same source flow table in the network management device by looking up the flow table, and the source identifier is recorded in the register of the network management device, and the flow packet is forwarded to the service scheduling flow table.

[0170] In one embodiment, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result, and the processor further implements the following steps when executing the computer program:

[0171] Using the service scheduling flow table in the network management device, determine the target end identifier of the traffic packet;

[0172] According to the target end identifier, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result.

[0173] In one embodiment, according to the target end identifier, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result, and the processor further implements the following steps when executing the computer program:

[0174] According to the target end identifier, determine whether the traffic packet needs to be forwarded to the external port by backhauling;

[0175] If the traffic packet does not need to be forwarded to the external port by way of backhaul, the traffic packet is forwarded to the external port corresponding to the target end identifier to obtain a second forwarding result;

[0176] If the traffic packet needs to be forwarded to an external port via backhaul, the traffic packet is sent to the homologous flow table in the network management device, and the IP address information of the backhaul port of the traffic packet is obtained from the register of the network management device. The traffic packet is then forwarded to the external port corresponding to the IP address information to obtain a second forwarding result.

[0177] In one embodiment, before forwarding the traffic packet from the namespace to the external port, the processor further implements the following steps when executing the computer program:

[0178] Sending an acquisition request to the address acquisition flow table in the network management device; the acquisition request is used to request to obtain the Ethernet address of the next traffic packet;

[0179] Carry the Ethernet address in the traffic packet.

[0180] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0181] Receiving a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device;

[0182] Control the flow of traffic packets between the namespace and the external port, and obtain the forwarding results of the traffic packets; the forwarding results are used to indicate whether the traffic packets are forwarded successfully;

[0183] Determine the test result of the network element device based on the forwarding result.

[0184] In one embodiment, the forwarding result includes a first forwarding result or a second forwarding result, and the test request includes a type identifier; the flow packet is controlled to flow between the namespace and the external port to obtain the forwarding result of the flow packet, and the computer program is further implemented by the processor when it is executed:

[0185] If the type of the test request is determined to be the first type according to the type identifier, the traffic packet is forwarded from the external port to the namespace to obtain a first forwarding result; the flow direction of the traffic packet in the first type of test request is from the external port to the namespace;

[0186] If the type of the test request is determined to be the second type according to the type identifier, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result; the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

[0187] In one embodiment, a traffic packet is forwarded from an external port to a namespace to obtain a first forwarding result, and when the computer program is executed by a processor, the following steps are further implemented:

[0188] Use the lookup flow table in the network management device to determine the source identifier and target identifier of the traffic packet;

[0189] According to the source identifier, the flow packet is forwarded to the service scheduling flow table in the network management device by looking up the flow table;

[0190] The traffic packet is forwarded to the namespace corresponding to the target end identifier through the service scheduling flow table to obtain a first forwarding result.

[0191] In one embodiment, according to the source identifier, the flow packet is forwarded to the service scheduling flow table in the network management device by looking up the flow table, and when the computer program is executed by the processor, the following steps are also implemented:

[0192] Determine the Internet Protocol IP address information of the return port of the traffic packet according to the source identifier;

[0193] If the IP address information is different from the IP address information of the external port, the traffic packet is forwarded to the service scheduling flow table by looking up the flow table;

[0194] If the IP address information is the same as the IP address information of the external port, the flow packet is forwarded to the same source flow table in the network management device by looking up the flow table, and the source identifier is recorded in the register of the network management device, and the flow packet is forwarded to the service scheduling flow table.

[0195] In one embodiment, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result, and the computer program, when executed by the processor, further implements the following steps:

[0196] Using the service scheduling flow table in the network management device, determine the target end identifier of the traffic packet;

[0197] According to the target end identifier, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result.

[0198] In one embodiment, according to the target end identifier, the traffic packet is forwarded from the namespace to the external port to obtain a second forwarding result, and when the computer program is executed by the processor, the following steps are also implemented:

[0199] According to the target end identifier, determine whether the traffic packet needs to be forwarded to the external port by backhauling;

[0200] If the traffic packet does not need to be forwarded to the external port by way of backhaul, the traffic packet is forwarded to the external port corresponding to the target end identifier to obtain a second forwarding result;

[0201] If the traffic packet needs to be forwarded to an external port via backhaul, the traffic packet is sent to the homologous flow table in the network management device, and the IP address information of the backhaul port of the traffic packet is obtained from the register of the network management device. The traffic packet is then forwarded to the external port corresponding to the IP address information to obtain a second forwarding result.

[0202] In one embodiment, before forwarding the traffic packet from the namespace to the external port, the computer program further implements the following steps when executed by the processor:

[0203] Sending an acquisition request to the address acquisition flow table in the network management device; the acquisition request is used to request to obtain the Ethernet address of the next traffic packet;

[0204] Carry the Ethernet address in the traffic packet.

[0205] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0206] It should be noted that the user information (including but not limited to user terminal information, user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0207] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0208] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0209] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for testing a network element device, characterized in that: The method is applied to network management equipment in a cloud platform; The network management device is configured with a namespace, and the method comprises: Receiving a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device; Controlling the flow packet to flow between the namespace and the external port, and obtaining a forwarding result of the flow packet; the forwarding result is used to indicate whether the flow packet is successfully forwarded; A test result of the network element device is determined according to the forwarding result.

2. The method according to claim 1, characterized in that The forwarding result includes a first forwarding result or a second forwarding result, and the test request includes a type identifier; and the controlling the flow packet to flow between the namespace and the external port to obtain the forwarding result of the flow packet includes: If the type of the test request is determined to be the first type according to the type identifier, the traffic packet is forwarded from the external port to the namespace to obtain a first forwarding result; the flow direction of the traffic packet in the first type of test request is from the external port to the namespace; If the type of the test request is determined to be the second type according to the type identifier, the traffic packet is forwarded from the namespace to the external port to obtain the second forwarding result; the flow direction of the traffic packet in the second type of test request is from the namespace to the external port.

3. The method according to claim 2, characterized in that The forwarding the traffic packet from the external port to the namespace to obtain a first forwarding result includes: Determine the source identifier and the destination identifier of the flow packet by using the lookup flow table in the network management device; According to the source identifier, forwarding the traffic packet to the service scheduling flow table in the network management device through the lookup flow table; The traffic packet is forwarded to the namespace corresponding to the target end identifier through the service scheduling flow table to obtain the first forwarding result.

4. The method according to claim 3, characterized in that According to the source identifier, forwarding the traffic packet to the service scheduling flow table in the network management device by looking up the flow table includes: Determine the Internet Protocol IP address information of the return port of the traffic packet according to the source identifier; If the IP address information is different from the IP address information of the external port, forwarding the traffic packet to the service scheduling flow table through the lookup flow table; If the IP address information is the same as the IP address information of the external port, the traffic packet is forwarded to the homologous flow table in the network management device through the lookup flow table, the source identifier is recorded in the register of the network management device, and the traffic packet is forwarded to the service scheduling flow table.

5. The method according to claim 2, characterized in that: The forwarding the traffic packet from the namespace to the external port to obtain the second forwarding result includes: Determine the target end identifier of the traffic packet by using the service scheduling flow table in the network management device; According to the target end identifier, the traffic packet is forwarded from the namespace to the external port to obtain the second forwarding result.

6. The method according to claim 5, characterized in that The step of forwarding the traffic packet from the namespace to the external port according to the target end identifier to obtain the second forwarding result includes: Determine, according to the target end identifier, whether the traffic packet needs to be forwarded to the external port by way of backhaul; If the traffic packet does not need to be forwarded to the external port by way of backhaul, forward the traffic packet to the external port corresponding to the target end identifier to obtain the second forwarding result; If the traffic packet needs to be forwarded to the external port by way of backhaul, the traffic packet is sent to the homologous flow table in the network management device, and the IP address information of the backhaul port of the traffic packet is obtained from the register of the network management device. The traffic packet is forwarded to the external port corresponding to the IP address information to obtain the second forwarding result.

7. The method according to claim 2, characterized in that Before forwarding the traffic packet from the namespace to the external port, the method further includes: Sending an acquisition request to the address acquisition flow table in the network management device; the acquisition request is used to request to obtain the Ethernet address of the next traffic packet; The Ethernet address is carried in the traffic packet.

8. A testing device for a network element device, characterized in that: The device comprises: A receiving module, used to receive a test request for a network element device in the cloud platform; the test request includes a traffic packet for testing the network element device; An acquisition module, used to control the flow of the traffic packet between the namespace and the external port in the cloud platform, and to obtain a forwarding result of the traffic packet; the forwarding result is used to indicate whether the traffic packet is successfully forwarded; A determination module is used to determine the test result of the network element device according to the forwarding result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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

Citation Information

Patent Citations

  • Migration of applications between an enterprise-based network and a multi-tenant network

    CN106663034A

  • Device, method and system for testing performance of communication network element technology interface

    CN116055353A

  • Service grid deployment state circulation processing method and system based on master-slave architecture, and storage medium

    CN117880078A

  • Service Traffic Control Method and System and Decision Network Element

    US20190150034A1