CN110351127B - Graceful restart method, device and system - Google Patents

Graceful restart method, device and system Download PDF

Info

Publication number
CN110351127B
CN110351127B CN201910564049.2A CN201910564049A CN110351127B CN 110351127 B CN110351127 B CN 110351127B CN 201910564049 A CN201910564049 A CN 201910564049A CN 110351127 B CN110351127 B CN 110351127B
Authority
CN
China
Prior art keywords
port
lag
state
entry
lag port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910564049.2A
Other languages
Chinese (zh)
Other versions
CN110351127A (en
Inventor
胡雅庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201910564049.2A priority Critical patent/CN110351127B/en
Publication of CN110351127A publication Critical patent/CN110351127A/en
Application granted granted Critical
Publication of CN110351127B publication Critical patent/CN110351127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a method, equipment and a system for graceful restart, which relate to the field of data communication and realize the uninterrupted forwarding of service flow. The method comprises the following steps: after the MLAG process of the local terminal network equipment is restarted, loading MLAG configuration, and recording the initial port state of the LAG port of the local terminal network equipment into a temporary table; sending a negotiation message to opposite-end network equipment of the MLAG domain to reestablish a pairing relation with the opposite-end network equipment; the local terminal network equipment starts a timer, interacts a synchronous message with the opposite terminal network equipment, calculates the current port state of the LAG port and updates the port state into the temporary table; if the timer is overtime, the local network device compares the entry corresponding to the LAG port in the temporary table with the entry corresponding to the LAG port in the external setting database of the local device to determine whether to update the hardware forwarding plane of the local device and the external setting database.

Description

Graceful restart method, device and system
Technical Field
The invention belongs to the field of data communication, and particularly relates to a graceful restart method, equipment and system.
Background
A Multi-Chassis Link Aggregation Group (MLAG) technology is a cross-device Link Aggregation technology, in which two physical devices are virtualized into one device on an Aggregation layer to implement cross-device Link Aggregation, thereby providing device-level redundancy protection and traffic load. In a network topology of the MLAG technology, one MLAG domain includes two paired network devices, and in the network topology, if an MLAG process on any one of the two paired network devices in the MLAG domain is restarted, how to implement uninterrupted forwarding of service traffic passing through the network device in the process of restarting the MLAG process is an urgent problem to be solved.
Disclosure of Invention
The invention provides an elegant restart method, equipment and a system, which are used for solving the problem of forwarding service flow after an MLAG process of any network equipment in an MLAG domain is restarted.
In order to achieve the above object, in a first aspect, an embodiment of the present invention provides a graceful restart method, where the method includes:
after the MLAG process of the cross-device link aggregation group of the local-end network device is restarted, loading MLAG configuration, and recording the initial port state of the LAG port of the link aggregation group of the local device into a temporary table; the temporary table is used for recording port state information of the LAG port, and one LAG port corresponds to one table entry in the temporary table;
Sending a negotiation message to opposite-end network equipment of the MLAG domain to reestablish a pairing relation with the opposite-end network equipment;
the local terminal network equipment starts a timer, interacts a synchronous message with the opposite terminal network equipment, calculates the current port state of the LAG port and updates the current port state into the temporary table;
if the timer is overtime, the local network equipment compares the list item corresponding to the LAG port in the temporary list with the list item corresponding to the LAG port in an external setting database of the local network equipment so as to determine whether to update a hardware forwarding plane of the local network equipment and the external setting database; the external setting database records port state information of all LAG ports issued by an MLAG process to the hardware forwarding plane.
In a second aspect, an embodiment of the present invention provides an apparatus for graceful restart, where the apparatus includes a configuration module, a sending module, a receiving module, a comparing module, and an updating module,
the configuration module is configured to load an MLAG configuration after the MLAG process of the cross-device link aggregation group of the device is restarted, and record an initial port state of a LAG port of the link aggregation group of the device in a temporary table; the temporary table is used for recording port state information of the LAG port, and one LAG port corresponds to one table entry in the temporary table;
The sending module is used for sending a negotiation message to the opposite terminal network equipment of the MLAG domain to reestablish the pairing relationship with the opposite terminal network equipment;
the configuration module is also used for starting a timer;
the sending module is further configured to send a synchronization packet to the peer network device;
the receiving module is used for calculating the current port state of the LAG port and updating the current port state of the LAG port into a temporary table;
the comparison module is configured to compare a table entry corresponding to the LAG port in the temporary table with a table entry corresponding to the LAG port in the external setting database of the device if the timer is overtime;
the updating module is used for determining whether to update the hardware forwarding plane of the equipment and the external setting database; the external setting database records port state information of all LAG ports issued by the MLAG process to the hardware forwarding plane.
In a third aspect, an embodiment of the present invention provides a system for graceful restart, where the system at least includes a home network device and an opposite network device, where the home network device and the opposite network device join a same cross-device link aggregation group MLAG domain, and the home network device or the opposite network device adopt the device in the second aspect.
According to the method, the device and the system for graceful restart provided by the embodiment of the invention, in the process of restarting the MLAG process, only the calculated current port state of the LAG port is recorded into the temporary table, and at the moment, the current port state is not set to a hardware forwarding plane, so that the influence of some intermediate temporary states in the convergence process on service flow is avoided, and the uninterrupted forwarding of the service flow is realized. And after the MLAG process is stably restarted, updating the current port state information of the LAG port of which the port state is changed in the restarting process of the MLAG process to a hardware forwarding plane. If the port state of the LAG port is not changed after the MLAG process is restarted, the hardware forwarding plane does not need to be updated, and the system overhead and the flow cutoff risk caused by resetting the hardware forwarding plane are avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a graceful restart method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an elegant restart apparatus according to an embodiment of the present invention;
FIG. 3 is a network topology diagram of an exemplary MLAG technology application;
FIG. 4 is a network topology diagram of an exemplary MLAG technology application;
fig. 5 is a schematic diagram of a system for graceful restart according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the embodiments described herein are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system architecture and the service scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by those skilled in the art that the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems along with the evolution of the system architecture and the appearance of a new service scenario.
The above method is described in detail with reference to specific examples.
The MLAG technology of a cross-device Link Aggregation Group (LAG) is a supplement to a Link Aggregation Group (LAG) technology, and can implement cross-device Link Aggregation, and in an actual application scenario of the MLAG technology, a restart condition of an MLAG process of one network device of two paired network devices in an MLAG domain is usually encountered, for example, an MLAG version is updated, at this time, an old version of the MLAG process needs to be closed and a new version of the MLAG process needs to be started, or an MLAG process needs to be manually restarted in a device debugging occasion, or an MLAG process is automatically restarted after being abnormal, and the like. It should be particularly noted that, in the embodiment of the present invention, when a Main master control processing Unit (Main Process Unit, MPU for short) of a dual master control device is switched, a Process of closing an MLAG Process on a Main MPU and starting the MLAG Process on a standby MPU is similar to a restart of the MLAG Process, and a scheme for ensuring a graceful restart in a restart Process of the MLAG Process provided in the embodiment of the present invention may also be applied.
The embodiment of the present invention provides a graceful restart method, which is used to solve the problem of forwarding service traffic after an MLAG process on any one of two paired network devices is restarted in an application of an MLAG technology, and since both of the two paired network devices can implement graceful restart by using the graceful restart method provided in the embodiment of the present invention, here, detailed explanation is given only taking an example that the MLAG process of one of the network devices (a local network device is selected for explanation, and it is obvious that a "local terminal" and an "opposite terminal" belong to a relative concept and do not form a limitation on the embodiment of the present invention) is restarted as an example.
In the embodiment of the invention, when the local-end network equipment normally runs, the MLAG process of the local-end network equipment interacts and negotiates a message with the opposite-end network equipment in the MLAG domain through the Peer-Link to establish a pairing relation with the opposite-end network equipment, and interacts and Synchronizes (SYNC) messages with the opposite-end network equipment to calculate the port state of the LAG port of the local-end network equipment, and invokes a driving interface to update the port state of the LAG port to the hardware forwarding plane of the local-end network equipment; and simultaneously, recording the port state of the LAG port into an external setting database of the equipment. Here, the port state of the LAG port is updated to the hardware forwarding plane of the device, that is, the port state of the LAG port is issued to the hardware chip of the device. In an embodiment of the present invention, one MLAG domain includes at least one LAG (here, LAG may also be expressed as MLAG in some cases), and one LAG includes two LAG ports (here, LAG ports are a concept of aggregation ports, and one LAG port may be aggregated by multiple physical member ports), where the two LAG ports are located on a home network device and a peer network device in the MLAG domain, respectively.
In the embodiment of the present invention, when the MLAG process of the home network device is first started, an external setting database is established, where the external setting database is stored in a system memory database, and the system memory database exists independently of each service process (e.g., MLAG process) and is used for each service process to store information. The external configuration database of the embodiment of the present invention records the port states of all LAG ports configured by the MLAG process to the hardware forwarding plane, which can be regarded as an image of the hardware forwarding plane. In the main and standby MPU systems of the dual master control device, data synchronization is performed between the system memory database of the main MPU and the system memory database of the standby MPU, so that the method for graceful restart provided by the embodiment of the present invention can also be applied to the MLAG process of the standby MPU when the main MPU and the standby MPU are switched. One LAG port corresponds to one table entry in the external setting database, and each table entry comprises fields such as an LAG port number, an enabling state, an isolation state, an isolated Peer-Link port number and a forwarding state of the LAG port, and also comprises a checksum and a field whether the LAG port is valid or not. The checksum field is obtained by performing checksum calculation on the enable state, the isolated Peer-Link port number, and the forwarding state, and the specific checksum calculation manner is not limited here, for example, the checksum calculation manner may be cumulative summation of binary strings of the fields, or may be a checksum algorithm such as CRC or MD5 calculation. Obviously, other fields in the table entry may also be added to the checksum calculation according to different application scenarios, which is not exhaustive here.
In the embodiment of the present invention, when the MLAG process on the local network device operates normally, the local network device periodically synchronizes the port states of all LAG ports of the local network device to the opposite network device, or when the port state of the LAG port of the local network device changes, the local network device immediately synchronizes a new port state of the LAG port to the opposite network device through the synchronization packet, so that the opposite network device can know the current port state of the LAG port of the local network device in time. Similarly, the opposite-end network device may also periodically synchronize the port states of all LAG ports of the device to the local-end network device, or, when the port state of the LAG port of the opposite-end network device changes, immediately synchronize the new port state of the LAG port to the local-end network device through the synchronization packet, so that the local-end network device can timely know the current port state of the LAG port of the opposite-end network device. In the embodiment of the present invention, if a local network device receives a synchronization packet periodically sent by an opposite network device and determines that a port state of an LAG port of the opposite network device carried in the synchronization packet changes, a port state of an LAG port on the local device, which belongs to the same LAG as the LAG port of the opposite network device, is updated according to a current port state of the LAG port of the opposite network device in the synchronization packet, and a drive interface is invoked to update the current port state of the LAG port on the local device to a hardware forwarding plane; meanwhile, recording the current port state of the LAG port into the corresponding table entry of the LAG port in the external setting database, calculating the checksum of the corresponding table entry of the LAG port, and setting the valid or invalid field of the corresponding table entry of the LAG port to be valid True. If the local-end network device receives the synchronization message periodically sent by the opposite-end network device and judges that the port state of the LAG port of the opposite-end network device carried in the synchronization message is unchanged, the port state of the LAG port on the local device does not need to be updated, and because the port state of the LAG port is unchanged, a hardware forwarding plane does not need to be updated, and an external setting database also needs to be updated.
As shown in fig. 1, an embodiment of the present invention provides a graceful restart method, including:
step 101, after the MLAG process of the local terminal network device is restarted, loading the MLAG configuration, and recording the initial port state of the LAG port of the local device into a temporary table; the temporary table is used for recording port state information of the LAG port, and one LAG port corresponds to one table entry in the temporary table. In the embodiment of the invention, after the MLAG process of the local terminal network equipment is started, a temporary table is established, and the temporary table does not work when the MLAG process is in normal operation and only works in the process of restarting the MLAG process. In the process of restarting the MLAG process, the temporary table is used for recording the current port state of an LAG port on the device in the process of restarting the MLAG process, and one LAG port corresponds to one table entry in the temporary table; the temporary table has no valid field, and other fields are the same as those in the externally-set database, that is, each entry in the temporary table includes a LAG port number, an enable state, an isolated Peer-Link port number, a forwarding state, and a checksum field of the LAG port, where the checksum field is obtained by performing checksum calculation on the enable state, the isolated Peer-Link port number, and the forwarding state, and a specific checksum calculation manner is not limited here, and may be, for example, an accumulated sum of binary strings of the fields, or may be a checksum algorithm such as CRC calculation, or MD5 calculation, and the like. It should be noted that the temporary table and the checksum algorithm employed by the external setup database need to be the same.
In the embodiment of the present invention, the port states of the LAG port include an Enabled state, an isolated state and a forwarding state, wherein the Enabled state includes an Disabled state and an Enabled state, the LAG port in the Disabled state does not participate in the physical negotiation, and the link state is Down; after the LAG port in the Enabled state and the access device have undergone physical negotiation, the link state may be Up. The isolation state comprises an Isolated state and a non-Isolated state, and the LAG port in the Isolated state prohibits the traffic from the Peer-Link from being forwarded to the LAG port; the LAG port in the unified state allows traffic from the Peer-Link to be forwarded to the LAG port. The Forwarding state comprises a Blocked state and a Forwarding state, and the LAG port in the Blocked state cannot forward the flow; the LAG port in the Forwarding state may forward traffic, but if the quarantine state of the LAG port in the Forwarding state is the idle state, Forwarding of traffic from the Peer-Link is still prohibited, and other traffic, such as traffic from the access device, may be forwarded.
Initially, enabling the LAG port to be in a Disabled state; if the pairing relationship between the paired network devices is established, the enabling state of the LAG port is transferred from the Disabled state to the Enabled state; and if the pairing relation between the paired network devices fails to keep alive, the enabling state of the LAG port is transited from the Enabled state to the Disabled state.
Initially, the isolation state of the LAG port is an Isolated state; if the link state of another LAG port belonging to the same LAG is Down, the isolation state of the LAG port is transferred to the unified state from the Isolated state; if the link state of another LAG port belonging to one LAG is Up, the Isolated state of the LAG port is transitioned from the unified state to the Isolated state.
Initially, the forwarding state of the LAG port is a Blocked state; if the link state of the LAG port is Up and the isolation state of the other LAG port belonging to one LAG is the Isolated state, the Forwarding state of the LAG port is transferred to the Forwarding state from the Blocked state; and if the link state of the LAG port is Down or the isolation state of the other LAG port belonging to one LAG is the Unilatched state, the Forwarding state of the LAG port is transited from the Forwarding state to the Blocked state.
In the embodiment of the present invention, in the process of restarting the MLAG process of the local-end network device, it is not necessary to close all LAG ports of the network device, but the hardware forwarding plane is maintained unchanged, that is, if the hardware state of the LAG port is in the forwarding state before the MLAG process is restarted, the hardware state of the LAG port still maintains the forwarding state in the process of restarting the MLAG process, so that traffic interruption is not caused, and uninterrupted forwarding of traffic is realized.
102, sending a negotiation message to opposite-end network equipment of the MLAG domain to reestablish a pairing relation with the opposite-end network equipment; the negotiation message may be a Heartbeat message or a handshake Hello message, or may be another negotiation message.
And starting a timer after the local terminal network equipment reestablishes the pairing relation with the opposite terminal network equipment of the MLAG domain. The timeout time of the timer represents the maximum time of the current port state of the LAG port of the device after the MLAG process restarts and reestablishes the pairing relationship. The timeout time of the timer can be custom set, such as an empirical value, such as 60 seconds, can be selected.
In the embodiment of the present invention, after the local-end network device reestablishes the pairing relationship with the opposite-end network device in the MLAG domain, the Enabled state of the LAG port of the local-end network device is changed to the Enabled state, which is recorded in the temporary table, and after the link states of the LAG port of the local-end network device are all changed to Up through the physical negotiation with the third-party access device, the local-end network device synchronizes the new link state to the opposite-end network device.
Step 103, starting a timer, interacting a synchronization message with the opposite terminal network device, calculating the current port state of the LAG port, and updating the port state into a temporary table.
In this step, the method interacts a synchronization packet with the opposite-end network device, calculates a current port state of the LAG port, and updates the port state into the temporary table, which specifically includes:
the local terminal network device carries the current link state and isolation state of the LAG port of the local device in a synchronous message and sends the synchronous message to the opposite terminal network device;
the opposite terminal network equipment sets the current isolation state of an LAG port belonging to the same LAG as the LAG port on the local equipment according to the current link state of the LAG port;
the opposite terminal network equipment sets the current forwarding state of the LAG port belonging to the same LAG as the LAG port on the local equipment according to the current isolation state of the LAG port;
the opposite terminal network equipment carries the current link state and the isolation state of the LAG port belonging to the same LAG with the LAG port in a synchronous message and sends the synchronous message to the local terminal network equipment; in this step, the opposite-end network device may periodically carry the current link state and the isolation state of the LAG port belonging to the same LAG as the LAG port in a synchronization packet and send the synchronization packet to the local-end network device, or may actively carry the current link state and the isolation state of the LAG port belonging to the same LAG as the LAG port in a synchronization packet and send the synchronization packet to the local-end network device when the current port state of the LAG port belonging to the same LAG as the LAG port is changed.
The local terminal network device sets the current isolation state of the LAG port of the local device according to the current link state of the LAG port belonging to the same LAG on the opposite terminal network device;
the local terminal network device sets the current forwarding state of the LAG port of the local device according to the current isolation state of the LAG port of the opposite terminal network device, which belongs to the same LAG with the LAG port of the local device;
and the local terminal network equipment records the current isolation state and the current forwarding state of the LAG port into the table entry corresponding to the LAG port in the temporary table, and calculates the checksum of the table entry corresponding to the LAG port.
In the embodiment of the present invention, during the process of restarting the MLAG process of the local-end network device, only the current port state of the calculated LAG port is recorded in the temporary table, and the checksum is calculated. Even if the current port state of the calculated LAG port is changed compared with the current port state before the MLAG process is restarted, the driving interface is not called to update the hardware forwarding plane, and the current port state is not recorded into an external setting database. The calculated current port state of the LAG port is not updated to a hardware forwarding plane, so that the influence of some intermediate temporary states in a convergence process on the service flow is avoided, and the uninterrupted forwarding of the service flow in the process of restarting the MLAG process is effectively ensured.
Step 104, if the timer is overtime, the local network equipment compares the table entry corresponding to the LAG port in the temporary table with the table entry corresponding to the LAG port in the external setting database of the local network equipment to determine whether to update the hardware forwarding plane and the external setting database of the local network equipment; the external setting database records port state information of all LAG ports issued by the MLAG process to the hardware forwarding plane.
In this step, the data alignment overhead (which is exceptionally significant when there are hundreds to thousands of LAG ports) is reduced by the checksum mechanism. If the port state of the LAG port is not changed after the MLAG process is restarted, the check sum of the table entry corresponding to the LAG port in the temporary table and the table entry corresponding to the LAG port in the external setting database is the same, and the hardware forwarding plane does not need to be updated at the moment; if the port state of the LAG port is changed after the MLAG process is restarted, the checksum of the entry corresponding to the LAG port in the temporary table is different from the checksum of the entry corresponding to the LAG port in the external setting database, and at this time, the new port state of the LAG port with the changed port state is updated to the hardware forwarding plane, that is, the new port state of the LAG port is sent to the hardware chip. The system overhead and the cut-off risk caused by resetting the hardware forwarding plane are avoided. In fact, in most cases, the network topology before and after the MLAG process is restarted does not change, and the port states of the LAG ports calculated before and after the MLAG process is restarted are the same, so that the hardware forwarding plane does not change, the network traffic is not affected, and the real uninterrupted forwarding is realized.
In this step, the local network device compares the entry corresponding to the LAG port in the temporary table with the entry corresponding to the LAG port in the external setting database of the local device, so as to determine whether to update the hardware forwarding plane and the external setting database of the local device, and specifically includes:
the home terminal network device sets whether valid fields of entries corresponding to all LAG ports in the external setting database are invalid, that is, initially considers that all entries in the external setting database are invalid.
Traversing the temporary table, if the MLAG process of the local-end network device is restarted, the network topology is not changed, and the LAG port in the MLAG configuration is not changed. If the LAG port has a corresponding first table entry in the temporary table, a corresponding second table entry exists in the external setting database, and the checksums of the first table entry and the second table entry are the same, setting whether the valid field in the second table entry is valid;
if the corresponding first entry exists in the temporary table of the LAG port, the corresponding second entry exists in the external setting database, and the checksums of the first entry and the second entry are different, updating the hardware forwarding plane according to the current port state of the LAG port in the first entry, and setting whether the valid field in the second entry is valid or not after updating the current port state and the checksum of the LAG port in the second entry according to the current port state and the checksum of the LAG port in the first entry. In this step, it may further be determined which port state of the LAG port in the first entry and the second entry is inconsistent, and only the one or more port states in the first entry that are inconsistent with the port state in the second entry are updated to the hardware forwarding plane, so as to reduce the operation overhead on the hardware forwarding plane.
In an example, each entry LAG-Port-i in the temporary table is traversed (i is a self-defined Port number), whether an entry corresponding to the LAG-Port-i exists in the external setting database is judged, if the entry corresponding to the LAG-Port-i exists in the external setting database and the checksums are the same, it is indicated that the Port state of the LAG Port is not changed, and whether a valid field in the entry corresponding to the LAG-Port-i in the external setting database is updated to True. If the entry corresponding to the LAG-Port-i exists in the external setting database, but the checksums are different, indicating that the Port state of the LAG Port has changed, updating a Port state calling driving interface in the entry corresponding to the LAG-Port-i in the temporary table to a hardware forwarding plane, updating the Port state in the entry corresponding to the LAG-Port-i in the temporary table to the entry corresponding to the LAG-Port-i in the external setting database, updating the checksums in the entries corresponding to the LAG-Port-i in the external setting database, and updating whether the valid field is True or not.
Optionally, if the MLAG process on the network device is restarted, the LAG port in the MLAG configuration is increased, that is, if the corresponding first entry exists in the temporary table of the LAG port and the corresponding entry does not exist in the external setting database, the hardware forwarding plane is updated according to the current port state of the LAG port in the first entry, a third entry corresponding to the LAG port is newly added in the external setting database, and after the current port state of the LAG port in the third entry and the checksum are updated according to the current port state of the LAG port in the first entry and the checksum, whether the valid field in the third entry is set to be valid is determined.
If the number of LAG ports in the MLAG configuration is reduced when the MLAG process on the network device is restarted, that is, after the traversal is completed, if a fourth entry exists in the external setting database, where an effective field of the fourth entry is invalid, the port state of the LAG port in the fourth entry is deleted from a hardware forwarding plane, and the fourth entry is deleted from the external setting database.
Illustratively, each entry LAG-Port-i in the temporary table is traversed (i is a self-defined Port number), whether an entry corresponding to the LAG-Port-i exists in the external setting database is judged, if the entry corresponding to the LAG-Port-i does not exist in the external setting database, a Port state calling driving interface of the LAG-Port-i recorded by the entry corresponding to the LAG-Port-i in the temporary table is set to a hardware forwarding plane, an entry corresponding to the LAG-Port-i is newly added in the external setting database, the entry information corresponding to the LAG-Port-i in the temporary table is updated to the entry corresponding to the newly added LAG-Port-i in the external setting database, and the checksum in the entry corresponding to the newly added LAG-Port-i in the external setting database is calculated at the same time, the valid or not field is set to True.
After traversing, if the external setting database has entries whose valid fields are still invalid, then the external setting database will set all entries whose valid fields are False, call the driving interface to delete the port state of the LAG port corresponding to the entry whose valid field is False from the hardware forwarding plane, and delete all entries whose valid fields are False in the external setting database.
In the embodiment of the invention, after the traversal of the temporary table is completed, the hardware forwarding plane and the external setting database are updated, the temporary table can be emptied or deleted, and the MLAG process is restarted and ended.
As a special case of the embodiment of the present invention, if the MLAG process of the local-end network device is restarted, and the new MLAG process cannot reestablish the pairing relationship with the peer-end network device, the timer cannot be started after the pairing relationship is established, at this time, the port state of the LAG port of the local-end network device is an initial state, and if the initial port state of the LAG port needs to be updated to the hardware forwarding plane at this time, a timer may be set before loading the MLAG configuration after the MLAG process of the local-end network device is restarted, and the timeout time of the timer is greater than the timeout time of the timer started after the pairing relationship is established; the timeout time of the timer can be set by user, for example, an empirical value such as 300 seconds can be selected. Therefore, in the embodiment of the present invention, if the new MLAG process cannot reestablish the pairing relationship, after the timer started before loading the MLAG configuration expires, whether to update the hardware forwarding plane and the external configuration database is determined according to the initial port state of the LAG port in the temporary table.
In the embodiment of the invention, when the local terminal network equipment normally operates, the local terminal network equipment periodically interacts heartbeat messages with the opposite terminal network equipment through the Peer-Link to carry out neighbor keep-alive, wherein the heartbeat messages contain a keep-alive time field used for indicating the expected keep-alive time of the opposite terminal network equipment, and the keep-alive time can be set in a user-defined manner. Before the MLAG process of the local-end network equipment is restarted, the graceful restart function of the MLAG process can be started through configuration, namely the keep-alive time of the heartbeat messages is set, the set keep-alive time is larger than the keep-alive time when the network equipment normally runs, and the situation that the local-end network equipment is mistakenly aged by the opposite-end network equipment in the process of restarting the MLAG process is avoided. For example, if the keep-alive time of the home network device a during normal operation is 15 seconds, and the opposite network device B does not receive the heartbeat packet within 15 seconds, it is considered that the network device a is aged, so that the keep-alive time can be set to 150 seconds before the MLAG process of the network device a is restarted, and the network device B does not receive the heartbeat packet within 150 seconds, and it is considered that the network device a is aged. The keep-alive time is lengthened to avoid being mistakenly considered by the opposite-end network device B as aged in the process of restarting the MLAG process of the local-end network device A.
In the graceful restart method provided by the embodiment of the invention, in the restart process of the MLAG process, only the calculated current port state of the LAG port is recorded in the temporary table, and at this time, the current port state is not set to the hardware forwarding plane, so that the influence of some intermediate temporary states in the convergence process on the service flow is avoided, and the uninterrupted forwarding of the service flow is realized. And after the MLAG process is stably restarted, updating the current port state information of the LAG port of which the port state is changed in the restarting process of the MLAG process to a hardware forwarding plane. If the port state of the LAG port is not changed after the MLAG process is restarted, the hardware forwarding plane does not need to be updated, and the system overhead and the flow cutoff risk caused by resetting the hardware forwarding plane are avoided.
For example, as shown in fig. 2, which is a network topology diagram of an application of the example MLAG technology, network device a and network device B form an MLAG domain, access device D1 and access device D2 access the MLAG domain in a dual-homing manner to form two cross-device link aggregation groups LAG1 and LAG2, a LAG Port of LAG1 on network device a is Port-a1, and a LAG Port on network device B is Port-B1; LAG2 the LAG Port on network device A is Port-A2, and the LAG Port on network device B is Port-B2; a direct connection aggregation Link Peer-Link exists between the network equipment A and the network equipment B, the Port-APL is a Peer-Link Port of the network equipment A, and the Port-BPL is a Peer-Link Port of the network equipment B. Initially, the enabled states of Port-A1, Port-A2, Port-B1, and Port-B2 are Disabled, the Isolated state is Isolated, and the Forwarding state is Blocked. After the MLAG process is started, network device A and network device B judge the parameters of MLAG domain ID, virtual MAC address and the like are consistent through interactive negotiation messages, the pairing relation of the network device A and the network device B is established, and the enabling states of Port-A1, Port-A2, Port-B1 and Port-B2 are changed into the Enabled state. Through physical negotiations with access device D1 and access device D2, the link states of Port-A1, Port-A2, Port-B1, and Port-B2 all become Up, and network device A and network device B both synchronize the new link state to the opposite end. Specifically, the situation that the network device a actively synchronizes the current port state of the LAG port to the network device B is specifically implemented as follows:
Network device A carries the link state (Up) and isolation state (Isolated) of Port-A1 and Port-A2 in SYNC message and sends it to network device B, after receiving SYNC message, according to the link state (Up) of Port-A1 and Port-A2 in SYNC message, network device B keeps the isolation state of Port-B1 and Port-B2 as Isolated state, according to the isolation state (Isolated) of Port-A1 and Port-A2 in SYNC message, sets the Forwarding state of Port-B1 and Port-B2 as Forwarding state.
Similarly, the situation that the network device B actively sends the current port state of the LAG port to the network device a is specifically implemented as follows:
network device B carries the link state (Up) and isolation state (Isolated) of Port-B1 and Port-B2 in SYNC message and sends it to network device a, after network device a receives SYNC message, according to the link state (Up) of Port-B1 and Port-B2 in SYNC message, the isolation state of Port-a1 and Port-a2 is kept as Isolated state, according to the isolation state (Isolated) of Port-B1 and Port-B2 in SYNC message, the Forwarding state of Port-a1 and Port-a2 is set as Forwarding state.
In the embodiment of the invention, the network equipment A and the network equipment B are respectively provided with a hardware forwarding plane and an external setting database, when the MLAG process is in normal operation, after the current Port states of the Port-A1 and the Port-A2 are set, the network equipment A calls a driving interface to send the current Port states of the Port-A1 and the Port-A2 to the hardware forwarding plane of the equipment; and recording the current Port states of Port-A1 and Port-A2 into an external setting database of the device, and updating the checksums of the entries corresponding to Port-A1 and Port-A2 in the external setting database. Similarly, after the current Port states of Port-B1 and Port-B2 are set, the network device B calls a drive interface to send the current Port states of Port-B1 and Port-B2 to the hardware forwarding plane of the device; and recording the current Port states of the Port-B1 and the Port-B2 into an external setting database of the device, and updating the checksums of the entries corresponding to the Port-B1 and the Port-B2 in the external setting database.
Here, it is assumed that, because the MLAG version is updated, the MLAG process on the network device a needs to be restarted, at this time, the keep-alive time field of the Heartbeat message may be set to 150 seconds, which is greater than the keep-alive time of the network device during normal operation by 15 seconds, and after the MLAG process on the network device a is restarted, the external setting database on the network device a still exists.
After the MLAG process on the network device a is restarted, the MLAG configuration is loaded, a temporary table is created, the LAG Port state is set to the initial state (the enabled states of Port-a1 and Port-a2 are both Disabled states, the Isolated states are both Isolated states, and the forwarding states are both Blocked states), only recording the LAG Port state in the temporary table, and without calling a driver interface to issue a hardware forwarding plane, the LAG Port state and the Port-a2 are interactively negotiated for a packet to reestablish a pairing relationship. After the pairing relationship is established, a new MLAG process on the network equipment A starts a timer, SYNC messages are interacted with the network equipment B, the port state of each LAG port is calculated, before the timer is overtime, the setting of the port state of the network equipment A is only recorded into a temporary table, a checksum field is updated, a drive interface is not called to issue a hardware forwarding plane, and the setting is not recorded into an external setting database.
Specifically, after the pairing relationship is established, the new MLAG process starts a timer T1(T1 is 60 seconds), and the network device a sets the Enabled states of Port-a1 and Port-a2 to the Enabled state, and records the Enabled states in the temporary table. Prior to the MLAG process restarting, the link state of Port-A1 and Port-A2 is already Up. Network device a carries the link state (Up) and isolation state (Isolated) of Port-a1 and Port-a2 in SYNC message and sends it to network device B, after receiving SYNC message, network device B keeps the isolation state of Port-B1 and Port-B2 in the Isolated state according to the link state (Up) of Port-a1 and Port-a2 in the SYNC message, and keeps the Forwarding state of Port-B1 and Port-B2 in Forwarding state according to the isolation state (Isolated) of Port-a1 and Port-a2 in the SYNC message.
Network device B carries the link status (Up) and isolation status (Isolated) of Port-B1 and Port-B2 in a SYNC message and sends the SYNC message to network device a, after receiving the SYNC message, network device a keeps the isolation status of Port-a1 and Port-a2 in the Isolated status according to the link status (Up) of Port-B1 and Port-B2 in the SYNC message, and sets the Forwarding status of Port-a1 and Port-a2 in the Forwarding status according to the isolation status (Isolated) of Port-B1 and Port-B2 in the SYNC message to the Forwarding status, and records the Forwarding status in a temporary table.
In the embodiment of the invention, because the Port states of Port-A1 and Port-A2 of network device A are not changed before and after the MLAG process is restarted, the current Port states of Port-A1 and Port-A2 recorded in the temporary table of network device A after the MLAG process is restarted are the same as the Port states of Port-A1 and Port-A2 in the external setting database of network device A, and therefore the check sums of the entries corresponding to Port-A1 and Port-A2 calculated in the temporary table and the external setting database are also the same.
When the timer T1 is overtime, setting valid fields in entries corresponding to Port-A1 and Port-A2 in an external setting database of the network device A to be False, traversing each entry in a temporary table by a new MLAG process, wherein corresponding entries exist in the temporary table and the external setting database by Port-A1 and Port-A2, and the checksums are the same, namely after the MLAG process is restarted, the Port states of Port-A1 and Port-A2 are not changed, setting the valid fields in the entries corresponding to Port-A1 and Port-A2 in the external setting database to be True, and at the moment, not updating the hardware forwarding plane. After the traversal is completed, the entry whether the valid field is False already does not exist in the external setting database on the network device a, and no additional processing is needed. The new MLAG process on the network device A deletes all the table entries in the temporary table to complete the graceful restart of the MLAG process.
In the process of restarting the MLAG process, because the topology and configuration of the MLAG network are not changed, after the MLAG process is restarted, the port state of each LAG port calculated by the new MLAG process is the same as the port state of each LAG port before the MLAG process is restarted, so the checksum is also the same, and therefore the hardware forwarding plane does not need to be updated, so the hardware forwarding plane does not have any change, the network flow in the whole process of restarting the MLAG process is not affected, and the uninterrupted forwarding of the service flow is realized.
As shown in fig. 3, it is assumed that during the process of restarting the MLAG process of network device a, the link between network device B and access device D1 is disconnected due to a failure, the link state of Port-B1 is changed to Down, and the forwarding state of Port-B1 is set to Blocked.
After the MLAG process on the network device a is restarted, the MLAG configuration is loaded, a temporary table is created, the LAG Port state is set to the initial state (the enabled states of Port-a1 and Port-a2 are both Disabled states, the Isolated states are both Isolated states, and the forwarding states are both Blocked states), only recording the LAG Port state in the temporary table, and without calling a driver interface to issue a hardware forwarding plane, the LAG Port state and the Port-a2 are interactively negotiated for a packet to reestablish a pairing relationship. After the pairing relationship is established, a new MLAG process on the network equipment A starts a timer, SYNC messages are interacted with the network equipment B, the port state of each LAG port is calculated, before the timer is overtime, the setting of the port state of the network equipment A is only recorded into a temporary table, a checksum field is updated, a drive interface is not called to issue a hardware forwarding plane, and the setting is not recorded into an external setting database.
Specifically, after the pairing relationship is established, the new MLAG process starts a timer T1(T1 equals 60 seconds), and network device a sets the Enabled states of Port-a1 and Port-a2 to the Enabled state and records the Enabled states in the temporary table. Prior to the MLAG process restarting, the link state of Port-A1 and Port-A2 is already Up. The method comprises the steps that a network device A carries link state (Up) and isolation state (Isolated) of a Port-A1 and a Port-A2 in a SYNC message and sends the SYNC message to a network device B, after the network device B receives the SYNC message, according to the link state (Up) of a Port-A1 and a Port-A2 in the SYNC message, the isolation state of a Port-B1 and a Port-B2 is kept to be the Isolated state, according to the Port-A1 isolation state (Isolated) in the SYNC message, the Forwarding state of a Port-B1 is kept to be the Blocked state (because the link state of the Port-B1 is Down), and according to the Port-A2 isolation state (Isolated) in the SYNC message, the Forwarding state of the Port-B2 is kept to be the Forwarding state.
After receiving the SYNC message, network device a sets the Port-a1 isolation state to a united state according to the link state (Down) of Port-B1 in the SYNC message and records the united state into a temporary table, sets the Port-a1 Forwarding state to a Forwarding state according to the isolation state (Isolated) of Port-B1 in the SYNC message and records the united state into a temporary table, sets the Port-a2 isolation state to a forwarded state according to the link state (Up) of Port-B3768 in the SYNC message, and keeps the Port-a2 isolation state to an Isolated state according to the isolation state (Isolated) of Port-B3528 in the SYNC message and records the SYNC state into a temporary table.
In the embodiment of the invention, because the Port state of Port-A2 is not changed during the process of restarting the MLAG process of network device A, after the restart of the MLAG process, the current Port state of Port-A2 recorded in the temporary table of network device A is the same as the Port state of Port-A2 in the external setting database of network device A, therefore, the checksum of the entry corresponding to Port-A2 calculated in the temporary table and the external setting database is also the same. However, the Port state of Port-a1 changes, so after the MLAG process is restarted, the current Port state of Port-a1 recorded in the temporary table of network device a is different from the Port state of Port-a1 in the external configuration database of network device a, and therefore, the checksum of the entry corresponding to Port-a1 calculated in the temporary table and the external configuration database is also different.
When the timer T1 times out, setting the valid fields in the entries corresponding to Port-A1 and Port-A2 in the external setting database of the network device A as False, traversing each entry in the temporary table by the new MLAG process, wherein the Port-A1 has corresponding entries in both the temporary table and the external setting database, and the check sum is different, calling the driver interface to update the current Port state of Port-A1 in the entry corresponding to Port-A1 in the temporary table to the hardware forwarding plane, it should be noted that, because the Port-A1 can only change the isolation state through further comparison, only the current isolation state of Port-A1 can be updated to the hardware forwarding plane, the current Port state of Port-A1 can be updated to the entry corresponding to Port-A1 in the external setting database, and the check sum is calculated, and setting the valid or invalid field in the entry corresponding to Port-A1 in the external setting database to True.
And if the Port-A2 has corresponding entries in both the temporary table and the external setting database and the checksums are the same, setting the valid field or not in the entry corresponding to the Port-A2 in the external setting database as True, and at this time, the hardware forwarding plane does not need to be updated. After the traversal is completed, the entry whether the valid field is False already does not exist in the external setting database on the network device a, and no additional processing is needed. The new MLAG process on the network device A deletes all the table entries in the temporary table to complete the graceful restart of the whole MLAG process.
In the process of restarting the MLAG process, because the MLAG network topology changes, after the MLAG process on the network device a is restarted, the Port state of Port-a1 calculated by the new MLAG process changes, resulting in different calculated checksums, and therefore, the Port state of Port-a1 needs to be updated to the hardware forwarding plane; the Port state of Port-A2 calculated by the new MLAG process has not changed and the calculated checksum is the same, so there is no need to update the Port state of Port-A2 to the hardware forwarding plane. That is to say, if the port state of the LAG port is changed during the restart of the MLAG process, only the new port state of the LAG port whose port state is changed needs to be updated to the hardware forwarding plane, and if the port state of the LAG port is not changed, the hardware forwarding plane does not need to be updated, thereby ensuring the stability and reliability of the hardware forwarding plane.
As shown in fig. 4, the apparatus 40 according to an embodiment of the present invention includes a configuration module 401, a sending module 402, a receiving module 403, a comparing module 404, and an updating module 405,
the configuration module 401 is configured to load an MLAG configuration after a cross-device link aggregation group MLAG process of the device is restarted, and record an initial port state of a link aggregation group LAG port of the device in a temporary table; the temporary table is used for recording port state information of the LAG port, and one LAG port corresponds to one table entry in the temporary table;
the sending module 402 is configured to send a negotiation packet to an opposite-end network device in the MLAG domain to reestablish a pairing relationship with the opposite-end network device;
the configuration module 401 is further configured to start a timer;
the sending module 402 is further configured to send a synchronization packet to the peer network device;
the receiving module 403 is configured to calculate a current port state of the LAG port, and update the current port state into a temporary table;
the comparing module 404 is configured to compare the entry corresponding to the LAG port in the temporary table with the entry corresponding to the LAG port in the external setting database of the device if the timer is overtime;
The update module 405 is configured to determine whether to update the hardware forwarding plane of the device and the external setting database; the external setting database records port state information of all LAG ports issued by an MLAG process to the hardware forwarding plane.
The sending module 402 is specifically configured to carry the current link state and the isolation state of the LAG port of the device in a synchronization message, and send the synchronization message to the opposite-end network device, so that the opposite-end network device sets a current isolation state of a LAG port, which belongs to the same LAG as the LAG port, on the opposite-end network device according to the current link state of the LAG port, and sets a current forwarding state of a LAG port, which belongs to the same LAG as the LAG port, on the opposite-end network device according to the current isolation state of the LAG port;
the receiving module 403 is specifically configured to, after receiving a synchronization packet that carries a current link state and an isolation state of an LAG port that belongs to the same LAG as the LAG port and is sent by the opposite-end network device, set the current isolation state of the LAG port according to the current link state of the LAG port that belongs to the same LAG as the LAG port; setting the current forwarding state of the LAG port according to the current isolation state of the LAG port belonging to the same LAG with the LAG port;
The receiving module 403 is specifically configured to record the current isolation state and forwarding state of the LAG port into an entry corresponding to the LAG port in a temporary table of the device, and calculate a checksum of the entry corresponding to the LAG port.
The comparing module 404 is specifically configured to set whether valid fields of entries corresponding to all LAG ports in the external setting database are invalid; traversing the temporary table, if a corresponding first table entry exists in the temporary table and a corresponding second table entry exists in the external setting database, and the checksums of the first table entry and the second table entry are the same, triggering the updating module;
the update module 405 is specifically configured to set a valid field in the second entry as valid;
the comparing module 404 is further specifically configured to trigger the updating module 405 if the LAG port has a corresponding first entry in the temporary table, and has a corresponding second entry in the external setting database, and the checksums of the first entry and the second entry are different;
the updating module 405 is specifically configured to update the hardware forwarding plane according to the current port state of the LAG port in the first entry, and set a valid field in the second entry to be valid after updating the current port state and the checksum of the LAG port in the second entry according to the current port state and the checksum of the LAG port in the first entry.
The comparing module 404 is further specifically configured to trigger the updating module 405 if the LAG port has a corresponding first entry in the temporary table and does not have a corresponding entry in the external setting database;
the update module 405 is further specifically configured to update a hardware forwarding plane according to the current port state of the LAG port in the first entry, add a third entry corresponding to the LAG port in the external configuration database, update the current port state and checksum of the LAG port in the third entry according to the current port state and checksum of the LAG port in the first entry, and set a valid field in the third entry as valid;
the update module 405 is further specifically configured to delete, after the traversal is completed, the port state of the LAG port in the fourth entry from the hardware forwarding plane and delete the fourth entry from the external setting database if the fourth entry exists in the external setting database and whether the valid field is invalid.
And the opposite terminal network equipment periodically sends a synchronous message to the home terminal network equipment.
According to the graceful restart equipment provided by the embodiment of the invention, in the process of restarting the MLAG process, only the calculated current port state of the LAG port is recorded into the temporary table, and at the moment, the current port state is not set to a hardware forwarding plane, so that the influence of intermediate temporary states in the convergence process on the service flow is avoided, and the uninterrupted forwarding of the service flow is realized. And after the MLAG process is restarted and stabilized, updating the current port state information of the LAG port with the port state changed in the restarting process of the MLAG process to a hardware forwarding plane. If the port state of the LAG port is not changed after the MLAG process is restarted, the hardware forwarding plane does not need to be updated, and the system overhead and the flow cutoff risk caused by resetting the hardware forwarding plane are avoided.
An embodiment of the present invention provides a graceful restart system, as shown in fig. 5, where the system at least includes a local network device 501 and an opposite network device 502, the local network device 501 and the opposite network device 502 join a same MLAG domain of a cross-device link aggregation group, and the local network device 501 or the opposite network device 502 adopt a graceful restart device provided in the embodiment of the present invention.
In the graceful restart system provided by the embodiment of the invention, in the restart process of the MLAG process, only the calculated current port state of the LAG port is recorded in the temporary table, and at this time, the current port state is not set to the hardware forwarding plane, so that the influence of some intermediate temporary states in the convergence process on the service flow is avoided, and the uninterrupted forwarding of the service flow is realized. And after the MLAG process is stably restarted, updating the current port state information of the LAG port of which the port state is changed in the restarting process of the MLAG process to a hardware forwarding plane. If the port state of the LAG port is not changed after the MLAG process is restarted, the hardware forwarding plane does not need to be updated, and the system overhead and the flow cutoff risk caused by resetting the hardware forwarding plane are avoided.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, a division of modules is merely a logical division, and an actual implementation may have another division, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the present invention.

Claims (10)

1. A method of graceful restart, the method comprising:
after the MLAG process of the cross-device link aggregation group of the local-end network device is restarted, loading MLAG configuration, and recording the initial port state of the LAG port of the link aggregation group of the local device into a temporary table; the temporary table is used for recording port state information of the LAG port, and one LAG port corresponds to one table entry in the temporary table;
Sending a negotiation message to opposite-end network equipment of the MLAG domain to reestablish a pairing relation with the opposite-end network equipment;
the local terminal network equipment starts a timer, interacts a synchronous message with the opposite terminal network equipment, calculates the current port state of the LAG port and updates the port state into the temporary table;
if the timer is overtime, the local network equipment compares the list item corresponding to the LAG port in the temporary list with the list item corresponding to the LAG port in an external setting database of the local network equipment so as to determine whether to update a hardware forwarding plane of the local network equipment and the external setting database; the external setting database records port state information of all LAG ports issued by an MLAG process to the hardware forwarding plane.
2. The method according to claim 1, wherein the interacting the sync packets with the peer network device, calculating a current port state of the LAG port, and updating the current port state into the temporary table specifically includes:
the local terminal network equipment carries the current link state and isolation state of the LAG port of the local equipment in a synchronous message and sends the synchronous message to the opposite terminal network equipment;
The opposite terminal network equipment sets the current isolation state of an LAG port belonging to the same LAG as the LAG port on the local equipment according to the current link state of the LAG port;
the opposite terminal network equipment sets the current forwarding state of the LAG port belonging to the same LAG as the LAG port on the local equipment according to the current isolation state of the LAG port;
the opposite terminal network equipment carries the current link state and the isolation state of the LAG port belonging to the same LAG with the LAG port in a synchronous message and sends the synchronous message to the local terminal network equipment;
the local terminal network device sets the current isolation state of the LAG port of the local device according to the current link state of the LAG port of the opposite terminal network device, which belongs to the same LAG with the LAG port of the local device;
the local terminal network device sets the current forwarding state of the LAG port of the local device according to the current isolation state of the LAG port of the opposite terminal network device, which belongs to the same LAG with the LAG port of the local device;
and the local terminal network equipment records the current isolation state and the current forwarding state of the LAG port into the table entry corresponding to the LAG port in the temporary table, and calculates the checksum of the table entry corresponding to the LAG port.
3. The method according to claim 2, wherein the comparing, by the local network device, the entry corresponding to the LAG port in the temporary table with the entry corresponding to the LAG port in an external setting database of the local network device to determine whether to update the hardware forwarding plane of the local network device and the external setting database includes:
the home terminal network equipment sets whether valid fields of table entries corresponding to all LAG ports in the external setting database are invalid;
traversing the temporary table, if the LAG port has a corresponding first table entry in the temporary table, and a corresponding second table entry exists in the external setting database, and the checksums of the first table entry and the second table entry are the same, setting whether a valid field in the second table entry is valid;
if the corresponding first entry exists in the temporary table of the LAG port, the corresponding second entry exists in the external setting database, and the checksums of the first entry and the second entry are different, updating a hardware forwarding plane according to the current port state of the LAG port in the first entry, and setting a valid field in the second entry as valid after updating the current port state and the checksum of the LAG port in the second entry according to the current port state and the checksum of the LAG port in the first entry.
4. The method of claim 3, further comprising:
if the corresponding first entry exists in the temporary table of the LAG port and the corresponding entry does not exist in the external setting database, updating a hardware forwarding plane according to the current port state of the LAG port in the first entry, adding a third entry corresponding to the LAG port in the external setting database, and setting whether a valid field in the third entry is valid or not after updating the current port state and the checksum of the LAG port in the third entry according to the current port state and the checksum of the LAG port in the first entry;
after traversing, if a fourth entry exists in the external setting database, where the valid field of the fourth entry is invalid, deleting the port state of the LAG port in the fourth entry from a hardware forwarding plane, and deleting the fourth entry from the external setting database.
5. An elegant restart device, characterized in that the device comprises a configuration module, a sending module, a receiving module, a comparing module and an updating module,
the configuration module is configured to load an MLAG configuration after the MLAG process of the cross-device link aggregation group of the device is restarted, and record an initial port state of a LAG port of the link aggregation group of the device in a temporary table; the temporary table is used for recording port state information of the LAG port, and one LAG port corresponds to one table entry in the temporary table;
The sending module is used for sending a negotiation message to the opposite terminal network equipment of the MLAG domain to reestablish the pairing relationship with the opposite terminal network equipment;
the configuration module is also used for starting a timer;
the sending module is further configured to send a synchronization packet to the peer network device;
the receiving module is used for calculating the current port state of the LAG port and updating the current port state of the LAG port into a temporary table;
the comparison module is configured to compare the entry corresponding to the LAG port in the temporary table with the entry corresponding to the LAG port in the external setting database of the device if the timer is overtime;
the updating module is used for determining whether to update the hardware forwarding plane of the device and the external setting database; the external setting database records port state information of all LAG ports issued by an MLAG process to the hardware forwarding plane.
6. The apparatus of claim 5,
the sending module is specifically configured to carry the current link state and the isolation state of the LAG port of the device in a synchronization message, and send the synchronization message to the peer network device;
the receiving module is specifically configured to, after receiving a synchronization packet that carries a current link state and an isolation state of an LAG port that belongs to the same LAG as the LAG port and is sent by the opposite-end network device, set the current isolation state of the LAG port according to the current link state of the LAG port that belongs to the same LAG as the LAG port; setting the current forwarding state of the LAG port according to the current isolation state of the LAG port belonging to the same LAG with the LAG port;
The receiving module is specifically configured to record the current isolation state and the current forwarding state of the LAG port in an entry corresponding to the LAG port in a temporary table of the device, and calculate a checksum of the entry corresponding to the LAG port.
7. The apparatus of claim 6,
the comparison module is specifically configured to set whether valid fields of entries corresponding to all LAG ports in the external setting database are invalid; traversing the temporary table, and if the LAG port has a corresponding first table entry in the temporary table and a corresponding second table entry in the external setting database, and the checksums of the first table entry and the second table entry are the same, triggering the updating module;
the update module is specifically configured to set a valid field in the second entry as valid;
the comparison module is specifically configured to trigger the update module if the LAG port has a corresponding first entry in the temporary table and a corresponding second entry in the external setting database, and the checksums of the first entry and the second entry are different;
the update module is specifically configured to update the hardware forwarding plane according to the current port state of the LAG port in the first entry, and set a valid field in the second entry as valid after updating the current port state and the checksum of the LAG port in the second entry according to the current port state and the checksum of the LAG port in the first entry.
8. The device according to claim 7, wherein the comparing module is further configured to trigger the updating module if the LAG port has a corresponding first entry in the temporary table and does not have a corresponding entry in the external setting database;
the update module is specifically further configured to update a hardware forwarding plane according to the current port state of the LAG port in the first entry, add a third entry corresponding to the LAG port in the external setting database, update the current port state and checksum of the LAG port in the third entry according to the current port state and checksum of the LAG port in the first entry, and set a valid field in the third entry to be valid;
the update module is specifically configured to, after the traversal is completed, delete, from the hardware forwarding plane, a port state of an LAG port in a fourth entry if the fourth entry whose valid field is invalid exists in the external setting database, and delete the fourth entry from the external setting database.
9. The device according to any one of claims 6 to 8, wherein the peer network device periodically sends a sync packet to the device.
10. A graceful restart system, comprising at least a home network device and an opposite network device, wherein the home network device and the opposite network device join a same MLAG domain of a cross-device link aggregation group, and the home network device or the opposite network device employs the device according to any one of claims 5 to 9.
CN201910564049.2A 2019-06-28 2019-06-28 Graceful restart method, device and system Active CN110351127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910564049.2A CN110351127B (en) 2019-06-28 2019-06-28 Graceful restart method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910564049.2A CN110351127B (en) 2019-06-28 2019-06-28 Graceful restart method, device and system

Publications (2)

Publication Number Publication Date
CN110351127A CN110351127A (en) 2019-10-18
CN110351127B true CN110351127B (en) 2022-06-28

Family

ID=68183263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910564049.2A Active CN110351127B (en) 2019-06-28 2019-06-28 Graceful restart method, device and system

Country Status (1)

Country Link
CN (1) CN110351127B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113746733A (en) * 2020-05-29 2021-12-03 中兴通讯股份有限公司 Table item synchronization method, gateway equipment, networking system and storage medium
CN111988213B (en) * 2020-07-16 2022-06-03 浪潮思科网络科技有限公司 Method, equipment and medium for synchronizing VXLAN tunnel in EVPN MLAG environment
CN116016385A (en) * 2021-10-21 2023-04-25 华为技术有限公司 State synchronization method, device and equipment
CN114448931B (en) * 2022-02-17 2023-11-21 浪潮思科网络科技有限公司 Domain name resolution method, device and medium based on MLAG networking environment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018228A (en) * 2006-12-22 2007-08-15 华为技术有限公司 A port convergence method and device
CN101252459A (en) * 2008-03-24 2008-08-27 中兴通讯股份有限公司 Method for setting protocol state of chain circuit terminal port and supervising method thereof
CN102857419A (en) * 2012-10-12 2013-01-02 华为技术有限公司 Method and device for processing fault of link aggregation port
CN103532856A (en) * 2013-10-23 2014-01-22 杭州华三通信技术有限公司 Message transmission method and equipment
CN103873336A (en) * 2012-12-14 2014-06-18 中兴通讯股份有限公司 Distributed resilient network interconnection-based service bearing method and device
CN105610743A (en) * 2015-12-31 2016-05-25 盛科网络(苏州)有限公司 Method and apparatus for realizing STP (Spanning Tree Protocol) protocol family in MLAG (Multi-Chassis Link Aggregation) environment
CN108900415A (en) * 2018-08-31 2018-11-27 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Master-slave equipment switching method and system under fault of M L AG interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9306804B2 (en) * 2013-04-16 2016-04-05 Arista Networks, Inc. Method and system for multichassis link aggregation in-service software update

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018228A (en) * 2006-12-22 2007-08-15 华为技术有限公司 A port convergence method and device
CN101252459A (en) * 2008-03-24 2008-08-27 中兴通讯股份有限公司 Method for setting protocol state of chain circuit terminal port and supervising method thereof
CN102857419A (en) * 2012-10-12 2013-01-02 华为技术有限公司 Method and device for processing fault of link aggregation port
CN103873336A (en) * 2012-12-14 2014-06-18 中兴通讯股份有限公司 Distributed resilient network interconnection-based service bearing method and device
CN103532856A (en) * 2013-10-23 2014-01-22 杭州华三通信技术有限公司 Message transmission method and equipment
CN105610743A (en) * 2015-12-31 2016-05-25 盛科网络(苏州)有限公司 Method and apparatus for realizing STP (Spanning Tree Protocol) protocol family in MLAG (Multi-Chassis Link Aggregation) environment
CN108900415A (en) * 2018-08-31 2018-11-27 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Master-slave equipment switching method and system under fault of M L AG interface

Also Published As

Publication number Publication date
CN110351127A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN110351127B (en) Graceful restart method, device and system
US9912530B2 (en) Method and apparatus for hitless failover in networking systems using single database
EP2911341B1 (en) Method and device for dynamically switching gateway of distributed resilient network interconnect
EP2586163B1 (en) Notifying a controller of a change to a packet forwarding configuration of a network element over a communication channel
US8438307B2 (en) Method and device of load-sharing in IRF stack
US20030218982A1 (en) Highly-available OSPF routing protocol
US9385944B2 (en) Communication system, path switching method and communication device
JP2013519268A (en) Data transfer method, data transfer apparatus, and data transfer system
US20100177632A1 (en) System and a method for routing data traffic
WO2011110135A2 (en) Master-standby switching method, system control unit and communication system
WO2018161794A1 (en) Apparatus upgrade method and access apparatus
US20140050092A1 (en) Load sharing method and apparatus
US20160308753A1 (en) Packet network linear protection systems and methods in a dual home or multi-home configuration
CN115589273A (en) EPA communication system
CN109150709B (en) Method, equipment and system for realizing Mux machine
US11310102B2 (en) Retaining active operations, administration, and maintenance (OAM) sessions across multiple devices operating as a single logical device
US11063859B2 (en) Packet processing method and network device
EP3573298B1 (en) Multi-node device and method for micro server built-in switch uplink port backup
CN108337118B (en) Message forwarding method and device
CN108282346B (en) Software upgrading method and device
KR20200072941A (en) Method and apparatus for handling VRRP(Virtual Router Redundancy Protocol)-based network failure using real-time fault detection
US20120230207A1 (en) Early detection of loss of continuity in a maintenance association
CN111224803B (en) Multi-master detection method in stacking system and stacking system
WO2020083271A1 (en) Aggregated link convergence method and apparatus, and storage medium
US11950032B2 (en) G.8032 with optical bypass

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder