Network communication link fault detection and positioning method, device, equipment and medium
By establishing a virtual USB service link between the baseboard management controller and the remote server and obtaining link configuration information for multi-dimensional detection, the problem of low detection efficiency of the BMC virtual USB network communication link is solved, and efficient fault location and accurate fault identification are achieved.
Patent Information
- Application Number
- CN202510961464.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-09-16
AI Technical Summary
In the prior art, the detection efficiency of the BMC virtual USB network communication link is low and affects the original system configuration, making it difficult to efficiently locate faults.
By starting the virtual USB service of the baseboard management controller, a network communication link is established between the baseboard management controller and the remote server, and link configuration information is obtained. Based on this, connectivity verification, functional testing and performance evaluation are performed, and the link fault detection results are used to locate the fault.
It achieves efficient network communication link fault detection and positioning, shortens detection time, avoids the impact on system configuration, accurately identifies various types of faults, breaks the traditional single detection mode, and improves detection efficiency.
Smart Images

Figure CN120658561A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for detecting and locating network communication link faults. Background Art
[0002] With the popularization of artificial intelligence technology, the demand for servers as computing infrastructure is rapidly expanding. The Baseboard Management Controller (BMC) on the server motherboard is a core component for monitoring and managing hardware status. Its virtual USB (Universal Serial Bus) network communication function can remotely connect to local device resources through the BMC client to implement operations such as data transmission and firmware upgrades. However, in the functional testing of domestic servers, the detection of the BMC virtual USB network communication link has become a production bottleneck.
[0003] Currently, the only way to determine link status is through a local in-band firmware upgrade. This involves using the USB device controller driver, Ethernet Gadget driver, and remote network driver interface specification supported by the BMC kernel to implement TCP / IP (Transmission Control Protocol / Internet Protocol) data transmission over a USB link. During testing, firmware upgrades are performed to verify link status. This approach has drawbacks such as low detection efficiency and impacts existing system configurations.
[0004] It can be seen that how to improve the efficiency of network communication link fault detection and location without affecting the original system configuration is a problem that those skilled in the art need to solve. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide a method, apparatus, device, and medium for detecting and locating network communication link faults, thereby improving the efficiency of detecting and locating network communication link faults without affecting the existing system configuration. The specific solution is as follows:
[0006] In a first aspect, the present invention discloses a method for detecting and locating a network communication link fault, comprising:
[0007] Starting a virtual USB service of a baseboard management controller to establish a network communication link between the baseboard management controller and a remote server;
[0008] Obtaining link configuration information of the network communication link;
[0009] Performing fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result, and a performance evaluation result;
[0010] The link fault detection result is used to perform fault location to obtain a fault location result.
[0011] Optionally, starting the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server includes:
[0012] Use OEM commands to control the baseboard management controller to turn off the energy-saving mode and enable the KVM option;
[0013] Starting a virtual USB network communication link detection program of the baseboard management controller to generate a virtual USB device;
[0014] The virtual USB device is controlled to establish a network communication link between the baseboard management controller and a remote server.
[0015] Optionally, after controlling the virtual USB device to establish a network communication link between the baseboard management controller and the remote server, the method further includes:
[0016] Determine whether there is a new virtual network interface;
[0017] If the new virtual network interface exists, setting an IP address and a subnet mask for the new virtual network interface based on the link configuration information;
[0018] Determining whether the mount status of the virtual USB device in the link configuration information indicates that the virtual USB device is in a mount success state;
[0019] If the mounting state of the virtual USB device indicates that the virtual USB device is in a mounting success state, it is determined that the network communication link is successfully established.
[0020] Optionally, the acquiring the link configuration information of the network communication link includes:
[0021] Obtain network configuration information of the baseboard management controller and configuration information of the virtual USB device; wherein the network configuration information of the baseboard management controller includes IP address information, subnet mask information, gateway information, network protocol parameters and network bandwidth limit, and the configuration information of the virtual USB device includes device type, mounting status, device identification information and controller model.
[0022] Optionally, performing fault detection on the network communication link based on the link configuration information to obtain a connectivity verification result includes:
[0023] determining a target format based on the device type;
[0024] Establishing a target detection data packet whose data packet format is a target format; wherein the target detection data packet includes a link identifier corresponding to the device identification information, a detection instruction, and a timestamp;
[0025] Sending a target detection-based data packet to the remote server via the network communication link;
[0026] If a response data packet returned by the remote server based on the target detection data packet is received within a preset response time threshold, a first connectivity verification result is generated; wherein the first connectivity verification result indicates that the link connectivity of the network communication link is normal;
[0027] If the response data packet returned by the remote server based on the target detection data packet is not received within a preset response time threshold, a second connectivity verification result is generated; wherein, the second connectivity verification result indicates that the link connectivity of the network communication link is abnormal.
[0028] Optionally, the functional test results include link data transmission test results and link protocol compatibility test results;
[0029] Accordingly, performing fault detection on the network communication link based on the link configuration information to obtain a functional test result includes:
[0030] If a first connectivity verification result is generated, sending test data of different sizes and data types to the remote server via the network communication link; wherein the format of the test data is determined based on the device type;
[0031] Monitoring key indicators of the test data; wherein the key indicators include transmission rate, packet loss rate, and number of error frames;
[0032] determining an average transmission rate of the test data according to the transmission start time and transmission end time of the test data;
[0033] Obtaining a first comparison result between the average transmission rate and a preset static rate range, and a second comparison result between the key indicator and a preset indicator threshold; wherein the preset static rate range is determined based on the network configuration information;
[0034] generating a link data transmission detection result according to the first comparison result and the second comparison result;
[0035] Determine a first protocol and a protocol version of the baseboard management controller based on the device type and the network protocol parameters;
[0036] Obtaining a second protocol and a protocol version of the second protocol of the remote server;
[0037] A link protocol compatibility detection result is generated based on whether a first preset condition and a second preset condition are met between the baseboard management controller and the remote server; wherein, the first preset condition is that the protocol types of the first protocol and the second protocol are consistent, and the second preset condition is that the protocol version of the first protocol and the protocol version of the second protocol are compatible.
[0038] Optionally, performing fault detection on the network communication link based on the link configuration information to obtain a performance test result includes:
[0039] Determine an initial transmission bandwidth threshold and an initial transmission rate threshold based on the controller model, the network bandwidth limit, and the network protocol parameters;
[0040] Based on the initial transmission bandwidth threshold, the initial transmission rate threshold, the link operation time of the network communication link, and the network load, a dynamic threshold model is constructed using a Kalman filter algorithm;
[0041] Dynamically adjusting the initial transmission bandwidth threshold and the initial transmission rate threshold respectively by using the dynamic threshold model to obtain a transmission bandwidth dynamic threshold and a transmission rate dynamic threshold;
[0042] The actual rate and actual bandwidth of the test data are compared with the transmission rate dynamic threshold and the transmission bandwidth dynamic threshold respectively to obtain a performance test result.
[0043] In a second aspect, the present invention discloses a network communication link fault detection and location device, comprising:
[0044] a communication link building module, configured to start a virtual USB service of a baseboard management controller to establish a network communication link between the baseboard management controller and a remote server;
[0045] A configuration information acquisition module, configured to acquire link configuration information of the network communication link;
[0046] A link fault detection module, configured to perform fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result, and a performance evaluation result;
[0047] The link fault locating module is configured to perform fault locating using the link fault detection result to obtain a fault locating result.
[0048] In a third aspect, the present invention discloses an electronic device, comprising:
[0049] Memory, used to store computer programs;
[0050] The processor is used to execute a computer program to implement the steps of the aforementioned disclosed method for detecting and locating network communication link failures.
[0051] In a fourth aspect, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for detecting and locating network communication link faults are implemented.
[0052] It can be seen that the present invention starts the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server; obtains link configuration information of the network communication link; performs fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result and a performance evaluation result; and uses the link fault detection result to locate the fault to obtain a fault location result.
[0053] The beneficial effect is as follows: the present invention establishes a network communication link between the baseboard management controller and the remote server by starting the virtual USB service of the baseboard management controller, obtains the link configuration information of the link, and performs fault detection based on the link, obtaining a link fault detection result including connectivity verification, functional testing and performance evaluation results, and uses these results to locate the fault to obtain a fault location result. That is to say, by starting the virtual USB service to establish a link, the detection time is compressed without affecting the system configuration. The link fault detection time is much lower than the firmware upgrade time, and it breaks the single detection mode of traditional technology that can only determine whether the link is alive. Based on the link configuration information, it realizes multi-dimensional detection of connectivity, function, and performance to accurately identify various specific faults, changing the traditional inefficient method of relying on manual troubleshooting, and automatically analyzing the fault location through multi-dimensional detection results, greatly shortening the fault location time. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0055] Figure 1 A flow chart of a method for detecting and locating a network communication link fault provided by an embodiment of the present invention;
[0056] Figure 2 A schematic diagram of a specific network communication link provided by an embodiment of the present invention;
[0057] Figure 3 A flowchart of a specific method for detecting and locating network communication link faults provided by an embodiment of the present invention;
[0058] Figure 4 A specific schematic diagram of network communication link fault detection and location provided by an embodiment of the present invention;
[0059] Figure 5 A schematic diagram of the structure of a network communication link fault detection and positioning device provided by an embodiment of the present invention;
[0060] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0062] With the popularization of artificial intelligence technology, the demand for servers as computing infrastructure is rapidly expanding. The basic management controller on the server motherboard is the core component for monitoring and managing the hardware status. Its virtual USB network communication function can remotely connect to local device resources through the BMC client to achieve data transmission and firmware upgrades. However, in the functional testing of domestic servers, the detection of the BMC virtual USB network communication link has become a production bottleneck.
[0063] Currently, the only way to determine link status is through a local in-band firmware upgrade. This involves leveraging the USB device controller driver, Ethernet Gadget driver, and remote network driver interface specification supported by the BMC kernel to implement TCP / IP data transmission over the USB link. During testing, firmware upgrades are performed to verify link status. This approach has drawbacks such as low detection efficiency and impact on existing system configurations.
[0064] The terms "including" and "having," as used in the present description and accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.
[0065] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0066] Next, a network communication link fault detection and location solution provided by an embodiment of the present invention is described in detail. Figure 1 A method for detecting and locating a network communication link fault provided by an embodiment of the present invention includes:
[0067] Step S11 : starting the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and a remote server.
[0068] There is currently no way to diagnose this link. The only way to determine whether the link is normal is to upgrade the firmware locally in-band. For example, Figure 2 The figure shows a specific network communication link diagram, which shows the link from BMC to remote server: For the BMC platform to support USB virtual network card, the BMC kernel needs to support UDC (USB device controller) driver and Ethernet Gadget (CDCEthemet) driver. CDC is the device communication class of USB. The Ethernet Gadget driver supports grouping multiple Ethernet frames into one USB transmission. The platform also needs to support rndis (Remote Network Driver Interface Specification). Implementing RNDIS based on USB is actually TCPIP over USB, which means running TCP / IP on the USB device, making the USB device look like a network card.
[0069] In this embodiment, starting the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server includes: using OEM commands to control the baseboard management controller to turn off the energy-saving mode and turn on the KVM option; starting the virtual USB network communication link detection program of the baseboard management controller to generate a virtual USB device; and controlling the virtual USB device to establish a network communication link between the baseboard management controller and the remote server.
[0070] BMC virtual USB network communication allows users to remotely connect resources on local server devices to the server through BMC client software (such as web-based software) without physically accessing the server. For example, USB storage devices can be virtually connected, facilitating data transfers and firmware updates between the remote server and the BMC. The BMC virtual USB network function implements interaction via a USB link using a virtual network-coordinated device. This virtual service runs on the BMC system. Currently, the KVM switch can be enabled using an OEM command. Since the BMC is in energy-saving mode by default, if the KVM is disabled, the USB BMC is disabled. When a user requests to connect a virtual USB device on a local device, the BMC and the local device communicate using network protocols. Data is transferred between the BMC and the local device, and the server treats the connection as a real USB device and processes it accordingly.
[0071] Step S12: Acquire link configuration information of the network communication link.
[0072] In this embodiment, obtaining the link configuration information of the network communication link includes: obtaining the network configuration information of the baseboard management controller and the configuration information of the virtual USB device; wherein the network configuration information of the baseboard management controller includes IP address information, subnet mask information, gateway information, network protocol parameters and network bandwidth limitation, and the configuration information of the virtual USB device includes device type, mounting status, device identification information and controller model.
[0073] After establishing a network communication link between the baseboard management controller and the remote server, the link configuration information of the network communication link is obtained, wherein the link configuration information is divided into two categories, one is the network configuration information of the baseboard management controller, and the other is the configuration information of the virtual USB device. The network configuration information of the baseboard management controller specifically includes IP address information, subnet mask information, gateway information, network protocol parameters and network bandwidth limitation, and the configuration information of the virtual USB device specifically includes the device type of the virtual USB device, the mounting status of the virtual USB device, the device identification information of the virtual USB device and the controller model of the virtual USB device.
[0074] In this embodiment, after controlling the virtual USB device to establish a network communication link between the baseboard management controller and the remote server, the method further includes: determining whether a new virtual network interface currently exists; if the new virtual network interface exists, setting an IP address and a subnet mask for the new virtual network interface based on the link configuration information; determining whether the mount status of the virtual USB device in the link configuration information indicates that the virtual USB device is in a successfully mounted state; if the mount status of the virtual USB device indicates that the virtual USB device is in a successfully mounted state, determining that the network communication link is successfully established.
[0075] After establishing a network communication link between the baseboard management controller and the remote server and obtaining the link configuration information of the network communication link, it is also necessary to detect whether the network communication link is successfully established. If it is not successfully established, the link needs to be re-established. Only after the link is successfully established can the subsequent link fault detection and fault location be meaningful. Determine whether there is a new virtual network interface; if there is a new virtual network interface, set the IP address and subnet mask for the new virtual network interface based on the link configuration information. Specifically, set the IP address and subnet mask of the new virtual network interface to be consistent with the IP address and subnet mask of the baseboard management controller. That is, set the IP address and subnet mask for the new virtual network interface based on the IP address information and subnet mask information in the network configuration information of the baseboard management controller. In this way, the new virtual network interface and the baseboard management controller are located in the same network segment; next, determine whether the mounting status of the virtual USB device in the link configuration information indicates that the virtual USB device is in a successful mounting state. That is, if the mounting status of the virtual USB device indicates that the virtual USB device is in a successful mounting state, it is determined that the network communication link is successfully established.
[0076] Furthermore, the baseboard management controller is located in the server being tested, that is, the baseboard management controller is a component on the mainboard of the server being tested that is used to monitor and manage the hardware status. The detection equipment is used to send relevant detection instructions to the baseboard management controller, thereby realizing fault detection and fault location. Therefore, it is necessary to establish a network connection between the detection equipment and the server being tested to ensure that the detection program can operate normally and data can be transmitted.
[0077] Step S13: performing fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a function test result, and a performance evaluation result.
[0078] Based on the link configuration information, the network communication link is subjected to three types of fault detection, namely connectivity verification, functional testing, and performance evaluation, to obtain link fault detection results. In other words, the link fault detection results include connectivity verification results, functional testing results, and performance evaluation results.
[0079] In this embodiment, fault detection is performed on the network communication link based on the link configuration information to obtain a connectivity verification result, including: determining a target format based on the device type; establishing a target detection data packet whose data packet format is the target format; wherein the target detection data packet includes a link identifier, a detection instruction, and a timestamp corresponding to the device identification information; sending a target detection data packet to the remote server through the network communication link; if a response data packet returned by the remote server based on the target detection data packet is received within a preset response time threshold, a first connectivity verification result is generated; wherein, the first connectivity verification result indicates that the link connectivity of the network communication link is normal; if the response data packet returned by the remote server based on the target detection data packet is not received within the preset response time threshold, a second connectivity verification result is generated; wherein, the second connectivity verification result indicates that the link connectivity of the network communication link is abnormal.
[0080] The testing device sends a connectivity verification command to the baseboard management controller, instructing the baseboard management controller to begin testing the network communication link's connectivity. A specific test packet containing information such as a link identifier, test command, and timestamp is sent to the network communication link. Based on a preset response time threshold, the device determines whether a response packet has been received from the other end of the link. If a response packet is received within the response time threshold, the link connectivity is normal. If no response packet is received or the response packet times out, a link connectivity failure is determined.
[0081] Specifically, the device type in the link configuration information can determine the format of the target detection data packet, that is, the target format is determined based on the device type, and a target detection data packet with a data packet format in the target format is established; wherein, the target detection data packet includes a link identifier, a detection instruction, and a timestamp, and the link identifier corresponds to the device identifier information in the link configuration information; next, a target detection data packet is sent to a remote server through a network communication link. If a response data packet based on the target detection data packet is received from the remote server within a preset response time threshold, a first connectivity verification result is generated, indicating that the link connectivity of the network communication link is normal. On the contrary, if the response data packet based on the target detection data packet is not received from the remote server within the preset response time threshold, a second connectivity verification result is generated, indicating that the link connectivity of the network communication link is abnormal. That is to say, if the second connectivity verification result is generated, it indicates that there is a fault in the network communication link.
[0082] In this embodiment, the functional test results include link data transmission detection results and link protocol compatibility detection results; accordingly, the network communication link is fault detected based on the link configuration information to obtain functional test results, including: if a first connectivity verification result is generated, test data of different sizes and different data types are sent to the remote server through the network communication link; wherein the format of the test data is determined based on the device type; monitoring key indicators of the test data; wherein the key indicators include transmission rate, packet loss rate, and number of error frames; determining the average transmission rate of the test data based on the transmission start time and transmission end time of the test data; obtaining a first comparison result between the average transmission rate and a preset static rate range, the key indicators and A second comparison result of a preset indicator threshold; wherein the preset static rate range is determined based on the network configuration information; a link data transmission detection result is generated based on the first comparison result and the second comparison result; the first protocol of the baseboard management controller and the protocol version of the first protocol are determined based on the device type and the network protocol parameters; the second protocol of the remote server and the protocol version of the second protocol are obtained; a link protocol compatibility detection result is generated based on whether the first preset condition and the second preset condition are met between the baseboard management controller and the remote server; wherein the first preset condition is that the protocol types of the first protocol and the second protocol are consistent, and the second preset condition is that the protocol version of the first protocol and the protocol version of the second protocol are compatible.
[0083] It should be noted that the functional test includes link data transmission detection and link protocol compatibility detection, so the functional test results include link data transmission detection results and link protocol compatibility detection results.
[0084] First, on the basis of generating the first connectivity verification result, that is, on the basis of the normal link connectivity of the network communication link, a link data transmission detection is performed. Each test data is determined based on the device type in the link configuration information, and the size and data type of these test data are different, that is, each test data is a data block of different size and different data type, and then the test data of different size and different data type are sent to the remote server through the network communication link; Next, during the transmission process, the key indicators of the test data are monitored, that is, the transmission rate, packet loss rate, and number of error frames of the test data; the average transmission rate of the test data is determined according to the transmission start time and transmission end time of the test data; the preset static rate range is determined based on the network configuration information, so that a first comparison result between the average transmission rate and the preset static rate range and a second comparison result between the key indicator and the preset indicator threshold are obtained. Specifically, the first comparison result indicates that the average transmission rate is not lower than the preset static rate range or the average transmission rate is lower than the preset static rate range, and the second comparison result includes two comparison results, namely the packet loss rate comparison result and the error frame number comparison result. The preset indicator threshold also includes two thresholds, namely the preset packet loss rate threshold and the preset error frame number threshold. Then the packet loss rate comparison result indicates that the packet loss rate is large. When the packet loss rate is greater than the preset packet loss rate threshold or the packet loss rate is not greater than the preset packet loss rate threshold, the error frame number comparison result indicates that the number of error frames is greater than the preset error frame number threshold or the number of error frames is not greater than the preset error frame number threshold; then, a link data transmission detection result is generated based on the first comparison result and the second comparison result. Specifically, if the first comparison result indicates that the average transmission rate is lower than the preset static rate range and / or the second comparison result indicates that the key indicator is greater than the preset indicator threshold, a first link data transmission detection result indicating that there is a data transmission fault is generated; if the first comparison result indicates that the average transmission rate is not lower than the preset static rate range and the second comparison result indicates that the key indicator is not greater than the preset indicator threshold, a second link data transmission detection result indicating that there is no data transmission fault is generated; it can be understood that if the packet loss rate is greater than the preset packet loss rate threshold and / or the number of error frames is greater than the preset error frame number threshold, the second comparison result indicates that the key indicator is greater than the preset indicator threshold; if the packet loss rate is not greater than the preset packet loss rate threshold and the number of error frames is not greater than the preset error frame number threshold, the second comparison result indicates that the key indicator is not greater than the preset indicator threshold.
[0085] Secondly, the network communication link is tested for link protocol compatibility. This means that the protocols used at both ends of the link are compatible. The protocol version and type information at both ends of the link are compared to check for any protocol mismatches. If any protocol incompatibility is found, the link is determined to have a protocol compatibility failure. Specifically, based on the device type and network protocol parameters in the link configuration information, the first protocol of the baseboard management controller and the protocol version of the first protocol are determined; the second protocol of the remote server and the protocol version of the second protocol are obtained; first, whether the first preset condition is met between the baseboard management controller and the remote server, that is, whether the protocol types of the first protocol and the second protocol are consistent. If they are consistent, the first preset condition is met between the baseboard management controller and the remote server. Then, whether the second preset condition is met between the baseboard management controller and the remote server, that is, whether the protocol version of the first protocol and the protocol version of the second protocol are compatible. If they are compatible, the second preset condition is met between the baseboard management controller and the remote server. Then, a first link protocol compatibility detection result is generated, indicating that the link protocol compatibility is normal. That is, if the first preset condition and the second preset condition are met between the baseboard management controller and the remote server, a first link protocol compatibility detection result is generated, indicating that the link protocol compatibility is normal. On the contrary, if the first preset condition or the second preset condition is not met between the baseboard management controller and the remote server, a second link protocol compatibility detection result is generated, indicating a link protocol compatibility failure.
[0086] In this embodiment, fault detection is performed on the network communication link based on the link configuration information to obtain a performance test result, including: determining an initial transmission bandwidth threshold and an initial transmission rate threshold based on the controller model, the network bandwidth limit, and the network protocol parameters; constructing a dynamic threshold model based on the initial transmission bandwidth threshold, the initial transmission rate threshold, the link operation time of the network communication link, and the network load, and using a Kalman filtering algorithm; dynamically adjusting the initial transmission bandwidth threshold and the initial transmission rate threshold using the dynamic threshold model to obtain a transmission bandwidth dynamic threshold and a transmission rate dynamic threshold; and comparing the actual rate and actual bandwidth of the test data with the transmission rate dynamic threshold and the transmission bandwidth dynamic threshold, respectively, to obtain a performance test result.
[0087] Based on the link configuration information, fault detection is performed on the network communication link in the performance test dimension to obtain the performance test results. Specifically, the initial transmission bandwidth threshold and the initial transmission rate threshold are determined based on the controller model, network bandwidth limit, and network protocol parameters in the link configuration information, wherein the controller model and network bandwidth limit correspond to the theoretical transmission bandwidth, and the network protocol parameters correspond to the transmission rate. It can be understood that the application scenario requirements can also be included in the influencing factors for determining the initial transmission bandwidth threshold and the initial transmission rate threshold, wherein the application scenarios include daily operation and maintenance, data backup and other scenarios; based on the initial transmission bandwidth threshold, the initial transmission rate threshold, the link operation time of the network communication link, and the network load, a dynamic threshold model is constructed using the Kalman filter algorithm; the dynamic threshold model is used to dynamically adjust the initial transmission bandwidth threshold and the initial transmission rate threshold to obtain the transmission bandwidth dynamic threshold and the transmission rate dynamic threshold. In other words, because in the process of constructing the dynamic threshold model, the model is made to learn In order to dynamically adjust the bandwidth rate threshold according to environmental factors such as link operation time and network load, in actual applications, the dynamic threshold model can reasonably adjust the bandwidth rate threshold according to the specific current application scenario and the situation of the current application scenario, and the obtained transmission bandwidth dynamic threshold and transmission rate dynamic threshold are more in line with the current scenario; then the actual rate and actual bandwidth of the test data are compared with the transmission rate dynamic threshold and transmission bandwidth dynamic threshold respectively to obtain a reasonable performance test result; it can be understood that if the actual rate of the test data is less than the transmission rate dynamic threshold and / or the actual bandwidth is less than the transmission bandwidth dynamic threshold, a first performance test result is generated, indicating that there is a fault in the transmission bandwidth rate; if the actual rate of the test data is not less than the transmission rate dynamic threshold and the actual bandwidth is not less than the transmission bandwidth dynamic threshold, a second performance test result is generated, indicating that the transmission bandwidth rate is normal.
[0088] Step S14: performing fault location using the link fault detection result to obtain a fault location result.
[0089] The link fault detection results are used in combination with the baseboard management controller log and the network device log to locate the fault and obtain the fault location result.
[0090] If a second connectivity verification result is generated, indicating abnormal link connectivity of the network communication link, the process directly jumps to the step of using the link fault detection result to locate the fault to obtain a fault location result. The fault location process can specifically include: 1) Physical layer fault location: One method is to check the hardware device status, that is, check the physical connection and indicator light status of the baseboard management controller network port, remote server network card, and switch / router port; another method is to check for transmission media problems, that is, check whether the test network cable, optical fiber, and other transmission media are damaged or have poor contact. 2) Network layer fault location: One method is IP configuration verification, that is, confirming whether the IP address, subnet mask, and gateway of the baseboard management controller and the remote server are correct and whether there is an IP conflict; another method is routing and connectivity testing, that is, using ping and traceroute commands to detect network reachability and troubleshoot routing table errors or firewall blocking. 3) Service layer fault location: One method is virtual USB service status: checking whether the baseboard management controller's virtual USB service is operating normally and whether the service port is listening; another method is firmware and driver compatibility: verifying whether the baseboard management controller firmware version supports the virtual USB protocol and whether the driver is installed correctly. 4) Protocol layer fault location: One is port and protocol testing, which tests the connectivity of specific ports and captures packets to analyze whether protocol data transmission is normal. The other is link configuration consistency, which compares the configuration of the baseboard management controller and the remote server to see if they match. In this way, repair suggestions are generated based on the connectivity verification and fault location results, and then visualized to the user, improving the user experience.
[0091] If a first-link data transmission detection result indicating a data transmission fault is generated, the fault is located in the data transmission dimension, checking the physical layer connection status, data integrity, transmission stability (signal interference, link jitter), and application layer configuration (parameter settings, concurrency limits, data format) one by one, thereby locating the fault layer and completing the fault location.
[0092] If a second link protocol compatibility test result representing a link protocol compatibility failure is generated, the link protocol compatibility failure is located by checking one by one whether the protocol version matches, whether the driver is adapted, whether there are abnormalities in the protocol data interaction, and whether the cross-system interoperability is abnormal, so as to locate the fault.
[0093] If the first performance test result indicating a transmission bandwidth failure is generated, you can use a test tool to test the actual bandwidth and compare it with the nominal USB protocol rate. Check the switch port rate limit and the upper limit of USB bandwidth supported by the BMC firmware. Identify hardware performance bottlenecks, analyze network congestion, determine whether bandwidth is being preempted by multiple concurrent sessions, test rate fluctuations under different loads, and locate the impact of link stability on bandwidth.
[0094] The fault location is determined by leveraging link fault detection results, combined with baseboard management controller (BMC) logs and network device logs. By analyzing the packet transmission path, response status, and parameter changes during data transmission, the specific location of the fault, such as the network switch, network cable, BMC chip, or virtual USB driver, is determined. Based on the fault type and location, corresponding solutions and repair suggestions are generated. Connectivity verification results, functional test results, performance evaluation results, fault location, and repair suggestions are provided to users in a visual manner, providing a more intuitive understanding of the network communication link status and enhancing the user experience.
[0095] It can be seen that the present invention starts the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server; obtains link configuration information of the network communication link; performs fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result and a performance evaluation result; and uses the link fault detection result to locate the fault to obtain a fault location result.
[0096] The beneficial effect is as follows: the present invention establishes a network communication link between the baseboard management controller and the remote server by starting the virtual USB service of the baseboard management controller, obtains the link configuration information of the link, and performs fault detection based on the link, obtaining a link fault detection result including connectivity verification, functional testing and performance evaluation results, and uses these results to locate the fault to obtain a fault location result. That is to say, by starting the virtual USB service to establish a link, the detection time is compressed without affecting the system configuration. The link fault detection time is much lower than the firmware upgrade time, and it breaks the single detection mode of traditional technology that can only determine whether the link is alive. Based on the link configuration information, it realizes multi-dimensional detection of connectivity, function, and performance to accurately identify various specific faults, changing the traditional inefficient method of relying on manual troubleshooting, and automatically analyzing the fault location through multi-dimensional detection results, greatly shortening the fault location time.
[0097] See also Figure 3 The embodiment of the present invention discloses a specific method for detecting and locating network communication link faults. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. It includes:
[0098] Step S21: Using OEM commands to control the baseboard management controller to turn off the energy-saving mode and turn on the KVM option; starting the virtual USB network communication link detection program of the baseboard management controller to generate a virtual USB device; controlling the virtual USB device to establish a network communication link between the baseboard management controller and the remote server.
[0099] OEM commands (Original Equipment Manufacturer Commands) are used to control the baseboard management controller to disable energy-saving mode and enable the KVM option (Keyboard, Video, Mouse). This works because when the baseboard management controller is in energy-saving mode by default, some hardware functions are restricted. For example, the virtual USB service is disabled by default in the baseboard management controller, causing virtual USB devices to not function properly. OEM commands directly manipulate the baseboard management controller's underlying configuration, removing energy-saving restrictions and activating the KVM function, providing a basic environment for the virtual USB service to operate. This allows the baseboard management controller's operating state to be accurately and efficiently initialized, avoiding link detection anomalies caused by energy-saving policies and laying the foundation for subsequent processes.
[0100] The baseboard management controller's virtual USB network communication link detection program is launched to generate a virtual USB device. Once running, this program loads the UDC driver, Ethernet Gadget driver, and RNDIS protocol, creating a virtual USB device in the baseboard management controller system through software simulation. This principle is similar to identifying a physical USB device through a driver in an operating system, except that network data is simulated as USB device data for transmission. This allows remote device mapping without the need for a physical USB device, greatly improving the flexibility and convenience of server management.
[0101] The virtual USB device is controlled to establish a network communication link between the BMC and a remote server. This works by encapsulating and parsing data between the BMC and the remote server using the TCP / IP protocol, allowing the server to read and write remote data as if it were local USB device data. This virtual link overcomes physical distance limitations, enabling efficient remote server management of the BMC, such as remote operating system installation and firmware transfer. This reduces operational costs and complexity compared to traditional physical connections.
[0102] Step S22: Acquire link configuration information of the network communication link.
[0103] In this embodiment, after controlling the virtual USB device to establish a network communication link between the baseboard management controller and the remote server, the following operations are required: determining whether a new virtual network interface currently exists; if a new virtual network interface exists, setting an IP address and subnet mask for the new virtual network interface based on the link configuration information; determining whether the mount status of the virtual USB device in the link configuration information indicates that the virtual USB device is in a successful mount state; if the mount status of the virtual USB device indicates that it is in a successful mount state, determining that the network communication link has been successfully established.
[0104] Step S23: performing fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a function test result, and a performance evaluation result.
[0105] Step S24: locating the fault using the link fault detection result to obtain a fault locating result.
[0106] It can be seen that the present invention establishes a network communication link between the baseboard management controller and the remote server through a virtual USB device, and completes the virtual network interface configuration and mounting status verification in combination with the link configuration information, which can realize the automatic establishment and verification of the communication link, avoid manual intervention, reduce manual configuration errors, ensure the effectiveness of the link, and improve management efficiency; the link established based on the independent hardware architecture of the baseboard management controller can maintain remote control even if the server main system fails, and at the same time, the standardized configuration is adapted to the baseboard management controller hardware of different manufacturers, enhancing the stability and compatibility of the out-of-band management channel; after the link is successfully established, hardware data can be collected in real time, fault alarms can be transmitted in time, and remote loading of images, file transfer and other operations are supported, shortening the abnormal response time and reducing operation and maintenance costs.
[0107] Below Figure 4The present invention is described using a specific network communication link fault detection and location diagram as an example. First, the detection environment is initialized. Then, the baseboard management controller is controlled by an OEM command to turn off the energy-saving mode and turn on the KVM option. The baseboard management controller's virtual USB network communication link detection program is started to generate a virtual USB device. The virtual USB device is controlled to establish a network communication link between the baseboard management controller and a remote server, and the link configuration information of the network communication link is obtained. Next, the local network is checked for a new virtual network interface. If a new virtual network interface exists, the IP address and subnet mask are set for the new virtual network interface based on the link configuration information, and the mount status of the virtual USB device is checked. If the virtual USB device is successfully mounted, fault detection is performed. Specifically, the network communication link is tested for link connectivity, link data transmission, link protocol compatibility, and link transmission bandwidth rate. If a link fault is detected in any of the above link fault detections, the fault is located, a test log record is generated, and a prompt message indicating that a link fault exists is returned. If no link fault is detected in the above link fault detection, the link is normal, the detection is terminated, the log is recorded, and feedback is provided to the user.
[0108] Figure 5 A schematic structural diagram of a network communication link fault detection and location device provided by an embodiment of the present invention includes:
[0109] A communication link building module 11 is used to start the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server;
[0110] Configuration information acquisition module 12, used to obtain link configuration information of the network communication link;
[0111] A link fault detection module 13 is configured to perform fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result, and a performance evaluation result;
[0112] The link fault locating module 14 is configured to perform fault locating using the link fault detection result to obtain a fault locating result.
[0113] It can be seen that the present invention starts the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server; obtains link configuration information of the network communication link; performs fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result and a performance evaluation result; and uses the link fault detection result to locate the fault to obtain a fault location result.
[0114] The beneficial effect is as follows: the present invention establishes a network communication link between the baseboard management controller and the remote server by starting the virtual USB service of the baseboard management controller, obtains the link configuration information of the link, and performs fault detection based on the link, obtaining a link fault detection result including connectivity verification, functional testing and performance evaluation results, and uses these results to locate the fault to obtain a fault location result. That is to say, by starting the virtual USB service to establish a link, the detection time is compressed without affecting the system configuration. The link fault detection time is much lower than the firmware upgrade time, and it breaks the single detection mode of traditional technology that can only determine whether the link is alive. Based on the link configuration information, it realizes multi-dimensional detection of connectivity, function, and performance to accurately identify various specific faults, changing the traditional inefficient method of relying on manual troubleshooting, and automatically analyzing the fault location through multi-dimensional detection results, greatly shortening the fault location time.
[0115] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 6 This is a block diagram of an electronic device according to an exemplary embodiment. The content in the diagram should not be construed as limiting the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the network communication link fault detection and location method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0116] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0117] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0118] The operating system 221 is used to manage and control the hardware devices on the electronic device, as well as the computer program 222, which can be Windows Server, NetWare, Unix, Linux, etc. In addition to including a computer program capable of implementing the network communication link fault detection and location method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs capable of performing other specific tasks.
[0119] Furthermore, this application discloses a computer-readable storage medium for storing a computer program. When executed by a processor, the computer program implements the aforementioned method for detecting and locating network communication link faults. The specific steps of this method can be found in the corresponding sections disclosed in the aforementioned embodiments and will not be further elaborated here.
[0120] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0121] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0122] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0123] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0124] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for detecting and locating a network communication link fault, characterized in that: include: Starting a virtual USB service of a baseboard management controller to establish a network communication link between the baseboard management controller and a remote server; Obtaining link configuration information of the network communication link; Performing fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result, and a performance evaluation result; The link fault detection result is used to perform fault location to obtain a fault location result.
2. The network communication link fault detection and location method according to claim 1, characterized in that: The starting of the virtual USB service of the baseboard management controller to establish a network communication link between the baseboard management controller and the remote server includes: Use OEM commands to control the baseboard management controller to turn off the energy-saving mode and enable the KVM option; Starting a virtual USB network communication link detection program of the baseboard management controller to generate a virtual USB device; The virtual USB device is controlled to establish a network communication link between the baseboard management controller and a remote server.
3. The network communication link fault detection and location method according to claim 2, characterized in that: After controlling the virtual USB device to establish a network communication link between the baseboard management controller and the remote server, the method further includes: Determine whether there is a new virtual network interface; If the new virtual network interface exists, setting an IP address and a subnet mask for the new virtual network interface based on the link configuration information; Determining whether the mount status of the virtual USB device in the link configuration information indicates that the virtual USB device is in a mount success state; If the mounting state of the virtual USB device indicates that the virtual USB device is in a mounting success state, it is determined that the network communication link is successfully established.
4. The method for detecting and locating network communication link failure according to claim 2, wherein: The obtaining of the link configuration information of the network communication link includes: Obtain network configuration information of the baseboard management controller and configuration information of the virtual USB device; wherein the network configuration information of the baseboard management controller includes IP address information, subnet mask information, gateway information, network protocol parameters and network bandwidth limit, and the configuration information of the virtual USB device includes device type, mounting status, device identification information and controller model.
5. The method for detecting and locating network communication link failure according to claim 4, wherein: Performing fault detection on the network communication link based on the link configuration information to obtain a connectivity verification result, including: determining a target format based on the device type; Establishing a target detection data packet whose data packet format is a target format; wherein the target detection data packet includes a link identifier corresponding to the device identification information, a detection instruction, and a timestamp; Sending a target detection-based data packet to the remote server via the network communication link; If a response data packet returned by the remote server based on the target detection data packet is received within a preset response time threshold, a first connectivity verification result is generated; wherein the first connectivity verification result indicates that the link connectivity of the network communication link is normal; If the response data packet returned by the remote server based on the target detection data packet is not received within a preset response time threshold, a second connectivity verification result is generated; wherein, the second connectivity verification result indicates that the link connectivity of the network communication link is abnormal.
6. The method for detecting and locating network communication link failure according to claim 5, wherein: The functional test results include link data transmission test results and link protocol compatibility test results; Accordingly, performing fault detection on the network communication link based on the link configuration information to obtain a functional test result includes: If a first connectivity verification result is generated, sending test data of different sizes and data types to the remote server via the network communication link; wherein the format of the test data is determined based on the device type; Monitoring key indicators of the test data; wherein the key indicators include transmission rate, packet loss rate, and number of error frames; determining an average transmission rate of the test data according to the transmission start time and transmission end time of the test data; Obtaining a first comparison result between the average transmission rate and a preset static rate range, and a second comparison result between the key indicator and a preset indicator threshold; wherein the preset static rate range is determined based on the network configuration information; generating a link data transmission detection result according to the first comparison result and the second comparison result; Determine a first protocol and a protocol version of the baseboard management controller based on the device type and the network protocol parameters; Obtaining a second protocol and a protocol version of the second protocol of the remote server; A link protocol compatibility detection result is generated based on whether a first preset condition and a second preset condition are met between the baseboard management controller and the remote server; wherein, the first preset condition is that the protocol types of the first protocol and the second protocol are consistent, and the second preset condition is that the protocol version of the first protocol and the protocol version of the second protocol are compatible.
7. The method for detecting and locating network communication link failure according to claim 6, wherein: Performing fault detection on the network communication link based on the link configuration information to obtain a performance test result, including: Determine an initial transmission bandwidth threshold and an initial transmission rate threshold based on the controller model, the network bandwidth limit, and the network protocol parameters; Based on the initial transmission bandwidth threshold, the initial transmission rate threshold, the link operation time of the network communication link, and the network load, a dynamic threshold model is constructed using a Kalman filter algorithm; Dynamically adjusting the initial transmission bandwidth threshold and the initial transmission rate threshold respectively by using the dynamic threshold model to obtain a transmission bandwidth dynamic threshold and a transmission rate dynamic threshold; The actual rate and actual bandwidth of the test data are compared with the transmission rate dynamic threshold and the transmission bandwidth dynamic threshold respectively to obtain a performance test result.
8. A network communication link fault detection and positioning device, characterized in that: include: a communication link building module, configured to start a virtual USB service of a baseboard management controller to establish a network communication link between the baseboard management controller and a remote server; A configuration information acquisition module, configured to acquire link configuration information of the network communication link; A link fault detection module, configured to perform fault detection on the network communication link based on the link configuration information to obtain a link fault detection result; wherein the link fault detection result includes a connectivity verification result, a functional test result, and a performance evaluation result; The link fault locating module is configured to perform fault locating using the link fault detection result to obtain a fault locating result.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the network communication link fault detection and location method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the network communication link fault detection and location method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Network link fault automatic detection system and method
CN117376193A
Link testing method and device, computer equipment and storage medium
CN118764416A
Device fault detection method and device, and storage medium
WO2023221547A1
Cited By
Method and system for arranging display simulator in array server
CN121524106A
An array server built-in display emulator method and system
CN121524106B
Nuclear power station control system inspection method and device, storage medium and electronic equipment
CN121559836A