WO2008014696A1 - Method and apparatus for realizing communication take-over - Google Patents

Method and apparatus for realizing communication take-over Download PDF

Info

Publication number
WO2008014696A1
WO2008014696A1 PCT/CN2007/070199 CN2007070199W WO2008014696A1 WO 2008014696 A1 WO2008014696 A1 WO 2008014696A1 CN 2007070199 W CN2007070199 W CN 2007070199W WO 2008014696 A1 WO2008014696 A1 WO 2008014696A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing unit
message
standby
primary
unit
Prior art date
Application number
PCT/CN2007/070199
Other languages
French (fr)
Chinese (zh)
Inventor
Huaimo Chen
Yuan Yao
Yu Fu
Boyan Tu
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2008014696A1 publication Critical patent/WO2008014696A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/552Prevention, detection or correction of errors by ensuring the integrity of packets received through redundant connections

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for implementing communication takeover. Background technique
  • High Availability refers to the ability of a product or system to continue to serve customers. It usually passes Mean Time to Repair (MTTR) and Mean Time Between Failures (MTBF). Indicators are identified. MTTR refers to the average time required for a component or device to recover from failure to failure. The broad MTTR involves spare parts management and customer service, which is an important indicator in equipment maintenance contracts. MTBF refers to the failure of a component or equipment. The average running time, which is the time interval that the user can tolerate, usually in hours.
  • the system is generally designed with dual motherboards, one of which is the active main board (AMB) and the other is the backup main board (SMB).
  • the main motherboard runs system software, including routing protocols, routing table management, and so on. All routing protocols and neighbor routers send and receive messages to each other and process them.
  • the routing protocols of the standby motherboard are also started to receive and process packets.
  • the main board backs up data such as the Open Shortest Path First (OSPF) routing protocol to the standby board.
  • OSPF Open Shortest Path First
  • a method for implementing a communication takeover comprising: providing a router having a primary processing unit; connecting a standby processing unit to the router; After the element is connected to the standby processing unit, the network protocol information is sent from the primary processing unit to the standby processing unit to perform link configuration and link with the primary processing unit in the standby processing unit. Synchronization of protocol states; switching to the alternate processing unit upon detection of a failure in the primary processing unit.
  • the method sends the protocol packet sent to the router to the primary processing unit, and the primary processing unit updates the local data according to the packet and performs corresponding processing, and the primary processing unit sends the protocol packet to the standby processing.
  • the unit, the standby processing unit then updates the local data according to the message.
  • This method requires the creation of two hidden interfaces for each area of the OSPF router: one in the primary processing unit and one in the standby processing unit.
  • the hidden interface of the primary processing unit and the standby processing unit is connected through a hidden channel through which link state data is backed up from the primary processing unit to the standby processing unit.
  • the primary processing unit when the primary processing unit receives a Link State Advertisement (LSA) packet of a neighboring router, the primary router is responsive to the neighboring router, and the LSA packet is flooded to the standby processing in the future.
  • LSA Link State Advertisement
  • the router will lose the LSA message. If a neighbor router must connect to the rest of the network through the router being switched, the neighbor router will also lose the LSA message. Therefore, the reliability of the method is low, and the data is lost and the system performance is degraded.
  • IPC Inter-Process Communication
  • Another method provided by the prior art is a communication takeover method based on a message mirroring mechanism.
  • the method of receiving the packet by the standby processing unit and maintaining the local data according to the received packet can solve the problem that the foregoing method may lose the packet during the switching process. It relies on the message mirroring mechanism provided by the Internet Protocol (IP) stack.
  • IP Internet Protocol
  • the message received under the message mirroring mechanism first arrives at the standby processing unit, and then the standby processing unit copies the message to the primary processing unit; the message sent under the message mirroring mechanism is, the primary
  • the processing unit first sends the message to the standby processing unit, which is actually sent by the standby processing unit; It is detected that when there is a fault in the primary processing unit, the router is switched to the standby processing unit.
  • the standby processing unit batch backups the link state from the primary processing unit. Then, the standby processing unit maintains and updates the link state by combining the explicit information of the active processing unit, the transmitted protocol message, and the received protocol message.
  • All received OSPF protocol packets first arrive at the standby processing unit, and then sent by the standby processing unit to the primary processing unit; all transmitted OSPF protocol messages are first sent by the primary processing unit to the standby processing unit, and then sent by the standby processing unit. Adjacent OSPF routers.
  • the standby processing unit In the process of receiving and transmitting, the standby processing unit is a passive information consumer. This information comes from the primary processing unit and other routers in the network. The standby processing unit does not generate any protocol packets, nor does it perform a Shortest Path First (SPF) calculation route.
  • SPF Shortest Path First
  • each OSPF protocol message there are some additional steps to process each OSPF protocol message.
  • Each received OSPF protocol passes through an additional internal step from the standby processing unit to the primary processing unit.
  • Each OSPF protocol sent passes through an additional internal step from the primary processing unit to the standby processing unit. This reduces the efficiency of transmission and reception.
  • the method relies on the IP stack or the operating system to provide a packet mirroring mechanism, and the general IP stack does not provide a packet mirroring mechanism. This makes it difficult to implement, has high requirements on the system, and has poor generality.
  • the embodiment of the invention provides a method and a device for implementing communication takeover, which can save a large amount of IPC bandwidth resources and make the system run more efficiently, more stably and reliably.
  • An embodiment of the present invention provides a method for implementing a communication takeover, including:
  • the primary processing unit and the standby processing unit synchronously receive routing protocol packets from the neighboring routers;
  • the primary processing unit and the standby processing unit maintain the packet according to the routing protocol Their respective local data
  • the standby processing unit takes over the primary processing unit.
  • An embodiment of the present invention further provides an apparatus for implementing communication takeover, including a message receiving unit, a main processing unit, a standby processing unit, and an active/standby control unit.
  • the message receiving unit is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary processing unit and the standby processing unit;
  • the primary processing unit and the standby processing unit maintain respective local data according to the message; the primary and secondary control unit is configured to control the standby processing unit to take over the primary processing unit communication.
  • the primary processing unit and the standby processing unit synchronously receive the routing protocol packet from the neighboring router, and the primary processing unit and the standby processing unit work in parallel, thereby avoiding all protocol reports in the prior art.
  • the text has to pass the IPC connection between the primary processing unit and the standby processing unit, which effectively solves the problem that a large amount of IPC bandwidth is occupied and wastes resources in the prior art, and improves the efficiency of system operation.
  • the standby processing unit maintains the local data according to the protocol message, and then sends a short response message to the primary processing unit, and the primary processing unit further performs the protocol according to the protocol.
  • the message maintains local data, which ensures that the local data of the primary processing unit and the standby processing unit are synchronously updated and consistent, so that the reliability of the switching process is higher.
  • the solution provided by the embodiment of the present invention does not depend on any special improvement of the IP stack or the operating system, and has universal applicability.
  • FIG. 1 is a flow chart of a method for implementing communication takeover in a first embodiment of the present invention
  • FIG. 2 is a flow chart of a method for implementing communication takeover in a second embodiment of the present invention
  • FIG. 3 is a flow chart of a method for implementing communication takeover in a third embodiment of the present invention.
  • FIG. 4 is a flow chart of a method for implementing communication takeover in a fourth embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for performing unplanned switching when applying the OSPF protocol according to the method provided by the embodiment of the present invention
  • FIG. 6 is a flowchart of a planned switching when the OSPF protocol is applied to the method provided by the embodiment of the present invention
  • Figure 7 is a schematic structural view of an apparatus for implementing a communication take-off provided in a fifth embodiment of the present invention.
  • Fig. 8 is a view showing the configuration of an apparatus for realizing communication take-off provided in a sixth embodiment of the present invention. detailed description
  • a method for implementing communication takeover includes: A1, a primary processing unit, and a standby processing unit synchronously receive a routing protocol packet from a neighboring router;
  • the primary processing unit and the standby processing unit receive the routing protocol message synchronously, and the packet receiving unit receives the routing protocol packet from the neighboring router, and then multicasts to the primary processing unit and The standby processing unit is simultaneously transmitted, and the primary processing unit and the standby processing unit are regarded as members of the multicast group.
  • the routing protocol is an OSPF protocol.
  • the method of the present invention can also be applied to other routing protocols. The method emphasizes implementing redundant backup of the communication function, and the specific routing protocol does not constitute the present invention. limit.
  • the packet is a Link State Advertisement (LSA) packet.
  • LSA Link State Advertisement
  • the packet may also be a Hello message or a database.
  • Description DD: Database Description
  • Link State Request message or Link State Ack message.
  • the primary processing unit and the alternate processing unit have the same local data before synchronously receiving protocol messages from neighboring routers.
  • the local data of the synchronous primary processing unit and the standby processing unit of the present invention may be synchronized by the operator in advance, which is understandable.
  • the synchronization may be performed by batch backup of the data of the primary processing unit to the standby processing unit when the standby processing unit is started.
  • the primary processing unit and the standby processing unit are software or hardware modules that have the same processing capability for routing protocol messages.
  • the synchronized local data may include configuration information, interface information, neighbor router status information, and link status information, etc., for routing control.
  • the primary processing unit and the standby processing unit maintain respective local data according to the message
  • the maintenance of the local data by the primary processing unit and the standby processing unit analyzes the information carried by the packet, and maintains the local data according to the analysis result, for example, maintaining a local link state database, a neighbor router status, or a request table. Wait.
  • the standby processing unit takes over the primary processing unit communication. Dynamically triggers or presets a time interval to trigger.
  • the switching process in which the standby processing unit takes over the communication of the primary processing unit can use the existing conventional implementation manner, and details are not described herein.
  • the message receiving unit sends the protocol message to the main processing unit and the standby processing unit at the same time, and the main processing unit and the standby processing unit work in parallel, thereby avoiding all the protocols in the prior art.
  • the problem that a large amount of IPC bandwidth is occupied and resources are wasted in the prior art is effectively solved, and the efficiency of the system operation is improved.
  • a method for implementing communication takeover includes: B1, a primary processing unit and a standby processing unit synchronously receive an LSA message from a neighboring router;
  • the received packet is an LSA packet in the OSPF routing protocol.
  • State database
  • the standby processing unit sends a response message that receives the LSA message to the primary processing unit.
  • the primary processing unit receives the response message from the standby processing unit.
  • the primary processing unit updates the primary processing unit local link state database according to the LSA message.
  • the primary processing unit sends a response packet that receives the LSA packet to the neighboring router;
  • the main processing unit runs the SPF algorithm to calculate the best path to reach the destination and update the routing table and forwarding table according to the paths;
  • step ⁇ 6 is sent to the neighboring router after step ⁇ 4 and step ,5, that is, the primary processing unit receives the LSA message and receives the response message sent by the standby processing unit to receive the LSA message. Received a response packet from the LSA packet. The purpose is to ensure that both the primary processing unit and the standby processing unit receive a response from the neighbor router before sending a response. In a network with a retransmission mechanism, if the neighboring router does not receive the response packet, the LSA "" message is sent again.
  • the difference between the second embodiment and the first embodiment is that, when the message receiving unit simultaneously sends the protocol text to the main processing unit and the standby processing unit, and the main processing unit and the standby processing unit work in parallel, the standby processing unit receives the protocol. After the message, by sending a short response message to the primary processing unit, the local data of the primary processing unit and the standby processing unit can be updated synchronously, so that the reliability of the switching process is higher.
  • the standby processing unit For each received LSA message, if the standby processing unit determines that the local router floods the message to a neighboring router, the standby processing unit places the LSA message to the locally recorded neighbor router. In the retransmission table, when the standby processing unit receives the response message from the neighboring router to the LSA packet, the LSA packet is deleted from the retransmission table of the neighboring router recorded locally.
  • a method for implementing a communication takeover includes: C1, a primary processing unit and a standby processing unit synchronously receive a Hello message from a neighboring router;
  • the received packet is a Hello packet in the OSPF routing protocol; the state information of the neighboring router;
  • the invention applies the OSPF protocol, and the status of the neighboring router includes:
  • the standby processing unit takes over the primary processing unit communication. Start the trigger trigger or preset the time interval to trigger.
  • the third embodiment is to process the Hello packet. If the standby processing unit is to process the Hello packet, the Hello timer and the Dead timer of the neighboring router are required to receive the Hello packet. And the time interval and interface state changes determine the status of the neighbor router and record.
  • This embodiment emphasizes the processing capability of the standby processing unit for Hello messages. Here, there is no absolute order in steps C2 and C3. Step C3 may also be performed first, followed by step C2. The order of the specific steps does not constitute a limitation of the present invention.
  • a method for implementing a communication takeover includes: D1, a primary processing unit and a standby processing unit synchronously receive a DD packet from a neighboring router;
  • the received packet is a DD packet in the OSPF routing protocol.
  • the standby processing unit maintains, according to the DD packet, a request table of the neighbor router recorded by the standby processing unit and status information of the neighbor router.
  • the process of maintaining the request table of the neighboring router by the standby processing unit is: comparing each LSA description information in the DD packet with the corresponding LSA in the link state database of the standby processing unit; if the LSA description information is more than the link The corresponding LSA in the state database is new.
  • the LSA description information is placed in the request table of the neighboring router by the processing unit; when the standby processing unit receives the LSA message corresponding to the LSA description information of the neighboring router, the LSA description information is The request table of the neighbor router is deleted.
  • the standby processing unit sends a response message to the primary processing unit to receive the DD packet;
  • the primary processing unit receives the response message from the standby processing unit;
  • the primary processing unit maintains, according to the DD, a request table of the neighbor router locally recorded by the primary processing unit, and status information of the neighbor router.
  • the primary processing unit sends, to the neighboring router, the response message of the database description packet to the database description packet.
  • Embodiment 4 embodies the processing method of the DD packet in the present invention. After the DD packet is processed, the neighbor router will retransmit the DD packet that is not received, so that the seamless switching process is performed. more perfect.
  • the status information of the locally recorded neighbor router is maintained according to the Hello packet and the DD packet.
  • the manner in which the standby processing unit obtains the neighbor router state information may also be used when the primary processing unit determines that the state of the neighboring router changes, and then the neighboring router is connected through the IPC connection between the primary processing unit and the standby processing unit. The status change is notified to the alternate processing unit. In this way, the standby processing unit may not run the relevant timer, but it takes up a little more IPC bandwidth resources. Specifically, how to implement the technology can choose the processing method according to the actual situation of the system.
  • the OSPF protocol is applied to the OSPF protocol, and the processing modes of the LSA packet, the Hello packet, and the DD packet in the OSPF protocol are described.
  • the processing of the LSA packet and the DD packet is compared with the conventional processing procedure, and the response message sent by the standby processing unit to the received LSA packet and the DD packet is added, so that the primary processing unit and the standby processing unit are configured to receive the response message.
  • the incoming message updates the local data and keeps them consistent, ready for the switchover.
  • the primary processing unit receives the LSA message and the DD message that are multicast by the packet receiving unit, the primary processing unit does not receive the received data from the standby processing unit within the preset time.
  • the main processing unit passes The IPC between the primary processing unit and the standby processing unit sends the message to the standby processing unit and generates an alarm message, prompting the user that the standby processing unit may be malfunctioning.
  • the primary processing unit processes the backup.
  • the unit requests the message; after receiving the request from the primary processing unit, the standby processing unit sends the message to the primary processing unit through an IPC connection between the primary processing unit and the standby processing unit, and generates an alarm message. , prompting the user that the main processing unit may not work properly.
  • Embodiment 2 to Embodiment 4 after the primary processing unit and the standby processing unit complete the initial data synchronization by data batch backup or other manner, if the primary processing unit changes local state, the local state change information is transmitted to The standby processing unit, the local data of the standby processing unit is further maintained according to the local state change information.
  • the local state change information includes: a motherboard configuration change information, an interface state change information, and a neighbor router state change information.
  • the local state change information is sent to the standby processing unit through the IPC connection between the primary processing unit and the standby processing unit, and the standby processing unit is configured according to the local state.
  • the change information maintains local data to ensure consistency with the data of the primary processing unit. Since the probability of occurrence of the local state change is relatively low and the amount of information is small, the occupancy of the IPC bandwidth resource is small, and the user does not have to worry about the problem that the IPC bandwidth is occupied too much.
  • the process in which the standby processing unit takes over the communication of the primary processing unit is called switching, and the switching mode of the present invention can be divided into unplanned switching and planned switching, and the unplanned switching and planned switching can be applied to the above embodiment.
  • the process of the OSPF protocol is applied to the method provided by the embodiment of the present invention, and includes:
  • the standby processing unit reads all network interface information from the interface layer
  • R2 performing active/standby switching, and the standby processing unit replaces the primary processing unit
  • the active/standby switch here refers to the interface of the standby processing unit to take over the active processing unit.
  • the reestablishment of the adjacency relationship is established from the Down state.
  • the manner of re-establishing the neighbor relationship may also be: For any state, it is not a full connection (Full). And not for the exchange (Exchange) neighbor router, the standby processing unit establishes the adjacency relationship according to the state it saves; for any neighbor router whose state is exchanged, the neighbor relationship is established from the ExStart state. This makes the seamless switching process faster. Specifically, how to implement the technician can select the processing mode according to the actual situation of the system, and the specific processing manner is not sufficient to limit the present invention.
  • the started timer includes a Hello timer, a Dead timer, and an LSA retransmission timing.
  • the standby processing unit runs the SPF algorithm to calculate the best path to the destination and update the routing table and forwarding table based on these paths.
  • Unplanned switching generally triggers failure of the primary processing unit for hardware and software failures, and the primary processing unit is not working properly.
  • a flowchart of a planned switching when the OSPF protocol is applied to the method provided by the embodiment of the present invention includes:
  • the standby processing unit reads all network interface information from the interface layer
  • the standby processing unit sets and starts an associated timer with the remaining time of the timer obtained from the main processing unit;
  • S5 the path of the other protocol is imported according to the configuration, and the LSA packet originating from the local router is regenerated;
  • the standby processing unit runs the SPF algorithm to calculate the best path to the destination and update the routing table and forwarding table based on these paths.
  • the planned switching is generally performed in the case that the main processing unit can work normally, and the artificial execution switching triggers the failure of the main processing unit or the user presets a certain time interval to trigger the failure of the main processing unit, so that the standby processing unit can take over the main
  • the process with the processing unit is smoother.
  • the device structure diagram is as shown in FIG. 7, and includes a receiving unit 100, a main processing unit 200, a standby processing unit 300, and an active/standby control unit 400.
  • the active/standby control unit 400 includes a data backup control unit 410 and a takeover control unit 420.
  • the data backup control unit 410 is configured to control the backup of the data of the primary processing unit 200 to the standby processing unit 300 when the standby processing unit 300 is started.
  • the message receiving unit 100 is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary processing unit 200 and the standby processing unit 300.
  • the receiving unit 100 transmits the message in multicast form, and the primary processing unit 200 and the standby processing unit 300 are regarded as members in the multicast group.
  • the backup processing unit 300 is configured to provide routing protection for the primary processing unit. After receiving the routing protocol message multicast by the packet receiving unit 100, the standby processing unit 300 maintains the local data of the standby processing unit 300 according to the packet.
  • the primary processing unit 200 is configured to provide a primary routing function of the router. After receiving the routing protocol packet that is received by the packet receiving unit 100, the primary processing unit maintains the local data of the primary processing unit 200 according to the packet.
  • the takeover control unit 420 is configured to control the standby process when the main processing unit 200 fails Unit 300 takes over communication with the primary processing unit 200.
  • the device structure diagram is as shown in FIG. 8, and includes a receiving unit 100, a main processing unit 200, a standby processing unit 300, and an active/standby control unit 400.
  • the primary processing unit 200 includes: a primary receiving unit 210, a primary data maintaining unit 220, a response message receiving unit 230, an active message forwarding unit 240, and a requesting unit 250;
  • the standby processing unit 300 includes: The unit 310, the backup data maintenance unit 320, the response message transmitting unit 330, and the alternate text forwarding unit 340.
  • the message receiving unit 100 is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary receiving unit 210 on the primary processing unit 200 and the standby receiving unit 310 on the standby processing unit 300.
  • the standby receiving unit 310 is configured to receive the protocol packet sent by the packet receiving unit 100, and is further configured to receive the packet forwarded by the primary packet forwarding unit 240.
  • the backup data maintenance unit 320 is configured to maintain local data according to the message received by the standby receiving unit 310.
  • the response message sending unit 330 is configured to: after the standby data maintenance unit 320 maintains the local data according to the received message, send a response message to the response message receiving unit 230;
  • the primary receiving unit 210 is configured to receive the protocol packet sent by the packet receiving unit 100, and is further configured to receive the packet forwarded by the standby packet forwarding unit 340.
  • the primary data maintenance unit 220 is configured to maintain local data according to the message received by the primary receiving unit 210 after the response message receiving unit 230 receives the response message;
  • the response message receiving unit 230 receives the response message from the received message sent by the response message sending unit 320;
  • the primary message forwarding unit 240 is configured to: after the primary receiving unit 210 receives the message, when the response message receiving unit 230 does not receive the received message sent by the response message sending unit 330 within the preset time In response to the message, the message is sent to the alternate receiving unit 310 and an alert message is generated to the user.
  • the requesting unit 250 is configured to: after the response message receiving unit 230 receives the response message from the received message sent by the response message sending unit 330, the primary receiving unit 210 does not receive the received message within the preset time. When the message sent by the unit 100 is sent to the alternate forwarding unit 340, the message is requested;
  • the standby forwarding unit 340 is configured to send the message requested by the requesting unit 250 to the primary receiving unit 210 after receiving the request from the primary processing unit, and generate an alarm message.

Abstract

A method and an apparatus for realizing the communication take-over. The route protocol message from the neighbor router is received synchronistical by the main processing unit and the spare processing unit. The main processing unit and the spare processing unit are parallel acting. The spare processing unit maintains the local data according to the protocol message and sends the short answer message to the main processing unit. The main processing unit then maintains the local data according to the protocol message in order to update the local data of the main processing unit and the spare processing unit synchronistical and congruous.

Description

一种实现通信接管的方法及装置 本申请要求于 2006 年 07 月 26 日提交中国专利局、 申请号为 200610099512.3、 发明名称为 "一种实现通信接管的方法及装置" 的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  Method and device for realizing communication takeover This application claims priority to Chinese patent application filed on July 26, 2006, the Chinese Patent Office, Application No. 200610099512.3, entitled "A Method and Apparatus for Realizing Communication Takeover" The entire contents of which are incorporated herein by reference. Technical field
本发明涉及通信技术领域, 具体涉及一种实现通信接管的方法及装 置。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a method and apparatus for implementing communication takeover. Background technique
高可用性(HA, High Availability)是指一个产品或系统对客户持续服 务的能力, 它通常通过平均修复时间(MTTR, Mean Time to Repair)和平 均故障间隔时间(MTBF, Mean Time Between Failures)两个指标进行标 识。 MTTR是指一个组件或设备从故障到恢复正常所需的平均时间, 广 义的 MTTR涉及到备件管理和客户服务, 是设备维护合同中的一项重要 指标; MTBF 是指一个组件或设备的无故障运行平均时间, 也就是用户 能容忍的故障间隔时间, 通常以小时为单位。  High Availability (HA) refers to the ability of a product or system to continue to serve customers. It usually passes Mean Time to Repair (MTTR) and Mean Time Between Failures (MTBF). Indicators are identified. MTTR refers to the average time required for a component or device to recover from failure to failure. The broad MTTR involves spare parts management and customer service, which is an important indicator in equipment maintenance contracts. MTBF refers to the failure of a component or equipment. The average running time, which is the time interval that the user can tolerate, usually in hours.
现有的路由器中一般釆用通信接管方案来实现系统的高可用性。 该 系统一般是釆用双主板设计, 其中一块为处于工作状态的主用主板 (AMB), 另一块为处于备份状态的备用主板(SMB)。 主用主板运行系统 软件, 包括路由协议、 路由表管理等。 所有路由协议与邻居路由器互相 收发报文并进行处理。 备用主板各路由协议也启动, 进行报文接收和处 理。 主用主板将各路由协议如: 开放最短路径优先(OSPF, Open Shortest Path First)路由协议等数据备份到备用主板。 当主用主板失效时, 备用主 板立即接管失效主板成为主用主板,这个过程称作 "倒换",这种倒换过程 也可由操作人员通过命令进行驱动。  In the existing routers, a communication takeover scheme is generally adopted to achieve high availability of the system. The system is generally designed with dual motherboards, one of which is the active main board (AMB) and the other is the backup main board (SMB). The main motherboard runs system software, including routing protocols, routing table management, and so on. All routing protocols and neighbor routers send and receive messages to each other and process them. The routing protocols of the standby motherboard are also started to receive and process packets. The main board backs up data such as the Open Shortest Path First (OSPF) routing protocol to the standby board. When the main board fails, the standby main board immediately takes over the failed main board and becomes the main board. This process is called "switching". This switching process can also be driven by the operator.
如何保证倒换后的路由器具有相同的链路状态数据库成为一个难 题, 为解决这一问题, 现有技术提供的解决方案如下:  How to ensure that the switched router has the same link state database becomes a difficult problem. To solve this problem, the solutions provided by the prior art are as follows:
现有技术提供的一种实现通信接管的方法, 包括: 提供具有主用处 理单元的路由器; 将一备用处理单元连接至所述路由器; 将主用处理单 元连接至所述备用处理单元后, 将网络协议信息从所述主用处理单元发 送至备用处理单元, 以在所述备用处理单元中进行与所述主用处理单元 的链路配置和链路协议状态的同步; 当检测到在所述主用处理单元中有 故障时, 将所述路由器切换到所述备用处理单元。 A method for implementing a communication takeover provided by the prior art, comprising: providing a router having a primary processing unit; connecting a standby processing unit to the router; After the element is connected to the standby processing unit, the network protocol information is sent from the primary processing unit to the standby processing unit to perform link configuration and link with the primary processing unit in the standby processing unit. Synchronization of protocol states; switching to the alternate processing unit upon detection of a failure in the primary processing unit.
该方法将发送给路由器的协议报文, 先发送到主用处理单元, 主用 处理单元根据该报文更新本地数据并进行相应的处理, 主用处理单元再 发送所述协议报文给备用处理单元, 备用处理单元再根据所述报文更新 本地数据。 该方法需要为 OSPF路由器的每一个区域创建两个隐藏接口: 一个在主用处理单元, 一个在备用处理单元。 主用处理单元和备用处理 单元的隐藏接口通过一个隐藏通道连接, 通过该隐藏通道实现链路状态 数据从主用处理单元备份到备用处理单元。  The method sends the protocol packet sent to the router to the primary processing unit, and the primary processing unit updates the local data according to the packet and performs corresponding processing, and the primary processing unit sends the protocol packet to the standby processing. The unit, the standby processing unit, then updates the local data according to the message. This method requires the creation of two hidden interfaces for each area of the OSPF router: one in the primary processing unit and one in the standby processing unit. The hidden interface of the primary processing unit and the standby processing unit is connected through a hidden channel through which link state data is backed up from the primary processing unit to the standby processing unit.
在上述实现通信接管的方法中, 当主用处理单元收到一个邻居路由 器的链路状态通告(LSA, Link State Advertisement) 报文, 应答了该邻居 路由器而未来得及洪泛该 LSA报文到备用处理单元时, 如果此时主用处 理单元和备用处理单元倒换, 那么路由器将失去这个 LSA报文。 如果某 个邻居路由器必须途径这个正在倒换的路由器才能连接到网络的其他部 分,那么该邻居路由器也将失去这个 LSA报文。 因此该方法可靠性较低, 的情况, 使数据丟失, 系统性能下降。  In the foregoing method for implementing the communication takeover, when the primary processing unit receives a Link State Advertisement (LSA) packet of a neighboring router, the primary router is responsive to the neighboring router, and the LSA packet is flooded to the standby processing in the future. In the case of a unit, if the primary processing unit and the standby processing unit are switched at this time, the router will lose the LSA message. If a neighbor router must connect to the rest of the network through the router being switched, the neighbor router will also lose the LSA message. Therefore, the reliability of the method is low, and the data is lost and the system performance is degraded.
所有接收的链路状态通告报文都要经过主用处理单元和备用处理单 元之间的进程间通信 (IPC , Inter-Process Communication)连接, 造成大量 的 IPC带宽资源被占用, 使系统性能下降。  All the received link state advertisements are connected through the Inter-Process Communication (IPC) between the primary processing unit and the standby processing unit, causing a large amount of IPC bandwidth resources to be occupied, which degrades system performance.
现有技术提供的另一方法是基于报文镜像机制的通信接管方法。 该 方法通过备用处理单元先接收报文并根据接收到的报文维护本地数据, 可以解决前述方法在倒换过程中可能丟失报文的问题。 它依赖于网际协 议(IP, Internet Protocol)栈提供的报文镜像机制。 在基于报文镜像机制下 接收的报文是首先抵达备用处理单元, 然后备用处理单元将所述报文复 制一份到主用处理单元; 在基于报文镜像机制下发送的报文是, 主用处 理单元首先将报文发送到备用处理单元, 由备用处理单元真正发出; 当 检测到在所述主用处理单元中有故障时, 将所述路由器切换到所述备用 处理单元。 Another method provided by the prior art is a communication takeover method based on a message mirroring mechanism. The method of receiving the packet by the standby processing unit and maintaining the local data according to the received packet can solve the problem that the foregoing method may lose the packet during the switching process. It relies on the message mirroring mechanism provided by the Internet Protocol (IP) stack. The message received under the message mirroring mechanism first arrives at the standby processing unit, and then the standby processing unit copies the message to the primary processing unit; the message sent under the message mirroring mechanism is, the primary The processing unit first sends the message to the standby processing unit, which is actually sent by the standby processing unit; It is detected that when there is a fault in the primary processing unit, the router is switched to the standby processing unit.
基于报文镜像机制的通信接管方法的步骤如下:  The steps of the communication takeover method based on the message mirroring mechanism are as follows:
首先, 备用处理单元启动时, 备用处理单元从主用处理单元批量备 份链路状态。 然后, 备用处理单元通过结合主用处理单元的明确信息, 发送的协议报文以及接收的协议报文来维持和更新链路状态。  First, when the standby processing unit is started, the standby processing unit batch backups the link state from the primary processing unit. Then, the standby processing unit maintains and updates the link state by combining the explicit information of the active processing unit, the transmitted protocol message, and the received protocol message.
所有的接收 OSPF协议报文首先到达备用处理单元, 然后由备用处理 单元发送到主用处理单元; 所有的发送 OSPF协议 文首先由主用处理单 元发送到备用处理单元,然后由备用处理单元发送到相邻的 OSPF路由器。  All received OSPF protocol packets first arrive at the standby processing unit, and then sent by the standby processing unit to the primary processing unit; all transmitted OSPF protocol messages are first sent by the primary processing unit to the standby processing unit, and then sent by the standby processing unit. Adjacent OSPF routers.
在接收和发送的过程中, 备用处理单元是一个被动的信息消费者。 这些信息来自主用处理单元以及网络中的其它路由器。 备用处理单元既 不产生任何协议报文, 也不执行最短路径优先算法(SPF, Shortest Path First)计算路由。  In the process of receiving and transmitting, the standby processing unit is a passive information consumer. This information comes from the primary processing unit and other routers in the network. The standby processing unit does not generate any protocol packets, nor does it perform a Shortest Path First (SPF) calculation route.
该方法中, 所有协议报文都要经过主用处理单元和备用处理单元之 间的 IPC连接传输, 占用了大量的 IPC带宽资源, 使系统性能下降。 其次, 处理每一个 OSPF协议报文都要一些额外的步骤。每一个接收的 OSPF协议 才艮文都要经过一个额外的从备用处理单元到主用处理单元的内部步骤。 每一个发送的 OSPF协议 ^艮文都要途经一个额外的从主用处理单元到备用 处理单元的内部步骤。 这使发送和接收的效率降低。  In this method, all protocol packets are transmitted through the IPC connection between the primary processing unit and the standby processing unit, occupying a large amount of IPC bandwidth resources, and the system performance is degraded. Second, there are some additional steps to process each OSPF protocol message. Each received OSPF protocol passes through an additional internal step from the standby processing unit to the primary processing unit. Each OSPF protocol sent passes through an additional internal step from the primary processing unit to the standby processing unit. This reduces the efficiency of transmission and reception.
另外, 该方法依赖于 IP栈或操作系统提供报文镜像机制, 而一般的 IP 栈不提供报文镜像机制。 导致实现难度较大, 对系统的要求高, 通用性 不好。 发明内容  In addition, the method relies on the IP stack or the operating system to provide a packet mirroring mechanism, and the general IP stack does not provide a packet mirroring mechanism. This makes it difficult to implement, has high requirements on the system, and has poor generality. Summary of the invention
本发明实施例提供一种实现通信接管的方法及装置, 可以节约大量 的 IPC带宽资源, 使系统运行更高效、 更稳定可靠。  The embodiment of the invention provides a method and a device for implementing communication takeover, which can save a large amount of IPC bandwidth resources and make the system run more efficiently, more stably and reliably.
本发明实施例提供一种实现通信接管的方法, 包括:  An embodiment of the present invention provides a method for implementing a communication takeover, including:
主用处理单元和备用处理单元同步接收来自邻居路由器的路由协议 报文;  The primary processing unit and the standby processing unit synchronously receive routing protocol packets from the neighboring routers;
所述主用处理单元和所述备用处理单元根据所述路由协议报文维护 各自的本地数据; The primary processing unit and the standby processing unit maintain the packet according to the routing protocol Their respective local data;
当所述主用处理单元失效时, 所述备用处理单元接管所述主用处理 单元。  When the primary processing unit fails, the standby processing unit takes over the primary processing unit.
本发明实施例还提供一种实现通信接管的装置, 包括报文接收单元、 主用处理单元、 备用处理单元和主备控制单元,  An embodiment of the present invention further provides an apparatus for implementing communication takeover, including a message receiving unit, a main processing unit, a standby processing unit, and an active/standby control unit.
所述报文接收单元, 用于接收来自邻居路由器的路由协议报文, 并 向主用处理单元和备用处理单元同时发送所述 4艮文;  The message receiving unit is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary processing unit and the standby processing unit;
主用处理单元和备用处理单元根据所述报文维护各自的本地数据; 主备控制单元, 用于控制备用处理单元接管主用处理单元通信。 本发明实施例提供的方案中, 主用处理单元和备用处理单元同步接 收来自邻居路由器的路由协议报文, 主用处理单元和备用处理单元并行 工作, 避免了现有技术中, 所有的协议报文都要经过主用处理单元和备 用处理单元之间的 IPC连接, 有效地解决了现有技术中大量 IPC带宽被 占用, 资源浪费的问题, 提高了系统运行的效率。  The primary processing unit and the standby processing unit maintain respective local data according to the message; the primary and secondary control unit is configured to control the standby processing unit to take over the primary processing unit communication. In the solution provided by the embodiment of the present invention, the primary processing unit and the standby processing unit synchronously receive the routing protocol packet from the neighboring router, and the primary processing unit and the standby processing unit work in parallel, thereby avoiding all protocol reports in the prior art. The text has to pass the IPC connection between the primary processing unit and the standby processing unit, which effectively solves the problem that a large amount of IPC bandwidth is occupied and wastes resources in the prior art, and improves the efficiency of system operation.
另外, 在主用处理单元和备用处理单元并行工作的基础上, 备用处 理单元根据协议报文维护本地数据后, 通过发送短小的响应消息给主用 处理单元, 主用处理单元再根据所述协议报文维护本地数据, 可以确保 主用处理单元和备用处理单元本地数据的同步更新并且一致, 使倒换过 程的可靠性更高。  In addition, on the basis that the primary processing unit and the standby processing unit work in parallel, the standby processing unit maintains the local data according to the protocol message, and then sends a short response message to the primary processing unit, and the primary processing unit further performs the protocol according to the protocol. The message maintains local data, which ensures that the local data of the primary processing unit and the standby processing unit are synchronously updated and consistent, so that the reliability of the switching process is higher.
而且, 本发明实施例提供的方案不依赖于 IP栈或操作系统的任何特殊 改进, 具有普遍的适用性。 附图说明  Moreover, the solution provided by the embodiment of the present invention does not depend on any special improvement of the IP stack or the operating system, and has universal applicability. DRAWINGS
下面通过具体实施方式并结合附图对本发明作进一步的详细说明。 图 1是本发明第一实施例中实现通信接管的方法流程图;  The invention will be further described in detail below with reference to the specific embodiments and drawings. 1 is a flow chart of a method for implementing communication takeover in a first embodiment of the present invention;
图 2是本发明第二实施例中实现通信接管的方法流程图;  2 is a flow chart of a method for implementing communication takeover in a second embodiment of the present invention;
图 3是本发明第三实施例中实现通信接管的方法流程图;  3 is a flow chart of a method for implementing communication takeover in a third embodiment of the present invention;
图 4是本发明第四实施例中实现通信接管的方法流程图;  4 is a flow chart of a method for implementing communication takeover in a fourth embodiment of the present invention;
图 5是本发明实施例提供的方法应用 OSPF协议时无计划倒换的流程 图; 图 6是本发明实施例提供的方法应用 OSPF协议时有计划倒换的流程 图; FIG. 5 is a flowchart of a method for performing unplanned switching when applying the OSPF protocol according to the method provided by the embodiment of the present invention; FIG. 6 is a flowchart of a planned switching when the OSPF protocol is applied to the method provided by the embodiment of the present invention;
图 7 是本发明第五实施例中提供的实现通信接管的装置的结构示意 图;  Figure 7 is a schematic structural view of an apparatus for implementing a communication take-off provided in a fifth embodiment of the present invention;
图 8 是本发明第六实施例中提供的实现通信接管的装置的结构示意 图。 具体实施方式  Fig. 8 is a view showing the configuration of an apparatus for realizing communication take-off provided in a sixth embodiment of the present invention. detailed description
为使本发明的原理、 特性和优点更加清楚, 下面结合说明书附图来 进一步详细描述本发明。  In order to make the principles, features and advantages of the present invention more apparent,
实施例一  Embodiment 1
如图 1所示, 本发明实施例提供的一种实现通信接管的方法, 包括: A1 , 主用处理单元和备用处理单元同步接收来自邻居路由器的路由 协议报文;  As shown in FIG. 1 , a method for implementing communication takeover according to an embodiment of the present invention includes: A1, a primary processing unit, and a standby processing unit synchronously receive a routing protocol packet from a neighboring router;
本实施例中, 所述主用处理单元和备用处理单元同步接收路由协议 报文可以是先由报文接收单元接收来自邻居路由器的路由协议报文后, 以组播方式向主用处理单元和备用处理单元同时发送, 主用处理单元和 备用处理单元被看作是组播组内的成员。  In this embodiment, the primary processing unit and the standby processing unit receive the routing protocol message synchronously, and the packet receiving unit receives the routing protocol packet from the neighboring router, and then multicasts to the primary processing unit and The standby processing unit is simultaneously transmitted, and the primary processing unit and the standby processing unit are regarded as members of the multicast group.
本实施例中, 所述路由协议为 OSPF协议, 同样的, 本发明方法还可 以应用于其他路由协议, 本方法强调的是实现对通信功能的冗余备份, 具体的路由协议不构成对本发明的限制。  In this embodiment, the routing protocol is an OSPF protocol. Similarly, the method of the present invention can also be applied to other routing protocols. The method emphasizes implementing redundant backup of the communication function, and the specific routing protocol does not constitute the present invention. limit.
本实施例中, 所述报文为链路状态通告(LSA , Link State Advertisement)报文, 可以理解的是, 在 OSPF路由协议下, 所述报文还 可以是连接(Hello)报文或数据库描述(DD: Database Description)报文或 链路状态请求(Link State Request)报文或链路状态应答(Link State Ack) 报文。  In this embodiment, the packet is a Link State Advertisement (LSA) packet. It can be understood that, in the OSPF routing protocol, the packet may also be a Hello message or a database. Description (DD: Database Description) message or Link State Request message or Link State Ack message.
本发明实施例中, 需要预先将主用处理单元和备用处理单元的初始 数据同步。 此处强调主用处理单元和备用处理单元在同步接收来自邻居 路由器的协议报文之前具有相同的本地数据。 本发明同步主用处理单元 和备用处理单元的本地数据可以是操作人员预先进行同步, 可以理解的 是, 同步的方式还可以是在备用处理单元启动时, 将主用处理单元的数 据批量备份到备用处理单元。 In the embodiment of the present invention, it is necessary to synchronize the initial data of the primary processing unit and the standby processing unit in advance. It is emphasized here that the primary processing unit and the alternate processing unit have the same local data before synchronously receiving protocol messages from neighboring routers. The local data of the synchronous primary processing unit and the standby processing unit of the present invention may be synchronized by the operator in advance, which is understandable. Alternatively, the synchronization may be performed by batch backup of the data of the primary processing unit to the standby processing unit when the standby processing unit is started.
其中, 主用处理单元和备用处理单元是对路由协议报文具有相同处 理能力的软件或硬件模块。 所述同步的本地数据可以包括配置信息、 接 口信息、 邻居路由器状态信息和链路状态信息等用于路由控制的数据。  The primary processing unit and the standby processing unit are software or hardware modules that have the same processing capability for routing protocol messages. The synchronized local data may include configuration information, interface information, neighbor router status information, and link status information, etc., for routing control.
A2, 主用处理单元和备用处理单元根据所述报文维护各自的本地数 据;  A2, the primary processing unit and the standby processing unit maintain respective local data according to the message;
主用处理单元和备用处理单元对本地数据的维护是对所述报文承载 的信息进行分析, 根据分析的结果对本地数据进行维护, 例如: 维护本 地链路状态数据库、 邻居路由器状态或请求表等。  The maintenance of the local data by the primary processing unit and the standby processing unit analyzes the information carried by the packet, and maintains the local data according to the analysis result, for example, maintaining a local link state database, a neighbor router status, or a request table. Wait.
A3 , 当主用处理单元失效时, 备用处理单元接管主用处理单元通信。 动倒换触发或预置一定时间间隔定时触发。  A3, when the primary processing unit fails, the standby processing unit takes over the primary processing unit communication. Dynamically triggers or presets a time interval to trigger.
本实施例中, 所述备用处理单元接管主用处理单元通信的倒换过程 可以釆用现有的常规实现方式, 此处不在赘述。  In this embodiment, the switching process in which the standby processing unit takes over the communication of the primary processing unit can use the existing conventional implementation manner, and details are not described herein.
实施例一通过报文接收单元同时向主用处理单元和备用处理单元发 送协议报文, 主用处理单元和备用处理单元并行工作的方式, 避免了现 有技术中, 所有的协议 ^艮文都要经过主用处理单元和备用处理单元之间 的 IPC连接, 有效地解决了现有技术中大量 IPC带宽被占用, 资源浪费 的问题, 提高了系统运行的效率。  In the first embodiment, the message receiving unit sends the protocol message to the main processing unit and the standby processing unit at the same time, and the main processing unit and the standby processing unit work in parallel, thereby avoiding all the protocols in the prior art. To pass the IPC connection between the primary processing unit and the standby processing unit, the problem that a large amount of IPC bandwidth is occupied and resources are wasted in the prior art is effectively solved, and the efficiency of the system operation is improved.
实施例二  Embodiment 2
如图 2所示, 本发明实施例提供的一种实现通信接管的方法, 包括: B1 , 主用处理单元和备用处理单元同步接收来自邻居路由器的 LSA 报文;  As shown in FIG. 2, a method for implementing communication takeover according to an embodiment of the present invention includes: B1, a primary processing unit and a standby processing unit synchronously receive an LSA message from a neighboring router;
本实施例中, 接收的报文为 OSPF路由协议下的 LSA报文。 态数据库;  In this embodiment, the received packet is an LSA packet in the OSPF routing protocol. State database
B3 ,备用处理单元发送收到该 LSA报文的响应消息给主用处理单元; B4 , 主用处理单元收到来自备用处理单元的响应消息; B5 , 主用处理单元根据所述 LSA报文更新主用处理单元本地链路状 态数据库; B3. The standby processing unit sends a response message that receives the LSA message to the primary processing unit. B4. The primary processing unit receives the response message from the standby processing unit. B5. The primary processing unit updates the primary processing unit local link state database according to the LSA message.
Β6 , 主用处理单元向所述邻居路由器发送收到所述 LSA报文的应答 报文;  Β6, the primary processing unit sends a response packet that receives the LSA packet to the neighboring router;
Β7, 主用处理单元运行 SPF算法计算出达到目的地的最佳路径并根 据这些路径更新路由表和转发表;  Β7, the main processing unit runs the SPF algorithm to calculate the best path to reach the destination and update the routing table and forwarding table according to the paths;
Β8, 当主用处理单元失效时, 备用处理单元接管主用处理单元通信。 本实施例中, 步骤 Β5与步骤 Β4以及步骤 Β7与步骤 Β4并无绝对的 时间顺序。 具体的执行顺序并不能理解为对本发明的限制。 此处强调的 是步骤 Β6在步骤 Β4和步骤 Β5之后, 也就是主用处理单元收到该 LSA 报文并且收到备用处理单元发送的收到该 LSA报文的响应消息之后再给 邻居路由器发送收到该 LSA报文的应答报文。 其目的是保证在主用处理 单元和备用处理单元都收到邻居路由器发送过来的报文后再发送应答。 在具有重传机制的网络中, 若邻居路由器未收到所述应答报文, 会再次 发送所述 LSA "^艮文。  Β 8. When the primary processing unit fails, the standby processing unit takes over the primary processing unit communication. In this embodiment, there is no absolute time sequence for step Β5 and step Β4 and steps Β7 and Β4. The specific order of execution is not to be construed as limiting the invention. It is emphasized here that step Β6 is sent to the neighboring router after step Β4 and step ,5, that is, the primary processing unit receives the LSA message and receives the response message sent by the standby processing unit to receive the LSA message. Received a response packet from the LSA packet. The purpose is to ensure that both the primary processing unit and the standby processing unit receive a response from the neighbor router before sending a response. In a network with a retransmission mechanism, if the neighboring router does not receive the response packet, the LSA "" message is sent again.
实施例二与实施例一的区别在于, 在报文接收单元同时向主用处理 单元和备用处理单元发送协议 文, 主用处理单元和备用处理单元并行 工作的基础上, 备用处理单元收到协议报文后, 通过发送短小的响应消 息给主用处理单元, 可以确保主用处理单元和备用处理单元本地数据的 同步更新, 使倒换过程的可靠性更高。  The difference between the second embodiment and the first embodiment is that, when the message receiving unit simultaneously sends the protocol text to the main processing unit and the standby processing unit, and the main processing unit and the standby processing unit work in parallel, the standby processing unit receives the protocol. After the message, by sending a short response message to the primary processing unit, the local data of the primary processing unit and the standby processing unit can be updated synchronously, so that the reliability of the switching process is higher.
对于每一个接收到的 LSA报文, 如果备用处理单元确定本地路由器 将所述报文向某个邻居路由器进行洪泛, 则备用处理单元将所述 LSA报 文放到本地记录的该邻居路由器的重传表里; 当备用处理单元接收到来 自该邻居路由器对这个 LSA报文的应答报文时,将所述 LSA报文从本地 记录的该邻居路由器的重传表中删除。  For each received LSA message, if the standby processing unit determines that the local router floods the message to a neighboring router, the standby processing unit places the LSA message to the locally recorded neighbor router. In the retransmission table, when the standby processing unit receives the response message from the neighboring router to the LSA packet, the LSA packet is deleted from the retransmission table of the neighboring router recorded locally.
实施例三  Embodiment 3
如图 3所示, 本发明实施例提供的一种实现通信接管的方法, 包括: C1 , 主用处理单元和备用处理单元同步接收来自邻居路由器的 Hello 报文; 本实施例中, 接收的报文为 OSPF路由协议下的 Hello报文; 所述邻居路由器的状态信息; As shown in FIG. 3, a method for implementing a communication takeover according to an embodiment of the present invention includes: C1, a primary processing unit and a standby processing unit synchronously receive a Hello message from a neighboring router; In this embodiment, the received packet is a Hello packet in the OSPF routing protocol; the state information of the neighboring router;
本发明应用 OSPF协议, 邻居路由器的状态包括:  The invention applies the OSPF protocol, and the status of the neighboring router includes:
停机 (Down)状态、企图(Attempt)状态、初始 (Init)状态、双向(2 - way) 状态、 交换开始(ExStart)状态、 交换(Exchange)状态、 装载( Loading) 状 态、 完全连接 (Full)状态。 所述邻居路由器的状态信息;  Down state, Attempt state, Init state, 2 - way state, ExStart state, Exchange state, Loading state, Full connection (Full) status. Status information of the neighbor router;
C4, 当主用处理单元失效时, 备用处理单元接管主用处理单元通信。 启动倒换触发或预置一定时间间隔定时触发。  C4, when the primary processing unit fails, the standby processing unit takes over the primary processing unit communication. Start the trigger trigger or preset the time interval to trigger.
实施例三是对 Hello报文的处理方式, 备用处理单元如果要对 Hello 报文进行处理, 则需要运行有关邻居路由器的 Hello定时器和 Dead定时 器,通过接收到邻居路由器的 Hello报文的内容和时间间隔以及接口状态 变化确定邻居路由器的状态并进行记录。 本实施例强调的是备用处理单 元对于 Hello报文的处理能力,在此,步骤 C2与步骤 C3 ,并无绝对顺序。 也可以先进行步骤 C3 ,后进行步骤 C2, 具体步骤的先后顺序不构成对本 发明的限制。  The third embodiment is to process the Hello packet. If the standby processing unit is to process the Hello packet, the Hello timer and the Dead timer of the neighboring router are required to receive the Hello packet. And the time interval and interface state changes determine the status of the neighbor router and record. This embodiment emphasizes the processing capability of the standby processing unit for Hello messages. Here, there is no absolute order in steps C2 and C3. Step C3 may also be performed first, followed by step C2. The order of the specific steps does not constitute a limitation of the present invention.
实施例四  Embodiment 4
如图 4所示, 本发明实施例提供的一种实现通信接管的方法, 包括: D1 , 主用处理单元和备用处理单元同步接收来自邻居路由器的 DD 报文;  As shown in FIG. 4, a method for implementing a communication takeover according to an embodiment of the present invention includes: D1, a primary processing unit and a standby processing unit synchronously receive a DD packet from a neighboring router;
本实施例中, 接收的报文为 OSPF路由协议下的 DD报文。  In this embodiment, the received packet is a DD packet in the OSPF routing protocol.
D2, 备用处理单元根据所述 DD报文维护备用处理单元本地记录的 所述邻居路由器的请求表以及该邻居路由器的状态信息;  D2. The standby processing unit maintains, according to the DD packet, a request table of the neighbor router recorded by the standby processing unit and status information of the neighbor router.
备用处理单元维护所述邻居路由器的请求表的过程为:将 DD报文中 的每一个 LSA描述信息与备用处理单元链路状态数据库中对应的 LSA进 行比较; 若所述 LSA描述信息比链路状态数据库中对应的 LSA新,则备 用处理单元将所述 LSA描述信息放到该邻居路由器的请求表中; 当备用 处理单元收到来自所述邻居路由器的所述 LSA描述信息对应的 LSA报文 时, 将所述 LSA描述信息从所述邻居路由器的请求表中删除。 The process of maintaining the request table of the neighboring router by the standby processing unit is: comparing each LSA description information in the DD packet with the corresponding LSA in the link state database of the standby processing unit; if the LSA description information is more than the link The corresponding LSA in the state database is new. The LSA description information is placed in the request table of the neighboring router by the processing unit; when the standby processing unit receives the LSA message corresponding to the LSA description information of the neighboring router, the LSA description information is The request table of the neighbor router is deleted.
D3 ,备用处理单元发送收到该 DD报文的响应消息给主用处理单元; D4, 主用处理单元收到来自备用处理单元的响应消息;  D3, the standby processing unit sends a response message to the primary processing unit to receive the DD packet; D4, the primary processing unit receives the response message from the standby processing unit;
D5, 主用处理单元根据所述 DD ^艮文维护主用处理单元本地记录的 所述邻居路由器的请求表以及该邻居路由器的状态信息;  D5. The primary processing unit maintains, according to the DD, a request table of the neighbor router locally recorded by the primary processing unit, and status information of the neighbor router.
D6 , 主用处理单元为该数据库描述报文给所述邻居路由器发送收到 该数据库描述报文的应答报文;  D6. The primary processing unit sends, to the neighboring router, the response message of the database description packet to the database description packet.
D7, 当主用处理单元失效时, 备用处理单元接管主用处理单元通信。 实施例四体现的是本发明对 DD报文的处理方式,对 DD报文的处理 使得在实现倒换后, 对未收到的 DD报文, 邻居路由器将重传, 使无缝化 的倒换过程更完美。  D7, when the primary processing unit fails, the standby processing unit takes over the primary processing unit communication. Embodiment 4 embodies the processing method of the DD packet in the present invention. After the DD packet is processed, the neighbor router will retransmit the DD packet that is not received, so that the seamless switching process is performed. more perfect.
实施例三和实施例四根据 Hello报文和 DD报文对本地记录的邻居路 由器的状态信息进行维护。 可以理解的是, 备用处理单元获得邻居路由 器状态信息的方式还可以釆用当主用处理单元判断邻居路由器状态发生 变化时, 则通过主用处理单元和备用处理单元之间的 IPC连接, 将邻居 路由器的状态变化通知给备用处理单元。 此种方式备用处理单元可以不 运行相关的定时器, 但是要占用稍多的 IPC带宽资源。 具体如何实现技 术人员可以根据系统的实际情况自行选择处理方式。  In the third embodiment and the fourth embodiment, the status information of the locally recorded neighbor router is maintained according to the Hello packet and the DD packet. It can be understood that the manner in which the standby processing unit obtains the neighbor router state information may also be used when the primary processing unit determines that the state of the neighboring router changes, and then the neighboring router is connected through the IPC connection between the primary processing unit and the standby processing unit. The status change is notified to the alternate processing unit. In this way, the standby processing unit may not run the relevant timer, but it takes up a little more IPC bandwidth resources. Specifically, how to implement the technology can choose the processing method according to the actual situation of the system.
上述实施例二至实施例四对本发明应用 OSPF协议,对 OSPF协议下 的 LSA报文、 Hello报文和 DD报文的处理方式进行了描述。 对 LSA报 文和 DD报文的处理方式与常规处理流程相比增加了从备用处理单元发 送收到 LSA报文和 DD报文的响应消息, 目的是使主用处理单元和备用 处理单元根据收到的报文更新本地数据并使它们保持一致, 为倒换做好 准备。  The OSPF protocol is applied to the OSPF protocol, and the processing modes of the LSA packet, the Hello packet, and the DD packet in the OSPF protocol are described. The processing of the LSA packet and the DD packet is compared with the conventional processing procedure, and the response message sent by the standby processing unit to the received LSA packet and the DD packet is added, so that the primary processing unit and the standby processing unit are configured to receive the response message. The incoming message updates the local data and keeps them consistent, ready for the switchover.
为了本发明实施例提供的方案更加完善, 若主用处理单元收到报文 接收单元组播的 LSA报文和 DD报文后, 在预置时间之内未收到来自备 用处理单元收到所述 ^艮文的响应消息的意外情况时, 主用处理单元则通 过主用处理单元和备用处理单元之间的 IPC发送所述 ^艮文给备用处理单 元并产生一个报警信息, 提示用户备用处理单元可能运行不正常。 The solution provided by the embodiment of the present invention is more complete. If the primary processing unit receives the LSA message and the DD message that are multicast by the packet receiving unit, the primary processing unit does not receive the received data from the standby processing unit within the preset time. When the response message of the message is described, the main processing unit passes The IPC between the primary processing unit and the standby processing unit sends the message to the standby processing unit and generates an alarm message, prompting the user that the standby processing unit may be malfunctioning.
若主用处理单元收到来自备用处理单元收到所述 LSA报文和 DD报 文的响应消息, 而在预置时间之内未收到所述的报文, 则主用处理单元 向备用处理单元请求所述报文; 备用处理单元接收到主用处理单元的请 求后, 通过主用处理单元和备用处理单元之间的 IPC连接发送所述报文 给主用处理单元, 并产生一个报警信息, 提示用户主用处理单元可能运 行不正常。  If the primary processing unit receives the response message from the standby processing unit that receives the LSA message and the DD message, and does not receive the message within the preset time, the primary processing unit processes the backup. The unit requests the message; after receiving the request from the primary processing unit, the standby processing unit sends the message to the primary processing unit through an IPC connection between the primary processing unit and the standby processing unit, and generates an alarm message. , prompting the user that the main processing unit may not work properly.
上述实施例二至实施例四中, 在主用处理单元和备用处理单元通过 数据批量备份或其它方式完成初始数据同步后若主用处理单元发生局部 状态变化, 则传送所述局部状态变化信息给备用处理单元, 所述备用处 理单元的本地数据还根据所述局部状态变化信息来维护。  In the foregoing Embodiment 2 to Embodiment 4, after the primary processing unit and the standby processing unit complete the initial data synchronization by data batch backup or other manner, if the primary processing unit changes local state, the local state change information is transmitted to The standby processing unit, the local data of the standby processing unit is further maintained according to the local state change information.
所述局部状态变化信息包括: 主板配置变化信息、 接口状态变化信 息和邻居路由器状态变化信息。 当主用处理单元发生配置变化或接口状 态变化或邻居路由器状态变化时, 通过主用处理单元和备用处理单元之 间的 IPC连接发送局部状态变化信息给备用处理单元, 备用处理单元根 据所述局部状态变化信息维护本地数据, 以保证与主用处理单元的数据 保持一致。 因为所述局部状态变化发生概率相对较低并且信息量较少, 所以对于 IPC带宽资源占用很小, 用户不必担心 IPC带宽被占用过多的 问题。  The local state change information includes: a motherboard configuration change information, an interface state change information, and a neighbor router state change information. When the primary processing unit changes configuration or the interface state changes or the neighbor router state changes, the local state change information is sent to the standby processing unit through the IPC connection between the primary processing unit and the standby processing unit, and the standby processing unit is configured according to the local state. The change information maintains local data to ensure consistency with the data of the primary processing unit. Since the probability of occurrence of the local state change is relatively low and the amount of information is small, the occupancy of the IPC bandwidth resource is small, and the user does not have to worry about the problem that the IPC bandwidth is occupied too much.
备用处理单元接管主用处理单元通信的过程称为倒换, 本发明的倒 换方式可以分为无计划的倒换和有计划的倒换, 所述无计划的倒换和有 计划的倒换可以应用于上述实施例二至实施例四的倒换过程中。  The process in which the standby processing unit takes over the communication of the primary processing unit is called switching, and the switching mode of the present invention can be divided into unplanned switching and planned switching, and the unplanned switching and planned switching can be applied to the above embodiment. Second, to the switching process of the fourth embodiment.
请参阅图 5 , 本发明实施例提供的方法应用 OSPF协议时无计划倒换 的流程, 具体包括:  Referring to FIG. 5, the process of the OSPF protocol is applied to the method provided by the embodiment of the present invention, and includes:
rl , 备用处理单元从接口层读入所有网络接口信息;  Rl, the standby processing unit reads all network interface information from the interface layer;
r2, 进行主备切换, 备用处理单元代替主用处理单元;  R2, performing active/standby switching, and the standby processing unit replaces the primary processing unit;
此处的主备切换是指备用处理单元接管主用处理单元的接口。  The active/standby switch here refers to the interface of the standby processing unit to take over the active processing unit.
r3 , 对于任何一个状态不为完全连接(Full ) 的邻居路由器, 备用处 理单元与其重新建立相邻关系; R3 , for any neighbor router whose state is not fully connected (Full), alternate The unit re-establishes its neighbor relationship with it;
本实施例中, 重新建立相邻关系从停机 (Down )状态开始建立。 可以 理解的是, 若在倒换前, 备用处理单元对 DD报文做实施例四中的处理, 则此处重新建立相邻关系的方式还可以为: 对于任何一个状态不为完全 连接(Full ) 并且不为交换(Exchange ) 的邻居路由器,备用处理单元接 着其保存的状态建立相邻关系; 对于任何一个状态为交换的邻居路由器, 从交换开始 (ExStart )状态开始建立相邻关系。 这使无缝化的倒换过程 更快。 具体如何实现技术人员可以根据系统的实际情况自行选择处理方 式, 具体的处理方式不够成对本发明的限制。  In this embodiment, the reestablishment of the adjacency relationship is established from the Down state. It can be understood that, if the standby processing unit performs the processing in the fourth embodiment on the DD packet before the switching, the manner of re-establishing the neighbor relationship here may also be: For any state, it is not a full connection (Full). And not for the exchange (Exchange) neighbor router, the standby processing unit establishes the adjacency relationship according to the state it saves; for any neighbor router whose state is exchanged, the neighbor relationship is established from the ExStart state. This makes the seamless switching process faster. Specifically, how to implement the technician can select the processing mode according to the actual situation of the system, and the specific processing manner is not sufficient to limit the present invention.
r4, 启动相关定时器;  R4, start the relevant timer;
所述启动的定时器包括 Hello定时器、 Dead定时器和 LSA重传定时 哭口 o  The started timer includes a Hello timer, a Dead timer, and an LSA retransmission timing.
r5 , 根据配置引入其他协议的路径并且重新产生源于本地路由器的 LSA报文;  R5, the path of the other protocol is imported according to the configuration, and the LSA packet originating from the local router is regenerated;
r6, 备用处理单元运行 SPF 算法计算出达到目的地的最佳路径并根 据这些路径更新路由表和转发表。  R6, the standby processing unit runs the SPF algorithm to calculate the best path to the destination and update the routing table and forwarding table based on these paths.
无计划的倒换一般针对软硬件故障触发主用处理单元失效, 主用处 理单元无法正常工作的情况。  Unplanned switching generally triggers failure of the primary processing unit for hardware and software failures, and the primary processing unit is not working properly.
请参阅图 6 , 本发明实施例提供的方法应用 OSPF协议时有计划倒换 的流程图, 具体包括:  Referring to FIG. 6, a flowchart of a planned switching when the OSPF protocol is applied to the method provided by the embodiment of the present invention includes:
si , 备用处理单元从接口层读入所有网络接口信息;  Si , the standby processing unit reads all network interface information from the interface layer;
s2,主用处理单元和备用处理单元等待所有邻居路由器状态成为完全 连接 ( Full );  S2, the primary processing unit and the standby processing unit wait for all neighbor router states to become fully connected (Full);
可以理解的是, 若主用处理单元或备用处理单元在等待预置的时间 后, 所有邻居路由器状态仍不能成为完全连接(Full ), 则可以釆用类似 无计划倒换的步骤进行倒换, 具体过程参照图 6步骤 r2至步骤 r6。  It can be understood that if the primary processing unit or the standby processing unit waits for the preset time, and all the neighbor router states cannot be completely connected (Full), the steps similar to the unplanned switching can be used for the switching, the specific process. Referring to step r2 to step r6 of Fig. 6.
s3 , 进行主备切换, 备用处理单元代替主用处理单元。  S3, the active/standby switchover is performed, and the standby processing unit replaces the active processing unit.
s4,备用处理单元用从主用处理单元得到的定时器的剩余时间设置并 启动相关的定时器; s5 , 根据配置引入其他协议的路径并且重新产生源于本地路由器的 LSA报文; S4, the standby processing unit sets and starts an associated timer with the remaining time of the timer obtained from the main processing unit; S5, the path of the other protocol is imported according to the configuration, and the LSA packet originating from the local router is regenerated;
s6, 备用处理单元运行 SPF算法计算出达到目的地的最佳路径并根 据这些路径更新路由表和转发表。  S6, the standby processing unit runs the SPF algorithm to calculate the best path to the destination and update the routing table and forwarding table based on these paths.
有计划的倒换一般针对主用处理单元可以正常工作的情况下, 人为 执行倒换触发主用处理单元失效或用户预置一定时间间隔定时触发主用 处理单元失效的情况, 可以使备用处理单元接管主用处理单元的过程更 平滑。  The planned switching is generally performed in the case that the main processing unit can work normally, and the artificial execution switching triggers the failure of the main processing unit or the user presets a certain time interval to trigger the failure of the main processing unit, so that the standby processing unit can take over the main The process with the processing unit is smoother.
上述无计划的倒换和有计划的倒换过程中, 各个步骤之间并无绝对 的时间顺序, 甚至一些步骤可以同时执行, 只要满足倒换的需求即可, 具体的执行顺序并不能理解为对本发明的限制。  In the above-mentioned unplanned switching and planned switching process, there is no absolute time sequence between the steps, and even some steps can be performed at the same time, as long as the requirements of the switching are satisfied, the specific execution order is not to be understood as the limit.
实施例五  Embodiment 5
本发明实施例中提供的一种实现通信接管的装置,装置结构图如图 7 所示, 包括 4艮文接收单元 100、 主用处理单元 200、 备用处理单元 300和 主备控制单元 400, 所述主备控制单元 400: 包括数据备份控制单元 410 和接管控制单元 420。  An apparatus for implementing communication takeover is provided in the embodiment of the present invention. The device structure diagram is as shown in FIG. 7, and includes a receiving unit 100, a main processing unit 200, a standby processing unit 300, and an active/standby control unit 400. The active/standby control unit 400 includes a data backup control unit 410 and a takeover control unit 420.
数据备份控制单元 410, 用于在备用处理单元 300启动时, 控制将主 用处理单元 200的数据备份到备用处理单元 300。  The data backup control unit 410 is configured to control the backup of the data of the primary processing unit 200 to the standby processing unit 300 when the standby processing unit 300 is started.
报文接收单元 100 , 用于接收来自邻居路由器的路由协议报文, 并向 主用处理单元 200和备用处理单元 300同时发送所述 4艮文。  The message receiving unit 100 is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary processing unit 200 and the standby processing unit 300.
本实施例中, 所述 4艮文接收单元 100 以组播形式发送^艮文, 主用处 理单元 200和备用处理单元 300被看作时组播组内的成员。  In this embodiment, the receiving unit 100 transmits the message in multicast form, and the primary processing unit 200 and the standby processing unit 300 are regarded as members in the multicast group.
备用处理单元 300 , 用于为主用处理单元提供路由保护,备用处理单 元 300接收到报文接收单元 100组播的路由协议报文后, 根据所述报文 维护备用处理单元 300的本地数据。  The backup processing unit 300 is configured to provide routing protection for the primary processing unit. After receiving the routing protocol message multicast by the packet receiving unit 100, the standby processing unit 300 maintains the local data of the standby processing unit 300 according to the packet.
主用处理单元 200 , 用于提供路由器的主要路由功能; 主用处理单元 接收到报文接收单元 100 组播的路由协议报文后, 根据所述报文维护主 用处理单元 200的本地数据。  The primary processing unit 200 is configured to provide a primary routing function of the router. After receiving the routing protocol packet that is received by the packet receiving unit 100, the primary processing unit maintains the local data of the primary processing unit 200 according to the packet.
接管控制单元 420 , 用于当主用处理单元 200失效时, 控制备用处理 单元 300接管主用处理单元 200通信。 The takeover control unit 420 is configured to control the standby process when the main processing unit 200 fails Unit 300 takes over communication with the primary processing unit 200.
实施例六  Embodiment 6
本发明实施例中提供的一种实现通信接管的装置,装置结构图如图 8 所示, 包括 4艮文接收单元 100、 主用处理单元 200、 备用处理单元 300和 主备控制单元 400。 所述主用处理单元 200包括: 主用接收单元 210、 主 用数据维护单元 220、 响应消息接收单元 230、 主用报文转发单元 240和 请求单元 250; 所述备用处理单元 300包括: 备用接收单元 310、 备用数 据维护单元 320、 响应消息发送单元 330和备用 文转发单元 340。  An apparatus for implementing communication takeover is provided in the embodiment of the present invention. The device structure diagram is as shown in FIG. 8, and includes a receiving unit 100, a main processing unit 200, a standby processing unit 300, and an active/standby control unit 400. The primary processing unit 200 includes: a primary receiving unit 210, a primary data maintaining unit 220, a response message receiving unit 230, an active message forwarding unit 240, and a requesting unit 250; the standby processing unit 300 includes: The unit 310, the backup data maintenance unit 320, the response message transmitting unit 330, and the alternate text forwarding unit 340.
下面对各单元的进行详细介绍。  The details of each unit are described below.
报文接收单元 100 , 用于接收来自邻居路由器的路由协议报文, 并向 主用处理单元 200上的主用接收单元 210和备用处理单元 300上的备用 接收单元 310同时发送所述报文。  The message receiving unit 100 is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary receiving unit 210 on the primary processing unit 200 and the standby receiving unit 310 on the standby processing unit 300.
备用接收单元 310 , 用于接收报文接收单元 100发送的协议报文; 还 用于接收主用报文转发单元 240转发的报文。  The standby receiving unit 310 is configured to receive the protocol packet sent by the packet receiving unit 100, and is further configured to receive the packet forwarded by the primary packet forwarding unit 240.
备用数据维护单元 320,用于根据备用接收单元 310接收的报文维护 本地数据;  The backup data maintenance unit 320 is configured to maintain local data according to the message received by the standby receiving unit 310.
响应消息发送单元 330,用于在备用数据维护单元 320根据接收的报 文维护本地数据后, 发送收到所述报文的响应消息给响应消息接收单元 230;  The response message sending unit 330 is configured to: after the standby data maintenance unit 320 maintains the local data according to the received message, send a response message to the response message receiving unit 230;
主用接收单元 210 , 用于接收报文接收单元 100发送的协议报文; 还 用于接收备用报文转发单元 340转发的报文。  The primary receiving unit 210 is configured to receive the protocol packet sent by the packet receiving unit 100, and is further configured to receive the packet forwarded by the standby packet forwarding unit 340.
主用数据维护单元 220,用于在响应消息接收单元 230收到所述响应 消息后根据主用接收单元 210接收的报文维护本地数据;  The primary data maintenance unit 220 is configured to maintain local data according to the message received by the primary receiving unit 210 after the response message receiving unit 230 receives the response message;
响应消息接收单元 230,接收来自响应消息发送单元 320发送的收到 报文的响应消息;  The response message receiving unit 230 receives the response message from the received message sent by the response message sending unit 320;
主用报文转发单元 240, 用于在主用接收单元 210收到报文后, 当在 预置时间内响应消息接收单元 230未收到响应消息发送单元 330发送的 收到所述报文的响应消息时, 发送所述报文给备用接收单元 310 , 并向用 户产生一个报警信息。 请求单元 250 ,用于在响应消息接收单元 230收到来自响应消息发送 单元 330发送的收到报文的响应消息后, 当在预置时间之内主用接收单 元 210未收到 ^艮文接收单元 100发送来的所述 文时, 向备用转发单元 340请求所述 ^艮文; The primary message forwarding unit 240 is configured to: after the primary receiving unit 210 receives the message, when the response message receiving unit 230 does not receive the received message sent by the response message sending unit 330 within the preset time In response to the message, the message is sent to the alternate receiving unit 310 and an alert message is generated to the user. The requesting unit 250 is configured to: after the response message receiving unit 230 receives the response message from the received message sent by the response message sending unit 330, the primary receiving unit 210 does not receive the received message within the preset time. When the message sent by the unit 100 is sent to the alternate forwarding unit 340, the message is requested;
备用 文转发单元 340, 用于在收到主用处理单元的请求后, 发送请 求单元 250请求的报文给主用接收单元 210, 并产生一个报警信息。  The standby forwarding unit 340 is configured to send the message requested by the requesting unit 250 to the primary receiving unit 210 after receiving the request from the primary processing unit, and generate an alarm message.
本领域技术人员可以理解, 上述实施例中的全部或部分单元或各步 骤是可以通过程序来指令相关硬件来实现, 所述程序可存储于计算机可 读取存储介质中, 所述存储介质, 如 ROM/RAM、 磁盘、 光碟等。 或者 将它们分别制作成各个集成电路模块, 或者将它们中的多个单元或步骤 制作成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬 件和软件结合。  It will be understood by those skilled in the art that all or part of the units or steps in the foregoing embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, such as a storage medium, such as ROM/RAM, disk, CD, etc. Alternatively, they may be fabricated into individual integrated circuit modules, or a plurality of units or steps thereof may be fabricated as a single integrated circuit module. Thus, the invention is not limited to any particular combination of hardware and software.
上述实施例是用于说明和解释本发明的原理的。 本发明的具体实施 方式不限于此。 对于本领域技术人员而言, 在不脱离本发明的实质和范 围的前提下进行的各种变更和修改均涵盖在本发明的保护范围之内。 因 此, 本发明的保护范围由权利要求确定。  The above embodiments are intended to illustrate and explain the principles of the invention. The specific embodiments of the present invention are not limited thereto. Various changes and modifications may be made without departing from the spirit and scope of the invention. Accordingly, the scope of the invention is defined by the claims.

Claims

权 利 要 求 Rights request
1. 一种实现通信接管的方法, 其特征在于, 包括: A method for implementing a communication takeover, comprising:
主用处理单元和备用处理单元同步接收来自邻居路由器的路由协议 报文;  The primary processing unit and the standby processing unit synchronously receive routing protocol packets from the neighboring routers;
所述主用处理单元和所述备用处理单元根据所述路由协议报文维护 各自的本地数据;  The primary processing unit and the standby processing unit maintain respective local data according to the routing protocol message;
当所述主用处理单元失效时, 所述备用处理单元接管所述主用处理 单元。  When the primary processing unit fails, the standby processing unit takes over the primary processing unit.
2. 如权利要求 1所述的实现通信接管的方法, 其特征在于, 所述主 用处理单元和备用处理单元根据所述路由协议报文维护各自的本地数据 的过程包括:  2. The method for implementing communication takeover according to claim 1, wherein the process of maintaining the local data by the primary processing unit and the standby processing unit according to the routing protocol message comprises:
备用处理单元根据所述路由协议报文维护备用处理单元本地数据; 备用处理单元发送收到所述路由协议报文的响应消息给主用处理单 主用处理单元收到所述响应消息后, 根据所述报文维护主用处理单 元本地数据, 并给相邻路由器发送所收到路由协议报文的应答报文。  The standby processing unit maintains the standby processing unit local data according to the routing protocol message; the standby processing unit sends a response message that receives the routing protocol message to the primary processing unit, and the primary processing unit receives the response message, according to the The packet maintains local data of the primary processing unit, and sends a response packet of the received routing protocol packet to the neighboring router.
3. 如权利要求 2所述的方法, 其特征在于, 进一步包括: 如果主用处理单元收到所述路由协议报文后, 在预置时间内未收到 来自备用处理单元收到所述路由协议报文的响应消息, 则发送所述路由 协议报文给备用处理单元并产生报警信息。  The method according to claim 2, further comprising: if the primary processing unit receives the routing protocol message, does not receive the received route from the standby processing unit within a preset time The response message of the protocol message sends the routing protocol message to the standby processing unit and generates alarm information.
4. 如权利要求 2所述的方法, 其特征在于, 进一步包括: 如果主用处理单元收到来自备用处理单元收到所述报文的响应消息 后, 在预置时间之内未收到所述路由协议报文, 则  The method according to claim 2, further comprising: if the primary processing unit receives the response message from the standby processing unit after receiving the message, the primary processing unit does not receive the received message within the preset time. Routing protocol message,
主用处理单元向备用处理单元请求所述 文;  The main processing unit requests the text from the standby processing unit;
备用处理单元发送所述报文给主用处理单元, 并产生报警信息。 The standby processing unit sends the message to the primary processing unit and generates an alarm message.
5. 如权利要求 1所述的方法, 其特征在于, 所述路由协议为开放最 短路径优先路由协议; 所述报文为链路状态通告报文;The method of claim 1, wherein the routing protocol is an open shortest path first routing protocol; the packet is a link state advertisement message;
Figure imgf000017_0001
Figure imgf000017_0001
的本地数据的过程包括: 路状态数据库; The process of local data includes: Road state database;
备用处理单元在所收到的链路状态通告报文比本地数据库中相应的 链路状态通告报文新的情况下, 发送收到该链路状态通告报文的响应消 息给主用处理单元;  The standby processing unit sends a response message of receiving the link state advertisement message to the active processing unit when the received link state advertisement message is newer than the corresponding link state advertisement message in the local database;
主用处理单元收到所述响应消息, 在所收到的链路状态通告报文比 本地数据库中相应的链路状态通告报文新的情况下, 根据所述链路状态 通告报文更新主用处理单元本地链路状态数据库; 计算出到达目的地的 最佳路径并根据这些路径更新路由表和转发表。  The main processing unit receives the response message, and updates the main message according to the link state advertisement message if the received link state advertisement message is newer than the corresponding link state advertisement message in the local database. Use the processing unit local link state database; calculate the best path to the destination and update the routing table and forwarding table based on these paths.
6. 如权利要求 5所述的方法, 其特征在于, 所述主用处理单元收到 所需的备用处理单元收到该链路状态通告报文的响应消息后, 给所述邻 居路由器发送收到所述链路状态通告报文的应答报文。  The method according to claim 5, wherein the primary processing unit sends a response message to the neighboring router after receiving the response message of the link state advertisement message received by the standby processing unit. A response message to the link state advertisement message.
7. 如权利要求 5所述的方法, 其特征在于, 备用处理单元根据链路 状态通告报文维护本地数据的过程, 进一步包括:  The method of claim 5, wherein the process of maintaining the local data by the standby processing unit according to the link status advertisement message further includes:
对于每一个接收到的链路状态通告报文, 如果备用处理单元确定本 地路由器将所述报文向某个邻居路由器进行洪泛, 则备用处理单元将所 述链路状态通告报文添加到本地记录的该邻居路由器的重传表里;  For each received link state advertisement message, if the standby processing unit determines that the local router floods the message to a neighbor router, the standby processing unit adds the link state advertisement message to the local device. Recorded in the retransmission table of the neighbor router;
当备用处理单元接收到来自该邻居路由器对这个链路状态通告报文 的应答报文时, 将所述链路状态通告报文从本地记录的该邻居路由器的 重传表中删除。  When the standby processing unit receives the response message from the neighboring router to the link state advertisement packet, the link state advertisement packet is deleted from the locally recorded retransmission table of the neighbor router.
8. 如权利要求 1所述的方法, 其特征在于, 所述路由协议为开放最 短路径优先路由协议, 所述报文为连接报文;  The method according to claim 1, wherein the routing protocol is an open shortest path first routing protocol, and the packet is a connection message;
所述备用处理单元根据连接报文维护本地数据的过程包括: 备用处理单元根据所述连接报文维护备用处理单元本地记录的所述 邻居路由器的状态信息。  The process of the local processing unit for maintaining the local data according to the connection packet includes: the standby processing unit maintaining the state information of the neighboring router locally recorded by the standby processing unit according to the connection message.
9. 如权利要求 1所述的方法, 其特征在于, 所述路由协议为开放最 短路径优先路由协议, 所述路由协议报文为数据库描述报文;  The method of claim 1, wherein the routing protocol is an open shortest path first routing protocol, and the routing protocol message is a database description message;
所述主用处理单元和备用处理单元根据数据库描述报文维护各自的 本地数据的过程包括: 备用处理单元根据所述数据库描述报文维护备用处理单元本地记录 的所述邻居路由器的请求表; The process for the primary processing unit and the standby processing unit to maintain respective local data according to the database description message includes: The standby processing unit maintains a request table of the neighbor router locally recorded by the standby processing unit according to the database description message;
备用处理单元发送收到该数据库描述报文的响应消息给主用处理单 元;  The standby processing unit sends a response message that receives the database description message to the primary processing unit;
主用处理单元收到所述响应消息, 根据所述数据库描述报文维护本 地记录的所述邻居路由器的请求表以及所述邻居路由器的状态信息; 并 发送收到该数据库描述报文的应答报文给所述邻居路由器。  Receiving, by the primary processing unit, the response message, maintaining a locally recorded request table of the neighboring router and status information of the neighboring router according to the database description message; and sending a response report that receives the database description message The text is given to the neighbor router.
10. 如权利要求 9 所述的方法, 其特征在于, 所述维护备用处理单 元本地记录的所述邻居路由器的请求表的过程包括:  10. The method according to claim 9, wherein the process of maintaining the request table of the neighbor router locally recorded by the standby processing unit includes:
检查该数据库描述报文中的每一个链路状态通告描述信息是否更 新, 若是, 则备用处理单元将所述链路状态通告描述信息放到该邻居路 由器的请求表中;  Checking whether each link state advertisement description information in the database description packet is updated, and if yes, the standby processing unit puts the link state advertisement description information into the request table of the neighbor router;
当备用处理单元收到来自所述邻居路由器的所述链路状态通告描述 信息对应的链路状态通告报文时, 将所述链路状态通告描述信息从所述 邻居路由器的请求表中删除。  When the standby processing unit receives the link state advertisement message corresponding to the link state advertisement description information from the neighboring router, the link state advertisement description information is deleted from the request table of the neighbor router.
11. 如权利要求 1所述的方法, 其特征在于, 备用处理单元启动时, 将主用处理单元的数据备份到备用处理单元完成初始数据同步。  11. The method according to claim 1, wherein when the standby processing unit is started, the data of the primary processing unit is backed up to the standby processing unit to complete initial data synchronization.
12. 如权利要求 11所述的方法, 其特征在于, 完成初始数据同步后, 如果主用处理单元发生局部状态变化, 则传送所述局部状态变化信息给 备用处理单元;  12. The method according to claim 11, wherein after the initial data synchronization is completed, if the primary processing unit changes a local state, the local state change information is transmitted to the standby processing unit;
所述备用处理单元根据所述局部变化信息来维护其本地数据。  The backup processing unit maintains its local data based on the local change information.
13. 如权利要求 12所述的方法, 其特征在于, 所述局部状态变化信 息包括:  13. The method of claim 12, wherein the local state change information comprises:
配置变化信息、 接口状态变化信息和邻居路由器状态变化信息。  Configuration change information, interface status change information, and neighbor router status change information.
14. 如权利要求 5至 10任意一项所述的方法, 其特征在于,还包括: 当主用处理单元发生故障失效时, 备用处理单元接管主用处理单元 通信的过程包括步骤: The method according to any one of claims 5 to 10, further comprising: when the primary processing unit fails, the process of the standby processing unit taking over the primary processing unit communication comprises the steps of:
所述备用处理单元从接口层读入所有网络接口信息;  The standby processing unit reads all network interface information from the interface layer;
进行主备切换, 所述备用处理单元代替所述主用处理单元; 所述备用处理单元与状态不为完全连接的邻居路由器重新建立相邻 关系; Performing active/standby switching, the standby processing unit replacing the primary processing unit; The standby processing unit re-establishes adjacency relationship with a neighboring router whose state is not fully connected;
启动相关定时器;  Start the relevant timer;
根据配置引入其他协议的路径并且重新生成源于本地路由器的链路 状态通告报文;  Introduce paths of other protocols according to the configuration and regenerate link state advertisement packets originating from the local routers;
备用处理单元计算出达到目的地的最佳路径并更新路由表和转发 表。  The alternate processing unit calculates the best path to the destination and updates the routing table and forwarding table.
15. 如权利要求 5至 10任意一项所述的方法, 其特征在于,还包括: 当触发主用处理单元失效时, 备用处理单元接管主用处理单元通信 的过程包括:  The method according to any one of claims 5 to 10, further comprising: when the triggering of the main processing unit fails, the process of the standby processing unit taking over the communication of the main processing unit comprises:
备用处理单元从接口层读入所有网络接口信息;  The standby processing unit reads all network interface information from the interface layer;
等待所有邻居路由器状态成为完全连接;  Wait for all neighbor routers to become fully connected;
进行主备切换, 备用处理单元代替主用处理单元;  Performing active/standby switching, and the standby processing unit replaces the primary processing unit;
备用处理单元用从主用处理单元得到的定时器的剩余时间设置并启 动相关的定时器;  The standby processing unit sets and starts the associated timer with the remaining time of the timer obtained from the primary processing unit;
根据配置引入其他协议的路径并且重新产生源于本地路由器的链路 状态通告报文;  Introducing paths of other protocols according to the configuration and regenerating link state advertisement packets originating from the local routers;
备用处理单元计算出达到目的地的最佳路径并更新路由表和转发 表。  The alternate processing unit calculates the best path to the destination and updates the routing table and forwarding table.
16. 如权利要求 15所述的方法, 其特征在于, 等待预置的时间后, 如果仍有邻居路由器状态不能成为完全连接, 则进行如下步骤:  16. The method according to claim 15, wherein after waiting for a preset time, if the neighbor router status cannot be completely connected, the following steps are performed:
进行主备切换, 备用处理单元代替主用处理单元;  Performing active/standby switching, and the standby processing unit replaces the primary processing unit;
对于任何一个状态不为完全连接的邻居路由器, 备用处理单元与其 重新建立相邻关系;  For any neighbor router whose state is not fully connected, the standby processing unit re-establishes its neighbor relationship with it;
启动相关定时器;  Start the relevant timer;
根据配置引入其他协议的路径并且重新产生源于本地路由器的链路 状态通告报文;  Introducing paths of other protocols according to the configuration and regenerating link state advertisement packets originating from the local routers;
备用处理单元计算出达到目的地的最佳路径并根据这些路径更新路 由表和转发表。 The alternate processing unit calculates the best path to the destination and updates the routing table and forwarding table based on these paths.
17. 一种实现通信接管的装置, 包括报文接收单元、 主用处理单元、 备用处理单元和主备控制单元, 其特征在于, 17. An apparatus for implementing a communication takeover, comprising a message receiving unit, a main processing unit, a standby processing unit, and an active/standby control unit, wherein
所述报文接收单元, 用于接收来自邻居路由器的路由协议报文, 并 向主用处理单元和备用处理单元同时发送所述 4艮文;  The message receiving unit is configured to receive a routing protocol message from the neighboring router, and simultaneously send the message to the primary processing unit and the standby processing unit;
主用处理单元和备用处理单元根据所述报文维护各自的本地数据; 主备控制单元, 用于控制备用处理单元接管主用处理单元通信。 The primary processing unit and the standby processing unit maintain respective local data according to the message; the primary and secondary control unit is configured to control the standby processing unit to take over the primary processing unit communication.
18. 如权利要求 17所述的实现通信接管的装置, 其特征在于, 所述 主备控制单元包括: 18. The apparatus for implementing a communication takeover according to claim 17, wherein the active/standby control unit comprises:
接管控制单元, 用于当主用处理单元失效时, 控制备用处理单元接 管主用处理单元通信;  a takeover control unit, configured to control the standby processing unit to take over communication of the primary processing unit when the primary processing unit fails;
数据备份控制单元, 用于控制将主用处理单元的数据备份到备用处 理单元。  A data backup control unit is configured to control backup of data of the primary processing unit to the standby processing unit.
19. 如权利要求 17所述的实现通信接管的装置, 其特征在于, 所述 备用处理单元包括:  19. The apparatus for implementing communication takeover according to claim 17, wherein the standby processing unit comprises:
备用接收单元, 用于接收报文接收单元发送的协议报文;  An alternate receiving unit, configured to receive a protocol packet sent by the packet receiving unit;
备用数据维护单元, 用于根据备用接收单元接收的报文维护本地数 据;  An alternate data maintenance unit, configured to maintain local data according to the message received by the standby receiving unit;
消息发送单元, 用于在备用数据维护单元根据接收的报文维护本地 数据后, 发送收到所述报文的响应消息给消息接收单元;  a message sending unit, configured to: after the standby data maintenance unit maintains the local data according to the received message, send a response message to the message receiving unit to the message receiving unit;
所述主用处理单元包括:  The main processing unit includes:
主用接收单元, 用于接收报文接收单元发送的协议报文;  The main receiving unit is configured to receive the protocol packet sent by the message receiving unit;
消息接收单元, 接收来自消息发送单元发送的收到报文的响应消息; 主用数据维护单元, 用于在所述消息接收单元收到所述响应消息后 根据主用接收单元接收的报文维护本地数据。  a message receiving unit, configured to receive a response message of the received message sent by the message sending unit, and a primary data maintaining unit, configured to maintain, according to the message received by the primary receiving unit, after the message receiving unit receives the response message Local data.
20. 如权利要求 19所述的实现通信接管的装置, 其特征在于, 所述 主用处理单元还包括:  The device for implementing the communication takeover according to claim 19, wherein the main processing unit further comprises:
主用报文转发单元, 用于在主用接收单元收到报文后, 当在预置时 间内响应消息接收单元未收到消息发送单元发送的收到所述报文的响应 消息时, 发送所述报文给备用接收单元, 并向用户产生一个报警信息; 所述备用接收单元用于接收主用报文转发单元转发的报文。 The primary message forwarding unit is configured to: after receiving the message by the primary receiving unit, when the response message receiving unit does not receive the response message sent by the message sending unit and receives the message within the preset time, send Sending the message to the standby receiving unit, and generating an alarm message to the user; The standby receiving unit is configured to receive a packet forwarded by the primary message forwarding unit.
21. 如权利要求 19或 20所述的实现通信接管的装置, 其特征在于, 所述主用处理单元还包括:  The apparatus for implementing the communication takeover according to claim 19 or 20, wherein the main processing unit further comprises:
请求单元, 用于在消息接收单元收到来自消息发送单元发送的收到 报文的响应消息后, 当在预置时间之内主用接收单元未收到报文接收单 元发送来的所述报文时, 请求备用报文转发单元发送所述报文;  a requesting unit, configured to: after the message receiving unit receives the response message of the received message sent by the message sending unit, when the primary receiving unit does not receive the report sent by the message receiving unit within the preset time And requesting the alternate message forwarding unit to send the message;
所述备用处理单元还包括:  The backup processing unit further includes:
备用报文转发单元, 用于在收到主用处理单元的请求后, 发送相关 报文给主用接收单元, 并产生一个报警信息;  The standby message forwarding unit is configured to send a related message to the primary receiving unit after receiving the request of the primary processing unit, and generate an alarm message;
所述主用接收单元接收所述备用报文转发单元转发的报文。  The primary receiving unit receives the packet forwarded by the standby packet forwarding unit.
PCT/CN2007/070199 2006-07-26 2007-06-28 Method and apparatus for realizing communication take-over WO2008014696A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNB2006100995123A CN100420207C (en) 2006-07-26 2006-07-26 Method and apparatus for realizing communication take-over and control
CN200610099512.3 2006-07-26

Publications (1)

Publication Number Publication Date
WO2008014696A1 true WO2008014696A1 (en) 2008-02-07

Family

ID=37578724

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/070199 WO2008014696A1 (en) 2006-07-26 2007-06-28 Method and apparatus for realizing communication take-over

Country Status (2)

Country Link
CN (1) CN100420207C (en)
WO (1) WO2008014696A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980484B (en) * 2010-10-14 2016-02-10 中兴通讯股份有限公司 A kind of method and system realizing router full guard
CN102571379A (en) * 2010-12-14 2012-07-11 中兴通讯股份有限公司 Method and device for main and standby protection of packet transport networking equipment
CN102223304B (en) * 2011-06-16 2014-08-27 杭州华三通信技术有限公司 Method and device for continuously forwarding after main/standby switch
CN103200109B (en) * 2013-03-22 2016-06-29 杭州华三通信技术有限公司 A kind of ospf neighbor relationship management method and equipment
CN105591951B (en) * 2015-10-15 2018-11-09 新华三技术有限公司 The BGP message processing methods and device of pile system
CN105939295A (en) * 2015-11-16 2016-09-14 杭州迪普科技有限公司 Network protocol state synchronization method and network protocol state synchronization device
US10735248B2 (en) * 2018-02-12 2020-08-04 Futurewei Technologies, Inc. Cloudified N-way routing protection at hyper scale
CN109218206B (en) * 2018-09-04 2021-03-23 杭州迪普科技股份有限公司 Method and device for limiting link state advertisement quantity
CN115190061A (en) * 2020-06-04 2022-10-14 华为技术有限公司 Method, communication device, storage medium and system for processing routing message
CN111740914B (en) * 2020-06-18 2022-11-22 深圳市信锐网科技术有限公司 OSPF protocol message distributed processing method, system and related equipment
CN112615751B (en) * 2020-12-29 2023-09-22 北京格林威尔科技发展有限公司 Main-standby switching hot backup method and device based on routing protocol
CN115550474A (en) * 2021-06-29 2022-12-30 中兴通讯股份有限公司 Protocol high-availability protection system and protection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1494228A (en) * 2002-11-02 2004-05-05 华为技术有限公司 Method of realizing single plate main and ready change over and its circuit
CN1529459A (en) * 2003-10-16 2004-09-15 港湾网络有限公司 Main-standby rotation realizing method facing to high-side exchange board
CN1777055A (en) * 2004-11-15 2006-05-24 中兴通讯股份有限公司 Communication device host-standby switching protocol processing software synchronizing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6112315A (en) * 1997-09-24 2000-08-29 Nortel Networks Corporation Process and apparatus for reducing software failures using sparing in distributed systems
CN1286303C (en) * 2003-02-26 2006-11-22 华为技术有限公司 Backup method for Ethernet port connected to Internet protocol network
CN100454955C (en) * 2003-04-11 2009-01-21 华为技术有限公司 Stand-by of IP telephone route and recovery method
CN100461646C (en) * 2004-08-27 2009-02-11 华为技术有限公司 Method for negat main spare board in communication equipment
CN100382452C (en) * 2005-11-15 2008-04-16 中兴通讯股份有限公司 Device and method for realizing ASC

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1494228A (en) * 2002-11-02 2004-05-05 华为技术有限公司 Method of realizing single plate main and ready change over and its circuit
CN1529459A (en) * 2003-10-16 2004-09-15 港湾网络有限公司 Main-standby rotation realizing method facing to high-side exchange board
CN1777055A (en) * 2004-11-15 2006-05-24 中兴通讯股份有限公司 Communication device host-standby switching protocol processing software synchronizing method

Also Published As

Publication number Publication date
CN1889464A (en) 2007-01-03
CN100420207C (en) 2008-09-17

Similar Documents

Publication Publication Date Title
WO2008014696A1 (en) Method and apparatus for realizing communication take-over
CN110912780B (en) High-availability cluster detection method, system and controlled terminal
US7490161B2 (en) Method and system for implementing OSPF redundancy
KR101099822B1 (en) Redundant routing capabilities for a network node cluster
US6983294B2 (en) Redundancy systems and methods in communications systems
CN102904818B (en) A kind of ARP information entry updating method and device
WO2009023996A1 (en) Method for implementing network interconnect via link aggregation
US9077617B1 (en) Kernel-based TCP-layer assist for fast recovery by backup control unit of a device
WO2009089784A1 (en) Method?system and equipment for accessing network device to packet exchange network
US20090252173A1 (en) Method For Improving Efficiency Of Redundancy Protocols
WO2011157151A2 (en) Method, device and system for realizing disaster-tolerant backup
WO2012000234A1 (en) Method, apparatus and system for fast switching between links
WO2012122945A1 (en) Operating method and device for virtual network element
CN110313138B (en) Related method and apparatus for achieving high availability using multiple network elements
WO2009067865A2 (en) Method, router, line card and active master card for realizng a link state database synchronization
WO2006136088A1 (en) A method for implementing active/standby gateway device in the network and a system thereof
WO2008046358A1 (en) A method and device to realize punch-through of point-to-multipoint network link status
WO2012171378A1 (en) Method and router for preventing flow interruption caused by failover from vpls to l3
WO2011110135A2 (en) Master-standby switching method, system control unit and communication system
CN110278094B (en) Link recovery method, device, system, storage medium and electronic device
WO2012155629A1 (en) Network disaster recovery method and system
CN105939254B (en) The method and device of VRRP backup group state switching
JP3493035B2 (en) Dynamic path switching method
WO2012097604A1 (en) Method, system and gateway for processing messages when gateway has failed
JP2005354579A (en) Packet repeating device, and route selection method by originator and destination address

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: 07764128

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: RU

122 Ep: pct application non-entry in european phase

Ref document number: 07764128

Country of ref document: EP

Kind code of ref document: A1