Fault positioning method and device
By using free detection frames and directional detection frames in the Fiber Channel network, the topology and fault points of the Fiber Channel link are automatically detected and located, which solves the problem of low fault location efficiency of the Fiber Channel network in the existing technology and achieves fast and automated fault location.
Patent Information
- Application Number
- CN202410164750.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, Fiber Channel (FC) network fault location relies on manual operations, which is inefficient and time-consuming, and lacks the support of automated tools.
It uses preset free detection frames and directional detection frames and encapsulates them in the link layer data frame of the FC protocol stack to automatically detect and locate the topology and fault points of the fiber channel link to achieve rapid fault location.
It realizes the rapid discovery and location of fiber channel network faults, improves efficiency, reduces dependence on technical personnel, and simplifies the troubleshooting process.
Smart Images

Figure CN118801980A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mobile communication infrastructure, and in particular to a fault location method and device. Background Art
[0002] Existing large data centers have a large number of devices and complex networks. In addition, most core businesses have high requirements for input / output (I / O) performance and link reliability. To meet business needs, business hosts and storage mostly use the mainstream Fibre Channel-Storage Aera Network (FC-SAN) networking.
[0003] However, since the Fibre Channel (FC) protocol is relatively closed compared to the Transmission Control Protocol / Internet Protocol (TCP / IP), there are few supporting manufacturers and a lack of mature troubleshooting tools. It mainly relies on manual use of commands such as the FC switch delay test (fcping) command to perform connectivity tests at different link locations, and then uses commands such as multipath software to collect data including paths, delays, etc., to open up the entire network topology from the host to the storage for problem fault location and analysis. Once a fault occurs, maintenance personnel can only log in to the corresponding devices one by one based on known baseline data, collect data, and conduct correlation screening and analysis to ultimately determine the problem. Summary of the invention
[0004] The embodiments of the present application provide a fault location method and device to solve the problem in the related art that problems in FC networks can only be solved manually, which is slow and inefficient.
[0005] In a first aspect, a fault location method is provided, comprising:
[0006] Using a preset free detection frame to detect each link in the optical channel FC link, determine the link topology from the host to the storage, and the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to obtain the data of each network element in the FC link;
[0007] In the case where the FC link is abnormal, determining a first link where the abnormality occurs;
[0008] Using a preset directional detection frame to detect along the first link, and obtaining data of each path in the first link, the directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack, and is used for directional repeated detection of abnormal links;
[0009] Based on the data of each path segment in the first link, the location of the fault point of the first link is determined.
[0010] In a second aspect, a fault location device is provided, comprising:
[0011] The first determination module is used to detect each link in the optical channel FC link using a preset free detection frame to determine the link topology from the host to the storage and the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack and is used to obtain the data of each network element in the FC link;
[0012] A second determination module is used to determine the first link where the abnormality occurs when the FC link is abnormal;
[0013] an acquisition module, configured to perform detection along the first link using a preset directional detection frame to acquire data of each path segment in the first link, wherein the directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack and is used to perform directional repeated detection on abnormal links;
[0014] The fault location module is used to determine the fault point location of the first link based on the data of each path segment in the first link.
[0015] In a third aspect, a terminal device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method described in the first aspect when executed by the processor.
[0016] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, a computer program product is provided, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which, when executed by a computer, cause the computer to execute the steps of the method described in the first aspect.
[0018] In the embodiment of the present application, firstly, each link in the optical channel FC link is detected using a pre-set free detection frame to determine the link topology from the host to the storage, as well as the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to obtain the data of each network element in the FC link. In the case of an abnormality in the FC link, the first link where the abnormality occurs is determined, and then a pre-set directional detection frame is used to detect along the first link to obtain the data of each path in the first link. The directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to perform directional repeated detection on the abnormal link. Finally, based on the data of each path in the first link, the fault point location of the first link is determined. The embodiment of the present application determines the link topology and baseline data through a pre-set free detection frame, and locates the fault point using a pre-set directional detection frame when an abnormality occurs. Fault discovery and location can be completed quickly without relying on the ability of technical personnel, thereby improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a flow chart of a fault location method provided in an embodiment of the present application;
[0021] Figure 2 It is a schematic diagram of extended definition of two types of FC detection frame header structures provided in an embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of the definition of two types of probe frame request and response frame extended command codes provided in an embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of defining two types of detection frame data areas provided in an embodiment of the present application;
[0024] Figure 5 It is a schematic diagram for explaining the functions of the free detection frame request and response subframe provided in an embodiment of the present application;
[0025] Figure 6 It is a schematic diagram for explaining the functions of the directional detection frame request and response subframe provided in an embodiment of the present application;
[0026] Figure 7 is a structural schematic diagram of a fault locating device provided in an embodiment of the present application;
[0027] Figure 8 This is a typical 4-path FC networking structure diagram provided in an embodiment of the present application;
[0028] Fig. 9 A schematic diagram of a single path detection process provided in an embodiment of the present application;
[0029] Fig.10 A schematic diagram of a single path delay baseline formation process provided in an embodiment of the present application;
[0030] Fig.11 A schematic diagram of the structure of four paths of a typical FC network provided in an embodiment of the present application;
[0031] Fig.12 It is a schematic diagram of a fault locating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here. In addition, the "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.
[0034] The following is combined with Figures 1 to 12 , a fault location method and device provided in an embodiment of the present application are described in detail through specific embodiments and application scenarios.
[0035] like Figure 1 As shown, it is a flow chart of a fault location method provided by an embodiment of the present application. Figure 1 As shown, the fault location method may include: contents shown in S101 to S104.
[0036] In S101, each link in the Fiber Channel FC link is detected using a preset free detection frame to determine the link topology from the host to the storage and the baseline data of each link.
[0037] The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack and is used to obtain data of each network element in the FC link.
[0038] In S102, when an abnormality occurs in an FC link, a first link in which the abnormality occurs is determined.
[0039] In S103, a pre-set directional detection frame is used to perform detection along the first link to obtain data of each path in the first link.
[0040] The directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack and is used for directional repeated detection of abnormal links.
[0041] In S104, based on the data of each path segment in the first link, the fault point location of the first link is determined.
[0042] In the embodiment of the present application, firstly, each link in the optical channel FC link is detected using a pre-set free detection frame to determine the link topology from the host to the storage, as well as the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to obtain the data of each network element in the FC link. In the case of an abnormality in the FC link, the first link where the abnormality occurs is determined, and then a pre-set directional detection frame is used to detect along the first link to obtain the data of each path in the first link. The directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to perform directional repeated detection on the abnormal link. Finally, based on the data of each path in the first link, the fault point location of the first link is determined. The embodiment of the present application determines the link topology and baseline data through a pre-set free detection frame, and locates the fault point using a pre-set directional detection frame when an abnormality occurs. Fault discovery and location can be completed quickly without relying on the ability of technical personnel, thereby improving efficiency.
[0043] In a possible implementation of the present application, the encapsulation of free detection frames and directional detection frames may include: using a combination of frame header control and data structure type fields in a frame header of a link layer of an FC protocol stack to identify network detection and data recording of free detection frames and / or directional detection frames; using a data area of a link layer of the FC protocol stack to identify detection requests and detection responses of free detection frames and / or directional detection frames, wherein the data area includes a frame identification area, a detection information recording area, a common extension area, and a directional routing information area, the frame identification area is used to identify free detection frames and directional detection frames, the detection information recording area is used to record data acquired by free detection frames and directional detection frames, the common extension area is an extended reserved area for the detection information recording area and the directional routing information area, and the directional routing information area is used to ensure that the detection frame can perform repeated detection along the original path.
[0044] That is to say, this embodiment uses the FC protocol Extended Link Service (ELS) frame part for extended definition and designs two types of frames, namely free detection frames and directional detection frames. One type of frame is used for detection according to the given route of the multi-path software in normal situations, and the other type of frame extracts the route of the abnormal path in abnormal situations and performs directional repeated detection on the abnormal path according to the specified route; the frame is recognized and supported by the FC device. After receiving the detection frame, the FC device writes its own various information into the data area of the newly designed frame according to the rules. These written data are returned to the detection initiator. The source end combines the processing rules to realize the functions of automatic generation of FC network topology, baseline data collection, and rapid discovery and location of FC faults. The first type of frame is the free detection frame (Q_Probe_F), which automatically obtains detailed data of each network element (frame input and output ports, timestamps, etc.) in the FC link in real time, analyzes and processes, and quickly and automatically generates a complete topology from the host to the storage and a delay baseline for each segment of the path; the second type of frame is the directional detection frame (Q_Probe_D), which is used for free detection frame detection data and baseline comparison to find abnormal changes in the path, and then conducts targeted re-detection of the abnormal path multiple times, obtains indicators such as the delay of each segment of the abnormal link path, and locates the abnormal point by comparing and analyzing the link historical baseline. Through the cooperation of the two special detection frames, indicators such as FC path changes and path delay can be obtained in real time, and the location of the link fault point can be determined.
[0045] Specifically, since the FC protocol stack and the TCP / IP protocol are different, the design and control of all protocol messages are basically centralized in the link layer (FC-2 layer). Therefore, the second layer FC-2 layer (link layer) frame end-to-end data block transmission control function of the FC protocol stack is utilized. Through the frame header routing control and data structure type combination, the FC frame is extended and designed in combination with the reserved field part of the extended link service frame command. Two types of extended new detection data frames are designed, which can be recognized and complied with by all FC devices.
[0046] like Figure 2 As shown, the two types of frames are extended by the combination of the frame header control R_CTL and the data structure TYPE field: the FC frame structure is relatively simple compared to the Ethernet TCP / IP frame, and the frame structure is defined by the frame header part (24 bytes), usually by utilizing the routing control R_CTL and data structure type TYPE field combination (i.e., R_CTL=0x22, TYPE=0x01 setting, hexadecimal) in the FC-2 layer frame Frame header (24 bytes (Byte, B)) to identify the FC frame type as an ELS extended data frame. We also use this combination to define two types of detection frames to realize FC network detection, data recording and other functions.
[0047] like Figure 3As shown, two types of detection data frame request and response extended service LS command code definitions: usually the 4B optional frame header part of the FC-2 frame data area (Data Fielded) represents the extended link service frame LS command code (such as accept, login, logout, loopback, etc.), and we use the reserved part to define two types of detection frame request and response command codes and functions ("0001-1111" is free detection frame: request (Q_Probe_F: FQ, Request), "0010-1111" is free detection frame: response (Q_Probe_F: FP, Reply); "0011-1111" is directional detection frame: request (Q_Probe_D: DQ, Request), "0100-1111" is directional detection frame: response (Q_Probe_D: DP, Reply), binary), to identify the functions of the two major categories of 4 sub-frames.
[0048] This embodiment redefines and designs the general FC-2 frame 2112B data area based on the FC protocol frame data format, and divides the data area into four sub-areas: frame identification area, detection information recording area, directional routing information area, and shared extension area. Figure 4 The area definitions shown are:
[0049] The first 4 bytes of the data area are used as the frame identification area of the two types of detection frames to identify the type of frame. As a detection data frame, the two types of detection frames need to obtain data from the link as the basic data for topology generation. From the 5th B, it is defined as the detection information recording area for recording the acquired data. The directional detection frame needs to repeatedly detect the abnormal link along the original path to locate the fault position, define the directional routing information area, and record the routing data of the frame from the back of the data area to the front. In order to ensure the record length of each data area, a common extension area is reserved in the middle area to provide data area length extension.
[0050] The start and end bits, lengths, and functional descriptions of the four data areas of the two types of detection frames are shown in Table 1.
[0051] Table 1
[0052]
[0053]
[0054] The data record formats of the two key data record areas, the detection information record area and the directional routing information area, are described in detail below:
[0055] In a possible implementation of the present application, the detection information recording area includes a device information field, an inlet information field, an inlet timestamp field, an outlet information field, an outlet timestamp field, and a flow field, wherein the device information field is used to record the device serial number of the detection frame arriving at the device, the inlet information field is used to record the frame inlet number information, the inlet timestamp field is used to record the timestamp of the frame entering the inlet, the outlet information field is used to record the frame outlet number information, the outlet timestamp field is used to record the timestamp of the frame passing through the outlet, and the flow field is used to record the flow of the outlet. As shown in Table 2.
[0056] Table 2
[0057]
[0058] In a possible implementation of the present application, the directional routing information area includes a path number field, a device information field, an ingress information field, and an egress information field, wherein the path number field is used to record the number of a single path for the detection frame to reach the device, the device information field is used to record the device serial number of the detection frame to reach the device, the ingress information field is used to record the frame ingress number information, and the egress information field is used to record the frame egress number information. As shown in Table 3.
[0059] Table 3
[0060]
[0061] It is worth noting that the above two data recording areas are data information recorded in each hop. When the number of recorded hops exceeds 30, the extended reserved area can be enabled (each extension length is an integer multiple of a single hop).
[0062] In a possible implementation of the present application, using a pre-set free detection frame to detect each link in the optical channel FC link to determine the link topology from the host to the storage, and the baseline data of each link, can include: the source end sends a first free detection frame to the destination end through each link in the FC link; when the first device in the FC link receives the first free detection frame, forwards the first free detection frame to the second device in the FC link, and writes the data of the first free detection frame to the first position of the detection information recording area; when the second device receives the first free probe, forwards the first free detection frame to the third device in the FC link, and writes the data of the first free detection frame to the second position of the detection information recording area, until the first free detection frame reaches the destination end through each link in the FC link, and the second position is the position after the first position; when the first free detection frame reaches the destination end, the destination end sends a second free detection frame to the source end, and writes the data of the second free detection frame to the directional routing information area; when the source end receives the second free detection frame sent by the destination end, the link topology from the host to the storage, and the baseline data of each link are generated according to the data in the detection information recording area.
[0063] In a possible implementation of the present application, each link in the optical channel FC link is detected using a pre-set free detection frame to determine the baseline data of each link, which may include: obtaining the timestamp of each device port on the path of each link in the FC link; determining the average value of the delay of each link segment according to the number of detections; determining the average total delay of the FC link based on the average value of the delay of each link segment; determining the baseline data of each link based on the average value of the delay of each link segment and the average total delay of the FC link.
[0064] like Figure 5 As shown, the free probe frame (Q_Probe_F) of this embodiment is a data frame extended on the basis of the general FC-2 frame. Each type of frame is divided into two types of sub-frames: request and response (the request is a probe request sent by the source end to the target, and the response is a reply from the frame to the source end through each device so that the source end can obtain the probe data), realizing the transmission function of the FC link probe data. Figure 5 Take 3 hops as an example.
[0065] The source sends a detection request frame to the destination link: the detection collector sends a free detection frame to all links: the request frame, after receiving it, device S1 forwards it to the next hop and writes the detection data into the detection data recording area through ①. Similarly, the second and third hop data are written respectively through steps ②③.
[0066] The free detection response frame writes the routing data: After the request frame arrives at the target storage A, the destination device takes out the route, writes the routing data of each hop into the directional routing information area through ④, and sends a free detection frame: the response frame returns to the detection collector along the original route according to the directional routing area path.
[0067] The end receives the target response frame and processes it: the source end receives the response frame data, takes out the "detection information recording area" data, generates the topology and the whole, and calculates the delay of each path segment.
[0068] In a possible implementation of the present application, the abnormality of the link includes that the path in the link does not receive a response frame to the free detection frame, and the delay of the path in the link receiving the response frame to the free detection frame is greater than the delay threshold.
[0069] Accordingly, using a pre-set directional detection frame to detect along the first link and obtain data of each path in the first link can include: obtaining abnormal path information from a detection information recording area, the abnormal path information includes the first link; sending a first directional detection frame along the first link, wherein the first directional detection frame passes through multiple devices in the first link; when each device in the first link receives the first directional detection frame, forwarding the first directional detection frame to the next device along the first link and replying a response frame to the source end; when the source end does not receive a response frame from the same device for a preset number of times, determining that there is an abnormality in the path where the device is located.
[0070] like Figure 6 As shown, the directional detection frame (Q_Probe_D) of this embodiment is a data frame extended on the basis of the general FC-2 frame. Each type of frame is divided into two types of sub-frames: request and response (the request is a detection request sent by the source end to the target, and the response is a reply from the frame to the source end through each device so that the source end can obtain the detection data), realizing the transmission function of the FC link detection data. Figure 6 Take 3 hops as an example.
[0071] Read data from the abnormal link routing information area: When a path is found to be abnormal (the destination response frame of the free detection frame is not received or the delay is long), the detection collector first reads the abnormal path information from the directional routing information area of the free detection frame, and then sends a directional detection request frame along the original path.
[0072] Record detailed data through directional response frames: After the detection device sends a detection frame, it will pass through multiple devices. After each device receives the detection frame, on the one hand, it continues to transmit the detection frame to the next device according to the directional route, and on the other hand, it replies a response frame to the source device to inform the device that it is normal and has collected data. According to the above figure, the following instructions are given. First, through step ②, the path exit / entrance is reversed and written into the request frame directional routing information area. When the directional request frame reaches the exit of the S1 device, step ③ writes the first-hop directional detection response data, and replies to the detection collection source that the device is normal. At the same time, the detection frame continues to be sent to the target according to the routing area. If a certain jump device response frame is not received for multiple times, it can be determined that there is an abnormality in the path related to the device. Similarly, through ④⑤, the second and third hop data are recorded respectively (such as Figure 6 ), return the detected data to the source end and record it
[0073] The source end receives data and analyzes and processes it: the detection information data of the directional detection and the directional routing information data are integrated. After the source end obtains the overall path information, it sends it to the fault discovery, analysis and positioning module for subsequent analysis and judgment of the fault.
[0074] The functional definitions of the two categories and four sub-type frames are shown in Table 4 below:
[0075] Table 4
[0076]
[0077]
[0078] In a possible implementation of the present application, the fault location method may also include: when the source end receives response frames from multiple devices, obtaining the total delay of the first path and the delay of each path segment; comparing the total delay of the first path and the delay of each path segment with the baseline data to determine the abnormal location.
[0079] like Figure 7 As shown, the embodiment of the present application provides a device relying on the above two types of frames, which includes six modules: management configuration module, data acquisition module, link topology generation module, fault discovery analysis and positioning module, data persistence module and alarm display module. The management configuration module is mainly responsible for the configuration of frame detection frequency, target information, analysis rules and fault judgment standards, and provides baseline data for link topology generation and fault location; the data acquisition module is mainly responsible for detection frame sending and indicator data collection; the link topology generation module is mainly responsible for the generation of physical topology from the host to the storage end; the fault discovery analysis and positioning module is mainly responsible for discovering FC network link faults, and analyzing and locating faults; the data persistence module is mainly responsible for storing the generated link topology data and located fault data in the database; the alarm display module is mainly responsible for abnormal link alarms and fault location alarms.
[0080] Among them, ① the management configuration module performs basic configuration such as detection target and frequency; ② the data collection module sends free detection frames and collects data to the target storage network according to the configuration; ③ the data collection module sends back the detection data, and the link topology generation and maintenance module analyzes and generates the network topology and the timestamps of each path segment to form a baseline, and sends it to the fault analysis and positioning module for subsequent comparison; ④ after receiving the latest link information, the fault analysis module compares it with the baseline data to determine whether the link is abnormal at the moment. If it is abnormal, link directional detection is required; ⑤ the fault discovery analysis and positioning module schedules the data collection module to send directional detection frames for directional detection; ⑥ the data collection module sends directional detection frames to detect and collect data on abnormal links; ⑦ the data collection module returns the ports, timestamps and other data of each link segment of the directional detection, and the fault analysis and positioning module locates the fault location; ⑧ the link topology and fault location data are stored by the data persistence module; ⑨ the alarm display module outputs the fault location information and sends it to the operation and maintenance personnel.
[0081] Among them, the management configuration module is mainly used to configure the parameters, conditions, rules, etc. required for the operation of each module of the management device, and is the basic module for the operation of the entire device. For example, the data acquisition module detects the frame detection frequency and number of times; the trigger conditions between the link topology generation maintenance module and the fault analysis and positioning module; the fault analysis and positioning module is used to analyze and judge the rules, etc.
[0082] The data acquisition module is one of the core modules of the device, which is mainly responsible for sending detection frames and completing data collection. It periodically sends free detection frames to collect basic data; when the link is abnormal, this module is scheduled to send directional detection frames to complete directional detection and data collection, providing basic link data for the link topology generation and maintenance module and the fault discovery, analysis and positioning module.
[0083] 1) The free detection frame periodically detects all links and obtains the basic link data: According to the configuration parameters, the free detection frame is periodically sent to each link of the target n times to obtain the basic link data. If the target response frame is received, the link data is recorded according to the record format defined in the data area and sent to the link topology generation module for link topology generation. If the target response frame data is not received, the record is completed according to the data record format of the directional routing record area, and repeated detection is performed by the directional detection frame.
[0084] 2) Send directional detection frames to obtain detailed information of abnormal links: Perform directional detection on the links where the free detection frame does not receive the destination response frame data. First, obtain the information of the abnormal path (such as path number, port, etc.), record the data in the directional routing information area, and send directional detection frames for re-detection based on the recorded abnormal path information to obtain the timestamps of the entry and exit ports of each network element on the abnormal path and the corresponding network element information returned by the last directional detection frame.
[0085] Finally, the network element data collected by the two types of detection frames are sent to the link topology generation module and the fault discovery analysis and positioning module to generate the link topology and analyze the fault location.
[0086] The link topology generation module is one of the core modules of the device. It mainly uses the target FC network free detection data sent back by the data acquisition module to automatically and quickly analyze, generate or update the FC link topology, which is used as the baseline data for subsequent judgment and analysis of link failures.
[0087] First, through free detection (Q_Probe_F), n detection requests are sent to each path according to the configuration parameters to obtain link data; secondly, link data is generated according to device sn, entry, exit, etc., and repeated paths are merged after analysis; finally, the final link topology is formed after removing repeated paths, and each link record is saved as baseline data. The main process of generating link topology and forming baseline data is as follows:
[0088] 1) Generate link topology
[0089] By sending n free detection request frames (Q_Probe_F:FQ) to detect the target FC network, each hop network element free detection response frame (Q_Probe_F:FP) records the sn, entry, exit and other data of each hop device in the basic information recording area of the frame according to the defined format and returns it to the source end service host. The successful return data is sent to the link topology generation and maintenance module to record and save according to the following table format to complete the collection and summary of all link information. Figure 8 The figure shows a typical 4-path FC network.
[0090] like Fig. 9 As shown, a single path S1 is used to detect and obtain link data as an example.
[0091] An example of the free detection frame detection process record format is shown in Table 5 below.
[0092] Table 5
[0093]
[0094] like Fig. 9 As shown, the business host detects and collects H1 cards to send free detection request frames to the target storage (Logical Unit Number, Lun). According to the functional working principle of the detection frame, the collection and recording of the detection data on the link is completed, and a complete path such as business host H1-S1.P1-S1.P2-A.P1 is formed, that is, the paths are connected in sequence to form a network topology from the source end to the target end.
[0095] In the same way, all link paths from the host to the target storage are detected, analyzed and determined, and then a complete link topology is formed after removing duplicate paths.
[0096] 2) Forming baseline data
[0097] like Fig.10 As shown in the figure, the process of forming the latency baseline of a single path and a single SAN switch S1 is taken as an example:
[0098] The delay calculation process of each segment of a single link (H1-S1.P1-S1.P2-A.P1) is shown in Table 6 below.
[0099] Table 6
[0100]
[0101] The timestamps of each device port on the path recorded by the free probe frame: response (Q_Probe_F:FP) are then calculated by time difference to obtain:
[0102] a) Average delay of each link (Td x ): That is, the average delay of the first segment path: H1-S1P1 is n is the number of detections; the average delay of the second segment path: S1.P1-S1.P2 is The average delay of the third path: S1P2-A.P1 is
[0103]
[0104] b) The average total delay of the entire link (T all ): Average total delay
[0105]
[0106] The average delay Td of each link segment of each path is calculated x , the average total delay of a single link T all , repeatedly detect and calculate all link baseline data and save them. Fig.11 The figure shows the latency baseline of the four paths in the FC network.
[0107] As shown in Table 7, this is a calculation table for the overall average total delay of the four paths and the average delay of each path.
[0108] Table 7
[0109]
[0110] In view of the above calculation method, for more network elements, more complex networks and more paths, the link topology baseline and link delay baseline are formed through repeated detection, analysis and calculation of the above free detection frame (Q_Probe_F), providing baseline data for subsequent fault analysis and positioning, and subsequent free detection frames periodically detect each link and automatically update the link topology baseline at a fixed time.
[0111] The fault discovery, analysis and positioning module is one of the core modules of the device. It mainly discovers the abnormal data of the link returned by the free detection frame, schedules the directional detection frame to perform repeated detection along the original path, obtains more detailed detection data, and then analyzes and compares the baseline to finally locate the link path fault point.
[0112] First, when the module finds that the free detection frame: request frame (Q_Probe_F:FQ) of a certain link has not received the destination response for many times or the path delay is abnormal, it triggers the directional detection frame (Q_Probe_D) to perform repeated directional detection on the abnormal link; secondly, the module schedules the data acquisition module to send the directional detection frame to obtain detailed link data; finally, the data acquisition module returns the directional detection data, and the fault analysis and location module analyzes and compares it to complete the fault location.
[0113] If a "directional probe frame: request frame (Q_Probe_D:DQ)" is sent to an abnormal link and obtains detailed link data, if the destination directional probe frame: response (Q_Probe_D:DP) is not successfully received, the position of the last directional probe frame: response (Q_Probe_D:DP) is determined, that is, it is considered that there is an abnormality in the position of the directional probe frame: response (Q_Probe_D:DP) to the destination.
[0114] If the "Directed Probe Frame: Request Frame (Q_Probe_D:DQ)" can normally receive the destination response frame, but the path delay is abnormal, the actual path average total delay Td_s and the delay of each segment are obtained, and then the delay of each link segment is compared. If it is found that the delay of a certain segment is greater than the baseline Td_x value, it is determined that the link segment is abnormal.
[0115] like Fig.11 As shown, after the "directional detection frame" obtains the free detection frame path routing information (such as: H2-S2.P1-S2.P3-B.P4), detection is performed along the original path. If the last response frame received is S2.P3 (that is, the frame cannot be forwarded to the next hop), and multiple detections fail to receive the response frame at the target B.P4, it is located as a link failure at B.P4; if the frame can receive the response frame at the target B.P4 after arriving at S2.P3, but the time is long, then the B.P4 port or link is abnormal.
[0116] After analyzing and judging the above link and performance indicator data, if a link or device is located to be abnormal, the analysis and positioning results will be pushed to the data persistence module for solidification and storage, and finally pushed to the alarm display module, which will push it to the operation and maintenance personnel for processing.
[0117] The data persistence module is mainly used to complete the persistent solidification of data in each module, including the detection data of the data acquisition module, the relevant configuration data of the management configuration module, the link topology data of the link topology generation and maintenance module, and the analysis result data of the fault location analysis module, providing real-time and historical data for analysis and judgment and alarm display for the device.
[0118] The alarm display module mainly realizes the alarm display of abnormal links and fault point locations. On the one hand, it sends abnormal alarm information after receiving it from the fault analysis and positioning module, and notifies the administrator by email, SMS, etc. On the other hand, it marks the abnormal points of the topology and displays the problems intuitively.
[0119] In order to solve the problems of insufficient operation and maintenance means and difficulty in fault location in FC link scenarios, this embodiment designs two types of FC extended detection data frames based on the FC protocol for detecting and collecting link data. Combined with the designed frame functions and usage methods, detailed indicator data of the target link network element under normal and abnormal conditions is automatically obtained for rapid analysis, thereby realizing link topology generation and fault point judgment and location.
[0120] In this embodiment, network element indicator data collection is automated, and topology links are automatically generated: one-click detection of storage network elements is achieved through custom detection frames Q_Probe_*, and basic network information and performance indicator data are quickly acquired and analyzed, which automates the complex manual login multi-level network element troubleshooting work, making network information acquisition faster and more efficient, and quickly completing network topology structure analysis. Directed detection frames achieve fault analysis and judgment capabilities without relying on manual experience and capabilities: through the innovatively designed directional detection frames, abnormal paths are repeatedly detected in a directional manner, and the real-time and latest data of the abnormal path as a whole and each segment of the path can be obtained to automatically complete fault analysis, location, and alarm display, without relying on the ability and experience of engineers.
[0121] like Fig.12 As shown, it is a schematic diagram of a fault location device provided in an embodiment of the present application. Fig.12 As shown, the fault location device may include: a first determination module 1201 , a second determination module 1202 , an acquisition module 1203 and a fault location module 1204 .
[0122] Among them, the first determination module 1201 is used to use a preset free detection frame to detect each link in the optical channel FC link, determine the link topology from the host to the storage, and the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack, and is used to obtain the data of each network element in the FC link; the second determination module 1202 is used to determine the first link where the abnormality occurs when an abnormality occurs in the FC link; the acquisition module 1203 is used to use a preset directional detection frame to detect along the first link, and obtain the data of each path in the first link. The directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack, and is used to perform directional repeated detection on the abnormal link; the fault location module 1204 is used to determine the fault point position of the first link based on the data of each path in the first link.
[0123] In the embodiment of the present application, first, the first determination module 1201 uses a pre-set free detection frame to detect each link in the optical channel FC link, determines the link topology from the host to the storage, and the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to obtain the data of each network element in the FC link. The second determination module 1202 determines the first link where the abnormality occurs when the FC link is abnormal. Then the acquisition module 1203 uses a pre-set directional detection frame to detect along the first link to obtain the data of each path in the first link. The directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to perform directional repeated detection on the abnormal link. Finally, the fault location module 1204 determines the fault point position of the first link based on the data of each path in the first link. The embodiment of the present application determines the link topology and baseline data through a pre-set free detection frame, and uses a pre-set directional detection frame to locate the fault point when an abnormality occurs, which can quickly complete fault discovery and location, and does not rely on the ability of technicians, thereby improving efficiency.
[0124] In a possible implementation of the present application, the encapsulation of free detection frames and directional detection frames includes: using a combination of frame header control and data structure type fields in a frame header of a link layer of an FC protocol stack to identify network detection and data recording of free detection frames and / or directional detection frames; using a data area of a link layer of the FC protocol stack to identify detection requests and detection responses of free detection frames and / or directional detection frames, wherein the data area includes a frame identification area, a detection information recording area, a common extension area, and a directional routing information area, the frame identification area is used to identify free detection frames and directional detection frames, the detection information recording area is used to record data acquired by free detection frames and directional detection frames, the common extension area is an extended reserved area for the detection information recording area and the directional routing information area, and the directional routing information area is used to ensure that the detection frame can perform repeated detection along the original path.
[0125] In a possible implementation of the present application, the detection information recording area includes a device information field, an ingress information field, an ingress timestamp field, an egress information field, an egress timestamp field and a traffic field, wherein the device information field is used to record the device serial number of the detection frame arriving at the device, the ingress information field is used to record the frame ingress number information, the ingress timestamp field is used to record the timestamp of the frame entering the ingress, the egress information field is used to record the frame egress number information, the egress timestamp field is used to record the timestamp of the frame passing through the egress, and the traffic field is used to record the traffic at the egress.
[0126] In a possible implementation of the present application, the first determination module 1201 is used to: obtain the timestamp of each device port on the path of each link in the FC link; determine the average value of the delay of each link segment according to the number of detections; determine the average total delay of the FC link based on the average value of the delay of each link segment; determine the baseline data of each link based on the average value of the delay of each link segment and the average total delay of the FC link.
[0127] In a possible implementation of the present application, the directional routing information area includes a path number field, a device information field, an ingress information field, and an egress information field, wherein the path number field is used to record the number of a single path for the detection frame to reach the device, the device information field is used to record the device serial number of the detection frame arriving at the device, the ingress information field is used to record the frame ingress number information, and the egress information field is used to record the frame egress number information.
[0128] In a possible implementation of the present application, the first determination module 1201 is used for: the source end sends a first free detection frame to the destination end through each link in the FC link; when the first device in the FC link receives the first free detection frame, the source end forwards the first free detection frame to the second device in the FC link, and writes the data of the first free detection frame into the first position of the detection information recording area; when the second device receives the first free probe, the source end forwards the first free detection frame to the third device in the FC link, and writes the data of the first free detection frame into the second position of the detection information recording area, until the first free detection frame reaches the destination end through each link in the FC link, and the second position is the position after the first position; when the first free detection frame reaches the destination end, the destination end sends a second free detection frame to the source end, and writes the data of the second free detection frame into the directional routing information area; when the source end receives the second free detection frame sent by the destination end, the link topology from the host to the storage and the baseline data of each link are generated according to the data in the detection information recording area.
[0129] In a possible implementation of the present application, a link abnormality includes that a path in the link does not receive a response frame to a free detection frame, and a delay in the path in the link receiving a response frame to a free detection frame is greater than a delay threshold; an acquisition module is used to: obtain abnormal path information from a detection information recording area, the abnormal path information includes a first link; send a first directional detection frame along the first link, wherein the first directional detection frame passes through multiple devices in the first link; when each device in the first link receives the first directional detection frame, forward the first directional detection frame to the next device along the first link, and reply with a response frame to the source end; when the source end does not receive a response frame from the same device for a preset number of times, determine that there is an abnormality in the path where the device is located.
[0130] In a possible implementation manner of the present application, the fault location module further includes a second acquisition module and a comparison module.
[0131] Among them, the second acquisition module is used to obtain the total delay of the first path and the delay of each path section when the source end receives response frames from multiple devices; the comparison module is used to compare the total delay of the first path and the delay of each path section with the baseline data to determine the abnormal location.
[0132] The function of the fault location device of this application is already Figure 1-Figure 11 The method embodiment shown is described in detail, so for any details not provided in the description of this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, which will not be repeated here.
[0133] Optionally, an embodiment of the present application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned fault location method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0134] Optionally, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned fault location method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0135] Optionally, an embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes each process of the above-mentioned fault location method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0136] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0138] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A fault location method, characterized in that: include: Using a preset free detection frame to detect each link in the optical channel FC link, determine the link topology from the host to the storage, and the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack, which is used to obtain the data of each network element in the FC link; In the case where the FC link is abnormal, determining a first link where the abnormality occurs; Using a preset directional detection frame to detect along the first link, and obtaining data of each path in the first link, the directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack, and is used for directional repeated detection of abnormal links; Based on the data of each path segment in the first link, the location of the fault point of the first link is determined.
2. The method according to claim 1, characterized in that The encapsulation of the free detection frame and the directional detection frame includes: Using a frame header control and data structure type field combination in a frame header of a link layer of the FC protocol stack, identifying network detection and data records of the free detection frame and / or the directional detection frame; The data area of the link layer of the FC protocol stack is used to identify the detection request and detection response of the free detection frame and / or the directional detection frame, wherein the data area includes a frame identification area, a detection information recording area, a common extension area and a directional routing information area, the frame identification area is used to identify the free detection frame and the directional detection frame, the detection information recording area is used to record the data obtained by the free detection frame and the directional detection frame, the common extension area is an extended reserved area for the detection information recording area and the directional routing information area, and the directional routing information area is used to ensure that the detection frame can perform repeated detection along the original path.
3. The method according to claim 2, characterized in that The detection information recording area includes a device information field, an entry information field, an entry timestamp field, an exit information field, an exit timestamp field and a traffic field, wherein the device information field is used to record the device serial number of the detection frame arriving at the device, the entry information field is used to record the frame entry number information, the entry timestamp field is used to record the timestamp of the frame entering the entry, the exit information field is used to record the frame exit number information, the exit timestamp field is used to record the timestamp of the frame passing through the exit, and the traffic field is used to record the traffic of the exit.
4. The method according to claim 2, characterized in that: The directional routing information area includes a path number field, a device information field, an ingress information field and an egress information field, wherein the path number field is used to record the number of a single path for the detection frame to reach the device, the device information field is used to record the device serial number of the detection frame arriving at the device, the ingress information field is used to record the frame ingress number information, and the egress information field is used to record the frame egress number information.
5. The method according to claim 2, characterized in that: The method of using a preset free detection frame to detect each link in the optical channel FC link to determine the link topology from the host to the storage and the baseline data of each link includes: The source end sends a first free detection frame to the destination end through each link in the FC link; When the first device in the FC link receives the first free detection frame, the first device in the FC link forwards the first free detection frame to the second device in the FC link, and writes data of the first free detection frame into the first position of the detection information recording area; When the second device receives the first free probe, it forwards the first free probe frame to the third device in the FC link, and writes the data of the first free probe frame into the second position of the detection information recording area until the first free probe frame reaches the destination end through each link in the FC link, and the second position is a position after the first position; When the first free detection frame reaches the destination end, the destination end sends a second free detection frame to the source end, and writes data of the second free detection frame into the directional routing information area; When the source end receives the second free detection frame sent by the destination end, the link topology from the host to the storage and the baseline data of each link are generated according to the data in the detection information recording area.
6. The method according to claim 2, characterized in that The method of using a preset free detection frame to detect each link in the optical channel FC link to determine the link topology from the host to the storage and the baseline data of each link includes: Get the timestamp of each device port on the path of each link in the FC link; Determine the average value of each link delay according to the number of detections and the timestamp; Determine the average total delay of the FC link based on the average value of the delay of each link segment; Based on the average value of the delay of each link segment and the average total delay of the FC link, the baseline data of each link is determined.
7. The method according to claim 2, characterized in that The abnormality of the link includes that the path in the link does not receive the response frame of the free detection frame, and the delay of the path in the link receiving the response frame of the free detection frame is greater than the delay threshold; The using a preset directional detection frame to detect along the first link to obtain data of each path in the first link includes: Acquire abnormal path information from the detection information recording area, wherein the abnormal path information includes a first link; Sending a first directional sounding frame along the first link, wherein the first directional sounding frame passes through a plurality of devices in the first link; When each device in the first link receives the first directional detection frame, forward the first directional detection frame to the next device along the first link, and reply a response frame to the source end; When the source end does not receive a response frame from the same device for a preset number of times, it is determined that an abnormality exists in the path where the device is located.
8. The method according to claim 7, characterized in that The method further comprises: When the source end receives response frames from multiple devices, obtaining a total delay of the first path and a delay of each path segment; The total delay of the first path and the delay of each path segment are compared with the baseline data to determine the abnormal location.
9. A fault location device, characterized in that: include: The first determination module is used to detect each link in the optical channel FC link using a preset free detection frame to determine the link topology from the host to the storage and the baseline data of each link. The free detection frame is a data frame encapsulated in the link layer of the FC protocol stack and is used to obtain the data of each network element in the FC link; A second determination module is used to determine the first link where the abnormality occurs when the FC link is abnormal; an acquisition module, configured to perform detection along the first link using a preset directional detection frame to acquire data of each path segment in the first link, wherein the directional detection frame is a data frame encapsulated in the link layer of the FC protocol stack and is used to perform directional repeated detection on abnormal links; The fault location module is used to determine the fault point location of the first link based on the data of each path segment in the first link.
10. A terminal device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to execute the steps of implementing the method according to any one of claims 1 to 8.
Citation Information
Cited By
Fault diagnosis method and device for passive optical network system, equipment and medium
CN119815216A
Control method and system of multichannel optical cable spare power automatic switching device
CN119853786A
Wireless ad hoc network communication system based on high dynamic routing protocol
CN120499879A
A wireless ad hoc network communication system based on a high dynamic routing protocol
CN120499879B
Fault equipment positioning method, device, system, equipment, medium and program product
CN120743654A
