Detection method, device and system for internal link of switch port

By conducting a detection and a group mutual test on the switch port, combined with the first test results and the second test results, the problems of low detection efficiency and accuracy in the existing technology are solved, and the effect of simplifying the detection process and improving efficiency is achieved. Essence

CN119363620AActive Publication Date: 2025-01-24XIAN YIPU COMM TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411396286.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-24
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

The prior art cannot accurately detect the configuration of the internal link of the switch port, and the detection method based on the test equipment is cumbersome and inefficient.

Method used

Through a detection of a single business port, the first test results are obtained; then the business ports in all business ports are performed. As a result, determine whether the internal link configuration of all business ports is correct.

Benefits of technology

Under the premise of ensuring the detection accuracy, the detection process of the internal link of the switch port is simplified, and the detection efficiency is improved. It can complete the detection of all ports at only one -end oral inspection and one group mutual test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363620A_ABST
    Figure CN119363620A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method, a device and a system for detecting an internal link of a switch port. The method comprises the following steps: determining a reference port from a plurality of service ports of a switch, and performing first detection on a link of the reference port to obtain a first detection result; grouping the plurality of service ports to obtain a plurality of non-coincident grouping results, each grouping result comprising two service ports; each service port is divided into two grouping results; the two service ports of each grouping result are used for link mutual detection, a second detection result is obtained, and the second detection result comprises link mutual detection results corresponding to the multiple grouping results; and determining link detection results of the plurality of service ports according to the first detection result and the second detection result. According to the method, only one-time single-port detection and one-time grouping mutual detection are needed, and the first detection result and the second detection result are subjected to cross confirmation, so that the effect of detecting whether the internal link configurations of all service ports are correct or not is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of switch testing, and in particular to a method, device and system for detecting internal links of a switch port. Background Art

[0002] With the rapid development of data center services and the rise of AI technology, the amount of data transmitted over the network is increasing, and the bandwidth of a single chip of a network switch is also increasing, resulting in an increasing density of high-speed links and more diversified configurations of switch chips. Therefore, network data transmission has higher and higher requirements for the correct configuration of high-speed links.

[0003] In the prior art, the detection methods for detecting whether a high-speed link is correctly configured mainly include a self-loopback detection method and a detection method based on a test device. The self-loopback detection method uses a self-loopback detection module to short-circuit the internal link of the port to be detected, and detects whether the configuration of the internal link of the port is correct based on whether the input and output data of the port to be detected are consistent; the detection method based on a test device requires the use of a DAC cable or an optical module to connect the test device and the port to be detected, and determines whether the configuration of the internal link of the port to be detected is correct based on whether the input and output data between the port to be detected and the test device are consistent.

[0004] However, the existing detection methods cannot obtain accurate detection results of the internal links of the ports. The detection methods based on test equipment require multiple connections and plug-in tests, and the detection process is cumbersome and the detection efficiency is low. Summary of the invention

[0005] The embodiments of the present application provide a method, device and system for detecting the internal link of a switch port, so as to complete the detection of all ports with only one single-port detection and one group mutual detection, thereby simplifying the detection process of the internal link of the switch port and improving the detection efficiency of the internal link of the switch port while ensuring the detection accuracy of the internal link.

[0006] In a first aspect, an embodiment of the present application provides a method for detecting an internal link of a switch port, wherein a reference port is determined from a plurality of service ports of the switch according to a received detection instruction, and a first detection is performed on an internal link of the reference port to obtain a first detection result; wherein the switch includes a plurality of service ports;

[0007] Grouping the multiple service ports to obtain multiple grouping results without overlap, wherein each grouping result includes two service ports; each service port is divided into two of the grouping results;

[0008] Using the two service ports of each of the grouping results to perform link mutual testing to obtain a second testing result, wherein the second testing result includes link mutual testing results corresponding to each of the plurality of grouping results;

[0009] The detection results of the internal links of the multiple service ports are determined according to the first detection result and the second detection result.

[0010] In a possible implementation manner, the performing a first detection on the internal link of the reference port to determine a first detection result includes:

[0011] According to a preset splitting rule, the reference port is split to obtain a plurality of sub-ports, wherein each sub-port is connected to a test device to form a first data link;

[0012] For each of the sub-ports, obtaining first transceived data between the sub-port and the test device generated through the first data link;

[0013] The first detection result is determined according to the first transceiver data respectively corresponding to each sub-port.

[0014] In a possible implementation manner, performing link mutual testing using two service ports of each of the grouping results to obtain a second detection result includes:

[0015] For each grouping result, according to a preset splitting rule, split the first service port in the grouping result to obtain a plurality of first service sub-ports, and split the second service port in the grouping result to obtain a plurality of second service sub-ports; wherein each of the first service sub-ports corresponds to one of the second service sub-ports;

[0016] Establishing a second data link between each of the first service sub-ports and the corresponding second service sub-port;

[0017] For each of the first service sub-ports, obtaining second transceived data between the first service sub-port and the corresponding second service sub-port generated through the second data link;

[0018] The link mutual testing result corresponding to the grouping result is determined according to the second transceiver data respectively corresponding to each of the first service sub-ports.

[0019] In a possible implementation manner, for each of the first service subports, acquiring second transceived data between the first service subport and the corresponding second service subport generated through the second data link includes:

[0020] For each first service sub-port, send an instruction to the first service sub-port so that the first service sub-port sends a first data message to the corresponding second service sub-port through the second data link, and obtains a second data message received by the corresponding second service sub-port;

[0021] Sending an instruction to the corresponding second service subport so that the corresponding second service subport sends a third data message to the first service subport through the second data link; acquiring a fourth data message received by the first service subport;

[0022] The determining, according to the second transceiver data respectively corresponding to each of the first service sub-ports, a link mutual testing result corresponding to the grouping result includes:

[0023] Determine the link mutual testing result according to the first data packet, the second data packet, the third data packet and the fourth data packet.

[0024] In a possible implementation manner, determining the link mutual testing result according to the first data packet, the second data packet, the third data packet, and the fourth data packet includes:

[0025] If the first data message is consistent with the second data message, and the third data message is consistent with the fourth data message, then there is no abnormality between the internal link of the second service sub-port and the internal link of the first service sub-port;

[0026] If the first data message and the second data message are inconsistent, or the third data message and the fourth data message are inconsistent, then the internal link of the first service sub-port or the internal link of the second service sub-port is abnormal.

[0027] In a possible implementation manner, determining the detection results of the internal links of the multiple service ports according to the first detection result and the second detection result includes:

[0028] If the first detection result indicates that the internal link of the reference port is normal, and the second detection result indicates that the internal link mutual test results of the multiple grouping results are normal, it is determined that the internal links of the multiple service ports are normal;

[0029] Otherwise, the internal links of the multiple service ports are abnormal.

[0030] In a possible implementation manner, if an abnormality is detected in the internal links of the multiple service ports, a first abnormality prompt message is issued.

[0031] In a possible implementation manner, the service port includes one of the following: a port consisting of a single channel, a port consisting of two channels, a port consisting of four channels, and a port consisting of eight channels.

[0032] In a second aspect, an embodiment of the present application provides a switch port internal link detection device, including:

[0033] A first detection unit, configured to determine a reference port from a plurality of service ports of the switch according to a received detection instruction, and perform a first detection on an internal link of the reference port to obtain a first detection result; wherein the switch includes a plurality of service ports;

[0034] A grouping unit, used for grouping the plurality of service ports to obtain a plurality of grouping results without overlap, wherein each grouping result includes two service ports; and each service port is divided into two of the grouping results;

[0035] A second detection unit, configured to perform a link mutual test on two service ports using each of the grouping results to obtain a second detection result, wherein the second detection result includes link mutual test results corresponding to each of the plurality of grouping results;

[0036] A determining unit is used to determine the detection results of the internal links of the multiple service ports according to the first detection result and the second detection result.

[0037] In a third aspect, an embodiment of the present application provides a switch port internal link detection system, including: a control unit, a switch, and at least one test device.

[0038] The switch includes a plurality of service ports, one of which is a reference port; the test device and the reference port establish a first data link, and the test device is used to detect an internal link of the reference port to obtain a first detection result; wherein the detection of the internal links of the plurality of service ports of the switch is implemented by the following steps:

[0039] The first service ports are grouped to obtain multiple non-overlapping grouping results, each grouping result includes two service ports, and each service port is divided into two grouping results; the control unit controls the link mutual testing of the two service ports of each grouping result to obtain a second detection result; and the link detection results of the multiple service ports are determined according to the first detection result and the second detection result.

[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned detection method is implemented.

[0041] The embodiments of the present application provide a method, device and system for detecting the internal link of a switch port. The method first detects the internal link of a single service port to obtain a first detection result; then groups all service ports, and mutually tests the service ports in each group result to obtain a second detection result; and then determines the detection results of the internal links of all service ports based on the first detection result and the second detection result. Thus, the effect of separately detecting the internal links of all service ports can be achieved by only performing a single-port detection and a group mutual test. The above scheme simplifies the detection process of the internal link of the switch port and improves the detection efficiency of the internal link of the switch port. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0043] Figure 1 A schematic diagram of the correct configuration of the internal link of the port provided for this application;

[0044] Figure 2 A schematic diagram of the structure of the cross-link mismatch within the port provided by this application;

[0045] Figure 3 A schematic diagram of the flow of the switch port internal link detection method provided in this application;

[0046] Figure 4 A schematic diagram of the connection structure between the split service port 1 and the split service port 2 provided in this application;

[0047] Figure 5 A schematic diagram of a switch port internal link detection device provided in the present application.

[0048] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of methods and systems consistent with some aspects of the present application as detailed in the appended claims.

[0050] First, the terms involved in this application are explained:

[0051] SerDes: refers to Serializer / Deserializer, which is a circuit used to convert parallel data into serial data and convert serial data into parallel data.

[0052] DAC: Direct Attach Copper, direct attach copper cable, is a cable solution for short-distance high-speed data transmission.

[0053] In network communication, switches forward data packets between network devices to achieve efficient data transmission. The inside of the switch is connected to different ports through internal links, and the ports exchange data with external devices to achieve data forwarding. Each port of the switch usually contains one or more SerDes, and each SerDes includes multiple channels (lanes). Each channel is an independent serial data channel, which can transmit data independently, and multiple channels transmit data in parallel.

[0054] According to the design of the switch chip hardware, the channel mapping (laneswap) and polarity flip (polarity flip) of each SerDes can be configured in the software. Among them, if the channel mapping is configured correctly, it can ensure that the internal link of the port has no cross-matching errors, and the order of multiple parallel channels is correct, so as to ensure that the data can be accurately transmitted from the transmitter to the receiver; each internal link includes a pair of transceiver lines, in which the transmission line Tx (Transmit) can be used to send data, and the receiving line Rx (Receive) can be used to receive data. If the polarity flip is configured correctly, the link functions normally as a transmitter or a receiver. For an internal link, data can only be forwarded correctly when the channel mapping and polarity flip are configured correctly.

[0055] With the rapid development of data center services and the rise of artificial intelligence technology, the amount of data transmitted over the network is increasing, and the bandwidth of the single chip of the network switch switch is also increasing, resulting in an increasing density of high-speed links and more diverse configurations of switch chips. Only by correctly configuring the internal links of the switch to the port can the correct transmission of network data be guaranteed. Therefore, it is necessary to detect the internal links of the port.

[0056] Take a port consisting of 4 channels as an example. Figure 1 This is a schematic diagram of the structure of the correct configuration of the internal links of the port provided by the present application. The internal link 101 of the port 100 is configured to the channel 111, the internal link 102 is configured to the channel 112, the internal link 103 is configured to the channel 113, and the internal link 104 is configured to the channel 114. Figure 2 This is a structural diagram of the cross-mismatch of the internal links of the port provided in the present application, where the internal link 101 of port 100 is configured to channel 111, the internal link 102 is configured to channel 114, the internal link 103 is configured to channel 113, and the internal link 104 is configured to channel 112; the cross-mismatch of the internal link 102 and the internal link 104 will cause data transmission errors.

[0057] Generally, there are two methods to detect the internal link of the port. One detection method is to short-circuit the internal link of the port to be detected with a self-loopback detection module, and determine whether the internal link configuration of the port to be detected is correct by analyzing whether the data sent and received by the port to be detected is consistent. Another method is a detection method based on a test device, which uses a DAC cable or an optical module to connect the test device and the port to be detected. Each detection determines whether the data sent and received between a port to be detected and the test device are consistent, thereby determining whether the internal link configuration of the port to be detected is correct. The prior art performs a detection process every time a port is detected; and when detecting a port composed of 4 channels, at the data sending end, the data is evenly distributed to the 4 channels. The channel from which the data is sent from the sending end to the receiving end does not affect the reception of the data by the receiving end, and the cross-matching of the internal link of the port does not affect the data received by the data receiving end, resulting in the inability of the existing detection method to obtain accurate detection results of the internal link of the port.

[0058] The method provided by the present application detects the internal link of a single service port once to obtain a first detection result; then groups all service ports, and mutually tests the service ports in each group result to obtain a second detection result; then determines whether the internal link configuration of all service ports is correct based on the first detection result and the second detection result; thus, the effect of detecting the internal links of all ports can be achieved by only performing a single-port detection and a group mutual test. This solves the problem that the detection process is cumbersome and the detection efficiency is low when the prior art detects the port of the switch.

[0059] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0060] Figure 3 A flow chart of the switch port internal link detection method provided in this application, such as Figure 3 As shown, the method comprises the following steps:

[0061] S301: According to the received detection instruction, determine a reference port from multiple service ports of the switch, perform a first detection on an internal link of the reference port, and obtain a first detection result; wherein the switch includes multiple service ports.

[0062] The execution subject of the switch port internal link detection method may be an electronic device, such as a computer or other device that can complete the switch port test.

[0063] The switch to be tested exchanges data with external devices through multiple service ports, the reference port is one of the multiple service ports, and the channel mapping and polarity flipping configurations of the test device port are correct.

[0064] The internal link of the reference port is first detected using the test equipment to obtain a first detection result. The first detection result is used to determine whether data can be accurately sent and received between the reference port and the test equipment, thereby determining whether the internal link configuration of the reference port matches that of the port of the test equipment. When the channel mapping configuration and polarity flip configuration of the internal link of the reference port and the port of the test equipment match, it indicates that the internal link configuration of the reference port matches that of the port of the test equipment.

[0065] S302: Grouping multiple service ports to obtain multiple grouping results without overlap, wherein each grouping result includes two service ports; each service port is divided into two grouping results.

[0066] In this step, all service ports of the switch to be tested are grouped to obtain multiple grouping results. Each grouping result includes two service ports, and multiple grouping results do not overlap. At the same time, each service port is divided into two grouping results, so that for a service port in any grouping result, another grouping result can be found, and the other grouping result also includes the service port. Two grouping results containing the same port are cross-linked through the same service port, and then all grouping results can be cross-linked.

[0067] S303: Use the two service ports of each grouping result to perform link mutual testing to obtain a second testing result, wherein the second testing result includes link mutual testing results corresponding to each of the multiple grouping results.

[0068] In this step, for all the grouping results obtained in step S302, the two service ports in each grouping result are tested against each other to obtain a mutual test result. The mutual test result indicates whether the two service ports can accurately send and receive data, thereby determining whether the internal link configurations of the two service ports match.

[0069] S304: Determine detection results of internal links of multiple service ports according to the first detection result and the second detection result.

[0070] In this step, the first detection result can be used to determine whether the internal link configuration of the reference port is correct. For the second detection result, it includes a link mutual detection result of a first grouping result, which is a link mutual detection result between the reference port and a service port X. The link mutual detection result can determine whether the internal link configuration of the reference port matches that of the service port X; it also includes a link mutual detection result of a second grouping result, which is a mutual detection result between the above service port X and another service port Y, and the link mutual detection result can determine whether the internal link configuration of the service port X matches that of the service port Y; similarly, it can be determined whether the internal link configuration of the service port Y matches that of another service port Z, and so on, until it is determined whether the internal link configuration of the two service ports in all grouping results matches. Since the reference port has been detected by the detection device, the detection result of the internal link of the reference port can be used as a reference detection result. In addition, since multiple grouping results have cross-relationships, the detection results of all other service ports can be determined from the detection result of the reference port.

[0071] The switch port internal link detection method provided in the embodiment of the present application selects a reference port, performs a detection on the internal link of the reference port, and obtains a first detection result; then all service ports are grouped, and the service ports in each group result are mutually tested to obtain multiple second detection results; then, based on the first detection result and the second detection result, it is determined whether the internal link configuration of all service ports is correct; thereby achieving the effect of detecting the internal links of all service ports by only performing one single-port detection and one group mutual test.

[0072] The method for detecting the internal link of a switch port provided in the embodiment of the present application is applicable to switches with various common ports. The switch port can be a port composed of 1 channel, a port composed of 2 channels, a port composed of 4 channels, or a port composed of 8 channels.

[0073] The following takes the case where the port of the switch to be tested is a port composed of 4 channels as an example to further illustrate the implementation of the switch port internal link detection method of the present application.

[0074] The maximum bandwidth of the switch to be tested is 51.2TB / s. The chip used in the system has 64 SerDes, each SerDes includes 8 channels, a total of 512 channels are extended, and every 4 channels form a service port, a total of 128 service ports.

[0075] Before the first and second tests, the data transmission rates of all service port channels can be reduced. Because the correctness of the internal link configuration of the switch port to be tested has nothing to do with the data transmission rate of the switch port channel, in order to save bandwidth and facilitate testing, the channels of all service ports can be reduced so that the data transmission rate of a single channel of the service port is the same as the data transmission rate supported by the test equipment. Specifically, the data transmission rate of the service port channel can be reduced to 100G or 200G.

[0076] In a specific implementation manner, performing a first detection on an internal link of a reference port to determine a first detection result includes:

[0077] First, according to a preset splitting rule, the reference port is split to obtain a plurality of sub-ports, wherein each sub-port is connected to the test device to form a first data link;

[0078] Secondly, for each sub-port, first transceived data generated between the sub-port and the test device through the first data link is obtained;

[0079] Finally, a first detection result is determined according to the first received and sent data corresponding to each sub-port.

[0080] The selected reference port is service port 1. The preset splitting rule is to split the service port based on a single channel, that is, each split service sub-port contains a channel. Service port 1 is split into 4 service sub-ports, each service sub-port corresponds to an internal link. Use an optical module or a DAC cable to connect the reference port to the port of the test equipment, and each service sub-port is connected to the corresponding port of the test equipment to form a first data link.

[0081] The first transceived data between the service subport and the corresponding port of the test device can be generated through the first data link. That is to say, the above-mentioned execution subject sends an instruction to the service subport so that the service subport sends a first reference data message through the first data link to obtain a second reference data message received by the corresponding port of the test device; sends an instruction to the corresponding port of the test device so that the corresponding port of the test device sends a third reference data message through the first data link to obtain a fourth reference data message received by the service subport. The first reference data message, the second reference data message, the third reference data message, and the fourth reference data message constitute the first transceived data.

[0082] The above first test result is:

[0083] If the first reference data message is consistent with the second reference data message and the third reference data message is consistent with the fourth reference data message, the first detection result indicates that data can be accurately transmitted between the service subport and the corresponding port of the test device, indicating that the channel mapping configuration and polarity flip configuration of the internal link of the service subport and the corresponding port of the test device match. The internal link configuration of the port of the test device is correct, thereby determining that the internal link configuration of the service subport is also correct.

[0084] If the first reference data message is inconsistent with the second reference data message; or the third reference data message is inconsistent with the fourth reference data message, the first detection result indicates that the service subport and the corresponding port of the test device cannot transmit data correctly. If the second reference data message or the fourth reference data message cannot be obtained, it means that the polarity reversal configuration of the internal link of the service subport is abnormal, resulting in abnormal function as a transmitter or a receiver; if the second reference data message and the fourth reference data message are obtained, but the first reference data message is inconsistent with the second reference data message; or the third reference data message is inconsistent with the fourth reference data message, it means that the channel mapping configuration of the internal link of the service subport is abnormal, resulting in cross-matching errors with the internal links of other service subports.

[0085] In some implementations of this embodiment, the link mutual test is performed using two service ports of each grouping result to obtain a second detection result, including the following sub-steps:

[0086] First, for each grouping result, according to the preset splitting rule, the first service port in the grouping result is split to obtain multiple first service sub-ports, and the second service port in the grouping result is split to obtain multiple second service sub-ports; wherein each first service sub-port corresponds to a second service sub-port.

[0087] The switch is still described as including 128 service ports, each of which includes 4 channels.

[0088] The above-mentioned execution entity can group the 128 service ports, and group service port 1 and service port 2 into a grouping result, service port 3 and service port 4 into a grouping result, and so on, until service port 127 and service port 128 form a grouping result; at the same time, service port 128 and service port 1 form a grouping result, service port 2 and service port 3 form a grouping result, and so on, until service port 126 and service port 127 form a grouping result, thereby completing the grouping.

[0089] For each grouping result, based on the preset splitting rule of a single channel, the first service port in the grouping result is split to obtain 4 first service sub-ports; the second service port in the grouping result is split to obtain 4 second service sub-ports; each first service sub-port corresponds to a second service sub-port. For example, for the grouping result consisting of service port 1 and service port 2, service port 1 is split into first service sub-port 11, first service sub-port 12, first service sub-port 13 and first service sub-port 14; service port 2 is split into second service sub-port 21, second service sub-port 22, second service sub-port 23 and second service sub-port 24; first service sub-port 11 corresponds to second service sub-port 21, first service sub-port 12 corresponds to second service sub-port 22, first service sub-port 13 corresponds to second service sub-port 23, and first service sub-port 14 corresponds to second service sub-port 24.

[0090] Secondly, a second data link is established between each first service subport and the corresponding second service subport. The second data link between each first service subport and the corresponding second service subport is established through a DAC cable. Still taking service port 1 and service port 2 as an example, Figure 4 A schematic diagram of the connection structure between the split service port 1 and the split service port 2 provided in this application. Figure 4 As shown, the first service subport 11 is connected to the second service subport 21 to form a second data link, the first service subport 12 is connected to the second service subport 22 to form a second data link, the first service subport 13 is connected to the second service subport 23 to form a second data link, and the first service subport 14 is connected to the second service subport 24 to form a second data link.

[0091] Then, for each first service sub-port, second transceiver data generated between the first service sub-port and the corresponding second service sub-port through the second data link is obtained.

[0092] Finally, the link mutual testing result corresponding to the grouping result is determined according to the second transceiver data respectively corresponding to each first service sub-port.

[0093] In some implementations of this embodiment, for each first service sub-port, obtaining second transceived data between the first service sub-port and the corresponding second service sub-port generated through the second data link includes the following sub-steps:

[0094] First, for each first service subport, an instruction is sent to the first service subport so that the first service subport sends a first data message to the corresponding second service subport through the second data link, and obtains a second data message received by the corresponding second service subport.

[0095] For any first service sub-port, the execution subject may send an instruction to the first service sub-port so that the first service sub-port sends a first data message through the second data link; the execution subject may receive a second data message received by the corresponding second service sub-port.

[0096] Secondly, an instruction is sent to the corresponding second service subport so that the corresponding second service subport sends a third data message to the first service subport through the second data link; and a fourth data message received by the first service subport is acquired.

[0097] The execution subject may send an instruction to the corresponding second service sub-port so that the corresponding second service sub-port sends the third data message through the second data link; the execution subject may receive the fourth data message received by the first service sub-port.

[0098] In some implementations of this embodiment, the above-mentioned determining the link mutual testing result corresponding to the grouping result according to the second transceiver data corresponding to each first service sub-port respectively includes: determining the link mutual testing result according to the first data packet, the second data packet, the third data packet and the fourth data packet.

[0099] In some implementations of this embodiment, the determining the link mutual testing result according to the first data packet, the second data packet, the third data packet, and the fourth data packet includes:

[0100] If the first data message is consistent with the second data message and the third data message is consistent with the fourth data message, there is no abnormality between the internal link of the second service sub-port and the internal link of the first service sub-port; the mutual test result indicates that data can be accurately transmitted between the first service sub-port and the corresponding second service sub-port, indicating that the configuration of the internal link of the first service sub-port matches the configuration of the internal link of the corresponding second service sub-port.

[0101] If the first data message is inconsistent with the second data message, or the third data message is inconsistent with the fourth data message, the internal link of the first service subport or the internal link of the second service subport is abnormal, and the mutual test result indicates that the first service subport and the corresponding second service subport cannot transmit data correctly. If the second data message or the fourth data message cannot be obtained, it means that the polarity flip configuration of the internal link of the first service subport and the corresponding second service subport does not match, resulting in data failure; if the second data message and the fourth data message are obtained, but the first data message is inconsistent with the second message, or the third data message is inconsistent with the fourth data message, it means that the channel mapping configuration of the internal link of the first service subport and the corresponding second service subport does not match, resulting in a cross-matching error between the internal link of the first service subport or the corresponding second service subport and other service subports.

[0102] In some implementations of this embodiment, determining link detection results of multiple service ports according to the first detection result and the second detection result includes:

[0103] If the first detection result indicates that the internal link of the reference port is normal, and the second detection result indicates that the internal link mutual testing results of the multiple grouping results are normal, it is determined that the internal links of the multiple service ports are normal.

[0104] The first detection result indicates that there is no abnormality in the internal link of the reference port, which means that it is determined that the internal link configuration of the reference port is correct.

[0105] The second detection result indicates that there is no abnormality in the internal link mutual test results of multiple grouping results, that is, for any grouping result, its mutual test result indicates that the configuration of the internal link of the first service port and the second service port in the grouping result matches. Specifically, it is manifested as: the internal link configuration of any first service sub-port of the first service port of the grouping result matches the second service sub-port of the corresponding second service port. The grouping result composed of service port 1 as the first service port and service port 2 as the second service port is still used as an example for explanation. When the first data message sent by the first business subport 11 is consistent with the second data message received by the second business subport 21; and the third data message sent by the second business subport 21 is consistent with the fourth data message received by the first business subport 11, and the first data message sent by the first business subport 12 is consistent with the second data message received by the second business subport 22; and the third data message sent by the second business subport 22 is consistent with the fourth data message received by the first business subport 12, and the first data message sent by the first business subport 13 is consistent with the second data message received by the second business subport 23; and the third data message sent by the second business subport 23 is consistent with the fourth data message received by the first business subport 13, and the first data message sent by the first business subport 14 is consistent with the second data message received by the second business subport 24; and the third data message sent by the second business subport 24 is consistent with the fourth data message received by the first business subport 14, it can be determined that the internal link configurations of business port 1 and business port 2 match.

[0106] Regarding the above-mentioned determination that there is no abnormality in the internal links of multiple service ports, a grouping result is obtained by service port 1 and service port 2, and the second detection result can be obtained that the internal link configurations of service port 1 and service port 2 match; because service port 1 is a reference port, the internal link configuration of the reference port is correct, thereby determining that the internal link configuration of service port 2 is correct; a grouping result is obtained by service port 2 and service port 3, and the second detection result can be obtained that the internal link configurations of service port 2 and service port 3 match, because the internal link configuration of service port 2 is correct, thereby determining that the internal link configuration of service port 3 is correct; and so on, service port 3 determines that the internal link configuration of service port 4 is correct, until service port 127 determines that the internal link configuration of service port 128 is correct, thereby determining that the internal link configurations of all service ports are correct.

[0107] Otherwise, the internal links of the multiple service ports are abnormal. If the first detection result indicates that the internal link of the reference port is abnormal, or the second detection result indicates that the internal links of the multiple service ports are abnormal, a first abnormal prompt message is issued to prompt the reference port or the service ports in the multiple grouping results to be corrected.

[0108] The switch port internal link detection method provided in the embodiment of the present application realizes accurate detection of the internal link of the service port by splitting all service ports based on the preset splitting rule of a single channel; obtains a first detection result by performing a single detection on the internal link of the reference port; then groups all service ports, and mutually tests the service ports in each grouping result to obtain a second detection result; then determines whether the internal link configuration of all service ports is correct based on the first detection result and the second detection result; thereby achieving accurate detection of the internal link of the service port while simplifying the detection process of the switch port internal link and improving the detection efficiency of the switch port internal link.

[0109] Corresponds to Figure 3 The embodiment shown is a method for detecting an internal link of a switch port. The present application also provides a device for detecting an internal link of a switch port. Figure 5 A schematic diagram of a switch port internal link detection device provided in this application, such as Figure 5 As shown, the device 50 includes:

[0110] The first detection unit 501 is used to determine a reference port from multiple service ports of the switch according to the received detection instruction, perform a first detection on the internal link of the reference port, and obtain a first detection result; wherein the switch includes multiple service ports.

[0111] The grouping unit 502 is used to group the multiple service ports to obtain multiple grouping results without overlap, wherein each grouping result includes two service ports; each service port is divided into two grouping results.

[0112] The second detection unit 503 is used to perform a link mutual test on two service ports using each grouping result to obtain a second detection result, wherein the second detection result includes the link mutual test results corresponding to each of the multiple grouping results.

[0113] The determination unit is used to determine the detection results of the internal links of the plurality of service ports according to the first detection result and the second detection result.

[0114] In a specific implementation, the first detection unit 501 is specifically used for:

[0115] According to a preset splitting rule, the reference port is split to obtain a plurality of sub-ports, wherein each sub-port is interconnected with a test device to form a first data link; for each sub-port, first transceiver data between the sub-port and the test device generated through the first data link is obtained; and a first detection result is determined according to the first transceiver data corresponding to each sub-port.

[0116] In some implementations of this embodiment, the grouping unit 502 is specifically configured to:

[0117] For each grouping result, according to the preset splitting rule, the first service port in the grouping result is split to obtain multiple first service sub-ports, and the second service port in the grouping result is split to obtain multiple second service sub-ports; wherein each first service sub-port corresponds to one second service sub-port; and a second data link is established between each first service sub-port and the corresponding second service sub-port.

[0118] In some implementations of this embodiment, the second detection unit 503 is specifically used to: for each first business sub-port, obtain the second received and sent data between the first business sub-port and the corresponding second business sub-port generated through the second data link; for each first business sub-port, send an instruction to the first business sub-port so that the first business sub-port sends a first data packet to the corresponding second business sub-port through the second data link, and obtain the second data packet received by the corresponding second business sub-port; send an instruction to the corresponding second business sub-port so that the corresponding second business sub-port sends a third data packet to the first business sub-port through the second data link; obtain the fourth data packet received by the first business sub-port.

[0119] In some implementations of this embodiment, the determining unit 504 is specifically configured to:

[0120] According to the second received and sent data corresponding to each first business sub-port, the link mutual test result corresponding to the grouping result is determined: according to the first data packet, the second data packet, the third data packet and the fourth data packet, the link mutual test result is determined; if the first data packet and the second data packet are consistent, and the third data packet and the fourth data packet are consistent, then the internal link of the second business sub-port and the internal link of the first business sub-port are normal; if the first data packet and the second data packet are inconsistent, or the third data packet and the fourth data packet are inconsistent, then the internal link of the first business sub-port or the internal link of the second business sub-port is abnormal.

[0121] Based on the first detection result and the second detection result, the link detection results of multiple service ports are determined: if the first detection result indicates that there is no abnormality in the internal link of the reference port, and the second detection result indicates that there is no abnormality in the internal link mutual test results of multiple grouping results, it is determined that there is no abnormality in the internal links of the multiple service ports; otherwise, the internal links of the multiple service ports are abnormal.

[0122] If internal links of multiple service ports are detected to be abnormal, a first abnormal prompt message is issued.

[0123] The present application also provides a switch port internal link detection system. The system provided in this embodiment includes:

[0124] a control unit, a switch, at least one test device,

[0125] The switch includes multiple service ports, one of which is a reference port; a test device and the reference port establish a first data link, and the test device is used to detect an internal link of the reference port to obtain a first detection result; wherein the internal link detection of the multiple service ports of the switch is implemented by the following steps:

[0126] The first service port is grouped to obtain multiple non-overlapping grouping results, each grouping result includes two service ports, and each service port is divided into two grouping results; the control unit controls the link mutual test of the two service ports of each grouping result to obtain a second test result; and the link test results of the multiple service ports are determined according to the first test result and the second test result.

[0127] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0128] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for detecting an internal link of a switch port, characterized in that: include: According to the received detection instruction, a reference port is determined from a plurality of service ports of the switch, and a first detection is performed on an internal link of the reference port to obtain a first detection result; wherein the switch includes a plurality of service ports; Grouping the multiple service ports to obtain multiple grouping results without overlap, wherein each grouping result includes two service ports; each service port is divided into two of the grouping results; Using the two service ports of each of the grouping results to perform link mutual testing to obtain a second testing result, wherein the second testing result includes link mutual testing results corresponding to each of the plurality of grouping results; The detection results of the internal links of the multiple service ports are determined according to the first detection result and the second detection result.

2. The method according to claim 1, characterized in that The first detection of the internal link of the reference port to determine a first detection result includes: According to a preset splitting rule, the reference port is split to obtain a plurality of sub-ports, wherein each sub-port is connected to a test device to form a first data link; For each of the sub-ports, obtaining first transceived data between the sub-port and the test device generated through the first data link; The first detection result is determined according to the first transceiver data respectively corresponding to each sub-port.

3. The method according to claim 1, characterized in that The using the two service ports of each of the grouping results to perform link mutual testing to obtain a second detection result includes: For each grouping result, according to a preset splitting rule, split the first service port in the grouping result to obtain a plurality of first service sub-ports, and split the second service port in the grouping result to obtain a plurality of second service sub-ports; wherein each of the first service sub-ports corresponds to one of the second service sub-ports; Establishing a second data link between each of the first service sub-ports and the corresponding second service sub-port; For each of the first service sub-ports, obtaining second transceived data between the first service sub-port and the corresponding second service sub-port generated through the second data link; The link mutual testing result corresponding to the grouping result is determined according to the second transceiver data respectively corresponding to each of the first service sub-ports.

4. The method according to claim 3, characterized in that: The step of acquiring, for each of the first service sub-ports, second transceived data between the first service sub-port and the corresponding second service sub-port generated through the second data link includes: For each first service sub-port, send an instruction to the first service sub-port so that the first service sub-port sends a first data message to the corresponding second service sub-port through the second data link, and obtains a second data message received by the corresponding second service sub-port; Sending an instruction to the corresponding second service subport so that the corresponding second service subport sends a third data message to the first service subport through the second data link; acquiring a fourth data message received by the first service subport; The determining, according to the second transceiver data respectively corresponding to each of the first service sub-ports, a link mutual testing result corresponding to the grouping result includes: Determine the link mutual testing result according to the first data packet, the second data packet, the third data packet and the fourth data packet.

5. The method according to claim 4, characterized in that The determining the link mutual testing result according to the first data packet, the second data packet, the third data packet, and the fourth data packet includes: If the first data message is consistent with the second data message, and the third data message is consistent with the fourth data message, then there is no abnormality between the internal link of the second service sub-port and the internal link of the first service sub-port; If the first data message and the second data message are inconsistent, or the third data message and the fourth data message are inconsistent, then the internal link of the first service sub-port or the internal link of the second service sub-port is abnormal.

6. The method according to any one of claims 1 to 5, characterized in that: The determining, according to the first detection result and the second detection result, link detection results of the plurality of service ports includes: If the first detection result indicates that the internal link of the reference port is normal, and the second detection result indicates that the internal link mutual test results of the multiple grouping results are normal, it is determined that the internal links of the multiple service ports are normal; Otherwise, the internal links of the multiple service ports are abnormal.

7. The method according to claim 6, characterized in that The method further comprises: If it is detected that the internal links of the multiple service ports are abnormal, a first abnormal prompt message is issued.

8. The method according to any one of claims 1 to 7, characterized in that The service port includes one of the following: a port consisting of a single channel, a port consisting of two channels, a port consisting of four channels, and a port consisting of eight channels.

9. A switch port internal link detection device, characterized in that: include: A first detection unit, configured to determine a reference port from a plurality of service ports of the switch according to a received detection instruction, and perform a first detection on an internal link of the reference port to obtain a first detection result; wherein the switch includes a plurality of service ports; A grouping unit, used for grouping the plurality of service ports to obtain a plurality of grouping results without overlap, wherein each grouping result includes two service ports; and each service port is divided into two of the grouping results; A second detection unit, configured to perform a link mutual test on two service ports using each of the grouping results to obtain a second detection result, wherein the second detection result includes link mutual test results corresponding to each of the plurality of grouping results; A determining unit is used to determine the link detection results of the multiple service ports according to the first detection result and the second detection result.

10. A switch port internal link detection system, characterized in that: include: a control unit, a switch, at least one test device, The switch includes a plurality of service ports, one of which is a reference port; The test device and the reference port establish a first data link, and the test device is used to detect the internal link of the reference port to obtain a first detection result; wherein the internal link detection of multiple service ports of the switch is implemented by the following steps: The first service ports are grouped to obtain multiple non-overlapping grouping results, each grouping result includes two service ports, and each service port is divided into two grouping results; the control unit controls the link mutual testing of the two service ports of each grouping result to obtain a second detection result; and the link detection results of the multiple service ports are determined according to the first detection result and the second detection result.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method for testing port connectivity of switch

    CN102664774A

  • Switch port test method, electronic equipment and system

    CN113676380A

  • Method for detecting chain circuit cross misconnection

    CN1531229A

  • Link discovery and verification procedure using loopback

    US20050083835A1