WO2017219779A1 - Device active/standby switchover method and apparatus based on link protocol, and storage medium - Google Patents

Device active/standby switchover method and apparatus based on link protocol, and storage medium Download PDF

Info

Publication number
WO2017219779A1
WO2017219779A1 PCT/CN2017/083832 CN2017083832W WO2017219779A1 WO 2017219779 A1 WO2017219779 A1 WO 2017219779A1 CN 2017083832 W CN2017083832 W CN 2017083832W WO 2017219779 A1 WO2017219779 A1 WO 2017219779A1
Authority
WO
WIPO (PCT)
Prior art keywords
standby
active
keep
alive
board
Prior art date
Application number
PCT/CN2017/083832
Other languages
French (fr)
Chinese (zh)
Inventor
张伟
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017219779A1 publication Critical patent/WO2017219779A1/en

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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability

Definitions

  • the present invention relates to the field of communications, and in particular, to a device active/standby switching method and device based on a link protocol, and a storage medium.
  • the main control board of the device adds a spare board in addition to the working motherboard to improve the reliability of the device.
  • the active/standby redundancy backup is implemented by the Graceful Restart (GR) synchronization technology.
  • GR Graceful Restart
  • the standby board does not work.
  • the working main control board will automatically switch from the current main board to the standby board, and the standby board will take over to work.
  • the link protocol of the two devices in the connection scenario is configured to exchange the keepalive packets to detect the existence of the connected device.
  • the device keeps the keepalive packets on the main control board.
  • the main control board is performing the active/standby switchover, the local device cannot send keep-alive packets. If the connected device fails to receive the data within a certain period of time.
  • the link termination packet will be sent, causing the link protocol to be broken, and traffic interruption occurs.
  • the technical problem to be solved by the embodiment of the present invention is to provide a device-based active/standby switching method and device based on the link protocol, and a storage medium.
  • the device when the device performs the active/standby switchover, the local device is switched during the switching. The keepalive packet is no longer sent. If the peer device does not receive the keep-alive packet within a certain period of time, the peer device considers that the local device is unreachable and sends a link termination packet, causing the link protocol to be broken. There is a problem with traffic interruption.
  • an embodiment of the present invention provides a device active/standby switching method based on a link protocol, including:
  • the key data includes: configuration information and protocol status.
  • the keepalive packet sending and receiving mechanism is used to maintain the sending and receiving of the keep-alive packets, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism.
  • an embodiment of the present invention provides a device active/standby switching device based on a link protocol, including:
  • the first establishing module is configured to establish a key data synchronization mechanism between the motherboard and the standby board, and the key data includes: configuration information and protocol status;
  • the second establishing module is configured to establish a keep-alive packet sending and receiving mechanism separated from the main board;
  • the first processing module is configured to maintain the sending and receiving process of the keep-alive message by using the keep-alive packet sending and receiving mechanism when the active/standby switching is triggered;
  • the second processing module is configured to switch the working main control board from the mainboard to the standby board by using a key data synchronization mechanism when the active/standby switchover is triggered.
  • an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the link-based device active/standby switching method described above. .
  • the key data includes: configuration information, protocol status, and establishment of the motherboard by establishing a key data synchronization mechanism between the motherboard and the standby board. Separate keep-alive packet sending and receiving mechanism; when the active/standby switchover is triggered, the keep-alive packet sending and receiving mechanism is used to maintain the sending and receiving of the keep-alive packet, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism; In the process of switching the local device to the standby device, the local device can maintain the keep-alive packet transmission and reception process through the keep-alive packet sending and receiving mechanism. During the active/standby switchover process, the peer device does not detect the active/standby switchover of the local device. This ensures that the local device does not experience traffic interruption during the active/standby switchover. problem.
  • FIG. 1 is a flowchart of a method for performing active/standby switching of a device based on a link protocol according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of synchronizing key data of a motherboard to a standby board according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of successful protocol exchange negotiation according to Embodiment 1 of the present invention.
  • FIG. 5 is a schematic structural diagram of a device active/standby switching device based on a link protocol according to Embodiment 2 of the present invention.
  • the link protocol includes UDLD (Unidirectional Link Detection) and Link Aggregation Control Protocol (LACP). Control Protocol), PPP (Point To Point Protocol, Point-to-Point Protocol, HDLC (High-Level Data Link Control), etc.
  • the link protocol belongs to the Layer 2 protocol of the Open System Interconnection (OSI) model. During the process of active/standby switchover, the stability of the protocol state is related to the normal delivery of the entire upper-layer service traffic.
  • OSI Open System Interconnection
  • the main control board of the device adds a spare board in addition to the working motherboard to improve the reliability of the device.
  • the device includes a router device, and the main control board is a device board for performing service configuration and main protocol work.
  • the active/standby redundancy backup is implemented through the active/standby switch GR synchronization technology.
  • the standby board does not work.
  • the working main control board will automatically switch from the current main board to the standby board, and the standby board will take over to work.
  • the device provides an active/standby switchover method based on the link protocol. Referring to Figure 1, the following steps are included:
  • S101 Establish a key data synchronization mechanism between the motherboard and the standby board.
  • the key data includes: configuration information and protocol status.
  • the key data synchronization mechanism between the main board and the standby board is as follows: the key data on the main board is synchronized to the standby board through the active/standby switchover database, and the key data in the active/standby switchover database is used to open the standby board. Used at work, avoiding the problem of chain scission caused by re-triggering link establishment.
  • S102 Establish a keep-alive packet sending and receiving mechanism separated from the main board.
  • the mechanism for transmitting and receiving the keep-alive message separated from the main board includes: setting a keep-alive processing module separated from the main board, and performing transceiving processing of the keep-alive message through the keep-alive processing module.
  • the keep-alive processing module is separated from the main board and is independent of the active/standby switch.
  • the keep-alive processing module can send and receive keep-alive packets without being affected by the active/standby switchover. .
  • the keep-alive processing module receives the relevant information of the keep-alive message before sending and receiving the keep-alive message. Information, such as the content of the message, the length of the message, the period of sending the message, and so on.
  • the keepalive message is periodically sent by the keepalive processing module of the local device to host the link protocol.
  • the protocol packets of the local device and the peer device are negotiated. After the negotiation succeeds, the device keeps the keepalive message. To sense the presence of a docking device. When the active device is used to switch the motherboard of the local device to the standby device, the UDLD protocol is used as the link.
  • the specific processing is as follows: The host and the peer device of the local device are based on the UDLD. If the negotiation is successful, the keepalive processing module of the local device receives the information about the keep-alive keep-alive packets, such as the packet content, before sending and receiving the keep-alive packets. The length of the packet, the packet sending period, and so on.
  • the UDLD protocol is managed by the keepalive processing module of the local device to periodically exchange the keep-alive packets with the peer device. If the negotiation is unsuccessful, the keepalive processing module of the local device receives the packet. To delete the information of the keep-alive message, the keep-alive processing module deletes the keep-alive message and stops sending the keep-alive message.
  • the keep-alive message is delivered to a separate and independent keep-alive processing module for processing, thereby maintaining the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
  • the above S101 and S102 may be either one of the preceding or the same in the order of execution. That is, the key data synchronization mechanism between the main board and the standby board can be established first, and then the keep-alive packet sending and receiving mechanism separated from the main board can be established; or the keep-alive packet sending and receiving mechanism separated from the main board can be established first, and then the main board and the standby board are established.
  • the key data synchronization mechanism between the two can also establish a keep-alive message sending and receiving mechanism separated from the main board and a key data synchronization mechanism between the main board and the standby board.
  • the link between the local device and the peer device is established based on the link protocol.
  • the link is successfully established and the traffic is forwarded.
  • the local device supports the active/standby switchover.
  • the mainboard of the device main control board is configured to trigger or other abnormalities.
  • the keep-alive process is performed.
  • the module continues to interact with the peer device for keep-alive messages.
  • the keep-alive processing module does not perform the switching.
  • the keep-alive processing module periodically sends the keep-alive message information saved before the switching, and interacts with the peer device for keep-alive messages.
  • the keepalive processing module continues to interact with the keepalive packets of the peer device, so that the local device can continue to interact with the peer device for keep-alive packets.
  • the peer device cannot sense the master of the local device.
  • the switchover is changed to maintain the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
  • the switching of the working main control board from the main board to the standby board by using the key data synchronization mechanism includes: suspending the transmission and reception of protocol packets, and acquiring the synchronized key data from the active/standby switching database after the synchronization event processing is completed, and recovering the protocol report. Transmit and receive processing, and update the keep-alive message in the keep-alive processing module.
  • the standby board After the event is triggered, the standby board does not process the sending and receiving of the protocol packets. After the event is complete, the standby board obtains the synchronized key data from the active/standby switchover database and obtains the key data. Then, the protocol information is exchanged with the peer device, and the related information of the keep-alive message in the keep-alive processing module is updated, and the original information is maintained without change.
  • the keepalive processing module is added to separate the keep-alive packets from the protocol packet processing.
  • the local device can continue to keep the live device with the peer device.
  • the peer device does not detect the active/standby switchover of the local device, and maintains the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover. .
  • a scheme for separating the keep-alive processing module from the main board is adopted, and the keep-alive message is sent and received by the original main board, and is converted into a keep-alive processing module separated from the main board for sending and receiving, at the local end device.
  • the keep-alive processing module does not perform the switchover. Since the main board cannot continue to interact with the peer device for keep-alive packets, the transfer is maintained by the keep-alive processing module to protect the peer device. The way the live message interacts, making the peer device The process of switching the local device to the standby board is not detected, and the stability of the link state is maintained. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
  • the key data includes: configuration information, protocol status, and establishment of a keep-alive report separated from the main board by establishing a key data synchronization mechanism between the main board and the standby board.
  • the keepalive packet sending and receiving mechanism is used to maintain the sending and receiving of the keep-alive message, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism;
  • the local device can maintain the keep-alive packet transmission and reception process through the keep-alive packet sending and receiving mechanism.
  • the peer device does not detect the active/standby switchover of the local device, and maintains the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
  • the stability of the link protocol state is related to the normal delivery of the entire upper-layer service traffic.
  • the device provides an active/standby switchover device based on the link protocol. Referring to FIG. 5, the method includes:
  • the first establishing module 201 is configured to establish a key data synchronization mechanism between the motherboard and the standby board.
  • the key data includes: configuration information and protocol status.
  • the first establishing module 201 is configured to synchronize the key data on the main board to the standby board through the active/standby switching database, and the key data in the active/standby switching database is used when the standby board is started, thereby avoiding re-triggering link establishment. And the problem of broken chains.
  • the second establishing module 202 is configured to establish a keep-alive message sending and receiving mechanism separated from the main board.
  • the second establishing module 202 is configured to set a keep-alive processing module that is separated from the main board, and completes the sending and receiving processing of the keep-alive message by using the keep-alive processing module.
  • the keep-alive processing module Since the keep-alive processing module is separate from the main board and exists independently, when the main control board of the device When the active/standby switchover is performed, the keepalive processing module can send and receive keepalive packets without being affected by the active/standby switchover.
  • the keep-alive processing module receives information about keep-alive messages, such as packet content, packet length, and packet sending period, before sending and receiving keep-alive packets.
  • the keepalive message is periodically sent by the keepalive processing module of the local device to host the link protocol.
  • the first processing module 203 is configured to maintain the transmission and reception processing of the keep-alive packet by using the keep-alive packet sending and receiving mechanism when the active/standby switchover is triggered.
  • the link between the local device and the peer device is established based on the link protocol.
  • the link is successfully established and the traffic is forwarded.
  • the local device supports the active/standby switchover.
  • the mainboard of the device main control board is configured to trigger or other abnormalities.
  • the first processing module 203 continues to perform the interaction processing of the keepalive message with the peer device by using the keep-alive processing module.
  • the keep-alive processing module does not perform the switching.
  • the keep-alive processing module periodically sends the keep-alive message information saved before the switching, and interacts with the peer device for keep-alive messages.
  • the keepalive processing module continues to interact with the keepalive packets of the peer device, so that the local device can continue to interact with the peer device for keep-alive packets.
  • the peer device cannot sense the master of the local device.
  • the switchover is changed to maintain the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
  • the second processing module 204 is configured to switch the working main control board from the mainboard to the standby board by using a key data synchronization mechanism when the active/standby switchover is triggered.
  • the second processing module 204 is configured to: suspend the transmission and reception processing of the protocol packet, and obtain the synchronized key data from the active/standby switching database after the synchronization event processing is completed, restore the protocol packet transmission and reception processing, and update the keep-alive processing. Keep-alive messages in the module.
  • the second processing module 204 temporarily does not process the sending and receiving of the protocol packets, and waits for the configuration loading and the synchronization of the interface to be completed, and the standby board obtains the synchronized key data from the active/standby switching database. After getting the key data, start with the peer device The protocol message is exchanged, and the related information of the keep-alive message in the keep-alive processing module is updated, and the original information is maintained without change.
  • the keepalive processing module is added to separate the keep-alive packets from the protocol packet processing.
  • the local device can continue to keep the live device with the peer device.
  • the peer device does not detect the active/standby switchover of the local device, and maintains the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover. .
  • a scheme for separating the keep-alive processing module from the main board is adopted, and the keep-alive message is sent and received by the original main board, and is converted into a keep-alive processing module separated from the main board for sending and receiving, at the local end device.
  • the keep-alive processing module does not perform the switchover. Since the main board cannot continue to interact with the peer device for keep-alive packets, the transfer is maintained by the keep-alive processing module to protect the peer device.
  • the peer device In the active/standby switchover mode, the peer device does not detect the process of switching the local device to the standby device. This ensures that the local device does not generate traffic during the active/standby switchover. The problem of interruption.
  • a key data synchronization mechanism between the main board and the standby board is established by the first establishing module 201, and the key data includes: configuration information, protocol status, and second establishment.
  • the module 202 establishes a keep-alive message sending and receiving mechanism separated from the main board.
  • the first processing module 203 maintains the sending and receiving process of the keep-alive message by using the keep-alive message sending and receiving mechanism, and the second processing module 204 uses the key data.
  • the synchronization mechanism switches the working main control board from the main board to the standby board.
  • the keepalive packet is sent and received through the keep-alive packet sending and receiving mechanism.
  • the local device can perform the interaction between the local device and the peer device.
  • the peer device does not detect the active/standby switchover of the local device. This ensures the stability of the link state and ensures the stability of the link.
  • the end device does not experience traffic interruption during the active/standby switchover.
  • the first establishing module 201, the second establishing module 202, the first processing module 203, and the second processing module 204 may each be a central processing unit (CPU), or a microprocessor (MPU), or Digital signal processor (DSP), or programmable gate array (FPGA) implementation.
  • CPU central processing unit
  • MPU microprocessor
  • DSP Digital signal processor
  • FPGA programmable gate array
  • a computer storage medium stores computer executable instructions for executing the link protocol based device active/standby switching method shown in FIG. 1.
  • modules or steps of the above embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device or distributed among multiple computing devices.
  • they may be implemented by program code executable by the computing device, such that they may be stored in a storage medium (ROM/RAM, disk, optical disk) by a computing device, and in some
  • the steps shown or described may be performed in an order different from that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of the modules or steps may be implemented as a single integrated circuit module. Therefore, the invention is not limited to any particular combination of hardware and software.
  • the local device in the process of switching the homeboard of the local device to the standby device, can be properly protected from the peer device by using the keep-alive packet sending and receiving mechanism separated from the mainboard to maintain the sending and receiving of the keep-alive packets. Interaction between live packets.
  • the peer device does not sense the active and standby devices of the local device.
  • the switchover is changed to maintain the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.

Landscapes

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

Abstract

Embodiments of the present invention provide a device active/standby switchover method and apparatus based on a link protocol, and a storage medium. The method comprises: establishing a key data synchronization mechanism between an active board and a standby board, the key data comprising configuration data and a protocol state; establishing a keepalive packet transception mechanism independent from the active board; and when an active/standby switchover is triggered, maintaining transception processing of the keepalive packet by using the keepalive packet transception mechanism, and switching a working master control board from the active board to the standby board by using the key data synchronization mechanism. By using the solution, in the process of switching from an active board to a standby board on a local end device, the transception processing of a keepalive packet is maintained by means of a keepalive packet transception mechanism independent from the active board, so that the local end device can normally exchange keepalive packets with a peer-end device; and in the process, the peer-end device does not perceive the active/standby change of the local end device, and further, the stability of a link state is maintained, thereby ensuring that a traffic interruption does not occur on the local end device during the active/standby switchover.

Description

基于链路协议的设备主备倒换方法和装置、存储介质Device active/standby switching method and device based on link protocol, storage medium
相关申请的交叉引用Cross-reference to related applications
本申请基于申请号为201610451658.3、申请日为2016年06月21日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。The present application is based on a Chinese patent application filed on Jan. 21, 2016, filed on Jun.
技术领域Technical field
本发明涉及通信领域,尤其涉及一种基于链路协议的设备主备倒换方法和装置、存储介质。The present invention relates to the field of communications, and in particular, to a device active/standby switching method and device based on a link protocol, and a storage medium.
背景技术Background technique
通常设备的主控板除了正在工作的主板以外,还会增加一个备板,以提高设备的可靠性。在主板倒换到备板的过程中,通过主备倒换GR(Graceful Restart,平滑重启)同步技术做到主备冗余备份。正常情况下备板是不工作的,当主板出现异常时,工作主控板会从当前的主板自动切换到备板,由备板接替来进行工作。Usually, the main control board of the device adds a spare board in addition to the working motherboard to improve the reliability of the device. In the process of switching the mainboard to the standby board, the active/standby redundancy backup is implemented by the Graceful Restart (GR) synchronization technology. Under normal circumstances, the standby board does not work. When the board is abnormal, the working main control board will automatically switch from the current main board to the standby board, and the standby board will take over to work.
处于对接场景中的两端设备,链路协议需要进行双向交互,两端设备的链路协议协商成功后,通过互发保活报文来感知对接设备的存在。而设备的保活报文交互工作是在主控板上进行的,当设备的主控板在进行主备倒换时,本端设备无法发送保活报文,如果对接设备在一定时间内没有收到保活报文,即认为本端设备不可达,会发出链路终止报文过来,导致链路协议断链,进而出现流量中断现象。 After the link protocol is successfully negotiated, the link protocol of the two devices in the connection scenario is configured to exchange the keepalive packets to detect the existence of the connected device. The device keeps the keepalive packets on the main control board. When the main control board is performing the active/standby switchover, the local device cannot send keep-alive packets. If the connected device fails to receive the data within a certain period of time. When the local device is unreachable, the link termination packet will be sent, causing the link protocol to be broken, and traffic interruption occurs.
发明内容Summary of the invention
本发明实施例主要解决的技术问题是,提供一种基于链路协议的设备主备倒换方法和装置、存储介质,解决现有技术中,在设备进行主备倒换时,因倒换期间本端设备不再发送保活报文,对接的对端设备由于在一定时间内没有收到保活报文,会认为本端设备不可达,其发送链路终止报文,导致链路协议断链,进而出现流量中断的问题。The technical problem to be solved by the embodiment of the present invention is to provide a device-based active/standby switching method and device based on the link protocol, and a storage medium. In the prior art, when the device performs the active/standby switchover, the local device is switched during the switching. The keepalive packet is no longer sent. If the peer device does not receive the keep-alive packet within a certain period of time, the peer device considers that the local device is unreachable and sends a link termination packet, causing the link protocol to be broken. There is a problem with traffic interruption.
为解决上述技术问题,本发明实施例提供一种基于链路协议的设备主备倒换方法,包括:To solve the above technical problem, an embodiment of the present invention provides a device active/standby switching method based on a link protocol, including:
建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态;Establish a key data synchronization mechanism between the motherboard and the standby board. The key data includes: configuration information and protocol status.
建立与主板分离的保活报文收发机制;Establish a keep-alive message sending and receiving mechanism separated from the main board;
当触发主备倒换时,利用保活报文收发机制维持保活报文的收发处理,并利用关键数据同步机制将工作主控板从主板倒换到备板。When the active/standby switchover is triggered, the keepalive packet sending and receiving mechanism is used to maintain the sending and receiving of the keep-alive packets, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism.
为解决上述技术问题,本发明实施例提供一种基于链路协议的设备主备倒换装置,包括:To solve the above technical problem, an embodiment of the present invention provides a device active/standby switching device based on a link protocol, including:
第一建立模块,配置为建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态;The first establishing module is configured to establish a key data synchronization mechanism between the motherboard and the standby board, and the key data includes: configuration information and protocol status;
第二建立模块,配置为建立与主板分离的保活报文收发机制;The second establishing module is configured to establish a keep-alive packet sending and receiving mechanism separated from the main board;
第一处理模块,配置为当触发主备倒换时,利用保活报文收发机制维持保活报文的收发处理;The first processing module is configured to maintain the sending and receiving process of the keep-alive message by using the keep-alive packet sending and receiving mechanism when the active/standby switching is triggered;
第二处理模块,配置为当触发主备倒换时,利用关键数据同步机制将工作主控板从主板倒换到备板。The second processing module is configured to switch the working main control board from the mainboard to the standby board by using a key data synchronization mechanism when the active/standby switchover is triggered.
为解决上述技术问题,本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行以上所述的基于链路协议的设备主备倒换方法。 In order to solve the above technical problem, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the link-based device active/standby switching method described above. .
本发明实施例的有益效果是:The beneficial effects of the embodiments of the present invention are:
根据本发明实施例提供的基于链路协议的设备主备倒换方法和装置、存储介质,通过建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态;建立与主板分离的保活报文收发机制;当触发主备倒换时,利用保活报文收发机制维持保活报文的收发处理,并利用关键数据同步机制将工作主控板从主板倒换到备板;采用上述方案,在本端设备主板倒换到备板的过程中,通过与主板分离的保活报文收发机制以维持保活报文的收发处理,使得本端设备能正常与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。According to the link protocol-based device active/standby switching method and device, and the storage medium provided by the embodiment of the present invention, the key data includes: configuration information, protocol status, and establishment of the motherboard by establishing a key data synchronization mechanism between the motherboard and the standby board. Separate keep-alive packet sending and receiving mechanism; when the active/standby switchover is triggered, the keep-alive packet sending and receiving mechanism is used to maintain the sending and receiving of the keep-alive packet, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism; In the process of switching the local device to the standby device, the local device can maintain the keep-alive packet transmission and reception process through the keep-alive packet sending and receiving mechanism. During the active/standby switchover process, the peer device does not detect the active/standby switchover of the local device. This ensures that the local device does not experience traffic interruption during the active/standby switchover. problem.
附图说明DRAWINGS
图1为本发明实施例一提供的一种基于链路协议的设备主备倒换方法的流程图;FIG. 1 is a flowchart of a method for performing active/standby switching of a device based on a link protocol according to Embodiment 1 of the present invention;
图2为本发明实施例一提供的将主板的关键数据同步到备板的示意图;2 is a schematic diagram of synchronizing key data of a motherboard to a standby board according to Embodiment 1 of the present invention;
图3为本发明实施例一提供的协议报文交互协商成功的示意图;FIG. 3 is a schematic diagram of successful protocol exchange negotiation according to Embodiment 1 of the present invention; FIG.
图4为本发明实施例一提供的协议报文交互协商不成功的示意图;4 is a schematic diagram of unsuccessful negotiation of protocol packet exchange according to Embodiment 1 of the present invention;
图5为本发明实施例二提供的一种基于链路协议的设备主备倒换装置的结构示意图。FIG. 5 is a schematic structural diagram of a device active/standby switching device based on a link protocol according to Embodiment 2 of the present invention.
具体实施方式detailed description
下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。The embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
实施例一Embodiment 1
随着数据链路技术的发展,链路协议被广泛应用在设备对接应用场景中,链路协议包括UDLD(Uni Directional Link Detection,单向链路检测)、LACP(Link Aggregation Control Protocol,链路汇聚控制协议)、PPP(Point  to Point Protocol,点对点协议)、HDLC(High-Level Data Link Control,高级数据链路控制)等。链路协议属于OSI(Open System Interconnection,开放系统互连)模型的二层协议,在设备进行主备倒换的过程中,其协议状态的稳定性关乎整个上层业务流量的正常传递。With the development of the data link technology, the link protocol is widely used in the device interconnection scenario. The link protocol includes UDLD (Unidirectional Link Detection) and Link Aggregation Control Protocol (LACP). Control Protocol), PPP (Point To Point Protocol, Point-to-Point Protocol, HDLC (High-Level Data Link Control), etc. The link protocol belongs to the Layer 2 protocol of the Open System Interconnection (OSI) model. During the process of active/standby switchover, the stability of the protocol state is related to the normal delivery of the entire upper-layer service traffic.
通常设备的主控板除了正在工作的主板以外,还会增加一个备板,以提高设备的可靠性。其中,设备包括路由器设备等,主控板是用于进行业务配置、主要协议工作的设备板卡。在主板倒换到备板的过程中,通过主备倒换GR同步技术做到主备冗余备份。正常情况下备板是不工作的,当主板出现异常时,工作主控板会从当前的主板自动切换到备板,由备板接替来进行工作。Usually, the main control board of the device adds a spare board in addition to the working motherboard to improve the reliability of the device. The device includes a router device, and the main control board is a device board for performing service configuration and main protocol work. During the process of switching the mainboard to the standby board, the active/standby redundancy backup is implemented through the active/standby switch GR synchronization technology. Under normal circumstances, the standby board does not work. When the board is abnormal, the working main control board will automatically switch from the current main board to the standby board, and the standby board will take over to work.
为了保证设备在主备倒换过程中不会出现流量中断的问题,本实施例提供一种基于链路协议的设备主备倒换方法,请参见图1,包括以下步骤:To ensure that the device does not interrupt the traffic during the active/standby switchover, the device provides an active/standby switchover method based on the link protocol. Referring to Figure 1, the following steps are included:
S101:建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态。S101: Establish a key data synchronization mechanism between the motherboard and the standby board. The key data includes: configuration information and protocol status.
其中,参见图2,建立主板与备板之间的关键数据同步机制包括:将主板上的关键数据通过主备倒换数据库同步到备板,主备倒换数据库中的关键数据用于在备板开启工作时使用,避免了重新触发链路建立而导致断链的问题。As shown in Figure 2, the key data synchronization mechanism between the main board and the standby board is as follows: the key data on the main board is synchronized to the standby board through the active/standby switchover database, and the key data in the active/standby switchover database is used to open the standby board. Used at work, avoiding the problem of chain scission caused by re-triggering link establishment.
S102:建立与主板分离的保活报文收发机制。S102: Establish a keep-alive packet sending and receiving mechanism separated from the main board.
其中,建立与主板分离的保活报文收发机制包括:设置与主板分离的保活处理模块,通过保活处理模块完成保活报文的收发处理。The mechanism for transmitting and receiving the keep-alive message separated from the main board includes: setting a keep-alive processing module separated from the main board, and performing transceiving processing of the keep-alive message through the keep-alive processing module.
由于保活处理模块是与主板分离、独立存在的,所以当设备的主控板在进行主备倒换时,保活处理模块能进行保活报文的收发处理,不会受到主备倒换的影响。The keep-alive processing module is separated from the main board and is independent of the active/standby switch. When the main control board of the device performs the active/standby switchover, the keep-alive processing module can send and receive keep-alive packets without being affected by the active/standby switchover. .
保活处理模块在进行保活报文的收发之前,会收到保活报文的相关信 息,例如报文内容、报文长度、报文发送周期等。由本端设备的保活处理模块托管链路协议来定时发送保活报文。The keep-alive processing module receives the relevant information of the keep-alive message before sending and receiving the keep-alive message. Information, such as the content of the message, the length of the message, the period of sending the message, and so on. The keepalive message is periodically sent by the keepalive processing module of the local device to host the link protocol.
参见图3、图4,在将本端设备的主板倒换到备板之前,首先进行本端设备与对端设备的协议报文的交互协商,协商成功后,才会通过互发保活报文来感知对接设备的存在。在采用保活处理模块将本端设备的主板倒换到备板时,以链路协议为UDLD协议进行交互为例,具体处理如下:在对接场景下进行本端设备的主板与对端设备基于UDLD协议的协议报文的交互协商,若协商成功,则本端设备的保活处理模块在进行保活报文的收发之前,会收到同步过来的保活报文的相关信息,例如报文内容、报文长度、报文发送周期等;由本端设备的保活处理模块托管UDLD协议来与对端设备定时交互保活报文;若协商不成功,则本端设备的保活处理模块会收到删除保活报文的信息,保活处理模块将保活报文删除并停止发送保活报文。As shown in Figure 3 and Figure 4, before the switchover of the local device to the standby device is performed, the protocol packets of the local device and the peer device are negotiated. After the negotiation succeeds, the device keeps the keepalive message. To sense the presence of a docking device. When the active device is used to switch the motherboard of the local device to the standby device, the UDLD protocol is used as the link. The specific processing is as follows: The host and the peer device of the local device are based on the UDLD. If the negotiation is successful, the keepalive processing module of the local device receives the information about the keep-alive keep-alive packets, such as the packet content, before sending and receiving the keep-alive packets. The length of the packet, the packet sending period, and so on. The UDLD protocol is managed by the keepalive processing module of the local device to periodically exchange the keep-alive packets with the peer device. If the negotiation is unsuccessful, the keepalive processing module of the local device receives the packet. To delete the information of the keep-alive message, the keep-alive processing module deletes the keep-alive message and stops sending the keep-alive message.
从上述内容可知,在将本端设备的主板倒换到备板的过程中,将保活报文交给一与主板分离、独立的保活处理模块进行处理,维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。As shown in the above, in the process of switching the motherboard of the local device to the standby board, the keep-alive message is delivered to a separate and independent keep-alive processing module for processing, thereby maintaining the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
上述S101和S102在执行的顺序上是可以任一个在前,也可以是同时进行的。即可以先建立主板与备板之间的关键数据同步机制,再建立与主板分离的保活报文收发机制;也可以先建立与主板分离的保活报文收发机制,再建立主板与备板之间的关键数据同步机制;也可以同时建立与主板分离的保活报文收发机制,以及主板与备板之间的关键数据同步机制。The above S101 and S102 may be either one of the preceding or the same in the order of execution. That is, the key data synchronization mechanism between the main board and the standby board can be established first, and then the keep-alive packet sending and receiving mechanism separated from the main board can be established; or the keep-alive packet sending and receiving mechanism separated from the main board can be established first, and then the main board and the standby board are established. The key data synchronization mechanism between the two can also establish a keep-alive message sending and receiving mechanism separated from the main board and a key data synchronization mechanism between the main board and the standby board.
S103:当触发主备倒换时,利用保活报文收发机制维持保活报文的收发处理,并利用关键数据同步机制将工作主控板从主板倒换到备板。S103: When the active/standby switchover is triggered, the keepalive packet sending and receiving mechanism is used to maintain the sending and receiving processing of the keep-alive packet, and the working main control board is switched from the mainboard to the standby board by using a key data synchronization mechanism.
在对接场景下建立本端设备与对端设备基于链路协议的交互,并成功建立链路,进行流量转发,本端设备支持主备倒换,当设备主控板的主板在配置触发或者其它异常事件的触发下而发生主备倒换时,通过保活处理 模块继续与对端设备进行保活报文的交互处理。保活处理模块不会进行倒换,保活处理模块会定时发送倒换前保存的保活报文信息,与对端设备进行保活报文交互。In the connection scenario, the link between the local device and the peer device is established based on the link protocol. The link is successfully established and the traffic is forwarded. The local device supports the active/standby switchover. When the mainboard of the device main control board is configured to trigger or other abnormalities. When the active/standby switchover occurs under the trigger of an event, the keep-alive process is performed. The module continues to interact with the peer device for keep-alive messages. The keep-alive processing module does not perform the switching. The keep-alive processing module periodically sends the keep-alive message information saved before the switching, and interacts with the peer device for keep-alive messages.
采用保活处理模块继续与对端设备的保活报文的交互处理,使得本端设备能继续与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。The keepalive processing module continues to interact with the keepalive packets of the peer device, so that the local device can continue to interact with the peer device for keep-alive packets. During this period, the peer device cannot sense the master of the local device. The switchover is changed to maintain the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
其中,利用关键数据同步机制将工作主控板从主板倒换到备板包括:暂停协议报文的收发处理,在同步事件处理完成后,从主备倒换数据库中获取同步的关键数据,恢复协议报文的收发处理,并更新保活处理模块中的保活报文。The switching of the working main control board from the main board to the standby board by using the key data synchronization mechanism includes: suspending the transmission and reception of protocol packets, and acquiring the synchronized key data from the active/standby switching database after the synchronization event processing is completed, and recovering the protocol report. Transmit and receive processing, and update the keep-alive message in the keep-alive processing module.
具体的,在触发主备倒换时,暂时不处理协议报文的收发,等待配置加载和接口创建同步结束等事件完成后,备板从主备倒换数据库中获取同步的关键数据,获取到关键数据之后,开始与对端设备交互协议报文,并更新保活处理模块中的保活报文的相关信息,没有变化即维持原有信息。After the event is triggered, the standby board does not process the sending and receiving of the protocol packets. After the event is complete, the standby board obtains the synchronized key data from the active/standby switchover database and obtains the key data. Then, the protocol information is exchanged with the peer device, and the related information of the keep-alive message in the keep-alive processing module is updated, and the original information is maintained without change.
本实施例通过增加保活处理模块,实现保活报文与协议报文处理相分离,在本端设备从主板倒换到备板的过程中,使得本端设备能继续与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。In this embodiment, the keepalive processing module is added to separate the keep-alive packets from the protocol packet processing. In the process of the local device switching from the mainboard to the standby board, the local device can continue to keep the live device with the peer device. During the active/standby switchover, the peer device does not detect the active/standby switchover of the local device, and maintains the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover. .
本实施例采用将保活处理模块与主板分离的方案,将保活报文由原本的主板进行发送和接收,转变为由一与主板分离的保活处理模块进行发送和接收,在本端设备主板倒换到备板的过程中,保活处理模块不会进行倒换,由于主板无法再继续与对端设备进行保活报文的交互,所以采用转交由保活处理模块继续与对端设备进行保活报文交互的方式,使得对端设备 感知不到本端设备主板倒换到备板的过程,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。In this embodiment, a scheme for separating the keep-alive processing module from the main board is adopted, and the keep-alive message is sent and received by the original main board, and is converted into a keep-alive processing module separated from the main board for sending and receiving, at the local end device. During the process of switching the mainboard to the standby board, the keep-alive processing module does not perform the switchover. Since the main board cannot continue to interact with the peer device for keep-alive packets, the transfer is maintained by the keep-alive processing module to protect the peer device. The way the live message interacts, making the peer device The process of switching the local device to the standby board is not detected, and the stability of the link state is maintained. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
根据本发明实施例提供的基于链路协议的设备主备倒换方法,通过建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态;建立与主板分离的保活报文收发机制;当触发主备倒换时,利用保活报文收发机制维持保活报文的收发处理,并利用关键数据同步机制将工作主控板从主板倒换到备板;采用上述方案,在本端设备主板倒换到备板的过程中,通过与主板分离的保活报文收发机制以维持保活报文的收发处理,使得本端设备能正常与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。According to the link protocol-based device active/standby switching method provided by the embodiment of the present invention, the key data includes: configuration information, protocol status, and establishment of a keep-alive report separated from the main board by establishing a key data synchronization mechanism between the main board and the standby board. When the active/standby switchover is triggered, the keepalive packet sending and receiving mechanism is used to maintain the sending and receiving of the keep-alive message, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism; During the process of switching the local device to the standby board, the local device can maintain the keep-alive packet transmission and reception process through the keep-alive packet sending and receiving mechanism. During this period, the peer device does not detect the active/standby switchover of the local device, and maintains the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
实施例二Embodiment 2
在设备进行主备倒换的过程中,其链路协议状态的稳定性关乎整个上层业务流量的正常传递。为了保证设备在主备倒换过程中不会出现流量中断的问题,本实施例提供一种基于链路协议的设备主备倒换装置,请参见图5,包括:During the process of active/standby switchover, the stability of the link protocol state is related to the normal delivery of the entire upper-layer service traffic. To ensure that the device does not have a traffic interruption during the active/standby switchover, the device provides an active/standby switchover device based on the link protocol. Referring to FIG. 5, the method includes:
第一建立模块201,配置为建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态。The first establishing module 201 is configured to establish a key data synchronization mechanism between the motherboard and the standby board. The key data includes: configuration information and protocol status.
其中,第一建立模块201配置为将主板上的关键数据通过主备倒换数据库同步到备板,主备倒换数据库中的关键数据用于在备板开启工作时使用,避免了重新触发链路建立而导致断链的问题。The first establishing module 201 is configured to synchronize the key data on the main board to the standby board through the active/standby switching database, and the key data in the active/standby switching database is used when the standby board is started, thereby avoiding re-triggering link establishment. And the problem of broken chains.
第二建立模块202,配置为建立与主板分离的保活报文收发机制。The second establishing module 202 is configured to establish a keep-alive message sending and receiving mechanism separated from the main board.
其中,第二建立模块202配置为设置与主板分离的保活处理模块,通过保活处理模块完成保活报文的收发处理。The second establishing module 202 is configured to set a keep-alive processing module that is separated from the main board, and completes the sending and receiving processing of the keep-alive message by using the keep-alive processing module.
由于保活处理模块是与主板分离、独立存在的,所以当设备的主控板 在进行主备倒换时,保活处理模块能进行保活报文的收发处理,不会受到主备倒换的影响。Since the keep-alive processing module is separate from the main board and exists independently, when the main control board of the device When the active/standby switchover is performed, the keepalive processing module can send and receive keepalive packets without being affected by the active/standby switchover.
保活处理模块在进行保活报文的收发之前,会收到保活报文的相关信息,例如报文内容、报文长度、报文发送周期等。由本端设备的保活处理模块托管链路协议来定时发送保活报文。The keep-alive processing module receives information about keep-alive messages, such as packet content, packet length, and packet sending period, before sending and receiving keep-alive packets. The keepalive message is periodically sent by the keepalive processing module of the local device to host the link protocol.
第一处理模块203,配置为当触发主备倒换时,利用保活报文收发机制维持保活报文的收发处理。The first processing module 203 is configured to maintain the transmission and reception processing of the keep-alive packet by using the keep-alive packet sending and receiving mechanism when the active/standby switchover is triggered.
在对接场景下建立本端设备与对端设备基于链路协议的交互,并成功建立链路,进行流量转发,本端设备支持主备倒换,当设备主控板的主板在配置触发或者其它异常事件的触发下而发生主备倒换时,第一处理模块203通过保活处理模块继续与对端设备进行保活报文的交互处理。保活处理模块不会进行倒换,保活处理模块会定时发送倒换前保存的保活报文信息,与对端设备进行保活报文交互。In the connection scenario, the link between the local device and the peer device is established based on the link protocol. The link is successfully established and the traffic is forwarded. The local device supports the active/standby switchover. When the mainboard of the device main control board is configured to trigger or other abnormalities. When the active/standby switchover occurs under the triggering of the event, the first processing module 203 continues to perform the interaction processing of the keepalive message with the peer device by using the keep-alive processing module. The keep-alive processing module does not perform the switching. The keep-alive processing module periodically sends the keep-alive message information saved before the switching, and interacts with the peer device for keep-alive messages.
采用保活处理模块继续与对端设备的保活报文的交互处理,使得本端设备能继续与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。The keepalive processing module continues to interact with the keepalive packets of the peer device, so that the local device can continue to interact with the peer device for keep-alive packets. During this period, the peer device cannot sense the master of the local device. The switchover is changed to maintain the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.
第二处理模块204,配置为当触发主备倒换时,利用关键数据同步机制将工作主控板从主板倒换到备板。The second processing module 204 is configured to switch the working main control board from the mainboard to the standby board by using a key data synchronization mechanism when the active/standby switchover is triggered.
其中,第二处理模块204配置为:暂停协议报文的收发处理,在同步事件处理完成后,从主备倒换数据库中获取同步的关键数据,恢复协议报文的收发处理,并更新保活处理模块中的保活报文。The second processing module 204 is configured to: suspend the transmission and reception processing of the protocol packet, and obtain the synchronized key data from the active/standby switching database after the synchronization event processing is completed, restore the protocol packet transmission and reception processing, and update the keep-alive processing. Keep-alive messages in the module.
具体的,在触发主备倒换时,第二处理模块204暂时不处理协议报文的收发,等待配置加载和接口创建同步结束等事件完成后,备板从主备倒换数据库中获取同步的关键数据,获取到关键数据之后,开始与对端设备 交互协议报文,并更新保活处理模块中的保活报文的相关信息,没有变化即维持原有信息。Specifically, when the active/standby switchover is triggered, the second processing module 204 temporarily does not process the sending and receiving of the protocol packets, and waits for the configuration loading and the synchronization of the interface to be completed, and the standby board obtains the synchronized key data from the active/standby switching database. After getting the key data, start with the peer device The protocol message is exchanged, and the related information of the keep-alive message in the keep-alive processing module is updated, and the original information is maintained without change.
本实施例通过增加保活处理模块,实现保活报文与协议报文处理相分离,在本端设备从主板倒换到备板的过程中,使得本端设备能继续与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。In this embodiment, the keepalive processing module is added to separate the keep-alive packets from the protocol packet processing. In the process of the local device switching from the mainboard to the standby board, the local device can continue to keep the live device with the peer device. During the active/standby switchover, the peer device does not detect the active/standby switchover of the local device, and maintains the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover. .
本实施例采用将保活处理模块与主板分离的方案,将保活报文由原本的主板进行发送和接收,转变为由一与主板分离的保活处理模块进行发送和接收,在本端设备主板倒换到备板的过程中,保活处理模块不会进行倒换,由于主板无法再继续与对端设备进行保活报文的交互,所以采用转交由保活处理模块继续与对端设备进行保活报文交互的方式,使得对端设备感知不到本端设备主板倒换到备板的过程,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。In this embodiment, a scheme for separating the keep-alive processing module from the main board is adopted, and the keep-alive message is sent and received by the original main board, and is converted into a keep-alive processing module separated from the main board for sending and receiving, at the local end device. During the process of switching the mainboard to the standby board, the keep-alive processing module does not perform the switchover. Since the main board cannot continue to interact with the peer device for keep-alive packets, the transfer is maintained by the keep-alive processing module to protect the peer device. In the active/standby switchover mode, the peer device does not detect the process of switching the local device to the standby device. This ensures that the local device does not generate traffic during the active/standby switchover. The problem of interruption.
根据本发明实施例提供的基于链路协议的设备主备倒换装置,通过第一建立模块201建立主板与备板之间的关键数据同步机制,关键数据包括:配置信息、协议状态;第二建立模块202建立与主板分离的保活报文收发机制;当触发主备倒换时,第一处理模块203利用保活报文收发机制维持保活报文的收发处理,第二处理模块204利用关键数据同步机制将工作主控板从主板倒换到备板;采用上述方案,在本端设备主板倒换到备板的过程中,通过与主板分离的保活报文收发机制以维持保活报文的收发处理,使得本端设备能正常与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。According to the link protocol-based device active/standby switching device provided by the embodiment of the present invention, a key data synchronization mechanism between the main board and the standby board is established by the first establishing module 201, and the key data includes: configuration information, protocol status, and second establishment. The module 202 establishes a keep-alive message sending and receiving mechanism separated from the main board. When the active/standby switchover is triggered, the first processing module 203 maintains the sending and receiving process of the keep-alive message by using the keep-alive message sending and receiving mechanism, and the second processing module 204 uses the key data. The synchronization mechanism switches the working main control board from the main board to the standby board. In the process of switching the local device to the standby board, the keepalive packet is sent and received through the keep-alive packet sending and receiving mechanism. The local device can perform the interaction between the local device and the peer device. The peer device does not detect the active/standby switchover of the local device. This ensures the stability of the link state and ensures the stability of the link. The end device does not experience traffic interruption during the active/standby switchover.
这里需要指出的是:以上装置实施例的描述,与上述方法实施例的描 述是类似的,具有同方法实施例相似的有益效果,因此不做赘述。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解,为节约篇幅,因此不再赘述。It should be pointed out here that the description of the above device embodiment and the description of the above method embodiment The description is similar and has similar advantageous effects as the method embodiments, and therefore will not be described again. For the technical details not disclosed in the embodiment of the present invention, please refer to the description of the method embodiment of the present invention, and the details are not described herein.
这里,在实际应用中,所述第一建立模块201、第二建立模块202、第一处理模块203以及第二处理模块204均可由中央处理器(CPU)、或微处理器(MPU)、或数字信号处理器(DSP)、或可编程门阵列(FPGA)实现。Here, in practical applications, the first establishing module 201, the second establishing module 202, the first processing module 203, and the second processing module 204 may each be a central processing unit (CPU), or a microprocessor (MPU), or Digital signal processor (DSP), or programmable gate array (FPGA) implementation.
在另一实施例中还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行图1所示的基于链路协议的设备主备倒换方法。In another embodiment, a computer storage medium is provided. The computer storage medium stores computer executable instructions for executing the link protocol based device active/standby switching method shown in FIG. 1.
显然,本领域的技术人员应该明白,上述本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the modules or steps of the above embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device or distributed among multiple computing devices. On the network, optionally, they may be implemented by program code executable by the computing device, such that they may be stored in a storage medium (ROM/RAM, disk, optical disk) by a computing device, and in some In this case, the steps shown or described may be performed in an order different from that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of the modules or steps may be implemented as a single integrated circuit module. Therefore, the invention is not limited to any particular combination of hardware and software.
以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a detailed description of the embodiments of the present invention in conjunction with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.
工业实用性Industrial applicability
本发明实施例在本端设备主板倒换到备板的过程中,通过与主板分离的保活报文收发机制以维持保活报文的收发处理,使得本端设备能正常与对端设备进行保活报文的交互,此期间对端设备感知不到本端设备的主备 倒换变化,进而维持了链路状态的稳定性,保证了本端设备在主备倒换过程中不会出现流量中断的问题。 In the embodiment of the present invention, in the process of switching the homeboard of the local device to the standby device, the local device can be properly protected from the peer device by using the keep-alive packet sending and receiving mechanism separated from the mainboard to maintain the sending and receiving of the keep-alive packets. Interaction between live packets. During this period, the peer device does not sense the active and standby devices of the local device. The switchover is changed to maintain the stability of the link state. This ensures that the local device does not experience traffic interruption during the active/standby switchover.

Claims (11)

  1. 一种基于链路协议的设备主备倒换方法,包括:An active/standby switchover method for a device based on the link protocol, including:
    建立主板与备板之间的关键数据同步机制,所述关键数据包括:配置信息、协议状态;Establish a key data synchronization mechanism between the motherboard and the standby board. The key data includes: configuration information and protocol status.
    建立与所述主板分离的保活报文收发机制;Establishing a keep-alive message sending and receiving mechanism separated from the main board;
    当触发主备倒换时,利用所述保活报文收发机制维持保活报文的收发处理,并利用所述关键数据同步机制将工作主控板从所述主板倒换到所述备板。When the active/standby switchover is triggered, the keep-alive packet sending and receiving mechanism is used to maintain the transmission and reception processing of the keep-alive packet, and the working main control board is switched from the mainboard to the standby board by using the key data synchronization mechanism.
  2. 如权利要求1所述的基于链路协议的设备主备倒换方法,其中,所述建立与所述主板分离的保活报文收发机制包括:设置与所述主板分离的保活处理模块,通过所述保活处理模块完成所述保活报文的收发处理。The link-based device active/standby switching method according to claim 1, wherein the establishing a keep-alive packet sending and receiving mechanism separated from the main board comprises: setting a keep-alive processing module separate from the main board, The keep-alive processing module completes the sending and receiving process of the keep-alive message.
  3. 如权利要求2所述的基于链路协议的设备主备倒换方法,其中,所述利用所述保活报文收发机制维持保活报文的收发处理包括:在主备倒换时,通过所述保活处理模块继续与对端设备进行所述保活报文的交互处理。The link-based device-based active/standby switchover method of claim 2, wherein the receiving and receiving the keep-alive message by using the keep-alive packet sending and receiving mechanism includes: when the active/standby switchover is performed, The keep-alive processing module continues to perform the interaction processing of the keep-alive message with the peer device.
  4. 如权利要求1-3任一项所述的基于链路协议的设备主备倒换方法,其中,所述建立主板与备板之间的关键数据同步机制包括:将所述主板上的所述关键数据通过主备倒换数据库同步到所述备板,所述主备倒换数据库中的所述关键数据用于在所述备板开启工作时使用。The link protocol-based device active/standby switching method according to any one of claims 1 to 3, wherein the establishing a key data synchronization mechanism between the motherboard and the standby board comprises: the key on the motherboard The data is synchronized to the standby board through the active/standby switching database. The key data in the active/standby switching database is used when the standby board is started.
  5. 如权利要求4所述的基于链路协议的设备主备倒换方法,其中,所述利用所述关键数据同步机制将工作主控板从所述主板倒换到所述备板包括:暂停协议报文的收发处理,在同步事件处理完成后,从所述主备倒换数据库中获取同步的所述关键数据,恢复所述协议报文的收发处理,并更新所述保活报文。 The link-based device-based active/standby switchover method of claim 4, wherein the switching of the working main control board from the mainboard to the standby board by using the key data synchronization mechanism includes: suspending protocol packets After the synchronization event processing is completed, the key data of the synchronization is obtained from the active/standby switching database, the transmission and reception processing of the protocol packet is resumed, and the keep-alive message is updated.
  6. 一种基于链路协议的设备主备倒换装置,包括:An active/standby switchover device for a device based on a link protocol, including:
    第一建立模块,配置为建立主板与备板之间的关键数据同步机制,所述关键数据包括:配置信息、协议状态;The first establishing module is configured to establish a key data synchronization mechanism between the motherboard and the standby board, where the key data includes: configuration information and protocol status;
    第二建立模块,配置为建立与所述主板分离的保活报文收发机制;The second establishing module is configured to establish a keep-alive packet sending and receiving mechanism separated from the main board;
    第一处理模块,配置为当触发主备倒换时,利用所述保活报文收发机制维持保活报文的收发处理;The first processing module is configured to maintain the sending and receiving process of the keep-alive packet by using the keep-alive packet sending and receiving mechanism when the active/standby switching is triggered;
    第二处理模块,配置为当触发主备倒换时,利用所述关键数据同步机制将工作主控板从所述主板倒换到所述备板。The second processing module is configured to switch the working main control board from the mainboard to the standby board by using the key data synchronization mechanism when the active/standby switchover is triggered.
  7. 如权利要求6所述的基于链路协议的设备主备倒换装置,其中,所述第二建立模块配置为:设置与所述主板分离的保活处理模块,通过所述保活处理模块完成所述保活报文的收发处理。The link-based device active/standby switching device of claim 6, wherein the second establishing module is configured to: set a keep-alive processing module separate from the mainboard, and complete the The transmission and reception processing of the keep-alive message.
  8. 如权利要求7所述的基于链路协议的设备主备倒换装置,其中,所述第一处理模块配置为:在主备倒换时,通过所述保活处理模块继续与对端设备进行所述保活报文的交互处理。The link-based device active/standby switching device of claim 7, wherein the first processing module is configured to continue to perform the foregoing with the peer device by the keep-alive processing module during the active/standby switchover Interactive processing of keep-alive messages.
  9. 如权利要求6-8任一项所述的基于链路协议的设备主备倒换装置,其中,所述第一建立模块配置为:将所述主板上的所述关键数据通过主备倒换数据库同步到所述备板,所述主备倒换数据库中的所述关键数据用于在所述备板开启工作时使用。The link-based device active/standby switching device according to any one of claims 6-8, wherein the first establishing module is configured to: synchronize the key data on the main board through an active/standby switching database. The key data in the active/standby switching database is used to be used when the standby board is started.
  10. 如权利要求9所述的基于链路协议的设备主备倒换装置,其中,所述第二处理模块配置为:暂停协议报文的收发处理,在同步事件处理完成后,从所述主备倒换数据库中获取同步的所述关键数据,恢复所述协议报文的收发处理,并更新所述保活报文。The link-based device active/standby switching device of claim 9, wherein the second processing module is configured to: suspend and send protocol packets, and switch from the active/standby switch after the synchronization event processing is completed. The key data of the synchronization is obtained in the database, the transceiving processing of the protocol packet is resumed, and the keep-alive packet is updated.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程序用于执行前述权利要求1至5任一项所述的基于链路协议的设备主备倒换方法。 A computer storage medium, wherein the computer storage medium stores a computer program for performing the link protocol-based device active/standby switching method according to any one of claims 1 to 5.
PCT/CN2017/083832 2016-06-21 2017-05-10 Device active/standby switchover method and apparatus based on link protocol, and storage medium WO2017219779A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610451658.3 2016-06-21
CN201610451658.3A CN107528706A (en) 2016-06-21 2016-06-21 A kind of equipment main and standby rearranging method and device based on link protocol

Publications (1)

Publication Number Publication Date
WO2017219779A1 true WO2017219779A1 (en) 2017-12-28

Family

ID=60734028

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/083832 WO2017219779A1 (en) 2016-06-21 2017-05-10 Device active/standby switchover method and apparatus based on link protocol, and storage medium

Country Status (2)

Country Link
CN (1) CN107528706A (en)
WO (1) WO2017219779A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355685A (en) * 2018-12-21 2020-06-30 杭州登虹科技有限公司 Double-chain keep-alive scheme for low-power-consumption product
CN111464514A (en) * 2020-03-19 2020-07-28 烽火通信科技股份有限公司 TCP hot backup method and system
CN112954722A (en) * 2021-01-26 2021-06-11 深圳震有科技股份有限公司 System and method for rapidly switching 5G UPF (unified power flow) main link and standby link
CN114244769A (en) * 2021-11-26 2022-03-25 新华三技术有限公司合肥分公司 Method, equipment and storage medium for sending keep-alive message
CN115643237A (en) * 2022-10-13 2023-01-24 北京华建云鼎科技股份公司 Data processing system for conference

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297753A (en) * 2018-03-23 2019-10-01 中兴通讯股份有限公司 A kind of method and system for verifying software version
CN109889367B (en) * 2019-01-04 2021-08-03 烽火通信科技股份有限公司 Method and system for realizing LACP NSR in distributed equipment not supporting NSR
CN110958176B (en) * 2019-11-20 2022-02-08 烽火通信科技股份有限公司 System and method for controlling uninterrupted routing during switching of main and standby control planes
CN111083074A (en) * 2019-12-20 2020-04-28 盛科网络(苏州)有限公司 High availability method and system for main and standby dual OSPF state machines
CN111586505B (en) * 2020-04-26 2022-04-08 烽火通信科技股份有限公司 Method and device for realizing rapid recovery of main/standby switching service in PON access system
CN111917590B (en) * 2020-08-11 2022-11-18 南京航空航天大学 MAC table processing device and method for main/standby switching data packets of Internet of things manufacturing gateway

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194652B2 (en) * 2002-10-29 2007-03-20 Brocade Communications Systems, Inc. High availability synchronization architecture
CN101075861A (en) * 2007-06-28 2007-11-21 中兴通讯股份有限公司 Method for realizing main spared board thermal backup and reversing main spared board
CN101094186A (en) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 Method and interface board of retaining neighbourhood
CN102307194A (en) * 2011-08-18 2012-01-04 杭州华三通信技术有限公司 Graceful restarting method and device for universal protocol process

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194652B2 (en) * 2002-10-29 2007-03-20 Brocade Communications Systems, Inc. High availability synchronization architecture
CN101075861A (en) * 2007-06-28 2007-11-21 中兴通讯股份有限公司 Method for realizing main spared board thermal backup and reversing main spared board
CN101094186A (en) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 Method and interface board of retaining neighbourhood
CN102307194A (en) * 2011-08-18 2012-01-04 杭州华三通信技术有限公司 Graceful restarting method and device for universal protocol process

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355685A (en) * 2018-12-21 2020-06-30 杭州登虹科技有限公司 Double-chain keep-alive scheme for low-power-consumption product
CN111464514A (en) * 2020-03-19 2020-07-28 烽火通信科技股份有限公司 TCP hot backup method and system
CN112954722A (en) * 2021-01-26 2021-06-11 深圳震有科技股份有限公司 System and method for rapidly switching 5G UPF (unified power flow) main link and standby link
CN112954722B (en) * 2021-01-26 2023-02-03 深圳震有科技股份有限公司 System and method for quickly switching 5G UPF (unified power flow) main link and standby link
CN114244769A (en) * 2021-11-26 2022-03-25 新华三技术有限公司合肥分公司 Method, equipment and storage medium for sending keep-alive message
CN115643237A (en) * 2022-10-13 2023-01-24 北京华建云鼎科技股份公司 Data processing system for conference
CN115643237B (en) * 2022-10-13 2023-08-11 北京华建云鼎科技股份公司 Data processing system for conference

Also Published As

Publication number Publication date
CN107528706A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
WO2017219779A1 (en) Device active/standby switchover method and apparatus based on link protocol, and storage medium
US7860985B2 (en) Method for synchronizing connection state in data communication, and communication node using the same
US9013978B2 (en) Synchronization between active TCP application and standby TCP application
CN110313138B (en) Related method and apparatus for achieving high availability using multiple network elements
US9219701B2 (en) Distributed method and system for implementing link aggregation control protocol (LACP) standard state machines
CN101573940A (en) System and method for TCP high availability
WO2009023996A1 (en) Method for implementing network interconnect via link aggregation
CN110324375B (en) Information backup method and related equipment
CN103986649A (en) Border gateway protocol smooth restart method and routing equipment
CN107104822B (en) Server disaster recovery processing method and device, storage medium and electronic equipment
CN109302328B (en) Hot standby switching method and system for VXLAN (virtual extensible local area network)
CN116048538B (en) Service grid deployment method and device for DPU
CN103607311A (en) System and method for reestablishing TCP connection seamlessly
WO2021057672A1 (en) Sequence number synchronization method and apparatus
CN103888283A (en) SCTP communication method and device
US9350621B2 (en) Synchronization after restart of a FC switch
JP3493035B2 (en) Dynamic path switching method
WO2016177211A1 (en) Address resolution protocol (arp) table entry synchronization method and device
JP2004088206A (en) Radio base station apparatus
KR101401006B1 (en) Method and appratus for performing software upgrade in high availability system
CN106302187B (en) Database synchronization method and device and router
JP2007074252A (en) High availability communication system, failure management method and program
JPH06217001A (en) Restart recognizing system for switching node
JPH11205415A (en) Exchange connection management system
JP2008270895A (en) Ss7 signal processing system and fault recovery method therefor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17814517

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17814517

Country of ref document: EP

Kind code of ref document: A1