CN114513437B - Network testing method, device, medium and computing equipment - Google Patents

Network testing method, device, medium and computing equipment Download PDF

Info

Publication number
CN114513437B
CN114513437B CN202210066985.2A CN202210066985A CN114513437B CN 114513437 B CN114513437 B CN 114513437B CN 202210066985 A CN202210066985 A CN 202210066985A CN 114513437 B CN114513437 B CN 114513437B
Authority
CN
China
Prior art keywords
node
heartbeat message
message
identification
heartbeat
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210066985.2A
Other languages
Chinese (zh)
Other versions
CN114513437A (en
Inventor
黄哲骁
李雪峰
张晓龙
徐城利
陈跃芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Netease Shuzhifan Technology Co ltd
Original Assignee
Hangzhou Langhe Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Langhe Technology Co Ltd filed Critical Hangzhou Langhe Technology Co Ltd
Priority to CN202210066985.2A priority Critical patent/CN114513437B/en
Publication of CN114513437A publication Critical patent/CN114513437A/en
Application granted granted Critical
Publication of CN114513437B publication Critical patent/CN114513437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Abstract

The embodiment of the disclosure provides a network testing method, which comprises the following steps: generating a first heartbeat message based on a link layer discovery protocol; according to the prestored identification of the second node, the first heartbeat message is sent to the second node; receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; calculating the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold. In the process, on one hand, the problem of coverage test of a data layer in a large-scale test scene can be solved; on the other hand, the dependence on physical nodes can be effectively reduced, and the test cost is saved.

Description

Network testing method, device, medium and computing equipment
Technical Field
Embodiments of the present disclosure relate to the field of testing technologies, and more particularly, to a network testing method, device, medium, and computing equipment.
Background
This section is intended to provide a background or context to the embodiments of the disclosure recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the high-speed development of the Internet, more and more devices are in the network, and network traffic also shows explosive growth, so that the problems of network volume expansion, complex traffic, difficult management and the like are caused. In addition, the traditional bottom network architecture is complex in configuration and slow in iteration, and obviously cannot cope with increasing traffic pressure in the network.
Therefore, a new network architecture, namely a software defined network (Software Defined Network, SDN), is presented, where the SDN separates network control functions from network forwarding functions, so that network information is concentrated on a unified programmable controller for processing on a control layer, and on a data layer, rapid processing is implemented based on a simple data forwarding function, so as to adapt to increasing traffic demands. And the control layer and the data layer are interacted by adopting an open unified interface, such as OpenFlow.
Disclosure of Invention
In this context, embodiments of the present disclosure desire to provide a network testing method and apparatus.
In a first aspect of the embodiments of the present disclosure, a network testing method is provided, which is applied to a first node, where a peer node of the first node is a second node, and includes:
generating a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
according to the prestored identification of the second node, the first heartbeat message is sent to the second node so that the second node processes the first heartbeat message;
receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
calculating the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
In a second aspect of the embodiments of the present disclosure, there is provided a network testing apparatus applied to a first node, where a peer node of the first node is a second node, including:
The generation module generates a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
the sending module is used for sending the first heartbeat message to the second node according to the prestored identifier of the second node so as to process the first heartbeat message by the second node;
the receiving module is used for receiving a second heartbeat message which is sent by the second node and corresponds to the first heartbeat message; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
the calculation module calculates the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
In a third aspect of embodiments of the present disclosure, there is provided a storage medium; stored thereon are computer instructions which, when executed by a processor, perform the steps of a method of:
Generating a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
according to the prestored identification of the second node, the first heartbeat message is sent to the second node so that the second node processes the first heartbeat message;
receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
calculating the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
In a fourth aspect of embodiments of the present disclosure, there is provided a computing device comprising:
a processor; and a memory for storing processor-executable instructions;
wherein the processor executes the executable instructions to implement the steps of the method as follows:
Generating a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
according to the prestored identification of the second node, the first heartbeat message is sent to the second node so that the second node processes the first heartbeat message;
receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
calculating the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
The above embodiments of the present disclosure have at least the following beneficial effects:
and generating a first heartbeat message based on a link layer discovery protocol, sending the first heartbeat message to the opposite terminal node, then receiving a second heartbeat message corresponding to the first heartbeat message, and calculating the time interval between the first heartbeat message and the second heartbeat message, thereby effectively judging whether the opposite terminal node is abnormal or not. Through the technical scheme, on one hand, the problem of coverage test of the data layer in a large-scale test scene can be solved; on the other hand, the dependence on physical nodes can be effectively reduced, and the test cost is saved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
FIG. 1 schematically illustrates a flow chart of a network testing method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a network testing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a block diagram of a network testing apparatus according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a schematic diagram of a network test medium according to an embodiment of the present disclosure;
fig. 5 schematically illustrates a schematic diagram of an electronic device capable of implementing the above method according to an embodiment of the disclosure.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable one skilled in the art to better understand and practice the present disclosure and are not intended to limit the scope of the present disclosure in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the present disclosure may be implemented as a system, apparatus, device, method, or computer readable storage medium. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to an embodiment of the disclosure, a network testing method, a network testing device, a network testing medium and a network testing computing device are provided.
In this document, it should be understood that any number of elements in the drawings is for illustration and not limitation, and that any naming is used only for distinction and not for any limitation.
The principles and spirit of the present disclosure are explained in detail below with reference to several representative embodiments thereof.
Summary of The Invention
The inventors have found that in conducting large-scale network testing, only the relevant performance of the control layer's application program interface (Application Programming Interface, API) is typically of interest, whereas traffic testing for the data layer is ignored.
In view of this, the present disclosure provides a technical solution that generates a first heartbeat message based on a link layer discovery protocol, sends the first heartbeat message to a peer node, then receives a second heartbeat message corresponding to the first heartbeat message, and calculates a time interval between the first heartbeat message and the second heartbeat message, so as to effectively determine whether the peer node has an abnormality.
The core technical conception of the specification is as follows:
because the heartbeat message is sent at fixed time intervals like the heartbeat, and the opposite node generates a response message after receiving the heartbeat message, the opposite node replies the heartbeat message. Therefore, in order to sense the link abnormality between two nodes on the data layer, the response message of the opposite node can be judged whether to timeout or not by constructing the heartbeat message and processing the response message of the opposite node, so as to determine whether the opposite node has the abnormality or not.
When constructing the heartbeat message, the link layer discovery protocol is simpler and is easy to expand, so that the efficiency of generating the heartbeat message based on the link layer discovery protocol is higher, and the response message is also more rapidly processed.
Through the technical scheme, on one hand, the problem of coverage test of the data layer in a large-scale test scene can be solved; on the other hand, the dependence on physical nodes can be effectively reduced, and the test cost is saved.
Having described the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are specifically described below.
Application scene overview
Taking a cloud computing scene as an example, with the high-speed development of cloud computing, the traffic of a data center is increased in a explosive manner, so that a network operation and maintenance service side is required to perform centralized control and management on the traffic, and the traffic can be distributed as required. The SDN can control network traffic in the complex network topology through the centralized panel, and perform unified calculation and scheduling according to traffic demands among data centers, so that the network traffic can be distributed as required, the network is optimized to the greatest extent, the resource value of the network is improved, each network is prevented from being processed manually, and the management efficiency is improved.
However, when performing large-scale testing for cloud computing scenarios, only the API interface performance of the control layer is typically of interest, while testing is not performed for the data layer, or the test coverage for the data layer is weak.
For example, assuming that there are multiple computing nodes in a cloud computing scenario, it is only necessary for the control layer to test the relevant performance of the API interfaces for controlling these computing nodes, while for the connectivity of the data layer, it is necessary to simulate these computing nodes by adding real physical devices and using the same scale as these computing nodes.
It can be seen that when large-scale testing is performed, the number of physical compute nodes needs to be relied upon to cover the entire data layer, and the deployment of these real physical devices generally increases the cost of testing.
In addition, in the testing process, because the test environment is built, problems are repeated, loopholes are repaired and the like for a long time, the occupied time of the equipment is greatly increased, and further, the cost required for testing a plurality of pieces of equipment is greatly increased.
Similarly, in the case of other large-scale networks, the coverage test is also performed with the above-mentioned problems of insufficient coverage and excessive test cost.
It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in any way in this respect. Rather, embodiments of the present disclosure may be applied to any scenario where applicable.
Exemplary method
The technical idea of the present specification will be described in detail by specific examples.
The present disclosure aims to provide a technical scheme that generates a first heartbeat message based on a link layer discovery protocol, sends the first heartbeat message to a peer node, and then calculates a time interval between the first heartbeat message and a second heartbeat message by receiving the second heartbeat message corresponding to the first heartbeat message, so as to effectively determine whether the peer node has an abnormality.
When implemented, the first heartbeat message may be generated based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
for example, the first node may generate a first heartbeat message based on the link layer discovery protocol, and send the first heartbeat message to a peer node of the first node, that is, the second node; the first heartbeat message at least carries the identification of the first node.
According to the prestored identification of the second node, the first heartbeat message is sent to the second node so that the second node processes the first heartbeat message;
for example, to ensure that the first heartbeat message is sent to the correct node, the first node may send the first heartbeat message to the second node according to the prestored identifier of the second node, so that the second node processes the first heartbeat message.
Receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
for example, after the second node processes the first heartbeat message, a response message for replying to the first heartbeat message, that is, the second heartbeat message is generated. The second heartbeat message is generated by the second node based on the link layer discovery protocol and is sent to the first node according to the identification of the first node. Then, the first node may receive a second heartbeat message corresponding to the first heartbeat message sent by the second node.
Calculating the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; determining that the second node is abnormal in response to the time interval reaching a preset threshold;
For example, the time information corresponding to the first heartbeat message may be a time when the first node sends the first heartbeat message, and the time information corresponding to the second heartbeat message may be a time when the second node sends the second heartbeat message, so when calculating, the first node may calculate a time interval between the time when the first node sends the first heartbeat message and the time when the second node sends the second heartbeat message, and then determine whether the time interval reaches a preset threshold, and if yes, determine that the second node has an abnormality.
Through the technical scheme, on one hand, the problem of coverage test of the data layer in a large-scale test scene can be solved; on the other hand, the dependence on physical nodes can be effectively reduced, and the test cost is saved.
Referring to fig. 1, fig. 1 is a flowchart of a network testing method according to an exemplary embodiment, the method includes the following steps:
step 101, generating a first heartbeat message based on a link layer discovery protocol; the first heartbeat message at least comprises an identifier of the first node.
In this embodiment, the first node may generate a first heartbeat message based on the link layer discovery protocol, and send the first heartbeat message to the peer node of the first node, that is, the second node.
In order to receive the response message replied by the second node, the first heartbeat message needs to carry the identifier of the first node.
The link layer discovery protocol (Link Layer Discovery Protocol, LLDP) is a data link layer protocol that enables devices in a network to discover and advertise status and interaction information with each other. The network device may organize the information such as the main capability, management address, device identifier, interface identifier, etc. of the home node device into different TLVs (Type/Length/Value), and encapsulate the TLVs in the LLDPDU (Link Layer Discovery Protocol Data Unit ) to issue to other node devices in the same network.
In one embodiment shown, the link layer discovery protocol may be pre-extended by at least a first field, a second field, and a third field; the first field comprises a first time when the local node sends a heartbeat message, the second field comprises a time when the opposite node sends a response message corresponding to the heartbeat message, and the third field comprises an identifier of the local node.
The above TLVs are the main data formats in LLDP, and each TLV may represent one piece of information, where Type indicates a TLV Type, length indicates a TLV data Length, and Value indicates a TLV data content.
For example, the link layer discovery protocol may be pre-extended with at least three types of TLVs, respectively:
8 bytes of localname used for indicating the first moment when the local node sends the heartbeat message;
an echo time of 8 bytes, which is used for indicating the moment when the opposite node sends a response message corresponding to the heartbeat message;
4 byte tunnel for representing the identity of the local node.
In addition, other fields can be extended by one skilled in the art as needed.
Step 102 may send the first heartbeat packet to the second node according to the prestored identifier of the second node, so that the second node processes the first heartbeat packet.
In this embodiment, the first node may be connected to a plurality of other nodes, so as to ensure that the first heartbeat message is sent to the correct node, and the first node may send the first heartbeat message to the second node according to the prestored identifier of the second node, so that the second node processes the first heartbeat message.
As can be seen from the foregoing, when the device receives information of other devices from the network using the link layer discovery protocol, the information can be stored in the form of MIB (Management Information Base ). Typically, two MIB libraries are maintained in the device, a local system MIB for maintaining local device MIB information and a remote system MIB MIB for maintaining remote device MIB information.
Therefore, after receiving the first heartbeat message, the second node may store TLV information in the first heartbeat message, for example, an identifier of the first node, so that the second node replies a response message according to the identifier of the first node.
In one embodiment shown, a plurality of analog nodes may be pre-deployed on a first node; further, the plurality of analog nodes may generate a plurality of first heartbeat messages based on the link layer discovery protocol, respectively.
In one example, multiple simulated nodes may be generated by the program, and the simulated nodes may be used to replace the actual first node to send the first heartbeat message, i.e., each simulated node may generate a first heartbeat message based on the link layer discovery protocol.
In the process, by constructing the simulation node to replace the real node and the opposite node to send the message, the large-scale simulation of the real node on a single node can be realized, so that physical resources are greatly saved, and the test cost is reduced.
In one embodiment, the identifier corresponding to each analog node may be generated separately, so that the second node replies the heartbeat message sent by the analog node according to the identifier of the analog node.
As can be seen from the foregoing, the second node needs to reply to the response message according to the identifier of the first node, and if the first heartbeat messages generated by the plurality of analog nodes all use the identifier of the first node, the analog nodes cannot distinguish the received response messages.
Therefore, according to the number of the simulation nodes, the corresponding identifier of each simulation node can be generated and carried in the heartbeat message sent by each simulation node, so that the second node can acquire the identifier of the simulation node when receiving the heartbeat message sent by the simulation node, and the corresponding response message can be replied according to the identifier of the simulation node.
In one embodiment shown, a routing table maintained by a second node may include a next hop routing table entry corresponding to the first node; further, the second node may determine, through the next hop routing table entry, an identifier of the first node corresponding to the identifier of the analog node, and reply to a heartbeat message sent by the analog node according to the identifier of the first node.
In one example, it is assumed that the identifier of the first node is a real IP address corresponding to the first node, the identifier of the second node is a real IP address corresponding to the second node, and the identifier of the analog node is a plurality of virtual IPs allocated to the plurality of analog nodes.
Although the simulation node can send the generated heartbeat message to the second node according to the prestored identifier of the second node, when the second node replies the response message, the response message cannot be sent to the simulation node because the heartbeat message sent by the simulation node carries the virtual IP corresponding to the simulation node.
Therefore, the next-hop routing table item corresponding to the first node can be added in the routing table maintained by the second node, so that the second node can search the routing table maintained by the second node when replying the heartbeat message sent by the analog node, search the real IP address corresponding to the first node according to the virtual IP corresponding to the analog node, and send the response message to the analog node according to the real IP address corresponding to the first node.
In addition, the plurality of first heartbeat messages can be generated in parallel and uniformly sent to the second node, and further, the number of the first heartbeat messages can be increased by increasing the number of the simulation nodes, so that the resource bottleneck can be rapidly positioned.
Step 103, receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; and the second heartbeat message is sent according to the identification of the first node.
In this embodiment, the first node may receive a second heartbeat packet corresponding to the first heartbeat packet sent by the second node.
It should be noted that, the response message, that is, the second heartbeat message, is generated based on the link layer discovery protocol after the second node processes the first heartbeat message sent by the first node, and is sent to the first node according to the identifier of the first node.
In one embodiment shown, the first heartbeat message may be encapsulated as a VXLAN message; and forwarding the VXLAN message to the second node according to the prestored identifier of the second node.
Further, in response to the second node receiving the VXLAN message, VXLAN decapsulation may be performed on the VXLAN message to obtain a first heartbeat message after the VXLAN decapsulation; and processing the first heartbeat message after the VXLAN decapsulation.
The VXLAN (Virtual Extensible Local Area Network ) is a network virtualization technology, is an extension of VLAN (Virtual Local Area Network ) and can well solve the problem that VLAN technology cannot meet the requirement of insufficient virtual network of a large-scale cloud computing data center.
For example, software for implementing encapsulation and decapsulation of the message VXLAN may be installed on the first node and the second node, where the identifier of the second node may be VXLAN of the second node, and after the first heartbeat message is encapsulated into the VXLAN message, the VXLAN message may be forwarded to the second node according to the pre-stored VXLAN of the second node.
Further, after receiving the VXLAN message, the second node may perform VXLAN decapsulation operation on the VXLAN message, thereby obtaining a first heartbeat message after VXLAN decapsulation, and processing the first heartbeat message after VXLAN decapsulation.
Step 104, calculating a time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
In this embodiment, as can be seen from the foregoing, the MIB maintained by the first node device records time information corresponding to the first heartbeat message and time information corresponding to the second heartbeat message, and whether the second node has an abnormality can be determined by calculating a time interval between the first heartbeat message and the second heartbeat message and determining whether the time interval reaches a preset threshold.
For example, assuming that the heartbeat message is sent once every 10 seconds, and the threshold of the time interval is set to 30 seconds, if the calculated time interval between the time when the second node sends the second heartbeat message and the time when the first node sends the first heartbeat message reaches 30 seconds, it is indicated that the second node has an abnormality.
In the process, on one hand, the problem of coverage test of the data layer in a large-scale test scene can be solved; on the other hand, the dependence on physical nodes can be effectively reduced, and the test cost is saved.
In one embodiment shown, the first node comprises a computing node and the second node comprises a gateway node.
Referring to fig. 2, fig. 2 is a flowchart of a network testing method according to an exemplary embodiment, including the following steps:
step 201, selecting a gateway node and a computing node to be tested.
Taking a cloud computing scene as an example, a gateway node and a computing node to be detected can be selected from a cloud computing cluster. The computing node can be used as a real physical node to send a heartbeat message to the gateway node, and a plurality of simulation nodes can be deployed on the computing node to simulate the process of sending the heartbeat message to the gateway node through the simulation nodes, so that the connectivity test of the data layer is performed.
Step 202, newly adding a next-hop routing table entry corresponding to the computing node on a routing table maintained by the gateway node to be tested.
From the foregoing, it can be seen that the gateway node cannot send the response message to the computing node according to the identifier allocated to the analog node, so that the routing table maintained on the gateway node needs to be searched, and the identifier of the computing node is determined by the identifier of the analog node, so that the gateway node replies the response message for the heartbeat message sent by the analog node according to the identifier of the computing node.
Step 203, registering the simulated node information.
From the foregoing, the SDN may create a network that may be centrally managed, and the computing nodes may register the required information of the emulated nodes from the control layer and create corresponding ports. By this step, a plurality of simulation nodes can be constructed at a time, so that a number of 4k, 8k, or even 16k calculation nodes are simulated. Further, the gateway node may obtain the information of the registered analog node from the centralized management program, so as to verify whether the analog node is a pre-registered analog node when receiving the heartbeat message of the analog node, if so, reply the response message, and if not, discard the message.
Step 204, deploying a simulation node.
After registering the number of analog nodes and the information corresponding to each analog node, each analog node is assigned a corresponding identification.
Step 205, send heartbeat message.
The simulation node can generate a heartbeat message based on a link layer discovery protocol, package the heartbeat message into a VXLAN message, and forward the VXLAN message to the gateway node according to a pre-stored vxlanip of the gateway node.
The heartbeat message carries an identifier corresponding to the analog node.
In step 206, the gateway node processes the heartbeat message.
The gateway node may perform VXLAN decapsulation on the VXLAN packet first to obtain a first heartbeat packet after VXLAN decapsulation, and then process the heartbeat packet after VXLAN decapsulation.
Step 207, the gateway node replies with a response message.
The gateway node may generate a response message for replying to the heartbeat message based on the link layer discovery protocol. The gateway node may determine the identity of the computing node according to the foregoing routing table, and send the response message according to the identity of the computing node.
Step 208, the computing node calculates a time interval between the heartbeat message and the response message.
When receiving each response message replied by the gateway node, the computing node calculates the time interval between the heartbeat message and the corresponding response message according to the time when each simulated node sends the heartbeat message and the time when the gateway node replies the response message aiming at the heartbeat message.
Step 209, determining whether the time interval reaches a preset threshold.
Judging whether the time interval reaches a preset threshold value, if so, judging that the second node is abnormal by overtime of the time for the gateway node to reply the response message.
For example, assuming 1000 analog nodes, if the gateway node replies to the heartbeat messages sent by the analog nodes within a preset time interval, it may be determined that the gateway node works normally; if there are N analog nodes, the time interval for the gateway node to reply to the response message reaches the preset threshold, and then it can be determined whether the gateway node has an abnormality according to whether the number of N is within the acceptable range.
In the process, on one hand, the control layer and the data layer in a large-scale test scene can be effectively tested and covered, on the other hand, a plurality of simulation nodes can be deployed on a single node, heartbeat messages are generated through the simulation nodes, and response messages are analyzed to simulate the real communication process between the physical nodes and the gateway nodes, so that the large-scale test of the data layer is realized, physical resources are saved, and the test cost is greatly reduced. And by constructing the heartbeat message in parallel by a plurality of simulation nodes and sending and analyzing the heartbeat message, the resource bottleneck can be positioned more rapidly, so that the bug repair and optimization time is improved.
Exemplary apparatus
Having described the method of exemplary embodiments of the present disclosure, reference is next made to fig. 3, which is a block diagram of a network testing apparatus provided by an exemplary embodiment.
The implementation process of the functions and roles of each module in the following device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein. For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments.
As shown in fig. 3, the network testing apparatus 300 may include: a generating module 301, a transmitting module 302, a receiving module 303 and a calculating module 304. Wherein:
the generating module 301 is configured to generate a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
the sending module 302 is configured to send the first heartbeat message to the second node according to the prestored identifier of the second node, so that the second node processes the first heartbeat message;
the receiving module 303 is configured to receive a second heartbeat message corresponding to the first heartbeat message, which is sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
The calculating module 304 is configured to calculate a time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
In an embodiment, the link layer discovery protocol pre-expands at least a first field, a second field, and a third field; the first field comprises a first time when the local node sends a heartbeat message, the second field comprises a time when the opposite node sends a response message corresponding to the heartbeat message, and the third field comprises an identifier of the local node.
In an embodiment, the first node comprises a computing node and the second node comprises a gateway node.
In one embodiment, the first node has a plurality of analog nodes pre-deployed thereon;
the generating module 301 further:
the plurality of analog nodes generate a plurality of first heartbeat messages based on the link layer discovery protocol, respectively.
In an embodiment, the method further comprises:
the identification module 305 is configured to generate an identification corresponding to each analog node, so that the second node replies the heartbeat message sent by the analog node according to the identification of the analog node.
In an embodiment, the routing table maintained by the second node includes a next-hop routing table entry corresponding to the first node;
the second node replies a heartbeat message sent by the simulation node according to the identification of the simulation node, and the method comprises the following steps:
and the second node determines the identification of the first node corresponding to the identification of the simulation node through the next-hop routing table entry, and replies the heartbeat message sent by the simulation node according to the identification of the first node.
In an embodiment, the sending module 302 further:
encapsulating the first heartbeat message into a VXLAN message;
forwarding the VXLAN message to the second node according to the prestored identifier of the second node;
the second node processes the first heartbeat message, including:
responding to the second node to receive the VXLAN message, and performing VXLAN decapsulation on the VXLAN message to obtain a first heartbeat message after the VXLAN decapsulation;
and processing the first heartbeat message after the VXLAN decapsulation.
The specific details of the above-mentioned respective modules of the network test apparatus 300 have been described in detail in the foregoing description of the flow of the word vector compression method based on the frequency domain transformation, and thus are not described herein again.
It should be noted that although several modules or units of the network test apparatus 300 are mentioned in the above detailed description, such partitioning is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Exemplary Medium
Having described the apparatus of the exemplary embodiments of the present disclosure, reference is next made to fig. 4, where fig. 4 is a schematic diagram of a network test medium provided by an exemplary embodiment.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 4, a readable storage medium 40 for implementing the above-described method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the readable storage medium of the present disclosure is not limited thereto, and in this document, the readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable 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), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Exemplary computing device
Having described the methods, media, and apparatus of exemplary embodiments of the present disclosure, reference is next made to fig. 5, where fig. 5 is a schematic diagram of an electronic device capable of implementing the methods provided by an exemplary embodiment.
An electronic device 500 according to such an embodiment of the present disclosure is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of electronic device 500 may include, but are not limited to: the at least one processing unit 501, the at least one memory unit 502, and a bus 503 connecting the various system components, including the memory unit 502 and the processing unit 501.
Wherein the storage unit stores program code executable by the processing unit 501 such that the processing unit 501 performs the steps of the various embodiments described herein above.
The memory unit 502 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 5021 and/or cache memory 5022, and may further include Read Only Memory (ROM) 5023.
The storage unit 502 may also include a program/usage tool 5024 having a set (at least one) of program modules 5025, such program modules 5025 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which may include the reality of a network environment, or some combination thereof.
The bus 503 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 504 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 500, and/or any device (e.g., router, modem, etc.) that enables the electronic device 500 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 505. Also, electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 506. As shown, the network adapter 506 communicates with other modules of the electronic device 500 over the bus 503. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
It should be noted that although several units/modules or sub-units/modules of the apparatus are mentioned in the above detailed description, this division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present disclosure. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Furthermore, although the operations of the methods of the present disclosure are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
While the spirit and principles of the present disclosure have been described with reference to several particular embodiments, it is to be understood that this disclosure is not limited to the particular embodiments disclosed nor does it imply that features in these aspects are not to be combined to benefit from this division, which is done for convenience of description only. The disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (14)

1. A network testing method applied to a first node, wherein a peer node of the first node is a second node, the method comprising:
generating a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
encapsulating the first heartbeat message into a VXLAN message; according to the prestored identification of the second node, the VXLAN message is sent to the second node, in order to respond to the received VXLAN message, VXLAN decapsulation is carried out on the VXLAN message by the second node, so that a first heartbeat message after the VXLAN decapsulation is obtained, and the first heartbeat message after the VXLAN decapsulation is processed;
Receiving a second heartbeat message corresponding to the first heartbeat message sent by the second node; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
calculating the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
2. The method of claim 1, the link layer discovery protocol pre-extends at least a first field, a second field, and a third field; the first field comprises a first time when the local node sends a heartbeat message, the second field comprises a time when the opposite node sends a response message corresponding to the heartbeat message, and the third field comprises an identifier of the local node.
3. The method of claim 1, the first node comprising a computing node and the second node comprising a gateway node.
4. The method of claim 1, the first node having a plurality of analog nodes pre-deployed thereon;
The generating a first heartbeat message based on the link layer discovery protocol includes:
the plurality of analog nodes generate a plurality of first heartbeat messages based on the link layer discovery protocol, respectively.
5. The method of claim 4, the method further comprising:
and respectively generating an identifier corresponding to each simulation node, so that the second node replies the heartbeat message sent by the simulation node according to the identifier of the simulation node.
6. The method of claim 5, wherein the routing table maintained by the second node includes a next hop routing table entry corresponding to the first node;
the second node replies a heartbeat message sent by the simulation node according to the identification of the simulation node, and the method comprises the following steps:
and the second node determines the identification of the first node corresponding to the identification of the simulation node through the next-hop routing table entry, and replies the heartbeat message sent by the simulation node according to the identification of the first node.
7. A network testing apparatus applied to a first node, a peer node of the first node being a second node, the apparatus comprising:
the generation module generates a first heartbeat message based on a link layer discovery protocol; wherein, the first heartbeat message at least comprises the identification of the first node;
The sending module packages the first heartbeat message into a VXLAN message; according to the prestored identification of the second node, the VXLAN message is sent to the second node, in order to respond to the received VXLAN message, VXLAN decapsulation is carried out on the VXLAN message by the second node, so that a first heartbeat message after the VXLAN decapsulation is obtained, and the first heartbeat message after the VXLAN decapsulation is processed;
the receiving module is used for receiving a second heartbeat message which is sent by the second node and corresponds to the first heartbeat message; wherein the second heartbeat message is generated based on the link layer discovery protocol; the second heartbeat message is sent according to the identification of the first node;
the calculation module calculates the time interval between the first heartbeat message and the second heartbeat message according to the time information corresponding to the first heartbeat message and the time information corresponding to the second heartbeat message; and determining that the second node is abnormal in response to the time interval reaching a preset threshold.
8. The apparatus of claim 7, the link layer discovery protocol pre-extends at least a first field, a second field, and a third field; the first field comprises a first time when the local node sends a heartbeat message, the second field comprises a time when the opposite node sends a response message corresponding to the heartbeat message, and the third field comprises an identifier of the local node.
9. The apparatus of claim 7, the first node comprising a computing node and the second node comprising a gateway node.
10. The apparatus of claim 7, the first node having a plurality of analog nodes pre-deployed thereon;
the generation module further:
the plurality of analog nodes generate a plurality of first heartbeat messages based on the link layer discovery protocol, respectively.
11. The apparatus of claim 10, the apparatus further comprising:
the identification module is used for respectively generating an identification corresponding to each simulation node so that the second node replies the heartbeat message sent by the simulation node according to the identification of the simulation node.
12. The apparatus of claim 11, the second node maintaining a routing table comprising a next hop routing table entry corresponding to the first node;
the second node replies a heartbeat message sent by the simulation node according to the identification of the simulation node, and the method comprises the following steps:
and the second node determines the identification of the first node corresponding to the identification of the simulation node through the next-hop routing table entry, and replies the heartbeat message sent by the simulation node according to the identification of the first node.
13. A storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any of claims 1-6.
14. A computing device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any of claims 1-6 by executing the executable instructions.
CN202210066985.2A 2022-01-20 2022-01-20 Network testing method, device, medium and computing equipment Active CN114513437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210066985.2A CN114513437B (en) 2022-01-20 2022-01-20 Network testing method, device, medium and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210066985.2A CN114513437B (en) 2022-01-20 2022-01-20 Network testing method, device, medium and computing equipment

Publications (2)

Publication Number Publication Date
CN114513437A CN114513437A (en) 2022-05-17
CN114513437B true CN114513437B (en) 2023-05-16

Family

ID=81549729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210066985.2A Active CN114513437B (en) 2022-01-20 2022-01-20 Network testing method, device, medium and computing equipment

Country Status (1)

Country Link
CN (1) CN114513437B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560309B1 (en) * 2017-10-11 2020-02-11 Juniper Networks, Inc. Identifying a root cause of alerts within virtualized computing environment monitoring system
WO2020081465A1 (en) * 2018-10-17 2020-04-23 Cisco Technology, Inc. Tenant-specific encryption of packets carried in multi-cloud networks
WO2020114017A1 (en) * 2018-12-04 2020-06-11 南京中兴新软件有限责任公司 Data center traffic exchange method and apparatus, device and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10061664B2 (en) * 2015-01-15 2018-08-28 Cisco Technology, Inc. High availability and failover
US9692690B2 (en) * 2015-08-03 2017-06-27 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for path monitoring in a software-defined networking (SDN) system
CN105515901B (en) * 2015-11-27 2019-01-22 努比亚技术有限公司 Message process device and method
CN105812181B (en) * 2016-03-10 2019-08-02 同济大学 A kind of distributed communication system maintaining method towards high speed Maglev emulation
CN107171884A (en) * 2017-03-31 2017-09-15 武汉绿色网络信息服务有限责任公司 It is a kind of to realize the method that stability is flowed in VXLAN virtual networks
US10637781B2 (en) * 2018-03-28 2020-04-28 Nicira, Inc. Method for reliable data delivery between tunnel endpoints using BFD protocol
US10645201B2 (en) * 2018-07-31 2020-05-05 Vmware, Inc. Packet handling during service virtualized computing instance migration
CN109660380B (en) * 2018-09-28 2022-09-06 深圳壹账通智能科技有限公司 Server running state monitoring method, platform, system and readable storage medium
CN113114535A (en) * 2021-04-12 2021-07-13 北京字跳网络技术有限公司 Network fault detection method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560309B1 (en) * 2017-10-11 2020-02-11 Juniper Networks, Inc. Identifying a root cause of alerts within virtualized computing environment monitoring system
WO2020081465A1 (en) * 2018-10-17 2020-04-23 Cisco Technology, Inc. Tenant-specific encryption of packets carried in multi-cloud networks
WO2020114017A1 (en) * 2018-12-04 2020-06-11 南京中兴新软件有限责任公司 Data center traffic exchange method and apparatus, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于VXLAN的央行省级数据中心大二层网络探索与研究;刘萌;;中国金融电脑(第08期);全文 *
大二层网络在双活数据中心建设中的应用思考;田冬阳;;电脑与电信(第10期);全文 *

Also Published As

Publication number Publication date
CN114513437A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
US11630646B2 (en) Software defined network controller
US10484265B2 (en) Dynamic update of virtual network topology
US10678444B2 (en) Optimizing serverless computing using a distributed computing framework
CN107800565B (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
US20210240587A1 (en) Cloud simulation and validation system
CN112311606A (en) Method for constructing virtual-real decoupling simulation network
US11847091B2 (en) Data transmission method and device for network on chip and electronic apparatus
CN105141449A (en) Addition method and device for monitoring configuration
US20200403878A1 (en) Dynamically identifying criticality of services and data sources
CN114422010B (en) Protocol testing method of satellite communication simulation platform based on network virtualization
US10969844B2 (en) Method and apparatus of controlling network node by providing a virtual power distribution unit
Abdelsalam et al. SRPerf: A performance evaluation framework for IPv6 segment routing
CN113849361B (en) Method, device, equipment and storage medium for testing service node
US20210377129A1 (en) Network building apparatus, network building method, non-transitory computer readable medium storing program
CN114513437B (en) Network testing method, device, medium and computing equipment
EP4207702A1 (en) Dynamic prediction of system resource requirement of network software in a live network using data driven models
US10200445B2 (en) Method for analyzing performance of network application program in software defined networking environment, apparatus therefor, and computer program therefor
CN108353017B (en) Computing system and method for operating multiple gateways on a multi-gateway virtual machine
WO2022212050A1 (en) Route discovery for failure detection in computer networks
CN114297083A (en) Agent test method, device, electronic equipment and readable medium
CN108616453B (en) Method, device and system for network equipment
CN113934432A (en) Method, apparatus, and storage medium for deploying a machine learning model
CN111865640A (en) Network architecture description method and device
CN114828140B (en) Service flow message forwarding method and device, storage medium and electronic equipment
CN115242895B (en) DPDK-based local access method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou NetEase Shuzhifan Technology Co.,Ltd.

Address before: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU LANGHE TECHNOLOGY Ltd.