Network switch and network switch hot restart method
By introducing the link protocol Engine module in the network switch, the processor sends the link protocol Keepalive information before the thermal resection, solves the problem of network business interruption caused by the disconnection of the LACP protocol, and realizes the continuity of the network business when the heat restart.
Patent Information
- Application Number
- CN202411470161.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-24
AI Technical Summary
During the hot restart of the network switch, the disconnection of the LACP protocol causes the network service to be interrupted, and the purpose of uninterrupted network service during the hot restart cannot be achieved.
Design a network switch, including a processor, an integrated chip and a link protocol Engine module. The processor sends link protocol Keepalive information to the Link Protocol Engine module before hot restart. The Link Protocol Engine module generates and sends link protocol Keepalives. messages to ensure that the peer network switch continues to receive these messages.
Through this method, the network switch can maintain the normal work of the link protocol when the heat restart, ensure that the network business is not interrupted, and reduces the increase in R & D costs during the heat restart process.
Smart Images

Figure CN119363685A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hot restart, and in particular to a network switch and a hot restart method for the network switch. Background Art
[0002] The hot restart of network switches is an advanced feature to ensure that network services are not interrupted when upgrading the software version of the network switch. Hot restart means that the CPU is restarted, but the external components such as the chip are not restarted. The ASIC chip still works during the restart, thus ensuring that the chip forwarding is not interrupted. However, the CPU restart will cause a disconnection at the network protocol level.
[0003] For example, once the LACP protocol is disconnected, a port on the other end will be caused to exit the LAG aggregation port. After the port exits the aggregation port, the flow will be disconnected and the network service will be interrupted, which will not achieve the purpose of hot restart without interruption of network service.
[0004] The LACP protocol is mainly used to dynamically control port aggregation. It exchanges information with the peer port through LACPDU, notifying its own system priority, system MAC address, port priority, port number and operation key. After receiving this information, the peer port compares it with the information saved by other ports and selects the port that can be aggregated, so that both devices can reach an agreement on whether the port joins or exits the LAG aggregation port.
[0005] like Figure 1 As shown, the network switch Switch1 and the network switch Switch2 send LACPDU messages to each other. After reaching an agreement, they each add port p1, port p2, and port p3 to their respective LAG aggregation groups, and continue to send LACPKeepalive messages to keep the ports in the aggregation group.
[0006] like Figure 2 As shown in the figure, when the network switch Switch1 is hot restarted, the CPU will restart, and the LACPKeepalive message will be interrupted. That is, during the restart period, the network switch Switch1 cannot send LACP Keepalive messages to notify the port information. The network switch Switch2 aggregation group LAG2 does not receive the LACP Keepalive message within the timeout period, and the port that does not receive the LACP Keepalive message is deleted from the LAG aggregation group. The traffic of the network switch Switch2 cannot reach the network switch Switch1 normally, and the traffic sent by the network switch Switch1 to the network switch Switch2 will also be discarded, resulting in service interruption. Summary of the invention
[0007] The purpose of the present invention is to provide a network switch and a network switch hot restart method, which can solve the problem that when the network switch is hot restarted and the version is upgraded, the link protocol can still maintain normal operation and ensure that the network service is not interrupted.
[0008] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0009] In a first aspect, an embodiment of the present application provides a network switch, the network switch comprising: a processor, an integrated chip, and a link protocol Engine module, the link protocol Engine module is arranged in the integrated chip, and the processor is communicatively connected with the integrated chip;
[0010] The processor is used to send link protocol Keepalive information to the link protocol Engine module before hot restart;
[0011] The link protocol Engine module is used to receive the link protocol Keepalive information sent by the processor, generate a link protocol Keepalive message from the link protocol Keepalive information, and send the link protocol Keepalive message to the opposite network switch when the processor is in a hot restart state.
[0012] In an optional implementation, the link protocol Engine module includes a link protocol PDU configuration module, a link protocol PDU generation module, and a link protocol PDU sending module;
[0013] The link protocol PDU configuration module is used to receive the link protocol Keepalive information sent by the processor;
[0014] The link protocol PDU generation module generates a link protocol Keepalive message for forwarding using the link protocol Keepalive information;
[0015] The link protocol PDU sending module is used to push the link protocol Keepalive message into the sending queue, and send each link protocol Keepalive message in the sending queue to the opposite network switch.
[0016] In an optional implementation, the link protocol Engine module further includes a Timer module;
[0017] The Timer module is used to send each link protocol Keepalive message in the sending queue to the opposite network switch according to the sending cycle.
[0018] In an optional embodiment, the sending queue contains multiple link protocol Keepalive messages, and the link protocol PDU sending module is also used to send the target link protocol Keepalive message in the sending queue to the opposite network switch, and then arrange the target link protocol Keepalive message after the last link protocol Keepalive message in the sending queue, wherein the target link protocol Keepalive message is the link protocol Keepalive message that is sorted first in the sending queue.
[0019] In an optional implementation manner, the processor is further configured to receive a first link protocol PDU message sent by a peer network switch before the hot restart, and store the first link protocol PDU message in a storage medium.
[0020] In an optional implementation, the link protocol is a LACP protocol, and the processor is further configured to obtain a first link protocol PDU message from the storage medium after a hot restart, and perform LAG negotiation with a peer network switch based on the first link protocol PDU message.
[0021] In an optional implementation, the processor is further configured to send a shutdown instruction to the link protocol Engine module after the hot restart, so that the link protocol Engine module disables a function of sending link protocol Keepalive messages.
[0022] In an optional implementation manner, the processor is further configured to send new link protocol Keepalive information to the link protocol Engine module after the hot restart;
[0023] The link protocol Engine module is used to receive new link protocol Keepalive information sent by the processor, and generate a new link protocol Keepalive message from the new link protocol Keepalive information.
[0024] In an optional implementation, the processor is further configured to enable the link protocol Engine module to send a link protocol Keepalive message after receiving a hot restart instruction.
[0025] In a second aspect, an embodiment of the present application provides a network switch hot restart method, which performs a hot restart on the network switch and sends a link protocol Keepalive message to the opposite network switch through the network switch.
[0026] This application has the following beneficial effects:
[0027] The present application designs a network switch, which includes: a processor, an integrated chip, and a link protocol Engine module. The link protocol Engine module is arranged in the integrated chip, the processor is connected to the integrated chip in communication, and the processor is used to send link protocol Keepalive information to the link protocol Engine module before hot restart, wherein the link protocol Engine module is used to receive the link protocol Keepalive information sent by the processor, generate a link protocol Keepalive message from the link protocol Keepalive information, and send a link protocol Keepalive message to the opposite network switch when the processor is in a hot restart state. It can ensure that when the network switch is hot restarted to upgrade the version, the link protocol can still maintain normal operation and ensure that the network service is not interrupted. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 It is one of the prior art schematic diagrams of the present invention;
[0030] Figure 2 This is the second schematic diagram of the prior art of the present invention;
[0031] Figure 3 A schematic diagram of the structure of a network switch provided by an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of the structure of the link protocol Engine module provided in an embodiment of the present invention;
[0033] Figure 5 A schematic diagram of a flow chart of a network switch hot restart method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0035] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0037] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0038] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0039] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0040] After extensive research, the inventors found that in the hot restart of a network switch, that is, the restart of the CPU, when the CPU restarts, it will cause a disconnection at the network protocol level, such as the LACP protocol. Once the LACP protocol is disconnected, it will cause a port on the other end to exit the LAG aggregation port. After the port exits the aggregation port, it will cause a break in the flow and cause network service interruption, which fails to achieve the purpose of hot restart without interruption of network service.
[0041] Therefore, in order to solve the above problems, it is necessary to support the LACP protocol to not be disconnected during the hot restart of the network switch and to restore the LACP protocol state after the network switch is restarted, so as to ensure that the LAG ports at both ends are unaware of the hot restart of the LACP protocol.
[0042] Currently, a common technology is to modify the LACP protocol in a non-standard way to support GR, that is, to modify a field in the LACPDU to support GR, such as the G Bit. When a hot restart is performed, the G Bit will be set in the LACPDU to notify the peer LAG aggregation group to enter the GR mode. When the LACP aggregation group fails to receive the LACPDU for a long time and times out, the aggregation group member ports will not be deleted, thereby keeping the service uninterrupted.
[0043] However, modifying the LACP protocol and LACPDU messages is a non-standard GR mode, that is, different manufacturers have different behaviors. For example, manufacturer A uses G Bit, while manufacturer B uses R Bit. There are problems in the intercommunication negotiation between manufacturers. Both devices need to be from the same manufacturer and support the same GR function to meet the LACP hot restart without packet loss requirements. However, the above hot restart method will increase the R&D cost of hot restart of network switches.
[0044] In view of the discovery of the above problems, this embodiment provides a network switch and a method for hot restarting the network switch. By designing the network switch, the network switch includes: a processor, an integrated chip and a link protocol Engine module. The link protocol Engine module is arranged in the integrated chip. The processor is connected to the integrated chip for communication. The processor is used to send link protocol Keepalive information to the link protocol Engine module before hot restart. The link protocol Engine module is used to receive the link protocol Keepalive information sent by the processor, generate a link protocol Keepalive message from the link protocol Keepalive information, and send a link protocol Keepalive message to the opposite network switch when the processor is in a hot restart state. It can ensure that when the network switch is hot restarted to upgrade the version, the link protocol can still maintain normal operation and ensure that the network service is not interrupted. The solution provided by this embodiment is described in detail below.
[0045] Please refer to Figure 3 , which is a schematic diagram of the structure of a network switch. The following describes in detail the various components of the network switch.
[0046] The network switch comprises: a processor 1, an integrated chip 2 and a link protocol Engine module 3, wherein the link protocol Engine module 3 is arranged in the integrated chip, and the processor 1 is communicatively connected with the integrated chip 2;
[0047] The processor 1 is used for sending link protocol Keepalive information to the link protocol Engine module 3 before hot restart;
[0048] The link protocol Engine module 3 is used to receive the link protocol Keepalive information sent by the processor 1, generate a link protocol Keepalive message from the link protocol Keepalive information, and send the link protocol Keepalive message to the opposite network switch when the processor 1 is in a hot restart state.
[0049] Exemplarily, when the link protocol is the LACP protocol, the processor sends the link protocol Keepalive information corresponding to each LAG port on the local end to the link protocol Engine module in the integrated chip before hot restart, so as to avoid the situation where the link protocol state machine of the processor is in a dormant state and cannot send the link protocol Keepalive information corresponding to each LAG port on the local end to the opposite network switch after the processor enters the hot restart state. The link protocol Engine module processes the link protocol Keepalive information corresponding to each LAG port sent by the processor, and generates a link protocol Keepalive message corresponding to the link protocol Keepalive information corresponding to each LAG port.
[0050] The LAG ports of the local network switch include the p1 port, the p2 port, and the p3 port. The processor sends the link protocol Keepalive information corresponding to the p1 port to the link protocol Engine module, the processor sends the link protocol Keepalive information corresponding to the p2 port to the link protocol Engine module, the processor sends the link protocol Keepalive information corresponding to the p3 port to the link protocol Engine module, the link protocol Engine module processes the link protocol Keepalive information corresponding to the p1 port to obtain the link protocol Keepalive message of the p1 port, the link protocol Engine module processes the link protocol Keepalive information corresponding to the p2 port to obtain the link protocol Keepalive message of the p2 port, and the link protocol Engine module processes the link protocol Keepalive information corresponding to the p3 port to obtain the link protocol Keepalive message of the p3 port. When the processor is in the hot restart state, the link protocol Engine module sends the link protocol Keepalive message corresponding to the p1 port, the link protocol Keepalive message corresponding to the p2 port, and the link protocol Keepalive message corresponding to the p3 port to the opposite network switch, so as to keep the service uninterrupted when the processor is in the hot restart state.
[0051] The link protocol Engine module can reuse the packet sending capability of the OAM Engine. In addition, the link protocol Engine module can also be deployed in the processor in a programmable manner: the link protocol Engine module reuses the functions of the OAM Engine module. The OAM Engine mainly continuously sends OAM-related protocol control messages. The newly added link protocol Engine module can continuously send link protocol Keepalive messages without increasing the R&D cost of the integrated chip.
[0052] The link protocol engine module is deployed in the integrated chip, using the programmable capability of the processor for encoding, simulating the link protocol to send and receive link protocol keepalive messages, and similarly, does not increase the R&D cost of the integrated chip.
[0053] It should be noted that the network switch provided by the present invention can hot restart the network switch corresponding to the LACP protocol, hot restart the network switch corresponding to the LLDP protocol, and hot restart the network switch corresponding to the MLAG protocol. The embodiment of the present invention does not impose specific restrictions on this.
[0054] Before hot restarting the local network switch, configure the link protocol Keepalive information to the link protocol Engine module, enable the link protocol Engine module to continuously send packets, and disable the processor's function of continuously sending link protocol Keepalives.
[0055] like Figure 4 , which is a schematic diagram of the structure of the link protocol Engine module. The link protocol Engine module includes a link protocol PDU configuration module 31 , a link protocol PDU generation module 32 and a link protocol PDU sending module 33 .
[0056] The link protocol PDU configuration module is used to receive the link protocol Keepalive information sent by the processor; the link protocol PDU generation module uses the link protocol Keepalive information to generate a link protocol Keepalive message for forwarding; the link protocol PDU sending module is used to push the link protocol Keepalive message into a sending queue, and send each link protocol Keepalive message in the sending queue to the opposite network switch.
[0057] The following is an example using the LACP protocol as the link protocol: the processor sends link protocol Keepalive information, mainly based on the member port of each LAG. The link protocol PDU configuration module receives the link protocol Keepalive information of each LAG port sent by the processor. The link protocol PDU configuration module sends the link protocol Keepalive information of each LAG port to the link protocol PDU generation module. The link protocol PDU generation module generates a pduPkt message that can be used for forwarding, that is, the link protocol Keepalive message of each LAG port. The link protocol PDU generation module pushes the link protocol Keepalive message of each LAG port into the sending queue. When the processor is in the hot restart state, the link protocol Keepalive message corresponding to each LAG port is sent to the opposite network switch to avoid service interruption when the processor is in the hot restart state.
[0058] There are multiple ways to send link protocol Keepalive messages in the sending queue. In one implementation, for example, Figure 5 As shown, the following steps are included:
[0059] S101: Send the target link protocol Keepalive message in the sending queue to the opposite network switch.
[0060] S102: Queue the target link protocol Keepalive message after the last link protocol Keepalive message in the sending queue.
[0061] The target link protocol Keepalive message is the link protocol Keepalive message that is at the front of the sending queue.
[0062] The following takes the LACP protocol as an example. The sending queue includes multiple link protocol Keepalive messages, such as a first link protocol Keepalive message, a second link protocol Keepalive message, and a third link protocol Keepalive message. The first link protocol Keepalive message corresponds to the p1 port of the local network switch, the second link protocol Keepalive message corresponds to the p2 port of the local network switch, and the third link protocol Keepalive message corresponds to the p3 port of the local network switch. The first link protocol Keepalive message, the second link protocol Keepalive message and the third link protocol Keepalive message are sorted in the sending queue in such a manner that the first link protocol Keepalive message is sorted before the second link protocol Keepalive message, and the second link protocol Keepalive message is sorted before the third link protocol Keepalive message, that is, the first link protocol Keepalive message is first sent to the peer network switch, the second link protocol Keepalive message is sent to the peer network switch after the first link protocol Keepalive message is sent to the network switch, and the third link protocol Keepalive message is sent to the peer network switch after the second link protocol Keepalive message is sent to the peer network switch.
[0063] After the first link protocol Keepalive message is sent to the opposite network switch, the first link protocol Keepalive message is arranged after the third link protocol Keepalive message, that is, the first link protocol Keepalive message sent out is arranged to be sent after the second link protocol Keepalive message is sent to the opposite network switch. Through the above sending method, only one link protocol Keepalive message can be stored for each LAG port, reducing the consumption of chip resources.
[0064] The specific method for sending the first link protocol Keepalive message, the second link protocol Keepalive message and the third link protocol Keepalive message is as follows: the link protocol Engine module further includes a Timer module 34. The Timer module is used to send each link protocol Keepalive message in the sending queue to the opposite network switch according to the sending cycle.
[0065] It should be noted that the sending period can be set to 10ns, 20ns, 30ns, etc., and the embodiments of the present application do not impose specific restrictions on this.
[0066] Before the local network switch is hot restarted, the processor is further configured to receive a first link protocol PDU message sent by the opposite network switch before the hot restart, and store the first link protocol PDU message in a storage medium.
[0067] The following is an example using the LACP protocol as the link protocol: the processor negotiates the link protocol status based on the sent and received link protocol PDU. For example, the local network switch adds the p1 port, p2 port, and p3 port to the first link aggregation group LAG port 1, and the first link aggregation group LAG port 1 is eventually UP. The local network switch forwards service traffic based on the first link aggregation group LAG port 1. At the same time, the p1 port, p2 port, and p3 port continue to send the link protocol Keepalive message of the first link aggregation group LAG port 1 to the opposite network switch.
[0068] The link protocol state machine of the processor in the processor saves the first link protocol PDU message sent by the opposite network switch received on the p1 port, the p2 port and the p3 port to the storage medium respectively, and stores it according to the first link protocol PDU message corresponding to the p1 port, the first link protocol PDU message corresponding to the p2 port and the first link protocol PDU message corresponding to the p2 port.
[0069] After the network switch is restarted, the processor is further used to obtain the first link protocol PDU message from the storage medium after the hot restart, and perform LAG port negotiation with the opposite network switch based on the first link protocol PDU message. That is, the processor will load the first link protocol PDU message of the receiving direction stored in the storage medium before the hot restart, and perform state machine recovery based on the first link protocol PDU message, which is similar to the renegotiation of the LAG ports of the network switches at both ends.
[0070] The state machine is restored based on the first link protocol PDU message stored before the hot restart, and the link protocol algorithm does not need to be modified, thereby reducing the difficulty of state machine recovery.
[0071] At this time, the link protocol PDU messages generated in the link protocol negotiation process of the local network switch in the sending direction need to be discarded to avoid affecting the protocol status of the peer LAG group. At the same time, since the protocol status has not been restored, the Keepalive messages in the receiving direction are meaningless, so it is necessary to close the reception of the link protocol Keepalive messages in the receiving direction, and also discard the link protocol PDU messages sent by the peer network switch.
[0072] After the processor is restarted and the link protocol status is restored, the link protocol Engine module's ability to continuously send link protocol Keepalive messages is disabled, and the processor takes over the link protocol Engine module to send Keepalive messages. At the same time, new link protocol Keepalive information is configured to the link protocol Engine module. The link protocol Engine module is used to receive the link protocol Keepalive information sent by the processor, and generate a link protocol Keepalive message from the link protocol Keepalive information to prepare for the next hot restart of the network switch.
[0073] At the same time, the ability to receive link protocol PDU messages sent by the peer network switch is enabled, and the messages sent by the peer network switch are received and processed, so that the local switch can be restored to the state before the restart without any perception.
[0074] When the network switch executes the hot restart command, based on receiving the hot restart command, the link protocol state machine is dormant, and the link protocol Engine module is enabled to continuously send Keepalive messages.
[0075] When the link protocol is LACP, since the link protocol is in dormant state, when the network switch is restarted, the link protocol module will not remove the local LAG port member port from the LAG group, and the local LAG group will keep forwarding normally.
[0076] The link protocol Engine module takes over the processor and continues to send link protocol Keepalive messages. During the hot restart, the link protocol Engine module continues to forward link protocol Keepalive messages normally, so that the peer network switch can still receive link protocol Keepalive messages, so that the peer end is unaware that the link protocol of the local network switch is restarting.
[0077] Since the processor is restarting or in order to avoid affecting the recovery of the link protocol module after the restart, all received link protocol PDU messages are discarded before the link protocol is restored.
[0078] It should be noted that when the link protocol is the LACP protocol, if the LAG aggregation group status or configuration of the peer network switch changes during the hot restart, after the protocol status is restored, the receiving capability of the link protocol PDU message in the receiving direction is turned on and processed. At this time, the received link protocol PDU message will change due to the change in the peer protocol status, causing the link protocol status to be renegotiated. The service interruption at this time is caused by the change in the link protocol configuration or status, which is normal behavior.
[0079] The present application also provides a network switch hot restart method, through which the network switch is hot restarted and a link protocol Keepalive message is sent to the opposite network switch.
[0080] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0081] In addition, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.
[0082] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0083] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A network switch, characterized in that: The network switch comprises: a processor, an integrated chip and a link protocol Engine module, wherein the link protocol Engine module is arranged in the integrated chip, and the processor is communicatively connected with the integrated chip; The processor is used to send link protocol Keepalive information to the link protocol Engine module before hot restart; The link protocol Engine module is used to receive the link protocol Keepalive information sent by the processor, generate a link protocol Keepalive message from the link protocol Keepalive information, and send the link protocol Keepalive message to the opposite network switch when the processor is in a hot restart state.
2. The network switch according to claim 1, characterized in that: The link protocol Engine module includes a link protocol PDU configuration module, a link protocol PDU generation module and a link protocol PDU sending module; The link protocol PDU configuration module is used to receive the link protocol Keepalive information sent by the processor; The link protocol PDU generation module generates a link protocol Keepalive message for forwarding using the link protocol Keepalive information; The link protocol PDU sending module is used to push the link protocol Keepalive message into the sending queue, and send each link protocol Keepalive message in the sending queue to the opposite network switch.
3. The network switch according to claim 2, characterized in that: The link protocol Engine module also includes a Timer module; The Timer module is used to send each link protocol Keepalive message in the sending queue to the opposite network switch according to the sending cycle.
4. The network switch according to claim 2 or 3, characterized in that: The sending queue contains multiple link protocol Keepalive messages, and the link protocol PDU sending module is also used to send the target link protocol Keepalive message in the sending queue to the opposite network switch, and then arrange the target link protocol Keepalive message after the last link protocol Keepalive message in the sending queue, wherein the target link protocol Keepalive message is the link protocol Keepalive message that is ranked first in the sending queue.
5. The network switch according to claim 1, characterized in that: The processor is further configured to receive a first link protocol PDU message sent by a peer network switch before hot restart, and store the first link protocol PDU message in a storage medium.
6. The network switch according to claim 5, characterized in that: The link protocol is the LACP protocol, and the processor is further configured to obtain a first link protocol PDU message from the storage medium after the hot restart, and perform LAG negotiation with the opposite network switch based on the first link protocol PDU message.
7. The network switch according to claim 1, characterized in that: The processor is further configured to send a shutdown instruction to the link protocol Engine module after a hot restart, so that the link protocol Engine module turns off a function of sending a link protocol Keepalive message.
8. The network switch according to claim 1, characterized in that: The processor is further configured to send new link protocol Keepalive information to the link protocol Engine module after hot restart; The link protocol Engine module is used to receive new link protocol Keepalive information sent by the processor, and generate a new link protocol Keepalive message from the new link protocol Keepalive information.
9. The network switch according to claim 1, characterized in that: The processor is further configured to enable the link protocol Engine module to send a link protocol Keepalive message after receiving a hot restart instruction.
10. A network switch hot restart method, characterized in that: Through the network switch of any one of claims 1 to 9, the network switch is hot restarted and a link protocol Keepalive message is sent to the opposite network switch.