[go: up one dir, main page]

CN119094331A - Switch detection and repair method, device, equipment and medium - Google Patents

Switch detection and repair method, device, equipment and medium Download PDF

Info

Publication number
CN119094331A
CN119094331A CN202411344654.6A CN202411344654A CN119094331A CN 119094331 A CN119094331 A CN 119094331A CN 202411344654 A CN202411344654 A CN 202411344654A CN 119094331 A CN119094331 A CN 119094331A
Authority
CN
China
Prior art keywords
target
port
information
module
eeprom
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411344654.6A
Other languages
Chinese (zh)
Inventor
谢彬彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Yep Telecommunication Technology Co Ltd
Original Assignee
Xian Yep Telecommunication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Yep Telecommunication Technology Co Ltd filed Critical Xian Yep Telecommunication Technology Co Ltd
Priority to CN202411344654.6A priority Critical patent/CN119094331A/en
Publication of CN119094331A publication Critical patent/CN119094331A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Monitoring And Testing Of Transmission In General (AREA)

Abstract

The application provides a detection and repair method, a device, equipment and a medium of a switch, wherein the method comprises the steps of firstly, determining the connection state of each port in the switch and the type of a module inserted by each port; and then, if the connection state of the configured target port is still the connection interruption, determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port, wherein the second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information, and finally, repairing the target cable module according to the target EEPROM information. The method of the application improves the efficiency of detecting and repairing the ports and modules of the switch, reduces the labor cost and ensures the stability of network connection.

Description

Method, device, equipment and medium for detecting and repairing switch
Technical Field
The present application relates to the field of network switch communications technologies, and in particular, to a method, an apparatus, a device, and a medium for detecting and repairing a switch.
Background
Network infrastructure needs to have high scalability and stability to handle more device connections and larger data traffic. The switch is core equipment of network infrastructure, is responsible for data transmission between different equipment, and the corresponding connected modules can enable data to be transmitted more efficiently and accurately, so that in network management, detection and maintenance of ports and modules of the switch are vital, stability of a network is maintained, and continuity and safety of various network services are guaranteed.
In the prior art, the detection of the ports and the modules of the switch depends on manual inspection and maintenance, usually, related maintenance personnel are dispatched to inspect part of the switch or the faulty switch at regular intervals or when the switch fails, and the states of the ports and the modules of the switch are inspected and repaired one by one after the fault is found so as to ensure the normal operation of the ports and the modules of the switch.
However, the detection and repair methods for the ports and the modules of the switch in the prior art are low in efficiency, time-consuming and labor-consuming, and difficult to ensure the stability of the network.
Disclosure of Invention
The application provides a detection and repair method, device, equipment and medium for a switch, which are used for solving the problems that the detection and repair modes of a switch port and a module thereof in the prior art are low in efficiency, time-consuming and labor-consuming, and the stability of a network is difficult to ensure.
In a first aspect, the present application provides a method for detecting and repairing a switch, including:
determining the connection state of each port in the switch and the type of a module inserted by each port;
Aiming at a target port with a connection state of connection interruption and a module type of cable, reconfiguring the target port according to a first mapping relation and the target port, wherein the first mapping relation is used for indicating the corresponding relation between the port and Serdes information;
if the connection state of the configured target port is still the connection interruption, determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port, wherein the second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information;
And repairing the target cable module according to the target EEPROM information.
Optionally, the reconfiguring the target port according to the first mapping relationship and the target port includes:
acquiring target Serdes information corresponding to the target port identification according to the first mapping relation and the target port identification corresponding to the target port;
Reconfiguring the target port according to the target Serdes information;
And controlling the configured target port to be powered on and powered off again.
Optionally, the determining, according to the second mapping relationship and the target cable module inserted by the target port, target EEPROM information of the target cable module includes:
acquiring a target data transmission rate of the target port;
And determining the target EEPROM information corresponding to the target cable module according to the target data transmission rate and the second mapping relation.
Optionally, before the repairing the target cable module according to the target EEPROM information, the method further includes:
Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information;
Storing the abnormal EEPROM information and the identification corresponding to the target cable module into a fault module table;
and setting the value of the first binary bit of the first field corresponding to the target cable module in the fault module table to be in repair.
Optionally, after the repairing the target cable module according to the target EEPROM information, the method further includes:
Detecting the target port and re-determining the connection state of the target port;
if the redetermined connection state is connected, setting the value of the second binary bit of the first field to be successfully repaired;
and if the redetermined connection state is the connection interruption, setting the value of the second binary bit of the first field to be repaired but failed.
Optionally, after determining the connection state of each port in the switch and the module type inserted by each port, the method further includes:
and storing the target port identification of the target port into a fault port table.
Optionally, the method further comprises:
determining release sub-information of the target cable module according to the target EEPROM information, wherein the release sub-information is used for indicating whether the target cable module is a release version or not;
and storing the release sub-information into a second field corresponding to the target cable module in the fault module table.
In a second aspect, the present application provides a detection repair device for a switch, including:
The first determining module is used for determining the connection state of each port in the switch and the module type of each port insertion;
The configuration module is used for reconfiguring the target port according to a first mapping relation and the target port, wherein the connection state is a connection interruption, the type of the module is a target port of a cable, and the first mapping relation is used for indicating the corresponding relation between the port and Serdes information;
The second determining module is used for determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port if the configured connection state of the target port is still connection interruption, wherein the second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information;
And the repair module is used for repairing the target cable module according to the target EEPROM information.
Optionally, the configuration module is specifically configured to:
acquiring target Serdes information corresponding to the target port identification according to the first mapping relation and the target port identification corresponding to the target port;
Reconfiguring the target port according to the target Serdes information;
And controlling the configured target port to be powered on and powered off again.
Optionally, the second determining module is specifically configured to:
acquiring a target data transmission rate of the target port;
And determining the target EEPROM information corresponding to the target cable module according to the target data transmission rate and the second mapping relation.
Optionally, the detection and repair device of the switch further includes a processing device, before repairing the target cable module according to the target EEPROM information, the processing device is configured to:
Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information;
Storing the abnormal EEPROM information and the identification corresponding to the target cable module into a fault module table;
and setting the value of the first binary bit of the first field corresponding to the target cable module in the fault module table to be in repair.
Optionally, after the repairing the target cable module according to the target EEPROM information, the processing module is further configured to:
Detecting the target port and re-determining the connection state of the target port;
if the redetermined connection state is connected, setting the value of the second binary bit of the first field to be successfully repaired;
and if the redetermined connection state is the connection interruption, setting the value of the second binary bit of the first field to be repaired but failed.
Optionally, after determining the connection state of each port in the switch and the module type of each port insertion, the first determining module is further configured to:
and storing the target port identification of the target port into a fault port table.
Optionally, the processing module is further configured to:
determining release sub-information of the target cable module according to the target EEPROM information, wherein the release sub-information is used for indicating whether the target cable module is a release version or not;
and storing the release sub-information into a second field corresponding to the target cable module in the fault module table.
In a third aspect, the application provides an electronic device comprising a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the method for detecting and repairing a switch according to the first aspect and the various possible implementation manners of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium, including computer executable instructions, which when executed by a processor, perform a method for repairing a switch according to the first aspect and various possible implementations of the first aspect.
The detection and repair method, device, equipment and medium of the switch comprise the steps of firstly determining the connection state of each port in the switch and the type of a module inserted by each port, then reconfiguring the target port according to a first mapping relation and the target port aiming at the target port with the connection state of connection interruption and the type of the module being cable, then determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port if the connection state of the configured target port is still connection interruption, and finally repairing the target cable module according to the target EEPROM information. According to the method, various fault conditions possibly occurring in the fault port and the cable module of the switch are considered, the port and the module are detected in sequence, the problem is gradually checked, the accuracy of fault positioning and repairing is improved, the equipment is stably operated, and the manual intervention is reduced, so that the maintenance cost is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a system schematic diagram of a method for detecting and repairing a switch according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a detection and repair module according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a method for detecting and repairing a switch according to an embodiment of the present application;
fig. 4 is a second flow chart of a detection and repair method of a switch according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a detection and repair device of a switch according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
Network infrastructure needs to have high scalability and stability to cope with the ever increasing demands for device connections and the ever increasing data traffic. In modern network architecture, switches serve as core devices, assuming critical data transmission tasks. The switch efficiently routes and exchanges data between different devices through its ports, and the modules (e.g., optical modules, copper cable modules) associated therewith further optimize the efficiency and accuracy of data transmission. Therefore, in network management, the regular detection and maintenance of the switch ports and modules is not only a key link for guaranteeing the network stability, but also a foundation for guaranteeing the continuity and safety of various network services.
In the prior art, the detection and repair mode of the switch mainly depends on manual inspection and repair. In general, a network administrator or a maintenance team periodically performs inspection on a switch, or when a problem occurs in a network and the switch fails, sends related technicians to inspect a part of the switch or the failed switch. The checking process includes preliminary detection of the physical state of the switch, and then checking the port of the switch and the state of the module. Once a fault is found, technicians can check the port and module state of the switch one by one, and possible fault sources are gradually eliminated so as to ensure the normal operation of the switch.
However, this manual detection and repair approach is complex and inefficient in the prior art. First, since manual inspection requires one-by-one investigation and manual operation, the overall process is inefficient. Especially in the large-scale network equipment environment, the switch quantity is numerous, and manual detection is not only time consuming and laborious, but also can not in time cover all equipment because of the manpower restriction easily to the time is restoreed in the extension trouble. Secondly, the manual detection method is easily affected by human factors, such as technicians with insufficient experience may have difficulty in accurately locating complex problems, or a condition of missed detection occurs under heavy workload, so that faults cannot be completely removed or hidden problems are not found in time.
Based on this, the application proposes a detection and repair method, device, equipment and medium for a switch, because the reason that the switch fails is usually due to the configuration of a port of the switch or the configuration of each port insertion module has errors, for example, the serializer/deserializer (Serdes) information of the port is inconsistent with the standard Serdes information configuration, or the electrically erasable programmable read-only memory (EEPROM) information of the cable (cable) module inserted into each port is inconsistent with the standard EEPROM information, the network equipment cannot normally perform data transmission, and the above failure causes can be detected and repaired through an automation mechanism. Therefore, when most of fault switches are detected, the switch ports and the modules connected with the switch ports can be detected and repaired, so that fault reasons can be accurately positioned, and labor cost is reduced. The method comprises the steps of determining a fault port according to the connection state of each port in a switch, obtaining target Serdes information of the fault port for the fault port, reconfiguring the fault port by using the target Serdes information to repair the port fault, obtaining target EEPROM information of a target cable module inserted by the fault port if the connection state of the configured target port is still in connection interruption, reconfiguring the cable module by using the target EEPROM information to repair the cable fault, and therefore detecting and repairing the ports and the modules of the switch and repairing the fault in most cases, not only improving the efficiency of fault processing of the switch, but also reducing the requirement on manual whole-course intervention, thereby obviously reducing maintenance cost and ensuring correct operation of the switch.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a system schematic diagram of a method for detecting and repairing a switch according to an embodiment of the present application. As shown in fig. 1, the system includes a switch and a cable module into which a switch port is inserted.
The switch also comprises a detection repair module, serdes information of the switch and a physical port for connecting the cable module, wherein the Serdes information comprises important parameters affecting signal transmission quality, such as pre-emphasis parameters for adjusting signal transmission, equalizer parameters and the like, the cable module also comprises EEPROM information of the module, and the EEPROM information comprises basic information, extension information, custom information and the like of the module and is used for rapidly identifying the module information and resetting the port by utilizing the information so as to perform normal data transmission.
It should be noted that, the switch supports multiple switch chips, port data transmission rates support 100G, 200G and 400G, the cable module inserted by the switch physical port supports standard protocols such as pluggable module standard (Small Form-Factor pluggable, SFF) 8472/SFF8436/SFF 8024/Common Management Interface Standard (CMIS), and in the actual use process, the switch port is traversed first, then the data transmission rate of the port is obtained through the software package of the built-in switch chip, and the current EEPROM information of the cable module is read through the serial communication bus.
Fig. 2 is a schematic structural diagram of a detection and repair module provided by the embodiment of the application, and as shown in fig. 2, the module comprises Serdes information tables of different ports, information tables of EEPROMs of cable modules of different standards, a fault port table, a fault port state, a fault module table and a fault module state.
The Serdes information tables of different ports pre-store different pre-emphasis values of the digital-analog converter and the optical module under different data transmission rates, and the pre-emphasis values are used for improving the high-frequency component of the high-speed serial data signal of the exchanger, counteracting the high-frequency loss of the signal in the transmission process and ensuring the correct transmission of the signal. The EEPROM information tables of the cable modules with different standards pre-store the standard information tables of the EEPROM of the cable modules with different data transmission rates. The fault port table and the fault port state are automatically generated according to Serdes information tables of different ports and used for recording port fault logs and fault port abnormal signal states, and correspondingly, the fault module table and the fault module state are automatically generated according to an EEPROM information table of a cable module and used for recording fault module logs and fault module abnormal information states.
Fig. 3 is a flowchart of a method for detecting and repairing a switch according to an embodiment of the present application. The method comprises the following steps:
S301, determining the connection state of each port in the switch and the type of the module inserted by each port.
The connection state of each port includes connection success or connection failure, and the module type may include a digital-analog converter, an optical module, or other modules.
It can be understood that during the maintenance and detection of the switch, according to the connection state of each port and the type of the module inserted by each port, whether each port operates normally can be rapidly determined, a basis is provided for the subsequent fault repair,
S302, aiming at a target port with a connection state of connection interruption and a module type of cable, reconfiguring the target port according to a first mapping relation and the target port.
The first mapping relationship is used for indicating a corresponding relationship between the port and the Serdes information.
In one implementation, a specific process for reconfiguring a target port includes:
Firstly, according to a first mapping relation and a target port identifier corresponding to a target port, obtaining target Serdes information corresponding to the target port identifier, then, reconfiguring the target port according to the target Serdes information, and finally, controlling the configured target port to be powered on and powered off again.
It can be understood that when the connection state of the port is determined to be the connection interruption and the model type inserted by the port is the cable type, the port is identified as the target port, then, the target Serdes information corresponding to the target port identification is obtained in the first mapping relation according to the target port identification by utilizing the first mapping relation, and finally, the target Serdes information is written into the Serdes module of the port through the management interface (such as Command line interface (Command LINE INTERFACE, CLI), simple network management protocol (Simple Network Management Protocol, SNMP) or special application programming interface (Application Programming Interface, API)) of the switch to perform reconfiguration, and the target port is controlled to perform the power-on and power-off operation again, so as to ensure that the reconfigured Serdes information is effective. The configuration process can automatically match the target Serdes information of the target port, thereby avoiding the complexity and the error of manual configuration, improving the operation and maintenance efficiency and reducing the fault repair time.
S303, if the configured connection state of the target port is still the connection interruption, determining target EEPROM information of the target cable module according to the second mapping relation and the target cable module inserted by the target port.
The second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information;
It should be appreciated that after the Serdes information reconfiguration and port powering up and down operations of S302 are completed for the destination port, the connection state of the destination port is redetermined. If the target port is still in the connection interruption state, the reason for the fault of the target port is possibly that the target cable module inserted by the target port has the fault, so that the target EEPROM information of the target cable module needs to be further acquired to check and repair the target cable module, the fault can be accurately positioned by the way of gradually narrowing the fault range, and the fault repair accuracy is improved.
In one implementation, a specific process for determining target EEPROM information of a target cable module includes:
And then, according to the second mapping relation of the target data transmission rate and the target data transmission rate, determining the target EEPROM information corresponding to the target cable module.
It should be understood that, because the EEPROM information of the cable module includes standard configuration information under different rates, when determining the target EEPROM information of the target cable module, the target data transmission rate of the target port needs to be acquired first, and based on this, the target cable module information that is the same as the target data transmission rate of the target port is acquired according to the second mapping relationship, and further, the target EEPROM information corresponding to the target cable module is determined. By the method, the configuration between the cable module and the port can be ensured to be correct, and transmission errors or performance degradation caused by configuration mismatch can be effectively avoided.
S304, repairing the target cable module according to the target EEPROM information.
It can be understood that the built-in EEPROM information of the target cable module is checked and compared according to the determined target EEPROM information, and inconsistent information is reconfigured to repair the target cable module.
The application provides a detection and repair method of a switch, which comprises the steps of firstly determining the connection state of each port in the switch and the type of a module inserted by each port, then reconfiguring the target port according to a first mapping relation and the target port aiming at the target port with the connection state of connection interruption and the type of the module of cable, then determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port if the connection state of the configured target port is still connection interruption, and finally repairing the target cable module according to the target EEPROM information. According to the method, various fault conditions possibly occurring in the fault port and the cable module of the switch are considered, the port and the module are detected in sequence, the problem is gradually checked, the accuracy of fault positioning and repairing is improved, the equipment is stably operated, and the manual intervention is reduced, so that the maintenance cost is reduced.
In one implementation manner, after determining the connection state of each port in the switch and the module type inserted by each port, the state of the port needs to be recorded, which specifically includes:
and storing the target port identification of the target port into a fault port table.
Where port identification refers to a tag that uniquely identifies a physical or logical port on a switch.
It can be understood that in the process of maintaining and detecting the switch, according to the connection state of each port and the module type inserted by each port, whether each port operates normally or not can be rapidly determined, and the port identification of the fault port is timely stored in the fault port table, so that reliable data support is provided for subsequent fault analysis and problem investigation.
Fig. 4 is a second flowchart of a detection and repair method of a switch according to an embodiment of the present application. As shown in fig. 4, this embodiment describes in detail a mode of fault marking a module before repairing the target cable module based on the embodiment of fig. 3, and specifically includes the following steps:
s401, comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information.
Since different pages (pages) are included in the EEPROM information and different data information is included in the different pages, for example, the EEPROM information includes contents of pages 0 to 7, and these information may include vendor ID of the module, basic information, calibration data, pre-emphasis value, temperature sensor data, user-defined module information, and the like.
It should be noted that the user-defined module information may include user-defined module information of a user, for example, page7 in the EEPROM information is a user-defined module information page, and includes different fields (bits), such as bit0-bit2, corresponding to bit0, which may define whether a module flag is formally issued, for example, 1 indicates a module that is formally issued, 0 indicates a module that is not formally issued, bit1, which may define whether a flag is repaired in use, for example, 1 may indicate a module that is repaired in test, 0 may indicate a module that is repaired, bit2, which may define whether a flag is normally operated after repair, for example, 1 may indicate a module that is repaired in test, and a port is successfully connected, 0 may indicate a module that is repaired in test but that the port is still failed in connection, and needs to be checked again.
It should be understood that the current EEPROM information of the target cable module and the target EEPROM information are checked and compared one by one, and the inconsistent information in the current EEPROM information and the target EEPROM information is used as the abnormal sub-EEPROM information, so that the abnormality in configuration can be effectively identified. The method can help to quickly locate and repair configuration errors, thereby ensuring correct communication between the switch port and the cable module and improving the stability and performance of network equipment.
S402, storing the abnormal EEPROM information and the identification corresponding to the target cable module into a fault module table.
It can be understood that after the abnormal EEPROM information is obtained, the identified abnormal EEPROM information and the identification information of the target Cable module are associated and stored in the fault module table, so that the EEPROM information configuration problem of the Cable module can be effectively tracked and managed later.
S403, setting the value of the first binary bit of the first field corresponding to the target cable module in the fault module table as being repaired.
It should be understood that when the current EEPROM information is inconsistent with the target EEPROM information, that is, the configuration information of the target cable module has an error, the EEPROM information of the target cable module needs to be repaired to ensure the normal connection of the port, so that a user-defined module information page of the current EEPROM information needs to be written into the fault module table, and a value of a first binary bit of a first field corresponding to the target cable module is set to be in repair, so that the system can effectively manage and track the configuration repair process of the target cable module.
For example, when detecting a cable module, it is found that there is an inconsistency between the current EEPROM information and the target EEPROM information, for example, the pre-emphasis value in the current EEPROM information of the target cable module is 0x03 and the pre-emphasis value in the target EEPROM information is 0x02, then the identification information (such as the module serial number and the vendor ID) of the cable module and the abnormal EEPROM information (the pre-emphasis value of 0x 03) are associated and written into a fault module table, and then in the fault module table, the first binary bit of the first field is set to 1 (i.e., bit1 is 1), which indicates that the module is in the "in repair" state.
It should be noted that, after repairing the target cable module according to the target EEPROM information, the repaired port needs to be retested and the repairing result is marked, so that the state of the port can be quickly identified later.
In an realizable mode, the specific process of marking the repaired port by the repairing result is as follows:
Detecting the target port, redefining the connection state of the target port, setting the value of the second binary bit of the first field to be repaired successfully if the redetermined connection state is connected, and setting the value of the second binary bit of the first field to be repaired but failed if the redetermined connection state is interrupted.
For example, if the redetected port connection status is connected, the value of the second binary bit of the first field is set to be repaired successfully, i.e. bit2 is 1, and if the redetected port connection status is connected failed, the value of the second binary bit of the first field is set to be repaired but failed, i.e. bit2 is 0.
It can be understood that after the current EEPROM information of the target cable module is reconfigured, the target port is detected again to obtain the connection state of the target port, if the connection state is connected, it is indicated that the port fault is caused by the configuration error of the current EEPROM information of the port cable module, and the connection is successful after the reconfiguration, then the value of the second binary bit of the first field is set to be repaired successfully, if the connection state is connected, it is indicated that the port fault may be caused by other physical reasons, further fault detection of the target port is required by a maintainer, and the value of the second binary bit of the first field is set to be repaired but failed. In this way, the system can automatically track the result of each repair attempt, whether the repair is successful or failed, the state information is accurately recorded, the requirement for human intervention is reduced, and the efficiency of fault management and repair work is remarkably improved.
Optionally, after the target EEPROM information is obtained, the module version of the module needs to be marked, and the specific process includes:
Firstly, determining release sub-information of a target cable module according to target EEPROM information, and then storing the release sub-information into a second field corresponding to the target cable module in a fault module table.
The release sub-information is used for indicating whether the target cable module is a release version or not.
It will be appreciated that, according to the target EEPROM information, different page information (e.g., page0-page 7) of the target cable module is obtained, if the page information does not include vendor information (e.g., page0 is empty), it indicates that the cable module is an informal release version, further testing is required, if the page information includes vendor information (e.g., page0 includes vendor information and a module version), that is, it indicates that the cable module is an informal release version, the detailed testing has been passed, then the release sub information is stored in a second field (e.g., if the cable module is an informal release version, flag bit0 is 1, and if the cable module is an informal release version, flag bit0 is 0) corresponding to the target cable module in the fault module table. In this way, the manager can quickly acquire module information in the subsequent fault processing, and further maintain and manage the fault module.
Fig. 5 is a schematic structural diagram of a detection and repair device of a switch according to an embodiment of the present application, and as shown in fig. 5, a detection and repair device 50 of a switch includes:
A first determining module 501, configured to determine a connection state of each port in the switch, and a module type in which each port is inserted;
the configuration module 502 is configured to reconfigure a target port according to a first mapping relationship and the target port, wherein the connection state is a target port with a connection interrupt and the module type is cable, and the first mapping relationship is used for indicating a corresponding relationship between the port and Serdes information;
A second determining module 503, configured to determine, if the configured connection state of the target port is still a connection interruption, target EEPROM information of the target cable module according to a second mapping relationship and a target cable module inserted by the target port, where the second mapping relationship is used to indicate a mapping relationship between the cable module and the EEPROM information;
and the repair module 504 is configured to repair the target cable module according to the target EEPROM information.
In a possible implementation manner, the configuration module 502 is specifically configured to:
Acquiring target Serdes information corresponding to the target port identification according to the first mapping relation and the target port identification corresponding to the target port;
reconfiguring a target port according to the target Serdes information;
and controlling the configured target port to be powered on and powered off again.
In a possible implementation manner, the second determining module 503 is specifically configured to:
acquiring a target data transmission rate of a target port;
And determining target EEPROM information corresponding to the target cable module according to the target data transmission rate and the second mapping relation.
In a possible implementation manner, the detection and repair device of the switch further includes a processing device, and before repairing the target cable module according to the target EEPROM information, the processing module is configured to:
Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information;
Storing the abnormal sub-EEPROM information and the identification corresponding to the target cable module into a fault module table;
And setting the value of the first binary bit of the first field corresponding to the target cable module in the fault module table as being repaired.
In a possible implementation manner, after repairing the target cable module according to the target EEPROM information, the processing module is further configured to:
detecting the target port and re-determining the connection state of the target port;
If the redetermined connection state is connected, setting the value of the second binary bit of the first field as successfully repaired;
If the redetermined connection state is a connection interruption, the value of the second binary bit of the first field is set to repaired but failed.
In a possible implementation manner, after determining the connection state of each port in the switch and the module type of each port is inserted, the first determining module 501 is further configured to:
and storing the target port identification of the target port into a fault port table.
In a possible implementation manner, the processing module is further configured to:
determining release sub-information of the target cable module according to the target EEPROM information, wherein the release sub-information is used for indicating whether the target cable module is a release version or not;
And storing the release sub-information into a second field corresponding to the target cable module in the fault module table.
The detection and repair device for the switch provided by the embodiment of the application can be used for executing the detection and repair method for the switch in any embodiment, and the implementation principle and the technical effect are similar, and are not repeated here.
It should be noted that, it should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. The modules can be realized in the form of software which is called by the processing element, in the form of hardware, in the form of software which is called by the processing element, and in the form of hardware. In addition, all or part of the modules may be integrated together or may be implemented independently. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. The device 60 further comprises a communication component 603. The processor 601, the memory 602, and the communication section 603 are connected via a bus 604.
In a specific implementation process, at least one processor 601 executes computer-executable instructions stored in the memory 602, so that the at least one processor 601 executes the above-mentioned method for detecting and repairing a switch.
The specific implementation process of the processor 601 may refer to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
The electronic device provided by the embodiment of the application can be used for executing the detection and repair method of the switch provided by any of the method embodiments, and the implementation principle and technical effects are similar and are not repeated here.
In the embodiment shown in fig. 6, it should be understood that the Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), other general purpose processors, digital signal Processor (english: DIGITAL SIGNAL Processor, abbreviated as DSP), application-specific integrated Circuit (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The Memory may include high-speed Memory (Random Access Memory, RAM) or may further include Non-volatile Memory (NVM), such as at least one disk Memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the detection and repair method of the switch is realized.
The above-described readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). The processor and the readable storage medium may reside as discrete components in a device.
The division of units is merely a logical function division, and there may be another division manner in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the various method embodiments described above may be implemented by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs the steps comprising the method embodiments described above, and the storage medium described above includes various media capable of storing program code, such as ROM, RAM, magnetic or optical disk.
Finally, it should be noted that other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains and as may be applied to the precise construction hereinbefore set forth and shown in the drawings and as follows in the scope of the appended claims. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for detecting and repairing a switch, comprising:
determining the connection state of each port in the switch and the type of a module inserted by each port;
Aiming at a target port with a connection state of connection interruption and a module type of cable, reconfiguring the target port according to a first mapping relation and the target port, wherein the first mapping relation is used for indicating a corresponding relation between the port and Serdes information of a serializer/deserializer;
if the connection state of the configured target port is still the connection interruption, determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port, wherein the second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information;
And repairing the target cable module according to the target EEPROM information.
2. The method of claim 1, wherein reconfiguring the destination port according to the first mapping relationship and the destination port comprises:
acquiring target Serdes information corresponding to the target port identification according to the first mapping relation and the target port identification corresponding to the target port;
Reconfiguring the target port according to the target Serdes information;
And controlling the configured target port to be powered on and powered off again.
3. The method according to claim 1 or 2, wherein the determining, according to the second mapping relationship and the target cable module inserted by the target port, target EEPROM information of the target cable module includes:
acquiring a target data transmission rate of the target port;
And determining the target EEPROM information corresponding to the target cable module according to the target data transmission rate and the second mapping relation.
4. The method according to claim 1 or 2, wherein before the repairing the target cable module according to the target EEPROM information, the method further comprises:
Comparing the current EEPROM information of the target cable module with the target EEPROM information, and determining abnormal sub-EEPROM information inconsistent with the current EEPROM information from the target EEPROM information;
Storing the abnormal EEPROM information and the identification corresponding to the target cable module into a fault module table;
and setting the value of the first binary bit of the first field corresponding to the target cable module in the fault module table to be in repair.
5. The method of claim 4, wherein after the repairing the target cable module according to the target EEPROM information, the method further comprises:
Detecting the target port and re-determining the connection state of the target port;
if the redetermined connection state is connected, setting the value of the second binary bit of the first field to be successfully repaired;
and if the redetermined connection state is the connection interruption, setting the value of the second binary bit of the first field to be repaired but failed.
6. The method according to claim 1 or 2, wherein after said determining the connection status of each port in the switch, and the type of module each port inserts, the method further comprises:
and storing the target port identification of the target port into a fault port table.
7. The method according to claim 4, wherein the method further comprises:
determining release sub-information of the target cable module according to the target EEPROM information, wherein the release sub-information is used for indicating whether the target cable module is a release version or not;
and storing the release sub-information into a second field corresponding to the target cable module in the fault module table.
8. A detection repair device for a switch, comprising:
The first determining module is used for determining the connection state of each port in the switch and the module type of each port insertion;
The configuration module is used for reconfiguring the target port according to a first mapping relation and the target port, wherein the connection state is a connection interruption, the type of the module is a target port of a cable, and the first mapping relation is used for indicating the corresponding relation between the port and Serdes information;
The second determining module is used for determining target EEPROM information of the target cable module according to a second mapping relation and the target cable module inserted by the target port if the configured connection state of the target port is still connection interruption, wherein the second mapping relation is used for indicating the mapping relation between the cable module and the EEPROM information;
And the repair module is used for repairing the target cable module according to the target EEPROM information.
9. An electronic device includes a processor, and a memory communicatively coupled to the processor;
The memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of detection and repair of a switch as claimed in any one of claims 1 to 7.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing a method of detection repair of a switch as claimed in any one of claims 1 to 7.
CN202411344654.6A 2024-09-25 2024-09-25 Switch detection and repair method, device, equipment and medium Pending CN119094331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411344654.6A CN119094331A (en) 2024-09-25 2024-09-25 Switch detection and repair method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411344654.6A CN119094331A (en) 2024-09-25 2024-09-25 Switch detection and repair method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN119094331A true CN119094331A (en) 2024-12-06

Family

ID=93664361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411344654.6A Pending CN119094331A (en) 2024-09-25 2024-09-25 Switch detection and repair method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN119094331A (en)

Similar Documents

Publication Publication Date Title
US8108724B2 (en) Field replaceable unit failure determination
KR20190131445A (en) Traffic capture and debugging tools for identifying root causes of device failure during automated testing
CN113176963B (en) PCIe fault self-repairing method, device, equipment and readable storage medium
CN112527582A (en) Detection method, detection device, detection equipment and storage medium of server cable
CN116382968B (en) Fault detection method and device for external equipment
CN114936135A (en) Abnormity detection method and device and readable storage medium
CN114780316A (en) Memory test method, device and system
CN119690756A (en) Fault processing method and device for high-speed expansion link
CN119094331A (en) Switch detection and repair method, device, equipment and medium
CN107678917B (en) Test machine automation management method, device, equipment and storage medium
CN104678292A (en) Test method and device for CPLD (Complex Programmable Logic Device)
CN117076214A (en) Method, system, terminal and medium for detecting dial fool-proof of hard disk backboard of server
CN116185689A (en) Configuration method, verification method, equipment and medium for error information injection capability
CN115756981A (en) Automatic inspection method, device, equipment and medium for hard disk backboard cable assembly
CN115373916A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium
US7925728B2 (en) Facilitating detection of hardware service actions
TW201807583A (en) Automatic control system and the instrument automatically search method using the same
CN115955416B (en) Method, device, equipment and storage medium for testing UPI bandwidth reduction
CN114724617B (en) Debugging method and debugging system
US11486926B1 (en) Wearout card use count
CN120336126A (en) Device status detection method, device, electronic device and storage medium
CN117762453A (en) Firmware upgrading method and device, storage medium and electronic equipment
CN118567922A (en) Component testing method, device, communication equipment and storage medium
CN117614801A (en) Method, device, equipment and storage medium for determining fault type
CN107783434A (en) Automatic control system and automatic searching method of instrument applied to same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination