Network management method and device
By obtaining the port status of the switching chip and performing multiple reset operations, the communication failure caused by the failure of automatic negotiation between the Broadcom5720 chip and the Broadcom5389 chip is solved, and normal communication in the chassis management control center is realized.
Patent Information
- Application Number
- CN202310186990.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2043-03-01
AI Technical Summary
The failure of automatic negotiation between the Broadcom5720 chip and the Broadcom5389 chip caused communication failure in the chassis management control center.
By acquiring the port status of the switching chip, it is determined whether there is a link failure in the target link, and a reset operation for the target number of times is performed on the first switching chip. If the link failure still exists, the third switch chip connected to the first switch chip is reset, its port is set to full duplex operation mode and automatic negotiation is turned off.
It solves the communication failure problem caused by automatic negotiation failure and ensures normal communication in the chassis management control center.
Smart Images

Figure CN116192610B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of switches, and more particularly, to a network management method and device. Background Art
[0002] In current switch products, it is necessary to detect the physical link status of switch ports and report a network fault flag in a timely manner when the physical link status is abnormal, so as to ensure the normal operation of data communication services.
[0003] When any one of the 2 SerDes (high-speed interfaces) on Broadcom5720 shows an abnormality, it will cause the auto-negotiation between the Broadcom5720 and the Broadcom5389 chips to fail, the corresponding communication link to be disconnected, and the CMC (Chassis Management Controller) to malfunction and unable to communicate normally. Summary of the Invention
[0004] The embodiments of the present application provide a network management method and device to at least solve the technical problem of communication failure of the chassis management control center caused by the auto-negotiation failure between the Broadcom5720 chip and the Broadcom5389 chip.
[0005] According to an embodiment of the present application, a network management method is provided, including: obtaining a first port status of a first input port and a second port status of a first output port of a first switching chip, where the port status includes at least one of: a connection state and a disconnection state; when the first port status and / or the second port status is the disconnection state, determining that a target link corresponding to a second input port of a second switching chip has a link fault, and performing a reset operation on the first switching chip for a target number of times, where the first input port of the first switching chip is connected to the second output port of the second switching chip; after performing the reset operation on the first switching chip for the target number of times and when the target link still has a link fault, performing a reset operation on a third switching chip connected to the first switching chip.
[0006] In an exemplary embodiment, before obtaining the first port status of the first input port and the second port status of the first output port of the first switching chip, the method further includes: reading status information of a register of the second switching chip; determining whether a network cable is plugged into the second input port through the status information of the register to determine the plugging state of the second input port.
[0007] In an exemplary embodiment, performing a reset operation on a first switching chip for a target number of times includes: performing a reset operation on the first switching chip and detecting whether there is a link fault in a target link; when the link fault still exists in the target link, performing a reset operation on the first switching chip again; wherein, after performing the reset operation on the first switching chip for the target number of times, stopping performing the reset operation on the first switching chip.
[0008] In an exemplary embodiment, after performing a reset operation on the first switching chip for a target number of times and when the link fault still exists in the target link, performing a reset operation on a third switching chip connected to the first switching chip includes: in response to a target instruction, performing a reset operation on the third switching chip, wherein the target instruction is used to set a fourth port connected to a second switching chip in the third switching chip to a full-duplex working mode and turn off the auto-negotiation mode.
[0009] In an exemplary embodiment, after performing a reset operation on the third switching chip, the method further includes: detecting whether there is a link fault in the target link; when the link fault still exists in the target link, sending a network fault flag.
[0010] In an exemplary embodiment, after performing a reset operation on the third switching chip, the method further includes: sending corresponding alarm prompt information, wherein the alarm prompt information is used to prompt that the connection state of the target link is abnormal.
[0011] In an exemplary embodiment, after obtaining a first port state of a first input port and a second port state of a first output port of the first switching chip, the method further includes: when the first port state is a connected state and the second port state is a connected state, determining that the target link is in a connected state.
[0012] According to another embodiment of the present application, a network management device is provided, including: an acquisition module, configured to acquire a first port state of a first input port and a second port state of a first output port of a first switching chip, wherein the first input port is connected to a second output port of a second switching chip, and the port state includes: a connected state and a disconnected state; a determination module, configured to determine that there is a link fault in a target link corresponding to a second input port of the second switching chip and perform a reset operation on the first switching chip for a target number of times when the first port state and / or the second port state is a disconnected state; a management module, configured to perform a reset operation on a third switching chip connected to the first switching chip after performing the reset operation on the first switching chip for the target number of times and when the link fault still exists in the target link.
[0013] According to another embodiment of the present application, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-mentioned network management method embodiments when running.
[0014] According to another embodiment of the present application, there is also provided an electronic device including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned network management method embodiments.
[0015] In the present application, by reading the port connection status of the Broadcom 5389 chip, it is determined whether there is an abnormality in the connection status of the target link corresponding to the network port of the Broadcom 5482 chip connected to the Broadcom 5389 chip. When there is a link abnormality in the target link, multiple reset operations are performed on the Broadcom 5389 chip. If there is still a link abnormality in the target link after the reset operation, the Broadcom 5720 chip connected to the Broadcom 5389 chip is reset by executing a target instruction, thereby solving the technical problem of communication failure of the chassis management control center caused by the automatic negotiation failure between the Broadcom 5720 chip and the Broadcom 5389 chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a hardware structure block diagram of a computer terminal of a network management method according to an embodiment of the present application;
[0017] Figure 2 is a flowchart of an optional network management method according to an embodiment of the present application;
[0018] Figure 3 is a connection schematic diagram of an optional in-server switching chip according to an embodiment of the present application;
[0019] Figure 4 is a flowchart of another optional network management method according to an embodiment of the present application;
[0020] Figure 5 is a structure block diagram of an optional network management device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0022] It should be noted that the terms "first", "second", etc. in the description, claims and drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.
[0023] To better understand the embodiments of this application, some nouns or terms that appear in the description process of the embodiments of this application are first translated and explained as follows:
[0024] CMC: Used to manage the power supply and temperature of multiple server chassis. Specifically, the main functions of CMC include: First, real-time automatic management of cabinet-level power supply and temperature. Among them, CMC detects the power requirements of the system and supports the optional "dynamic power device access" mode; CMC reports real-time power consumption, including high and low points recorded with timestamps; CMC supports setting the power upper limit of the optional cabinet, and once this limit is exceeded, an alarm will be triggered or measures will be taken to keep the cabinet power within the specified power upper limit; CMC will detect and automatically control the cooling fan according to the actual ambient temperature and internal ambient temperature values; CMC provides a comprehensive inventory and status or error report of the cabinet resources; Second, CMC has a mechanism for centrally configuring the following settings. Among them, CMC can set the network and security of the cabinet, power redundancy and power upper limit, I / O switch network, I / O module and the I / O structure consistency check between servers, etc. Therefore, CMC can be configured to send an alarm when warnings or errors related to temperature, hardware configuration errors, power outages, and fan speed occur.
[0025] Broadcom 5389: Referred to as the BCM5389 chip, it is an 8GbE edge switch with integrated SerDes. It combines the functions of all high-speed switching systems, including: packet buffer, serializer / deserializer (SerDes), media access controller, address management, and non-blocking switching fabric, thus synthesizing a CMOS device with only 0.13 microns. In addition, the BCM5389 chip complies with the IEEE802.3, 802.3u, 802.3ab, and 802.3x specifications, including: MAC control, pause frame, and auto-negotiation sub-parts, providing compatibility with all industry-standard Ethernet, Fast Ethernet, and Gigabit Ethernet devices.
[0026] Broadcom 5720: Referred to as the BCM5720 chip. Specifically, the BCM5720 chip combines a dual triple-speed IEEE802.3-compliant media access controller (MAC), dual 10 / 100 / 1000BASE-X / S GMII 1.25Gbaud SerGes transceivers, or dual 10 / 100 / 1000 Ethernet transceivers (physical).
[0027] Broadcom 5482: Referred to as the BCM5482 chip, it is a dual-port 10 / 100 / 1000BASE-T Gigabit Ethernet transceiver. The BCM5482 chip has the following characteristics: compliant with the IEEE802.3TM, 802.3u, 802.3ab, and 802.3z standards; as a 0.13-micron CMOS device, it has low power consumption and low cost; supports RGMII, SGMII, and SerDes MAC interface options; in addition, it supports copper wire or fiber optic RGMII modes.
[0028] Auto Negotiation: By exchanging a special frame of FLP (Fast Link Pluse) with the peer end, which contains the working combination modes supported by the transmitting end (such as speed / duplex mode), after the peer end receives and compares with the working combination modes supported by the transmitting end, it selects an optimal working mode.
[0029] The method embodiments provided in the embodiments of this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is the hardware structure block diagram of a computer terminal for a network management method according to an embodiment of this application. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1Only one processor 102 is shown (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a field-programmable gate array FPGA), and a memory 104 for storing data. Among them, the above mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only illustrative and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown in, or have a different configuration from Figure 1 shown.
[0030] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the network management method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0031] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (Radio Frequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.
[0032] In this embodiment, a network management method running on the above computer terminal is provided. Figure 2 is a flowchart of an optional network management method according to an embodiment of the present application, as Figure 2 shown, the process includes steps S202 - S206, where:
[0033] Step S202, obtaining the first port state of the first input port of the first switching chip and the second port state of the first output port, where the port state includes at least one of: connection state, disconnection state.
[0034] In the technical solution provided in step S202 of the present invention above, the first switching chip is Broadcom 5389 (hereinafter simply referred to as the BCM5389 chip), and Port3 is used to represent the first input port, and Port0 is used to represent the first output port. In addition, in the embodiments of the present application, the first port state of the first input port of the first switching chip and the second port state of the first output port can be obtained through the BMC.
[0035] Since it is necessary to detect the connection state of the communication link in the embodiments of the present application, therefore, before obtaining the first port state of the first input port of the first switching chip and the second port state of the first output port, it is first necessary to determine whether a network cable is inserted into the second switching chip connected to the first switching chip.
[0036] Optionally, read the status information of the register of the first switching chip; determine whether a network cable is inserted into the second input port through the status information of the register to determine the plugging state of the second input port.
[0037] Figure 3 It is a schematic diagram of the connection of the switching chips in the server according to an optional embodiment of the present application, as Figure 3 shown, where the U0 port and U1 port of Broadcom5482 (i.e., the second switching chip, hereinafter simply referred to as the BCM5482 chip) are network ports, and the output port of the BCM5482 chip is connected to the input port Port3 of the BCM5389 chip, and the output port Port0 of the BCM5389 chip is connected to Broadcom5720 (i.e., the third switching chip, hereinafter simply referred to as the BCM5720 chip). Therefore, in the embodiments of the present application, the status information of the register of the BCM5482 chip can be read through the BMC, and it can be determined whether a network cable is inserted into the U0 port and U1 port of the BCM5482 chip according to the status information to determine the plugging condition of the input port of the BCM5482 chip.
[0038] After it is determined that a network cable is inserted into the input port of the BCM5482 chip, the link connection state of the target link connecting the above ports can be judged through the first port state of the first input port of the first switching chip and the second port state of the first output port.
[0039] Optionally, when the first port state is a connected state and the second port state is a connected state, it is determined that the target link is in a connected state. This indicates that the target link is normal and communication can be carried out normally; otherwise, step S204 is executed.
[0040] Step S204: When the first port state and / or the second port state is in a disconnected state, determine that there is a link failure in the target link corresponding to the second input port of the second switching chip, and perform a reset operation on the first switching chip for a target number of times, where the first input port of the first switching chip is connected to the second output port of the second switching chip.
[0041] In the technical solution provided in step S204 of the present invention above, if it is observed through the BMC that the port state of any one of the first port state and the second port state of the first switching chip is in a disconnected state, it can be determined that there is a failure in the target link. In addition, the purpose of performing multiple card reset operations on the first switching chip is to avoid the possibility that a single reset may not succeed, resulting in abnormal communication link alarm affecting the operation of the device. Therefore, in the embodiments of the present application, it is preferably to perform 3 reset operations on the first switching chip. There is no specific limitation here, and the target number of times can be set according to the actual situation.
[0042] In an exemplary embodiment, the first switching chip can be reset multiple times according to the following rules: perform a reset operation on the first switching chip and detect whether there is a link failure in the target link; when there is still a link failure in the target link, perform a reset operation on the first switching chip again; where, after performing the reset operation on the first switching chip for the target number of times, stop performing the reset operation on the first switching chip.
[0043] Specifically, taking the example of performing three reset operations on the BCM5389 chip. First, perform the first reset operation on the BCM5389 chip. After the first reset operation, detect whether there is a link failure in the target link through the BMC. Where, if it is detected at this time that there is no link failure in the target link, it means that the link state is abnormal due to a chip failure problem of the BCM5389 chip itself, resulting in abnormal communication; if it is detected at this time that there is a link failure in the target link, continue to perform the second reset operation on the BCM5389 chip. In order to rule out the possibility of an unsuccessful reset operation, continue to detect whether there is a link in the target link through the BMC. After the second reset operation, still detect whether there is a link in the target link through the BMC. If there is still a link failure in the target link at this time, perform the third reset operation on the BCM5389 chip. At this time, it is detected through the BMC that there is still a link failure in the target link, and at this time, report a network failure flag, where the network failure flag is used to indicate that there is a failure between the links connecting the BCM5482 chip and the BCM5389 chip.
[0044] After performing multiple reset operations on the first switching chip, there is still a link fault on the target link, ruling out the possibility that the frame management control center cannot communicate due to a fault in the first switching chip. Further, the cause of the link fault can be determined through step S206, and corresponding management operations can be executed to ensure normal communication through the target link.
[0045] Step S206: After performing the target number of reset operations on the first switching chip and when there is still a link fault on the target link, perform a reset operation on the third switching chip connected to the first switching chip.
[0046] In an exemplary embodiment, in response to a target instruction, a reset operation is performed on the third switching chip, where the target instruction is used to set the fourth port connected to the second switching chip in the third switching chip to the full-duplex operating mode and turn off the auto-negotiation mode.
[0047] Specifically, in combination with Figure 3 , when it is detected that there is a link fault on the target link corresponding to the U0 port of the BCM5482 chip, a reset operation can be performed on the BCM5720 chip through software on the device, such as executing the ethtool–s eth0 autoneg off instruction on the MCS. Among them, the ethtool–s eth0 autoneg off instruction is used to set the physical port corresponding to the high-speed interface eth0 (i.e., PORTA) on the BCM5720 chip to the full-duplex operating mode, and at the same time turn off the auto-negotiation between the BCM5720 chip and the BCM5482 chip. Thereby, the problem that the auto-negotiation between the BCM5389 chip and the BCM5720 chip fails due to the disconnection between PORT0 and PORT3 of the BCM5389 chip, resulting in the frame management control center being unable to communicate normally, can be solved.
[0048] Among them, in the full-duplex operating mode, a transmitter and a receiver are set for each segment of the communication system. Therefore, data can be controlled to be transmitted in both directions simultaneously, greatly improving the data transmission efficiency. In addition, the full-duplex mode does not require a direction switch. Therefore, there is no event delay caused by the switching operation, which is very beneficial for some interactive applications that cannot have event delays (such as remote monitoring and control systems).
[0049] Similarly, when a link failure occurs in the target link corresponding to the U1 port of the BCM5482 chip, the ethtool–s eth1 autoneg off command can be executed through the software on the device to perform a reset operation on the BCM5720 chip. Among them, the ethtool–s eth1 autoneg off command is used to set the physical port corresponding to the high-speed interface eth1 (i.e., PORTB) on the BCM5720 chip to the full-duplex working mode, and at the same time turn off the auto-negotiation between the BCM5720 chip and the BCM5482 chip.
[0050] Further, after performing a reset operation on the third switching chip, it is detected whether there is a link failure in the target link; when there is still a link failure in the target link, a network failure flag is sent.
[0051] Specifically, after performing a reset operation on the third switching chip, continue to detect the target link through the BMC. If there is still a link failure in the target link, at this time, send a network failure flag to the corresponding software on the device, so that the corresponding technical personnel can timely troubleshoot the target link and take corresponding management measures.
[0052] In addition, after sending the network failure flag, corresponding alarm prompt information can also be sent, where the alarm prompt information is used to prompt that the connection status of the target link is abnormal.
[0053] Through the above steps, read the port connection status of the BCM5389 chip to determine whether there is an abnormality in the connection status of the target link corresponding to the network port of the BCM5482 chip connected to the BCM5389 chip. When there is a link abnormality in the target link, perform multiple reset operations on the BCM5389 chip. If there is still a link abnormality in the target link after the reset operation, perform a reset operation on the BCM5720 chip connected to the BCM5389 chip by executing the ethtool–seth0autonegoff command, thereby solving the technical problem of communication failure of the chassis management control center caused by the failure of the auto-negotiation between the BCM5720 chip and the BCM5389 chip.
[0054] As an alternative implementation, Figure 3 The connection schematic diagram of the switching chip shown is used to further illustrate the network management method. Figure 4 is a flowchart of another alternative network management method according to an embodiment of the present application. As Figure 4 shown, the network can be managed through the following steps, where:
[0055] Step S1, the BMC determines whether a network cable is inserted into U0 of the BCM5482 chip by reading the status information of the registers of the BCM5482 chip. If a network cable is inserted into U0 of the BCM5482 chip, step S2 is continued;
[0056] Step S2, the BMC reads the port statuses of PORT0 and PORT3 of the BCM5389 chip;
[0057] Step S3, it is determined whether the port statuses of PORT0 and PORT3 are both in the connected state. If so, step S4 is executed; otherwise, step S5 is executed;
[0058] Step S4, the target link corresponding to the UO port is normal;
[0059] Step S5, the BMC performs multiple reset operations on the BCM5389 chip to detect whether there is a link fault in the target link corresponding to the UO port. When there is still a link fault in the target link, step S6 is executed;
[0060] Step S6, in response to the ethtool–s eth0 autoneg off instruction, a reset operation is performed on the BCM5720 chip;
[0061] Step S7, the BMC continues to detect whether there is a link fault in the target link corresponding to the UO port. When there is still a link fault in the target link, a network fault flag is sent.
[0062] Among them, the execution entity of the above steps may be a server, a terminal, etc., but is not limited thereto.
[0063] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.
[0064] Embodiment 2
[0065] In this embodiment, a network management device is further provided. The network management device is used to implement the network management method and the preferred implementation manner in Embodiment 1 above, and the parts that have been described will not be repeated. As used hereinafter, the term "module" may be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0066] Figure 5 is a structural block diagram of an optional network management device according to an embodiment of the present application. As Figure 5 shown, the device includes an acquisition module 51, a determination module 52, and a management module 53, where:
[0067] The acquisition module 51 is configured to acquire the first port status of the first input port of the first switching chip and the second port status of the first output port, where the first input port is connected to the second output port of the second switching chip, and the port status includes: connection status, disconnection status.
[0068] Wherein, the first switching chip is a Broadcom 5389 (hereinafter simply referred to as the BCM5389 chip), and the first input port is represented by Port3 and the first output port is represented by Port0. In addition, in the embodiment of the present application, the first port status of the first input port of the first switching chip and the second port status of the first output port can be obtained through the BMC.
[0069] Since it is necessary to detect the connection status of the communication link in the embodiment of the present application, therefore, before acquiring the first port status of the first input port of the first switching chip and the second port status of the first output port, it is first necessary to determine whether a network cable is inserted into the second switching chip connected to the first switching chip.
[0070] Optionally, read the status information of the register of the first switching chip; determine whether a network cable is inserted into the second input port through the status information of the register to determine the plugging state of the second input port.
[0071] As Figure 3Schematic diagram of the connection of the in-server switching chip shown. The U0 and U1 ports of the Broadcom 5482 (i.e., the second switching chip, hereinafter simply referred to as the BCM5482 chip) are network ports, and the output port of the BCM5482 chip is connected to the input port Port3 of the BCM5389 chip. The output port Port0 of the BCM5389 chip is connected to the Broadcom 5720 (i.e., the third switching chip, hereinafter simply referred to as the BCM5720 chip). Therefore, in the embodiment of the present application, the BMC can read the status information of the registers of the BCM5482 chip and determine whether there is a network cable inserted into the U0 and U1 ports of the BCM5482 chip according to the status information, so as to determine the plugging and unplugging status of the input port of the BCM5482 chip.
[0072] After it is determined that there is a network cable inserted into the input port of the BCM5482 chip, the link connection status of the target link connecting the above ports can be judged by the first port status of the first input port and the second port status of the first output port of the first switching chip.
[0073] Optionally, when the first port status is the connected state and the second port status is the connected state, it is determined that the target link is in the connected state. This indicates that the target link is normal and communication can be carried out normally.
[0074] The determination module 52 is configured to determine that there is a link failure in the target link corresponding to the second input port of the second switching chip when the first port status and / or the second port status is the disconnected state, and perform a reset operation on the first switching chip for a target number of times.
[0075] Specifically, if it is observed through the BMC that the port status of any one of the first port status and the second port status of the first switching chip is the disconnected state, it can be determined that there is a failure in the target link. In addition, the purpose of performing multiple card reset operations on the first switching chip is to avoid the possibility that a single reset may not be successful, resulting in abnormal reporting of alarms on the communication link and affecting the operation of the device. Therefore, in the embodiment of the present application, it is preferably to perform 3 reset operations on the first switching chip. There is no specific limitation here, and the target number can be set according to the actual situation.
[0076] In an exemplary embodiment, the determination module 52 can perform multiple reset operations on the first switching chip according to the following rules: perform a reset operation on the first switching chip and detect whether there is a link failure in the target link; when there is still a link failure in the target link, perform a reset operation on the first switching chip again; wherein, after performing the reset operation on the first switching chip for the target number of times, stop performing the reset operation on the first switching chip.
[0077] Specifically, take the example of performing three reset operations on the BCM5389 chip. First, perform the first reset operation on the BCM5389 chip. After the first reset operation, the BMC detects whether there is a link failure in the target link. Among them, if it is detected that there is no link failure in the target link at this time, it means that the link status is abnormal due to the chip failure problem of the BCM5389 chip itself, resulting in abnormal communication; if it is detected that there is a link failure in the target link at this time, continue to perform the second reset operation on the BCM5389 chip. In order to rule out the possibility of unsuccessful reset operations, continue to detect whether there is a link in the target link through the BMC. After the second reset operation, still detect whether there is a link in the target link through the BMC. If there is still a link failure in the target link at this time, perform the third reset operation on the BCM5389 chip. At this time, it is detected through the BMC that there is still a link failure in the target link, and at this time, a network fault flag is reported, where the network fault flag is used to indicate that there is a fault between the links connecting the BCM5482 chip and the BCM5389 chip.
[0078] After performing multiple reset operations on the first switching chip, there is still a link failure in the target link, ruling out the possibility that the frame management control center cannot communicate due to the failure of the first switching chip. Further, the cause of the link failure can be determined through step S206, and corresponding management operations can be executed to ensure normal communication through the target link.
[0079] The management module 53 is used to perform a reset operation on the third switching chip connected to the first switching chip when the target number of reset operations is performed on the first switching chip and there is still a link failure in the target link.
[0080] In an exemplary embodiment, the management module 53 can perform a reset operation on the third switching chip in response to a target instruction, where the target instruction is used to set the fourth port connected to the second switching chip in the third switching chip to the full-duplex working mode and turn off the auto-negotiation mode.
[0081] Specifically, in combination with Figure 3, when a link failure occurs in the target link corresponding to the U0 port of the BCM5482 chip, the BCM5720 chip can be reset through software on the device, such as executing the ethtool–s eth0 autoneg off command on the MCS. Among them, the ethtool–s eth0 autoneg off command is used to set the physical port corresponding to the high-speed interface eth0 (i.e., PORTA) on the BCM5720 chip to the full-duplex working mode, and at the same time turn off the auto-negotiation between the BCM5720 chip and the BCM5482 chip. Thus, it can solve the problem that the auto-negotiation between the BCM5389 chip and the BCM5720 chip fails due to the disconnection between PORT0 and PORT3 of the BCM5389 chip, resulting in the inability of the chassis management control center to communicate normally.
[0082] Among them, in the full-duplex working mode, a transmitter and a receiver are set at each section of the communication system. Therefore, data can be controlled to be transmitted in two directions simultaneously, greatly improving the data transmission efficiency. In addition, the full-duplex mode does not require direction switching, so there is no event delay caused by the switching operation, which is very beneficial to some interactive applications that cannot have event delays (such as remote monitoring and control systems).
[0083] Similarly, when a link failure occurs in the target link corresponding to the U1 port of the BCM5482 chip, the BCM5720 chip can be reset by executing the ethtool–s eth1 autoneg off command through the software on the device. Among them, the ethtool–s eth1 autoneg off command is used to set the physical port corresponding to the high-speed interface eth1 (i.e., PORTB) on the BCM5720 chip to the full-duplex working mode, and at the same time turn off the auto-negotiation between the BCM5720 chip and the BCM5482 chip.
[0084] Furthermore, after resetting the third switching chip, it is detected whether there is a link failure in the target link; when there is still a link failure in the target link, a network failure flag is sent.
[0085] Specifically, after resetting the third switching chip, continue to detect the target link through the BMC. If there is still a link failure in the target link, at this time, a network failure flag is sent to the corresponding software on the device, so that the corresponding technical personnel can timely troubleshoot the target link and take corresponding management measures.
[0086] In addition, after sending the network failure flag, corresponding alarm prompt information can also be sent, where the alarm prompt information is used to prompt that the connection status of the target link is abnormal.
[0087] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: all the above-mentioned modules are located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.
[0088] Embodiment 3
[0089] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is set to execute the network management method in Embodiment 1 when running.
[0090] Optionally, the device where the non-volatile storage medium is located executes the following steps by running the program: obtaining the first port state of the first input port of the first switching chip and the second port state of the first output port, where the port state includes at least one of: connection state, disconnection state; when the first port state and / or the second port state is the disconnection state, determining that there is a link failure in the target link corresponding to the second input port of the second switching chip, and performing a reset operation on the first switching chip for a target number of times, where the first input port of the first switching chip is connected to the second output port of the second switching chip; after performing the reset operation on the first switching chip for the target number of times and when the target link still has a link failure, performing a reset operation on the third switching chip connected to the first switching chip.
[0091] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include but not be limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0092] An embodiment of the present application further provides a processor, which is used to run a program. Wherein, the program executes the network management method in Embodiment 1 when running.
[0093] Optionally, when the program runs, the following steps are implemented: obtain the first port status of the first input port of the first switching chip and the second port status of the first output port, where the port status includes at least one of the following: connection status, disconnection status; when the first port status and / or the second port status is the disconnection status, determine that there is a link failure in the target link corresponding to the second input port of the second switching chip, and perform a reset operation on the first switching chip for a target number of times, where the first input port of the first switching chip is connected to the second output port of the second switching chip; after performing the reset operation on the first switching chip for the target number of times and when the target link still has a link failure, perform a reset operation on the third switching chip connected to the first switching chip.
[0094] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the network management method in Embodiment 1.
[0095] Optionally, when the program runs, the following steps are implemented: obtain the first port status of the first input port of the first switching chip and the second port status of the first output port, where the port status includes at least one of the following: connection status, disconnection status; when the first port status and / or the second port status is the disconnection status, determine that there is a link failure in the target link corresponding to the second input port of the second switching chip, and perform a reset operation on the first switching chip for a target number of times, where the first input port of the first switching chip is connected to the second output port of the second switching chip; after performing the reset operation on the first switching chip for the target number of times and when the target link still has a link failure, perform a reset operation on the third switching chip connected to the first switching chip.
[0096] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0097] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0098] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0099] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A network management method, characterized in that, including: Obtain the first port status of the first input port and the second port status of the first output port of the first switching chip, where at least one of the port statuses includes: connection status, disconnection status; When the first port status and / or the second port status is the disconnection status, determine that there is a link failure in the target link corresponding to the second input port of the second switching chip, and perform a reset operation on the first switching chip for a target number of times, where the first input port of the first switching chip is connected to the second output port of the second switching chip; After performing the reset operation on the first switching chip for the target number of times and when the target link still has a link failure, in response to a target instruction, perform a reset operation on the third switching chip connected to the first switching chip, where performing a reset operation on the third switching chip connected to the first switching chip is used to indicate setting the fourth port connected to the second switching chip in the third switching chip to the full-duplex working mode and turning off the auto-negotiation mode.
2. The method according to claim 1, characterized in that, Before obtaining the first port status of the first input port and the second port status of the first output port of the first switching chip, the method further includes: Read the status information of the register of the second switching chip; Determine whether a network cable is plugged into the second input port through the status information of the register to determine the plugging state of the second input port.
3. The method according to claim 1, wherein Performing a reset operation on the first switching chip for a target number of times includes: Perform a reset operation on the first switching chip and detect whether there is a link failure in the target link; When the target link still has a link failure, perform a reset operation on the first switching chip again; Among them, after performing the reset operation on the first switching chip for a target number of times, stop performing the reset operation on the first switching chip.
4. The method according to claim 1, wherein After performing the reset operation on the third switching chip, the method further includes: Detect whether there is a link failure in the target link; When the target link still has a link failure, send a network failure flag.
5. The method according to claim 4, wherein After sending the network failure flag, the method further includes: Send corresponding alarm prompt information, where the alarm prompt information is used to prompt that the connection status of the target link is abnormal.
6. The method according to claim 1, characterized in that, After obtaining the first port status of the first input port and the second port status of the first output port of the first switching chip, the method further includes: When the first port status is the connection status and the second port status is the connection status, determine that the target link is in the connection state.
7. A network management device, characterized in that, including: An obtaining module, configured to obtain the first port status of the first input port and the second port status of the first output port of the first switching chip, where at least one of the port statuses includes: connection status, disconnection status; A determination module, configured to determine that there is a link failure in a target link corresponding to a second input port of a second switching chip when the first port state and / or the second port state is the disconnected state, and perform a reset operation on the first switching chip for a target number of times, where a first input port of the first switching chip is connected to a second output port of the second switching chip; A management module, configured to, after performing the reset operation on the first switching chip for the target number of times and when the link failure still exists in the target link, in response to a target instruction, perform a reset operation on a third switching chip connected to the first switching chip, where performing the reset operation on the third switching chip connected to the first switching chip is used to instruct to set a fourth port of the third switching chip connected to the second switching chip to a full-duplex operating mode and turn off an auto-negotiation mode.
8. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where when the computer program is executed by a processor, the steps of the network management method described in any one of claims 1 to 6 are implemented.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the network management method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Network diagnosis recovery management method and device, and readable medium
CN111030851A