CN112532482A - Shunting equipment testing method and device - Google Patents

Shunting equipment testing method and device Download PDF

Info

Publication number
CN112532482A
CN112532482A CN202011339296.1A CN202011339296A CN112532482A CN 112532482 A CN112532482 A CN 112532482A CN 202011339296 A CN202011339296 A CN 202011339296A CN 112532482 A CN112532482 A CN 112532482A
Authority
CN
China
Prior art keywords
service
shunting
services
server
tested
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.)
Granted
Application number
CN202011339296.1A
Other languages
Chinese (zh)
Other versions
CN112532482B (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 DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202011339296.1A priority Critical patent/CN112532482B/en
Publication of CN112532482A publication Critical patent/CN112532482A/en
Application granted granted Critical
Publication of CN112532482B publication Critical patent/CN112532482B/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/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure provides a shunt device testing method and a device thereof. The method comprises the following steps: acquiring the number of servers corresponding to each service in the services corresponding to the to-be-tested distribution equipment; generating flow information according to the number of servers corresponding to each service, wherein the flow information comprises m test messages, in the MAC address code of the ith test message, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of the servers corresponding to the previous j-1 services, the server identification values corresponding to other services are all first preset values, i is more than 0 and less than or equal to m, j is more than 0, and m is equal to the sum of the numbers of the servers corresponding to all the services; sending the flow information to the shunting equipment to be tested; and determining whether the shunting function and the copying function of the shunting equipment to be tested are normal or not according to the number of the feedback information at the output port of the server connected with the shunting equipment to be tested. The embodiment of the disclosure can improve the test efficiency and the test accuracy of the shunt switch.

Description

Shunting equipment testing method and device
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a shunting device testing method, apparatus, system, and electronic device capable of improving shunting device testing efficiency.
Background
With the development of the IP network technology and the gradual popularization of big data, how to correctly and on-demand shunt and audit more and more big data and large traffic service messages becomes a problem that needs to be solved urgently. The distribution switch is a main tool for distributing and copying service messages, and can copy received messages into multiple copies according to transmission characteristics of the messages (such as MAC, IP, port numbers and the like carried by the messages), and distribute the copies to different service-related devices for equal processing.
The MAC address code distribution mode based on the designated computing unit is a distribution switch message processing mode for performing service replication and distribution according to the MAC address carried by the message. In the related art, to perform function verification by copying and shunting the shunting way for the shunting switch, a large amount of complicated case design and flow preparation are needed, the efficiency is low, and comprehensive testing cannot be achieved.
Therefore, ensuring the normal operation of the shunting switch is an important link of network data processing, and how to quickly and effectively test the shunting capacity and the replication capacity of the shunting switch becomes an important subject.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method, an apparatus, a system and an electronic device for testing a shunting device, which are used to overcome the problems of tedious testing process, low efficiency, incomplete testing and the like of a shunting switch due to limitations and defects of related technologies at least to a certain extent.
According to a first aspect of the embodiments of the present disclosure, a method for testing a shunting device is provided, including: acquiring the number of servers corresponding to each service in the services corresponding to the to-be-tested distribution equipment; generating a piece of flow information according to the number of servers corresponding to each service, wherein the flow information comprises m test messages, in the MAC address code of the ith test message, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of the servers corresponding to the previous j-1 services, the server identification values corresponding to other services are all first preset values, i is more than 0 and less than or equal to m, j is more than 0, and m is equal to the sum of the numbers of the servers corresponding to all the services; sending the flow information to the to-be-tested shunting equipment; and determining whether the distribution function and the copy function of the distribution equipment to be tested are normal or not according to the number of feedback information at the output port of the server connected with the distribution equipment to be tested.
In an exemplary embodiment of the present disclosure, the determining, according to feedback information of an output port of a server connected to the to-be-tested shunt device, whether the shunt function and the copy function of the to-be-tested shunt device are normal includes: judging whether the number of feedback information of the output port of the server with the sequence number of the jth service being the first preset value is equal to m-Nj +1 or not to obtain a first judgment result, wherein Nj is the number of servers corresponding to the jth service; judging whether the quantity of feedback information of output ports of other servers of the jth service is equal to 1 or not to obtain a second judgment result; and when the first judgment result and the second judgment result corresponding to all the services are yes, judging that the shunting function and the replication function of the shunting equipment to be tested are normal.
In an exemplary embodiment of the present disclosure, in the MAC address coding of each test packet, the network card ring number identification value corresponding to each service is a second preset value.
In an exemplary embodiment of the present disclosure, further comprising: acquiring network card ring number identification bits of message MAC address codes corresponding to each service; in the MAC address coding of the ith test message, the bit number n occupied by the network card ring number identification value corresponding to the jth service is the ratio of the server identification value k to the network card ring number identification bit number corresponding to the jth service.
In an exemplary embodiment of the present disclosure, the obtaining the number of servers corresponding to each service in the services corresponding to the to-be-tested distribution device includes: acquiring a server identification bit number of a message MAC address code corresponding to each service from a primary shunting device; and determining the number of servers corresponding to each service according to the number of the server identification bits.
In an exemplary embodiment of the present disclosure, the number of services corresponding to the to-be-tested offloading device is 8, and the number of bits of the MAC address code occupied by each service is not completely the same.
According to a second aspect of the present disclosure, there is provided a shunt device test system, including: a routing device; the primary shunting equipment is connected with the routing equipment; the second-level shunting equipment is connected with the first-level shunting equipment and is provided with a plurality of server output ports, and the plurality of server output ports are grouped according to services; each server is correspondingly connected with one server output port; the test device is connected with the secondary shunt device and used for executing the method to test whether the shunt function and the copy function of the secondary shunt device are normal.
According to a third aspect of the embodiments of the present disclosure, there is provided a shunt device testing apparatus, including: the parameter acquisition module is set to acquire the number of servers corresponding to each service in the services corresponding to the to-be-tested distribution equipment; the message generation module is configured to generate a piece of flow information according to the number of servers corresponding to each service, the flow information includes m test messages, in the MAC address code of the ith test message, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of servers corresponding to the first j-1 services, the server identification values corresponding to other services are first preset values, i is greater than 0 and less than or equal to m, j is greater than 0, and m is equal to the sum of the numbers of servers corresponding to all the services; the message sending module is configured to send the flow information to the to-be-tested flow distribution equipment; and the feedback judgment module is set to determine whether the shunting function and the copying function of the shunting equipment to be tested are normal according to the number of feedback information returned from the output port of the server connected with the shunting equipment to be tested.
According to a fourth aspect of the present disclosure, there is provided a shunt device testing apparatus, including: a memory; and a processor coupled to the memory, the processor configured to perform the method of any of the above based on instructions stored in the memory.
According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium, on which a program is stored, which when executed by a processor, implements the shunting device testing method as set forth in any one of the above.
According to the shunting device testing method provided by the embodiment of the disclosure, a flow is constructed according to the MAC address information corresponding to a plurality of services corresponding to the shunting device to be tested, and a group of test messages capable of simultaneously testing the copying capability and the shunting capability of the shunting device on the messages are generated, so that the complex process of separating and testing the copying capability and the shunting capability of the shunting device in the related technology can be avoided, the testing efficiency of the shunting device is effectively improved, and the comprehensiveness and the accuracy of the test can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 is a schematic diagram of a test system of a shunt device in an exemplary embodiment of the present disclosure.
Fig. 2 is a diagram of a MAC address encoding.
Fig. 3 is a flowchart of a test method of a shunting device in an exemplary embodiment of the present disclosure.
Fig. 4 is a sub-flowchart of step S4 in an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram of a test apparatus of a shunting device in an exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram of an electronic device in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Further, the drawings are merely schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus, a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The following detailed description of exemplary embodiments of the disclosure refers to the accompanying drawings.
FIG. 1 is a schematic diagram of a shunt device test system for use with embodiments of the present disclosure.
Referring to fig. 1, a system 100 may include:
a routing device 11;
the primary shunting device 12 is connected with the routing device 11;
the secondary shunting device 13 is connected with the primary shunting device 12, and is provided with a plurality of server output ports 131, and the plurality of server output ports 131 are grouped according to services;
a plurality of servers 14, wherein each server 14 is correspondingly connected with one server output port 131;
the test device 15 is connected to the secondary shunt device 13, and is used in the shunt device test method provided by the embodiment of the present disclosure to test whether the shunt function and the copy function of the secondary shunt device 13 are normal.
In the system 100, the routing device 11 may be, for example, a router or a switch. The routing device 11 receives the service packet and forwards the service packet to the primary offloading device 12.
The primary offloading device 12 determines which service or services the service packet is processed by according to the attribute of the service packet. When one service packet corresponds to a plurality of services, the primary offloading device 12 generates an MAC address code designating a computing unit (i.e., designates which CPU core of which server corresponding to which service the service packet is processed), and issues the MAC address code and the service packet to the secondary offloading device 13.
The secondary shunting device 13 is, for example, a shunting switch. After receiving the service message and the MAC address code thereof, the secondary offloading device 13 parses the MAC address code, and when determining that the service message only relates to one service, offloads the service message to a server output port of a designated server corresponding to the service according to information of the MAC address code, and specifies which CPU core of the designated server processes the service message; when the service message is judged to relate to a plurality of different services, the service message is copied, the copied service message is distributed to a server output port of a designated server corresponding to the service, and the CPU core of the designated server is designated to process the service message.
The server 14 receives and processes the service message through the corresponding server output port.
The MAC address code generated by the primary offload device 12 consists of SMAC (source MAC address) and DMAC (destination MAC address). In general, the MAC address coding formed by the SMAC and the DMAC together can accommodate the processing information of 8 services, and the number of information bits corresponding to each service is not exactly the same. The information corresponding to each service consists of a server serial number (numbered from 1) and a server network card ring number (numbered from 0), the first-stage shunting device converts the server serial number and the server network card ring number of the corresponding service into binary numbers to be filled into the SMAC or the DMAC, and finally converts the SMAC and the DMAC into 16-system MAC addresses. The information bit number occupied by the server serial number of different services and the information bit number occupied by the server network card ring number are not completely the same. The SMAC and DMAC have 48 bits, so that the information bit number occupied by a single service does not exceed 48 bits.
Fig. 2 is a diagram of a MAC address encoding.
Referring to fig. 2, the MAC address code is composed of SMAC and DMAC, the DMAC carries the computing unit information of services 8 to 5, and the SMAC address carries the computing unit information of services 4 to 1. And the computing unit information corresponding to each service comprises server serial number information and network card ring number information. For example, as shown in fig. 2, the server serial number of the service 8 occupies 47 th to 41 th bits of the DMAC, and the network card ring number occupies 40 th to 36 th bits of the DMAC; the server serial number of the service 6 occupies 21 st to 17 th bits of the DMAC, and the network card ring number occupies 16 th to 12 th bits of the DMAC; the server serial number of the service 3 occupies the 38 th to 29 th bits of the SMAC, and the network card ring number occupies the 28 th to 24 th bits of the SMAC; the server serial number of the service 1 occupies 11 th to 5 th bits of the SMAC, and the network card ring number occupies 4 th to 0 th bits of the SMAC.
The above occupying mode is only an example, and those skilled in the art can allocate MAC address resources and occupy the position and length of the MAC address code by the service according to each service requirement, which is not limited in the present disclosure.
In the embodiment shown in fig. 2, when one service packet only needs to be processed by the service 3, the primary offloading device 12 identifies the server serial number of the service 3 at bits 38 to 29 of the SMAC, and identifies the server target CPU core number of the service 3 at bits 28 to 24. If the serial number of the server that needs to receive the packet in the service 3 is 2 and the core number of the target CPU is 3, the SMAC address output by the primary offloading device 12 is 0000.4300.0000, and the DMAC address is 0000.0000.0000. And the second-stage shunting device 13 shunts the service message to the 2 nd server output port corresponding to the service 3 according to the MAC address code.
Fig. 3 is a flowchart of a test method of a shunting device in an exemplary embodiment of the present disclosure.
Referring to fig. 3, a shunt device testing method 300 may include:
step S1, acquiring the number of servers corresponding to each service in the services corresponding to the distribution equipment to be tested;
step S2, generating a piece of flow information according to the number of servers corresponding to each service, wherein the flow information includes m test messages, in the MAC address code of the ith test message, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of servers corresponding to the previous j-1 services, the server identification values corresponding to other services are all first preset values, i is greater than 0 and less than or equal to m, j is greater than 0, and m is equal to the sum of the numbers of servers corresponding to all the services;
step S3, sending the flow information to the to-be-tested flow distribution equipment;
step S4, determining whether the distribution function and the copy function of the distribution device to be tested are normal according to the number of the feedback information at the output port of the server connected to the distribution device to be tested.
According to the shunting device testing method provided by the embodiment of the disclosure, a flow is constructed according to the MAC address information corresponding to a plurality of services corresponding to the shunting device to be tested, and a group of test messages capable of simultaneously testing the copying capability and the shunting capability of the shunting device on the messages are generated, so that the complex process of separating and testing the copying capability and the shunting capability of the shunting device in the related technology can be avoided, the testing efficiency of the shunting device is effectively improved, and the comprehensiveness and the accuracy of the test can be improved.
The steps of the split-flow device testing method 100 are described in detail below.
In step S1, the number of servers corresponding to each service in the services corresponding to the distribution device to be tested is obtained.
In this embodiment of the present disclosure, the testing device 15 may be connected to the first shunting device 12, read a setting scheme of an information bit occupied by each service by the first shunting device 12, determine a server identification number of a message MAC address corresponding to each service, and further determine the number of servers corresponding to the service according to a scale (for example, a 16 scale) of the message. In other embodiments, the number of servers corresponding to each service may also be determined manually and input into the testing device 15.
In step S2, a piece of traffic information is generated according to the number of servers corresponding to each service, where the traffic information includes m test packets, in the MAC address code of the ith test packet, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of servers corresponding to the first j-1 services, the server identification values corresponding to other services are all the first preset values, i is greater than 0 and less than or equal to m, j is greater than 0, and m is equal to the sum of the numbers of servers corresponding to all the services.
In the embodiment of the present disclosure, each test packet relates to all services, and at the same time, the test packet included in one flow covers all the server output ports 131 of the secondary shunting device 13, so that the replication capability and the shunting capability of the secondary shunting device 13 can be simultaneously tested by using one test packet, and the shunting capability of the secondary shunting device 13 to all the server output ports can be tested by using m test packets.
In order to perform the performance and specification test in a comprehensive manner, the embodiment of the present disclosure sets the server identification value of the MAC address code of the multiple test packets in each service to be increased from 0 to the specification size. Therefore, in the embodiment of the present disclosure, the MAC address code of the test packet is set according to the service order and the server serial number, and in the MAC address code of the ith test packet, the server identifier k corresponding to the jth service is set to be the difference between i and the sum of the numbers of servers corresponding to all previous services.
Taking the MAC address code space occupying scheme shown in fig. 2 as an example, if the server identification value and the network card ring identification value of the service 7 computing unit occupy 35 th-27 th bits and 26 th-22 th bits of DMAC, respectively, the server identification value and the network card ring identification value of the service 5 computing unit occupy 11 th-5 th bits and 4 th-0 th bits of DMAC, respectively, the server identification value and the ring identification value of the service 4 computing unit occupy 47 th-44 th bits and 43 th-39 th bits of SMAC, respectively, and the server identification value and the network card ring identification value of the service 2 computing unit occupy 23 th-17 th bits and 16 th-12 th bits of SMAC, respectively.
In the embodiment of the present disclosure, the network card ring identifier value corresponding to each service is a second preset value, which may be set in the MAC address code of each test packet.
In other embodiments, because the splitter switch (the second splitter device 13) does not care about the network card ring number, but leaves enough bits for the corresponding network card ring number, it is possible to perform the test of different numbers of bits of the network card ring number for each group of traffic. For example, the network card ring number identification bit (40 th to 36 th bits) of service 1 occupies 5 bits, so the network card ring number scheme of the test message corresponding to service 1 may set the nth bit as 1 according to the sequence of the messages, for example, the network card ring number identification value of the first test message occupies 0 bit (i.e., 0), the network card ring number flag value of the second test message occupies 1 bit (i.e., 1), and so on, the network card ring number flag value of the sixth test message occupies 5 bits (i.e., 31), thereby testing the influence of different network card ring numbers on the device shunting.
That is, the network card ring identification number of the message MAC address code corresponding to each service may be obtained and set in the MAC address code of the i-th test message, and the number n of bits occupied by the network card ring identification value corresponding to the j-th service is the remainder of the ratio of the server identification value k to the network card ring identification number of bits corresponding to the j-th service.
When the first preset value and the second preset value are both set to be 1 (that is, the test message is designated to be copied to the first CPU core of the first server of the non-target service for processing), the initial MAC address code of the test message for the service 8 may be set to 1080-; by analogy, the initial MAC address of the test packet for the service 7 is encoded as 1080-; the initial MAC address coding of the test packet for the service 6 is 1080-; the initial MAC address coding of the test packet for service 5 is 1080-; the initial MAC address coding of the test packet for service 4 is 1080-; the initial MAC address coding of the test packet for service 4 is 1080-; the initial MAC address coding of the test packet for service 3 is 1080-; the initial MAC address encoding of the test packet for service 1 is 1080-. Through the design of the test flow, when each group of services is tested, the corresponding service group meets the maximum corresponding server identification value, and each server has the corresponding service flow, and the services can copy one flow for other service groups at the same time.
In step S3, the traffic information is sent to the shunting device to be tested.
In this step, the test equipment 15 directly sends the traffic information to the second splitter equipment 13.
In step S4, it is determined whether the shunting function and the copy function of the to-be-tested shunting device are normal according to the number of the feedback information at the output port of the server to which the to-be-tested shunting device is connected.
When a server output port receives a service message and forwards the service message to a corresponding server, the server output port generates a feedback message to record the forwarding. Therefore, whether the shunting device under test is normal is determined in step S4 by checking the number of the returned feedback information of each server output port.
Fig. 4 is a sub-flowchart of step S4 in the embodiment of the present disclosure.
Referring to fig. 4, step S4 may include:
step S41, setting j equal to 1;
step S42, judging whether the number of feedback information of the output port of the server with the sequence number of the jth service being the first preset value is equal to m-Nj +1 to obtain a first judgment result, wherein Nj is the number of servers corresponding to the jth service;
step S43, determining whether the number of feedback information at the output ports of other servers of the jth service is equal to 1 to obtain a second determination result;
step S44, when the first judgment result and the second judgment result corresponding to the jth service are both yes, the step S45 is executed, otherwise, the step S48 is executed to judge that the shunting function and the copying function of the shunting equipment to be tested are abnormal;
step S45, determining whether j is the maximum value of the service number, if not, proceeding to step S46 to make j equal to j +1, and returning to step S42; if yes, go to step S47;
and step S47, judging that the shunting function and the copying function of the shunting equipment to be tested are normal.
By checking the quantity of the feedback information at the output port of each server, the test result can be rapidly and comprehensively output, and the test accuracy is effectively improved.
The embodiment of the disclosure can ensure that the test message is copied among the services while testing each service to normally shunt in the maximum interface range by carrying out flow design according to the services, and the test method can ensure that the specification test is carried out while the test shunt switch shunts based on the MAC address code of the appointed computing unit, simplifies the test method and improves the efficiency.
Corresponding to the above method embodiment, the present disclosure further provides a shunt device testing apparatus, which may be used to execute the above method embodiment.
Fig. 5 is a block diagram of a test apparatus for a shunting device in an exemplary embodiment of the present disclosure.
Referring to fig. 5, the shunt device testing apparatus 500 may include:
the parameter obtaining module 51 is configured to obtain the number of servers corresponding to each service in the services corresponding to the distribution equipment to be tested;
a message generating module 52, configured to generate a piece of traffic information according to the number of servers corresponding to each service, where the traffic information includes m test messages, in an MAC address code of an ith test message, a server identification value k corresponding to a jth service is a difference between i and a sum of the numbers of servers corresponding to the first j-1 services, server identification values corresponding to other services are first preset values, where i is greater than 0 and less than or equal to m, j is greater than 0, and m is equal to the sum of the numbers of servers corresponding to all the services;
the message sending module 53 is configured to send the traffic information to the to-be-tested distribution device;
the feedback judgment module 54 is configured to determine whether the shunting function and the replication function of the to-be-tested shunting device are normal according to the number of the feedback information at the output port of the server connected to the to-be-tested shunting device.
Since the functions of the apparatus 500 have been described in detail in the corresponding method embodiments, the disclosure is not repeated herein.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division 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, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, and a bus 630 that couples the various system components including the memory unit 620 and the processing unit 610.
Wherein the storage unit stores program code that is executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 3.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 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 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. As shown, the network adapter 660 communicates with the other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In summary, in the present network, when the MAC address code based on the designated computing unit is used to pass through the shunting switch, the first-stage shunting device performs the related MAC address code, and then the shunting switch performs the shunting, and the same traffic may have corresponding MAC address codes in different service units, so that the shunting needs to be performed in the same service range according to the MAC address code of the same service unit, and the same traffic replication relationship exists between different service ranges. In the test process, the flow setting and the design of the test case are carried out according to the methods of the same service shunting and different service copying, so that the test process can be greatly simplified. The identification of a service unit consists of a server number and a network card ring number, the flow distribution switch only needs to distribute flow according to the server number, and all the flow can be divided into 8 different services according to MAC address codes, so that one flow can be designed to simultaneously meet the coding requirements of the 8 services when the flow design is tested. In addition, in order to perform performance and specification tests, the number of the server requiring the MAC address coding of the equipment flow in each service is increased from 0 to the specification size. Taking fig. 2 as an example, if the server number and the network card ring number identification number of the service 7 calculation unit are 35-27 bits and 26-22 bits, respectively, the server number and the network card ring number identification number of the service 5 calculation unit are 11-5 bits and 4-0 bits, respectively, the server number and the ring number identification number of the service 4 calculation unit are 47-44 bits, and the server number and the network card ring number identification number of the service 2 calculation unit are 23-17 bits and 16-12 bits, respectively. The MAC address coding for the traffic of the eighth service can be designed as 0210-; by analogy, the MAC address of the MAC for the traffic of the seventh service is coded as 0210-; the MAC address of the MAC for the traffic of the sixth service is encoded as 0210-; the MAC address of the MAC for the traffic of the fifth service is encoded as 0210-; the MAC address code of the MAC for the flow of the fourth service is 0210-; the MAC address code of the MAC for the traffic of the third service is 0210-; the MAC address code of the MAC for the traffic of the second service is 0210-; the MAC address of the MAC for the traffic of the first service is encoded as 0210-. Through the design of the test flow, when each group of services is tested, the corresponding service group meets the maximum corresponding server number and each server has the corresponding service flow, and the services can copy one flow for other service groups at the same time. In addition, since the splitter switch does not care about the network card ring number, but leaves enough bits for the corresponding network card ring number, it is possible to test different numbers of bits of the network card ring number for each group of traffic flows, but it is not necessary to test all possible network card ring numbers. For example, the identifier bits (40 th to 36 th) of the first network card ring number occupy 5 bits, so that 6 traffic corresponding to the first service can be designed, the first network card ring number is 0 bit (i.e., 0), the second network card ring number is 1 bit (i.e., 1), and so on, the 6 th network card ring number is 5 bits (i.e., 31). Therefore, the influence of different network card ring numbers on the equipment shunting can be tested. Meanwhile, when a test case is designed, in order to ensure that each flow of each group of services has an output interface, the number of the corresponding output interfaces is required to be the same as the incremental number of the corresponding server identification bits when the corresponding services are tested, and the output interfaces corresponding to other services can be set by self. The testing method can ensure that the specification test is carried out while the test shunting switch shunts based on the MAC address code of the appointed computing unit, simplifies the testing method and improves the efficiency.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, 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 (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
The program product for implementing the above method according to an embodiment of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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 program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 for aspects of the present invention 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A shunt device testing method is characterized by comprising the following steps:
acquiring the number of servers corresponding to each service in the services corresponding to the to-be-tested distribution equipment;
generating a piece of flow information according to the number of servers corresponding to each service, wherein the flow information comprises m test messages, in the MAC address code of the ith test message, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of the servers corresponding to the previous j-1 services, the server identification values corresponding to other services are all first preset values, i is more than 0 and less than or equal to m, j is more than 0, and m is equal to the sum of the numbers of the servers corresponding to all the services;
and sending the flow information to the to-be-tested flow distribution equipment.
2. And determining whether the distribution function and the copy function of the distribution equipment to be tested are normal or not according to the number of feedback information at the output port of the server connected with the distribution equipment to be tested.
3. The shunting device testing method according to claim 1, wherein the determining, according to the feedback information at the output port of the server to which the shunting device to be tested is connected, whether the shunting function and the copy function of the shunting device to be tested are normal includes:
judging whether the number of feedback information of the output port of the server with the sequence number of the jth service being the first preset value is equal to m-Nj +1 or not to obtain a first judgment result, wherein Nj is the number of servers corresponding to the jth service;
judging whether the quantity of feedback information of output ports of other servers of the jth service is equal to 1 or not to obtain a second judgment result;
and when the first judgment result and the second judgment result corresponding to all the services are yes, judging that the shunting function and the replication function of the shunting equipment to be tested are normal.
The shunting device test method according to claim 1, wherein in the MAC address code of each of the test packets, the network card ring number identification value corresponding to each of the services is a second preset value.
4. The shunt device testing method of claim 1, further comprising:
acquiring network card ring number identification bits of message MAC address codes corresponding to each service;
in the MAC address coding of the ith test message, the bit number n occupied by the network card ring number identification value corresponding to the jth service is the ratio of the server identification value k to the network card ring number identification bit number corresponding to the jth service.
5. The shunting device testing method according to claim 1, wherein the obtaining of the number of servers corresponding to each of the services in the services corresponding to the shunting device to be tested comprises:
acquiring a server identification bit number of a message MAC address code corresponding to each service from a primary shunting device;
and determining the number of servers corresponding to each service according to the number of the server identification bits.
6. The shunting device test method according to claim 1, wherein the number of services corresponding to the shunting device to be tested is 8, and the number of bits of the MAC address code occupied by each of the services is not completely the same.
7. A shunt device test system, comprising:
a routing device;
the primary shunting equipment is connected with the routing equipment;
the second-level shunting equipment is connected with the first-level shunting equipment and is provided with a plurality of server output ports, and the plurality of server output ports are grouped according to services;
each server is correspondingly connected with one server output port;
the testing device is connected with the secondary shunt device and used for executing the method of any one of claims 1 to 6 so as to test whether the shunt function and the copy function of the secondary shunt device are normal.
8. A shunt device testing arrangement, characterized by, includes:
the parameter acquisition module is set to acquire the number of servers corresponding to each service in the services corresponding to the to-be-tested distribution equipment;
the message generation module is configured to generate a piece of flow information according to the number of servers corresponding to each service, the flow information includes m test messages, in the MAC address code of the ith test message, the server identification value k corresponding to the jth service is the difference between i and the sum of the numbers of servers corresponding to the first j-1 services, the server identification values corresponding to other services are first preset values, i is greater than 0 and less than or equal to m, j is greater than 0, and m is equal to the sum of the numbers of servers corresponding to all the services;
the message sending module is configured to send the flow information to the to-be-tested flow distribution equipment;
and the feedback judgment module is set to determine whether the shunting function and the copying function of the shunting equipment to be tested are normal according to the number of feedback information returned from the output port of the server connected with the shunting equipment to be tested.
9. An electronic device, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the shunt device testing method of any of claims 1-7 based on instructions stored in the memory.
10. A computer-readable storage medium on which a program is stored, the program, when executed by a processor, implementing the shunt device testing method according to any one of claims 1 to 7.
CN202011339296.1A 2020-11-25 2020-11-25 Shunting equipment testing method and device Active CN112532482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011339296.1A CN112532482B (en) 2020-11-25 2020-11-25 Shunting equipment testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011339296.1A CN112532482B (en) 2020-11-25 2020-11-25 Shunting equipment testing method and device

Publications (2)

Publication Number Publication Date
CN112532482A true CN112532482A (en) 2021-03-19
CN112532482B CN112532482B (en) 2022-07-05

Family

ID=74994535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011339296.1A Active CN112532482B (en) 2020-11-25 2020-11-25 Shunting equipment testing method and device

Country Status (1)

Country Link
CN (1) CN112532482B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507448A (en) * 2021-06-17 2021-10-15 中国汽车技术研究中心有限公司 Security access service authentication method and system
CN117785585A (en) * 2024-01-05 2024-03-29 北京卓讯科信技术有限公司 Automatic testing method and device for convergence and diversion equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507448A (en) * 2021-06-17 2021-10-15 中国汽车技术研究中心有限公司 Security access service authentication method and system
CN117785585A (en) * 2024-01-05 2024-03-29 北京卓讯科信技术有限公司 Automatic testing method and device for convergence and diversion equipment

Also Published As

Publication number Publication date
CN112532482B (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN112532482B (en) Shunting equipment testing method and device
CN111800501B (en) Method and device for processing service request, storage medium and electronic equipment
EP2535994A2 (en) Fault processing system
CN112367680B (en) External communication test method and device based on intelligent ammeter and computer equipment
CN109542781B (en) Block chain consensus algorithm testing method and device, calculating device and storage medium
CN114422385B (en) Method and system for generating network system test case
CN114356671A (en) Board card debugging device, system and method
CN113391967B (en) Packet filtering test method and device for firewall
CN103984633A (en) Automatic testing system for job downloading of bank host
CN109587349B (en) Multimedia agent line testing method and device, electronic equipment and storage medium
CN100389627C (en) Testing equipment of short message interface
CN112351050A (en) Method, device, communication equipment and storage medium for mirroring data stream
CN114338514B (en) Network detection method, device, medium and electronic equipment
CN114143079B (en) Verification device and method for packet filtering strategy
CN113098775B (en) Flow shunting method and device
EP3128437A1 (en) Data processing method, processor, and data processing device
CN112738153B (en) Gateway selection method, system, device, server and medium in service system
WO2021128936A1 (en) Message processing method and apparatus
CN110548285B (en) Game communication control method and device, medium and electronic equipment
CN113407444A (en) Interface test case generation method, device, equipment and storage medium
CN111078477A (en) Interface test method and device, storage medium and electronic equipment
CN112953783A (en) Satellite link state detection method, device, server and storage medium
CN110795338A (en) Automatic testing method and device based on front-end and back-end interaction and electronic equipment
CN115277506B (en) Load balancing equipment testing method and system
CN112737872B (en) ARINC664P7 end system cross-network testing system and method

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