WO2017045431A1 - 路由器平滑重启的管理方法和装置 - Google Patents

路由器平滑重启的管理方法和装置 Download PDF

Info

Publication number
WO2017045431A1
WO2017045431A1 PCT/CN2016/083180 CN2016083180W WO2017045431A1 WO 2017045431 A1 WO2017045431 A1 WO 2017045431A1 CN 2016083180 W CN2016083180 W CN 2016083180W WO 2017045431 A1 WO2017045431 A1 WO 2017045431A1
Authority
WO
WIPO (PCT)
Prior art keywords
router
lsa
packet
sent
receives
Prior art date
Application number
PCT/CN2016/083180
Other languages
English (en)
French (fr)
Inventor
何建军
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017045431A1 publication Critical patent/WO2017045431A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Definitions

  • the present application relates to, but is not limited to, the field of communications, and in particular, to a management method and apparatus for smooth restart of a router.
  • the Graceful Restart (GR) function ensures that the data forwarding layer functions normally when the routing protocol is restarted to ensure that critical services are not interrupted.
  • OSPF Open Shortest Path First
  • GR LSA State Advertisement
  • the function of sending the GR LSA before the main processor is switched is that the switching router sends a smooth restart signal to the neighboring router, requesting the neighboring router to assist itself to complete the smooth restart; the other is that the main processor switches the backup processor to work. Send the GR LSA.
  • the main processor Before the main processor switches, it knows that the neighbor information is received, so that the GR LSA can be received by the neighbor. On the contrary, when the main processor switches the backup processor to take over the main processor, all the previous neighbor information has been lost. Determine if the previous neighbor received the GR LSA.
  • the router link state advertisement (Router LSA) will be regenerated, and the previous connection to the restarting party will be deleted in the Router LSA.
  • the restarter receives a new neighbor L2 that does not have a connection to the router, it will determine that the neighbor does not assist the local end to complete the GR.
  • FIG. 1 is a schematic diagram of interaction between a neighboring router and a GR LSA sent by a restarting router in the related art.
  • the GR LSA is sent to the neighboring router to transmit the local GR signal. I hope the neighbor can help.
  • ROUTER 1 sends a certain number of GR LSAs, it starts to send HELLO packets.
  • ROUTER2 does not receive the GR LSAs sent by ROUTER 1 due to link propagation.
  • ROUTER 2 will not assist ROUTER 1 to complete the GR. It will re-delete the Router LSA that points to the ROUTER 1 connection.
  • ROUTER 1 receives ROUTER 2 At the time of the Router LSA, it was judged that ROUTER 2 did not assist the local completion of the GR at all, and ROUTER 1 immediately exited the GR.
  • the time that the local end is removed from the GR is delayed, and the convergence speed of the route is reduced.
  • This document provides a management method and device for router smooth restart, which solves the shortcomings of the restarter route to determine whether the neighbor router assists the local end to complete the GR operation lag.
  • a management method for smooth restart of a router includes:
  • the first router After the first router is configured to notify the second router to perform the graceful restart of the GR, the first router acquires the packet sent by the second router.
  • the first router determines, according to the packet sent by the second router, whether the second router receives the notification sent by the first router, and obtains a determination result
  • the first router is controlled to end the GR operation.
  • the acquiring the packet sent by the second router includes:
  • the first router determines, according to the packet sent by the second router, whether the second router receives the notification sent by the first router, and obtains a determination result, including:
  • the second router is in the negotiation phase of the database interaction, if the obtained packet is a DD packet sent by the second router, check whether the flag bit O in the option field of the DD packet is set, if If the flag bit O is not set, the result of the determination is that the second router does not receive the notification sent by the first router; or
  • the packet is an LSR packet sent by the second router, and the description information of the link state advertisement LSA in the LSR packet is obtained. If the description information of the LSA is the GR LSA of the first router, The obtained determination result is that the second router does not receive the notification sent by the first router; or
  • the first router determines, according to the LSA in the DD packet, that the second router is in a database digest packet exchange phase, if the obtained packet is a DD packet sent by the second router, Whether the second router receives the GR LSA of the first router or the Router LSA of the first router, after the first router processes the last DD packet sent by the second router, if not determined If the second router receives the GR LSA of the first router or the Router LSA of the first router, the determined result is that the second router does not receive the notification sent by the first router.
  • the first router determines, according to the LSA in the DD packet, whether the second router receives the GR LSA of the first router or the Router LSA of the first router, and is obtained by: of:
  • the LSA is the GR LSA of the first router and the first router records the information of the LSA, determining that the second router receives the GR LSA of the first router; or
  • the LSA is the Router LSA of the first router, it is determined that the second router receives the Router LSA of the first router.
  • the method further includes: if the first router does not have the information of the LSA in the DD packet sent by the second router, or the update information of the LSA, the first router sends the information to the first router The second router requests information of the LSA.
  • a management device for smoothly restarting a router comprising:
  • Obtaining a module configured to: after the first router notifies the second router to assist the first router to perform a graceful restart of the GR, acquiring the packet sent by the second router;
  • a determining module configured to: determine, according to the packet sent by the second router, whether the second router receives the notification sent by the first router, and obtain a determination result
  • a control module configured to: if the determination result is that the second router does not receive the notification of the first router, control the first router to end the GR operation.
  • the acquiring module is configured to: obtain a database summary description DD packet and/or a link state request LSR packet sent by the second router.
  • the determining module is configured to:
  • the second router is in the negotiation phase of the database interaction, if the obtained packet is a DD packet sent by the second router, check whether the flag bit O in the option field of the DD packet is set, if If the flag bit O is not set, the result of the determination is that the second router does not receive the notification sent by the first router; or
  • the second router is in the database summary description packet interaction phase, if the obtained packet is an LSR packet sent by the second router, the description information of the link state advertisement LSA in the LSR packet is obtained. If the description information of the LSA is the request for the GR LSA of the first router, the obtained determination result is that the second router does not receive the notification sent by the first router; or
  • the second router is in the database digest packet exchange phase, if the obtained packet is a DD packet sent by the second router, determine whether the second router is determined according to the LSA in the DD packet. Receiving the GR LSA of the first router or the Router LSA of the first router, after the first router processes the last DD packet sent by the second router, if the second When the router receives the GR LSA of the first router or the Router LSA of the first router, the obtained determination result is that the second router does not receive the notification sent by the first router.
  • the determining module is configured to: determine, according to the LSA in the DD packet, whether the second router receives the GR LSA of the first router or the Router LSA of the first router according to the LSA in the DD packet ,include:
  • the LSA is the GR LSA of the first router and the first router records the information of the LSA, determining that the second router receives the GR LSA of the first router; or
  • the LSA is the Router LSA of the first router, it is determined that the second router receives the Router LSA of the first router.
  • the device further includes:
  • the requesting module is configured to: if the first router does not have the information of the LSA in the DD packet sent by the second router, or the update information of the LSA, request the information about the LSA from the second router .
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the above method.
  • the embodiment of the present invention provides an implementation manner of quickly detecting and exiting a smooth restart after the active/standby switchover of the router.
  • the second router can quickly determine whether the second router assists the first router to complete the GR. If the neighbor does not assist the restarter to complete the GR operation, the restarter can exit the smooth restart process in advance, which overcomes the shortcoming of the restarter route to determine whether the neighbor router assists the local end to complete the GR operation lag, and speeds up the route convergence.
  • FIG. 1 is a schematic diagram of interaction between a neighboring router and a GR LSA sent by a restarting router;
  • FIG. 2 is a flowchart of a method for managing a smooth restart of a router according to an embodiment of the present invention
  • FIG. 3 is a flowchart of determining, by the first router, a DD packet when the second router is in an exstart state according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of processing a DD packet by a first router when a second router is in an exchange state according to an embodiment of the present invention
  • FIG. 5 is a flowchart of determining, by the first router, an LSR packet when the second router is in an exchange state according to an embodiment of the present disclosure
  • FIG. 6 is a flowchart of determining, by the first router, the last DD packet of the neighbor when the second router is in the exchange state according to the embodiment of the present invention
  • FIG. 7 is a structural diagram of a device for managing a smooth restart of a router according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for managing a smooth restart of a router according to an embodiment of the present invention.
  • the method shown in Figure 1 includes:
  • Step 201 After the first router is notified to the second router to assist the first router to perform the GR, the first router obtains the packet sent by the second router.
  • Step 202 The first router determines, according to the packet sent by the second router, whether the second router receives the notification sent by the first router, and obtains a determination result.
  • Step 203 If the determination result is that the second router does not receive the notification of the first router, control the first router to end the GR operation.
  • the method provided by the embodiment of the present invention provides a method for quickly detecting and exiting a graceful restart after the master/slave switchover of the router. By checking the message sent by the neighbor, it can quickly determine whether the second router assists the first router to complete. Smooth restart of the GR process. If the neighbor does not assist the restarter to complete the graceful restart of the GR operation, the restarter can exit the smooth restart process in advance, overcoming the shortcoming of the restarter route to determine whether the second router assists the local end to complete the GR operation lag, and speeds up the routing. The speed of convergence.
  • the network shown in Figure 1 is used as an example.
  • the neighboring router does not help the restarter to complete the GR operation. This may be because the neighboring router does not support the Opaque capability (the ability to process Opaque LSAs, the GR LSA belongs to the Opaque LSA category), or it may be due to neighbors.
  • the GR LSA sent by the restarter is not received at all. In the above example, it is finally determined that the neighbor does not assist the local GR operation at the time of the interaction. In fact, it can be determined that the neighbor does not assist the local GR operation as early as before.
  • the interaction 1 receives all the database summary descriptions sent by ROUTER 2, the DD packet is received.
  • ROUTER 1 completes the GR operation; the second interaction 4 receives the request from the ROUTER 2 to the restarter GR LSA, and can also determine that the other party has not received the GR LSA sent by ROUTER 1, if the other party receives the GR sent by ROUTER 1.
  • the LSA does not send a request for the GR LSA.
  • the embodiment of the present invention uses the database summary description packet and the link state request packet information sent by the neighboring router to determine in advance whether the neighbor has assisted the local end to complete the GR operation, and does not assist the local end to complete the handover. If the GR is used, the local end will immediately exit the GR process to speed up the convergence of the route.
  • the obtaining the packet sent by the second router includes:
  • DD database description
  • LSR link state request
  • the first router determines, according to the packet sent by the second router, whether the second router receives the notification sent by the first router, and obtains a determination result, including:
  • the second router is in the negotiation phase of the database interaction, if the obtained packet is a DD packet sent by the second router, check whether the flag bit O in the option field of the DD packet is set, if If the flag bit O is not set, the result of the determination is that the second router does not receive the notification sent by the first router; or
  • the second router is in the database summary description packet interaction phase, if the obtained packet is an LSR packet sent by the second router, the description information of the link state advertisement LSA in the LSR packet is obtained. If the description information of the LSA is the request for the GR LSA of the first router, the obtained determination result is that the second router does not receive the notification sent by the first router; or
  • the first router determines, according to the LSA in the DD packet, that the second router is in a database digest packet exchange phase, if the obtained packet is a DD packet sent by the second router, Whether the second router receives the GR LSA of the first router or the Router LSA of the first router, after the first router processes the last DD packet sent by the second router, if not determined Receiving, by the second router, the first router The GR LSA or the Router LSA of the first router obtains a result that the second router does not receive the notification sent by the first router.
  • Step A1 The first router that performs the active/standby switchover clears the database information, and sends a certain number of GR LSAs to notify the second router that the local router is performing a graceful restart.
  • the second router is required to assist the local end to complete the graceful restart of the GR.
  • the second router is a neighbor of the first router;
  • Step A2 After the GR LSA is sent, the first router starts to send the HELLO message and re-establishes the neighbor relationship with the second router, where the HELLO message is used to acquire the neighbor relationship; when the status of the first router and the second router rises to the exstart The state performs the negotiation phase of the database interaction; the first router receives the DD packet sent by the neighbor, and checks whether the flag bit O in the option option field in the DD packet is set. If the flag bit O is not set, the first The router exits the GR operation;
  • Step A3 After the negotiation of the database interaction is completed, the second router enters the exchange state, that is, enters the database summary to describe the packet exchange phase, and the first router resolves the DD packet sent by the neighbor, and obtains the LSA description in the DD packet.
  • the information if the LSA description information is the GR LSA generated by the first router and matches the GR LSA recorded by the first router, and identifies that the neighbor receives the GR LSA sent by the local end, and does not need to exit the GR operation; or, if the LSA description information is The router LSA of the first router identifies that the neighbor has the restarter Router LSA and does not need to exit the GR operation. If the LSA information is not found locally, the LSA is added to the neighbor request list and requests the LSA from the second router. information;
  • Step A4 During the second router being in the exchange state, the first router processes the LSR packet sent by the neighbor. If the LSR packet includes the GR LSA generated by the first router, the second router does not receive the local router. On the GR LSA, the first router needs to exit the GR operation. If there is a corresponding LSA in the local database, the LSA is sent to the neighbor. If there is no corresponding LSA in the local database, the database interaction process is incorrect, causing the status of the second router to switch to exstart. , restart the database interaction process;
  • Step A5 During the exchange of the second router, the first router processes the last DD packet sent by the neighbor, indicating that the second router has all the LSA description information in the database. After the transmission is complete, if the LSA description information of the processed DD packet does not have the GR LSA of the first router or the Router LSA of the first router, the first router exits the GR operation.
  • the first router determines, according to the LSA in the DD packet, whether the second router receives the GR LSA of the first router or the Router LSA of the first router, as follows: Ways to get:
  • the LSA is the GR LSA of the first router and the first router records the information of the LSA, determining that the second router receives the GR LSA of the first router; or
  • the LSA is the Router LSA of the first router, it is determined that the second router receives the Router LSA of the first router.
  • the first router If the first router does not have the LSA information in the DD packet sent by the second router, or the update information of the LSA, the first router requests the LSA from the second router. information.
  • FIG. 3 is a flowchart of determining a DD packet by a first router when the second router is in an exstart state according to an embodiment of the present invention.
  • the method shown in Figure 3 includes:
  • the second router enters the exstart state, indicating that the negotiation before the DD packet exchange is started, and the second router sends an empty DD packet, and the empty DD packet does not carry any LSA description information, where the option option field in the DD packet has A flag bit O is used to indicate whether the router can handle the opaque LSA capability.
  • the GR LSA belongs to the opaque LSA. If the flag bit O is not set, the router does not have the capability to process the opaque LSA. If the O flag is set, The router has the capability of processing the opaque LSA.
  • the first router receives the first null DD packet sent by the second router, and checks whether the O flag bit in the option field is set. If not set, the second router does not. Supporting the processing capability of the opaque LSA, the GR router that was previously sent by the first router, the second router will certainly not receive, so it will not assist the restarter to complete the GR operation. At this time, the first router exits the GR operation.
  • FIG. 4 is a schematic diagram of a first route when a second router is in an exchange state according to an embodiment of the present invention. Flowchart for processing DD packets. The method shown in Figure 4 includes:
  • the second router After the negotiation between the first router and the second router is completed, the second router enters the exchange state, starts the database interaction with the first router, and adds all the local link state advertisement header description information to the DD packet.
  • the first router receives the DD packet sent by the neighbor, it processes the LSA description information of the packet, and compares each LSA description with the LSA of the local record. LSA, indicating that the LSA needs to be requested from the second router;
  • the neighbor has received the GR LSA previously sent by the local end, and the neighbor is received by the neighboring party.
  • the second router Because the subsequent router LSA information needs to be used to learn the previous network topology, whether the second router records the Router LSA of the first router is also one of the conditions for determining whether to exit the GR. Therefore, when the neighbor database does not contain the restarter Router, If the LSA is in the LSA state, the router needs to quit the GR. Therefore, if the LSA description in the DD packet is the Router LSA of the first router, the second router records the Router LSA of the first router. The first router does not need to be configured. If the LSA in the DD packet does not contain the Router LSA of the first router, the second router does not record the Router LSA of the first router. The first router needs to log out of the GR.
  • FIG. 5 is a flowchart of determining a LSR message by a first router when a second router is in an exchange state according to an embodiment of the present invention.
  • the method shown in Figure 5 includes:
  • the first router determines that the second router lacks the corresponding LSA or lacks the update of the corresponding LSA of the local end, and searches for the data from the database. If the corresponding LSA is found, the LSA is sent to the second router. If the corresponding LSA is not found, the database interaction is incorrect. You need to cut the status of the second router to exstart and start over. Perform database interactions;
  • the second router When a GR LSA belongs to the first router in the LSR packet, the second router requests the GR LSA generated by the local router, indicating that the second router does not have the GR LSA of the first router or the GR LSA update information of the first router. .
  • the serial number, checksum and age in the LSA determine the old and new LSA, as follows:
  • the sequence number is incremented by one on the previous basis. Therefore, the larger the serial number of the LSA, the newer the LSA; when the serial number is the same, the checksum of the serial number is compared, wherein the larger the checksum, the newer the LSA; when the checksum is the same, the comparison
  • the age field the maximum age of the maxage LSA is the latest, where if the two LSA age differences are less than 900, then the same is considered new, more than 900 is the youngest LSA.
  • the second router LSA does not have the latest GR LSA of the first router. If the serial number is large, the second router does not receive the newly generated GR LSA of the first router, so the GR needs to be exited at this time; for example, the first router During the GR period, a new GR LSA may be generated for some reason, and the latest GR related information may be transmitted to the second router. The length of the previously set GR is not enough, and the GR time parameter needs to be extended. The GR LSA notifies the second router of the latest GR duration, and the second router also extends the assistance time accordingly.
  • the age field is judged. If the checksum changes, the GR LSA has an abnormality. Press GR at this time. Operation processing.
  • the judgment of the age field is as follows: Since the first router is in the GR, the age of the GR LSA cannot exceed 1800, and the age of the GR is 1800, so the GR LSA in the local database is certainly not the maximum age maxage.
  • the maxage value is 3600, and the age difference between the GR LSA of the first router and the GR LSA of the second router is greater than 900 and the age of the local GR LSA is smaller, but the LSA generated by the local end is always stored in the database for aging, age. It will continue to increase. Only the GR LSA age of the second router's database is smaller than that of the first router's GR LSA, so this is not possible under normal circumstances.
  • the first router receives the request message of the GR LSA sent by the second router, which may be as follows:
  • Case 2 When the first router generates multiple GR LSAs, the second router does not receive the latest GR LSA. The neighbor does not receive the GR LSA sent by the restarter.
  • the first router needs to exit the GR operation.
  • FIG. 6 is a flowchart of determining, by the first router, the last DD packet of the neighbor when the second router is in the exchange state according to the embodiment of the present invention.
  • the method shown in Figure 6 includes:
  • the M-flag is set to 0 in the DD packet to notify the first router that the local LSA description has been sent.
  • the M flag is equal to 1.
  • the M flag is equal to 0 to indicate that all LSA descriptions have been sent.
  • the first router After the first router processes the last DD packet sent by the second router, it has a very comprehensive understanding of the database information of the second router. According to the previous process of processing the DD packet, it identifies whether the neighbor receives the first router GR LSA. Or the case of the first router Router LSA, whether to withdraw from the GR. When the second router does not receive the first router GR LSA identifier or contains the first router Router LSA identifier, the first router needs to exit the GR operation.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement a smooth restart of the router.
  • FIG. 7 is a structural diagram of a device for managing a smooth restart of a router according to an embodiment of the present invention.
  • the method shown in Figure 7 includes:
  • the obtaining module 701 is configured to: after the first router notifies the second router to assist the first router to perform a graceful restart of the GR, obtain the packet sent by the second router;
  • the determining module 702 is configured to: determine, according to the packet sent by the second router, whether the second router receives the notification sent by the first router, and obtain a determination result;
  • the control module 703 is configured to: if the determination result is that the second router does not receive the notification of the first router, control the first router to end the GR operation.
  • the obtaining module 701 is configured to: obtain a database digest description DD packet and/or a link state request LSR packet sent by the second router.
  • the determining module 702 is configured to:
  • the second router If the second router is in the negotiation phase of the database interaction, if the obtained packet is a DD packet sent by the second router, check the flag bit in the option field of the DD packet. Whether it is set, if the flag bit O is not set, the determination result is that the second router does not receive the notification sent by the first router; or
  • the second router is in the database summary description packet interaction phase, if the obtained packet is an LSR packet sent by the second router, the description information of the link state advertisement LSA in the LSR packet is obtained. If the description information of the LSA is the request for the GR LSA of the first router, the obtained determination result is that the second router does not receive the notification sent by the first router; or
  • the second router is in the database digest packet exchange phase, if the obtained packet is a DD packet sent by the second router, determine whether the second router is determined according to the LSA in the DD packet. Receiving the GR LSA of the first router or the Router LSA of the first router, after the first router processes the last DD packet sent by the second router, if the second If the router does not receive the GR LSA of the first router or the Router LSA of the first router, the determined result is that the second router does not receive the notification sent by the first router.
  • the determining module 702 is configured to: determine, according to the LSA in the DD packet, whether the second router receives the GR LSA of the first router or the Router LSA of the first router, include:
  • the LSA is the GR LSA of the first router and the first router records the information of the LSA, determining that the second router receives the GR LSA of the first router; or
  • the LSA is the Router LSA of the first router, it is determined that the second router receives the Router LSA of the first router.
  • the device further comprises:
  • the requesting module is configured to: if the first router does not have the information of the LSA in the DD packet sent by the second router, or the update information of the LSA, request the information about the LSA from the second router .
  • the device provided by the embodiment of the present invention provides a fast detection and exit of the router after the active/standby switchover
  • the check of the message sent by the neighbor can quickly determine whether the second router assists the first router to complete the smooth restart GR process. If the neighbor does not assist the restarter to complete the smooth restart GR operation, restart.
  • the party can exit the smooth restart process in advance, and overcome the shortcoming of the restarter route to determine whether the second router assists the local end to complete the GR operation lag, and speeds up the route convergence.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the application is not limited to any particular combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the method provided by the embodiment of the present invention provides a method for quickly detecting and exiting a graceful restart after the master/slave switchover of the router. By checking the message sent by the neighbor, it can quickly determine whether the second router assists the first router to complete. Smoothly restart the GR process if the neighbor does not have the assistance If the starter completes the graceful restart of the GR operation, the restarter can exit the smooth restart process in advance, and overcome the shortcomings of the restarter route to determine whether the second router assists the local end to complete the GR operation lag, and speeds up the route convergence.

Landscapes

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

Abstract

本文公布一种路由器平滑重启的管理方法和装置。所述方法,包括:第一路由器在通知第二路由器协助所述第一路由器进行平滑重启GR后,获取所述第二路由器发送的报文;所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。

Description

路由器平滑重启的管理方法和装置 技术领域
本申请涉及但不限于通信领域,尤其涉及一种路由器平滑重启的管理方法和装置。
背景技术
平滑重启(Graceful Restart,GR)实现的功能是在路由协议重启时保证数据转发层面功能的正常,以保证关键业务不中断。在相关技术中,开放式最短路径优先(Open Shortest Path First,OSPF)主备倒换进行GR操作的方法主要有两种,一种是主处理器倒换前发送平滑重启链路状态通告(Graceful Restart Link State Advertisement,GR LSA);主处理器倒换前发送GR LSA的作用是倒换路由器向邻居路由器传达平滑重启信号,请求邻居路由器协助自己完成平滑重启;另一种是主处理器倒换后备处理器工作开始发送GR LSA。主处理器倒换前由于知道邻居的信息,所以可以保证GR LSA被邻居接收到;相反主处理器倒换后备处理器接替主处理器工作时,先前的邻居信息已经全部丢失,所以这种情况下无法确定先前邻居是否接收到GR LSA。
如果邻居没有接收到重启方路由器发送的GR LSA,就不会协助重启方路由器完成GR操作,相应地会重新产生路由器链路状态通告(Router LSA),Router LSA中会删除先前指向重启方的连接,当重启方接收到邻居新产生没有指向自己连接的Router LSA时,会判断出邻居根本没有协助本端完成GR,此时重启方会退出GR操作。
图1为相关技术中邻居路由器未接收到重启方路由器发送的GR LSA时的交互示意图。ROUTER 1主备倒换后,发送GR LSA向邻居路由器传递本地要进行GR的信号,希望邻居能够提供帮助。ROUTER 1发送一定次数的GR LSA后,开始发送HELLO报文,本例中由于链路传播原因导致ROUTER2没有接收到ROUTER 1发送的GR LSA。ROUTER 2不会协助ROUTER 1完成GR,会重新产生删除指向ROUTER 1连接的Router LSA,经过数据库摘要描述报文和链路状态请求报文交互后,当ROUTER 1接收到ROUTER 2 的Router LSA时,才判断出ROUTER 2根本就没有协助本地完成GR,ROUTER 1此时立刻退出GR。
由于未能及时判断出邻居没有协助本端重启方完成GR操作,延迟了本端退出GR的时间,降低了路由的收敛速度。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本文提供一种路由器平滑重启的管理方法和装置,解决重启方路由判断邻居路由器是否协助本端完成GR操作滞后的缺点。
一种路由器平滑重启的管理方法,包括:
第一路由器在通知第二路由器协助所述第一路由器进行平滑重启GR后,获取所述第二路由器发送的报文;
所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;
如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。
可选地,所述获取所述第二路由器发送的报文,包括:
获取所述第二路由器发送的数据库摘要描述DD报文和/或链路状态请求LSR报文。
可选地,所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果,包括:
在所述第二路由器处于数据库交互的协商阶段中,如果获取到的报文是所述第二路由器发送的DD报文,检查所述DD报文的选项字段中标志位O是否置位,如果标志位O没有置位,则得到确定结果为所述第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的 报文是所述第二路由器发送的LSR报文,获取所述LSR报文中的链路状态通告LSA的描述信息,如果所述LSA的描述信息是请求所述第一路由器的GR LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的DD报文,所述第一路由器根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,在所述第一路由器处理完所述第二路由器发送的最后一个DD报文后,如果未确定出所述第二路由器接收到第一路由器的GR LSA或者第一路由器的Router LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知。
可选地,所述第一路由器根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,是通过如下方式得到的:
获取接收到的DD报文中LSA;
如果所述LSA是所述第一路由器的GR LSA且所述第一路由器记录有所述LSA的信息,则确定所述第二路由器接收到所述第一路由器的GR LSA;或者,
如果所述LSA是所述第一路由器的Router LSA,则确定所述第二路由器接收到所述第一路由器的Router LSA。
可选地,所述方法还包括:如果所述第一路由器没有所述第二路由器发送的DD报文中LSA的信息,或者,所述LSA的更新信息,则所述第一路由器向所述第二路由器请求所述LSA的信息。
一种路由器平滑重启的管理装置,包括:
获取模块,设置为:在第一路由器通知第二路由器协助所述第一路由器进行平滑重启GR后,获取所述第二路由器发送的报文;
确定模块,设置为:根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;
控制模块,设置为:如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。
可选地,所述获取模块设置为:获取所述第二路由器发送的数据库摘要描述DD报文和/或链路状态请求LSR报文。
可选地,所述确定模块设置为:
在所述第二路由器处于数据库交互的协商阶段中,如果获取到的报文是所述第二路由器发送的DD报文,检查所述DD报文的选项字段中标志位O是否置位,如果标志位O没有置位,则得到确定结果为所述第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的LSR报文,获取所述LSR报文中的链路状态通告LSA的描述信息,如果所述LSA的描述信息是请求所述第一路由器的GR LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的DD报文,根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,在所述第一路由器处理完所述第二路由器发送的最后一个DD报文后,如果未确定出所述第二路由器接收到第一路由器的GR LSA或者第一路由器的Router LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知。
可选地,所述确定模块设置为:通过如下方式根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA的,包括:
获取接收到的DD报文中LSA;
如果所述LSA是所述第一路由器的GR LSA且所述第一路由器记录有所述LSA的信息,则确定所述第二路由器接收到所述第一路由器的GR LSA;或者,
如果所述LSA是所述第一路由器的Router LSA,则确定所述第二路由器接收到所述第一路由器的Router LSA。
可选地,所述装置还包括:
请求模块,设置为:如果所述第一路由器没有所述第二路由器发送的DD报文中LSA的信息,或者,所述LSA的更新信息,则向所述第二路由器请求所述LSA的信息。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述方法。
本发明提供的实施例,提供一种路由器主备倒换后快速检测退出平滑重启的实现方式,通过对邻居发来的消息的检查,可以快速地判断出第二路由器有没有协助第一路由器完成GR过程,如果邻居没有协助重启方完成GR操作的话,重启方可以提前退出平滑重启过程,克服了重启方路由判断邻居路由器是否协助本端完成GR操作滞后的缺点,加快了路由收敛的速度。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为相关技术中邻居路由器未接收到重启方路由器发送的GR LSA时的交互示意图;
图2为本发明实施例提供的路由器平滑重启的管理方法的流程图;
图3为本发明实施例提供的在第二路由器处于exstart状态时第一路由器对DD报文的判断流程图;
图4为本发明实施例提供的在第二路由器处于exchange状态时第一路由器对DD报文处理的流程图;
图5为本发明实施例提供的在第二路由器处于exchange状态时第一路由器对LSR报文的判断流程图;
图6为本发明实施例提供的第二路由器处于exchange状态时,第一路由器处理完邻居最后一个DD报文的判断流程图;
图7为本发明实施例提供的路由器平滑重启的管理装置的结构图。
本发明的实施方式
下面将结合附图及实施例对本发明的实施方式进行描述。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
图2为本发明实施例提供的路由器平滑重启的管理方法的流程图。图1所示方法包括:
步骤201、第一路由器在通知第二路由器协助所述第一路由器进行GR后,获取所述第二路由器发送的报文;
步骤202、所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;
步骤203、如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。
本发明实施例提供的方法,提供一种路由器主备倒换后快速检测退出平滑重启的实现方式,通过对邻居发来的消息的检查,可以快速地判断出第二路由器有没有协助第一路由器完成平滑重启GR过程,如果邻居没有协助重启方完成平滑重启GR操作的话,重启方可以提前退出平滑重启过程,克服了重启方路由判断第二路由器是否协助本端完成GR操作滞后的缺点,加快了路由收敛的速度。
以图1所示网络为例,邻居路由器没有协助重启方完成GR操作,可能是因为邻居路由器根本不支持Opaque能力(能够处理Opaque LSA的能力,GR LSA属于Opaque LSA范畴),也可能是因为邻居根本就没有接收到重启方发送的GR LSA。上述例子中最终在交互5时刻才判断出邻居没有协助本地GR操作,其实早在之前就可以判断出邻居没有协助本地GR操作,当交互1接收完ROUTER 2发来的所有数据库摘要描述DD报文时,发现没有ROUTER 1的GR LSA描述,说明ROUTER 2根本就没有接收到ROUTER 1发送的GR LSA,没有接收到重启方发送的GR LSA,那么就不会协助重启 方ROUTER 1完成GR操作;其次交互4接收到ROUTER 2发来的对重启方GR LSA的请求时,也可以判断出对方没有接收到ROUTER 1发送的GR LSA,如果对方接收到ROUTER 1发送的GR LSA,则不会发送GR LSA的请求。
经过上述分析,本发明实施例利用邻居路由器发来的数据库摘要描述报文和链路状态请求报文信息,提前判断出邻居有没有协助本端重启方完成GR操作,没有协助本端重启方完成GR操作的话,本端会立刻退出GR过程,以加快路由的收敛速度。
下面对本发明实施例提供的方法作进一步说明:
其中,所述获取所述第二路由器发送的报文,包括:
获取所述第二路由器发送的数据库摘要描述(Database Description,DD)报文和/或链路状态请求(Link State Request,LSR)报文。
其中,所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果,包括:
在所述第二路由器处于数据库交互的协商阶段中,如果获取到的报文是所述第二路由器发送的DD报文,检查所述DD报文的选项字段中标志位O是否置位,如果标志位O没有置位,则得到确定结果为所述第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的LSR报文,获取所述LSR报文中的链路状态通告LSA的描述信息,如果所述LSA的描述信息是请求所述第一路由器的GR LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的DD报文,所述第一路由器根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,在所述第一路由器处理完所述第二路由器发送的最后一个DD报文后,如果未确定出所述第二路由器接收到第一路由器的 GR LSA或者第一路由器的Router LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知。
下面对上述确定流程进行说明:
步骤A1、发生主备倒换操作的第一路由器清空数据库的信息,发送一定次数的GR LSA,用以告知第二路由器本端正在进行平滑重启,需要第二路由器协助本端完成平滑重启GR,其中所述第二路由器为所述第一路由器的邻居;
步骤A2、在发送完GR LSA后,第一路由器开始发送HELLO报文与第二路由器重新建立邻居关系,其中HELLO报文用于获取邻居关系;当第一路由器与第二路由器的状态上升至exstart状态进行数据库交互的协商阶段;第一路由器接收到邻居发来的DD报文,检查DD报文中option选项字段中标志位O是否置位,如果标志位O没有置位,则所述第一路由器退出GR操作;
步骤A3、在数据库交互的协商完毕后,第二路由器进入exchange状态,即进入数据库摘要描述报文交互阶段,第一路由器解析邻居发来的DD报文,获取所述DD报文中的LSA描述信息,如果LSA描述信息是第一路由器产生的GR LSA并且与所述第一路由器记录的GR LSA相符,标识邻居接收到本端发送的GR LSA,无需退出GR操作;或者,如果LSA描述信息是第一路由器的Router LSA,标识邻居有重启方Router LSA,也无需退出GR操作;而如果本地查找不到该LSA的信息,则该LSA添加到邻居请求列表中,向第二路由器请求该LSA的信息;
步骤A4、在第二路由器处于exchange状态期间,第一路由器处理邻居发来的LSR报文,如果LSR报文中包括第一路由器产生的GR LSA,表示第二路由器没有接收到本端发送出去的GR LSA,第一路由器需要退出GR操作;如果本地数据库中有对应LSA,则将LSA发送给邻居,如果本地数据库中没有对应LSA,则说明数据库交互过程出错,造成第二路由器的状态切换到exstart,重新开始数据库交互流程的情况;
步骤A5、在第二路由器处于exchange期间,第一路由器处理完邻居发来的最后一个DD报文,表示第二路由器已经将数据库中所有LSA描述信息 发送完毕,如果根据已处理的DD报文中的LSA描述信息均没有第一路由器的GR LSA或第一路由器的Router LSA,则第一路由器退出GR操作。
由上可以看出,所述第一路由器根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,是通过如下方式得到的:
获取接收到的DD报文中LSA;
如果所述LSA是所述第一路由器的GR LSA且所述第一路由器记录有所述LSA的信息,则确定所述第二路由器接收到所述第一路由器的GR LSA;或者,
如果所述LSA是所述第一路由器的Router LSA,则确定所述第二路由器接收到所述第一路由器的Router LSA。
其中,如果所述第一路由器没有所述第二路由器发送的DD报文中LSA的信息,或者,所述LSA的更新信息,则所述第一路由器向所述第二路由器请求所述LSA的信息。
下面对本发明实施例提供的方法进行说明:
图3为本发明实施例提供的在第二路由器处于exstart状态时第一路由器对DD报文的判断流程图。图3所示方法包括:
在第二路由器进入exstart状态,表示开始DD报文交互前的协商,第二路由器发送一个空的DD报文,空DD报文不携带任何LSA描述信息,其中该DD报文中option选项字段有一个标志位O,用来表示路由器能否处理opaque LSA能力,其中GR LSA属于opaque LSA中的一种,如果标志位O没有置位,说明路由器没有处理opaque LSA的能力,如果O标志位置位,说明路由器有处理opaque LSA的能力;第一路由器接收到第二路由器发来的第一个空DD报文,检查option字段中O标志位是否置位,如果没有置位的话,说明第二路由器不支持opaque LSA的处理能力,那么第一路由器先前发送的GR LSA,第二路由器肯定不会接收,所以也就不会协助重启方完成GR操作,此时第一路由器退出GR操作。
图4为本发明实施例提供的在第二路由器处于exchange状态时第一路由 器对DD报文处理的流程图。图4所示方法包括:
在第一路由器和第二路由器双方协商完毕后,第二路由器进入exchange状态,开始与第一路由器进行数据库的交互,并将本地所有的链路状态通告头部描述信息添加到DD报文中发送给第一路由器;当第一路由器接收到邻居发来的DD报文时,会对报文所有LSA描述信息进行处理,将每个LSA描述和本地记录的LSA进行比较,如果本地没有记录对应的LSA,说明需要向第二路由器请求该LSA;
如果DD报文中的LSA描述是第一路由器产生的GR LSA并且第一路由器记录有GR LSA,说明邻居已经接收到本端先前发送的GR LSA,此时标识邻居接收到重启方GR LSA;
因为后续需要使用重启方Router LSA信息来获知先前的网络拓扑结构,因此第二路由器是否记录有第一路由器的Router LSA也是判断是否需要退出GR条件之一,所以当邻居数据库中不含有重启方Router LSA时,说明邻居端出现异常情况,此时需要退出GR,因此如果DD报文中的LSA描述是第一路由器的Router LSA,表示第二路由器记录了第一路由器的Router LSA,第一路由器无需退出GR操作;如果DD报文中的LSA描述没有第一路由器的Router LSA,则表示第二路由器未记录第一路由器的Router LSA,第一路由器需退出GR操作。
图5为本发明实施例提供的在第二路由器处于exchange状态时第一路由器对LSR报文的判断流程图。图5所示方法包括:
在第二路由器处于exchange状态期间,第一路由器在接收到第二路由器发来的LSR报文后,确定第二路由器缺少对应LSA或者缺少本端对应LSA的更新,此时会从数据库中搜索是否存在对应的LSA,如果搜索到对应的LSA,则将该LSA发送给第二路由器,如果没有搜索到对应LSA,则说明数据库交互过程中出错,需要将第二路由器的状态切到exstart,重新开始进行数据库交互;
当LSR报文中有一条GR LSA属于第一路由器时,即第二路由器请求本端先前产生的GR LSA,说明第二路由器没有第一路由器的GR LSA,或者没有第一路由器的GR LSA更新信息。
其中,LSA中的序列号、校验和以及年龄三个字段来确定LSA新旧,说明如下:
当路由器重新产生LSA时,会将序列号在上一次的基础上加1。因此,LSA的序列号越大,表示LSA越新;当序列号的大小一样时,比较序列号的校验和,其中校验和越大,表示LSA越新;当校验和一样时,比较年龄字段,最大年龄maxage的LSA最新,其中,如果两个LSA年龄差值小于900,则认为一样新,大于900则年龄小的LSA最新。
在第二路由器LSA没有第一路由器最新的GR LSA,如果是序列号本端大,说明第二路由器没有接收到第一路由器新产生的GR LSA,所以此时需要退出GR;例如,第一路由器在GR期间可能由于某种原因会产生新的GR LSA,向第二路由器传递最新的GR相关信息,比第一路由器判断先前设置的GR时长不够,需要将GR时间参数延长,此时会产生新GR LSA将最新的GR时长通知给第二路由器,第二路由器也会相应地将协助时间延长。
当第二路由器和第一路由器的LSA的序列号一样时,如果校验和未发生变化,则对年龄字段进行判断,如果校验和发生变化,说明GR LSA已经出现异常,此时按退出GR操作处理。其中对年龄字段的判断说明如下:由于第一路由器处于GR,所以GR LSA的年龄不可能超过1800,其中GR的时长的年龄为1800,因此本地数据库中的GR LSA肯定不会为最大年龄maxage,其中maxage值为3600,那么第一路由器的GR LSA和第二路由器的GR LSA年龄差值大于900并且本端GR LSA的年龄值更小,但是本端产生的LSA一直存放在数据库中老化,年龄会一直在增加,只有第二路由器的数据库中GR LSA年龄小于第一路由器的GR LSA的可能,所以正常情况下不可能出现这种情况。
综上分析可以看出,第一路由器接收到第二路由器发送的GR LSA的请求报文,可能有如下两种情况:
情况一:第一路由器方只产生一次GR LSA时,第二路由器没有接收到GR LSA;
情况二:第一路由器产生多次GR LSA时,第二路由器没有接收到最新一次产生的GR LSA说明邻居没有接收到重启方最新发送的GR LSA;
因此,第一路由器需要退出GR操作。
图6为本发明实施例提供的第二路由器处于exchange状态时,第一路由器处理完邻居最后一个DD报文的判断流程图。图6所示方法包括:
当第二路由器将本地数据库所有LSA描述发送完毕时,会通过设置DD报文中M标志位为0来通知第一路由器本端已经将数据库所有LSA描述发送完,其中,M标志位等于1表示还有未发送完的LSA描述,M标志位等于0表示已经将所有LSA描述发送完。
第一路由器处理完第二路由器发送的最后一个DD报文后,会对第二路由器的数据库信息有一个十分全面的了解,根据先前处理DD报文流程中标识邻居是否接收到第一路由器GR LSA或含有第一路由器Router LSA的情况,判断是否需要退出GR。当第二路由器没有接收到第一路由器GR LSA标识或含有第一路由器Router LSA标识时,第一路由器需要退出GR操作。
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述路由器平滑重启的管理方法。
图7为本发明实施例提供的路由器平滑重启的管理装置的结构图。图7所示方法包括:
获取模块701,设置为:在第一路由器通知第二路由器协助所述第一路由器进行平滑重启GR后,获取所述第二路由器发送的报文;
确定模块702,设置为:根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;
控制模块703,设置为:如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。
其中,所述获取模块701设置为:获取所述第二路由器发送的数据库摘要描述DD报文和/或链路状态请求LSR报文。
其中,所述确定模块702设置为:
在所述第二路由器处于数据库交互的协商阶段中,如果获取到的报文是所述第二路由器发送的DD报文,检查所述DD报文的选项字段中标志位O 是否置位,如果标志位O没有置位,则得到确定结果为所述第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的LSR报文,获取所述LSR报文中的链路状态通告LSA的描述信息,如果所述LSA的描述信息是请求所述第一路由器的GR LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知;或者
在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的DD报文,根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,在所述第一路由器处理完所述第二路由器发送的最后一个DD报文后,如果未确定出所述第二路由器没有接收到第一路由器的GR LSA或者第一路由器的Router LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知。
其中,所述确定模块702设置为:通过如下方式根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA的,包括:
获取接收到的DD报文中LSA;
如果所述LSA是所述第一路由器的GR LSA且所述第一路由器记录有所述LSA的信息,则确定所述第二路由器接收到所述第一路由器的GR LSA;或者,
如果所述LSA是所述第一路由器的Router LSA,则确定所述第二路由器接收到所述第一路由器的Router LSA。
其中,所述装置还包括:
请求模块,设置为:如果所述第一路由器没有所述第二路由器发送的DD报文中LSA的信息,或者,所述LSA的更新信息,则向所述第二路由器请求所述LSA的信息。
本发明实施例提供的装置,提供一种路由器主备倒换后快速检测退出平 滑重启的实现方式,通过对邻居发来的消息的检查,可以快速地判断出第二路由器有没有协助第一路由器完成平滑重启GR过程,如果邻居没有协助重启方完成平滑重启GR操作的话,重启方可以提前退出平滑重启过程,克服了重启方路由判断第二路由器是否协助本端完成GR操作滞后的缺点,加快了路由收敛的速度。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
以上所述,仅为本发明的实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。
工业实用性
本发明实施例提供的方法,提供一种路由器主备倒换后快速检测退出平滑重启的实现方式,通过对邻居发来的消息的检查,可以快速地判断出第二路由器有没有协助第一路由器完成平滑重启GR过程,如果邻居没有协助重 启方完成平滑重启GR操作的话,重启方可以提前退出平滑重启过程,克服了重启方路由判断第二路由器是否协助本端完成GR操作滞后的缺点,加快了路由收敛的速度。

Claims (10)

  1. 一种路由器平滑重启的管理方法,包括:
    第一路由器在通知第二路由器协助所述第一路由器进行平滑重启GR后,获取所述第二路由器发送的报文;
    所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;
    如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。
  2. 根据权利要求1所述的方法,其中,所述获取所述第二路由器发送的报文,包括:
    获取所述第二路由器发送的数据库摘要描述DD报文和/或链路状态请求LSR报文。
  3. 根据权利要求1所述的方法,其中,所述第一路由器根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果,包括:
    在所述第二路由器处于数据库交互的协商阶段中,如果获取到的报文是所述第二路由器发送的DD报文,检查所述DD报文的选项字段中标志位O是否置位,如果标志位O没有置位,则得到确定结果为所述第二路由器未接收到所述第一路由器发送的通知;或者
    在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的LSR报文,获取所述LSR报文中的链路状态通告LSA的描述信息,如果所述LSA的描述信息是请求所述第一路由器的GR LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知;或者
    在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的DD报文,所述第一路由器根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所 述第一路由器的Router LSA,在所述第一路由器处理完所述第二路由器发送的最后一个DD报文后,如果未确定出所述第二路由器接收到第一路由器的GR LSA或者第一路由器的Router LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知。
  4. 根据权利要求3所述的方法,其中,所述第一路由器根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,是通过如下方式得到的:
    获取接收到的DD报文中LSA;
    如果所述LSA是所述第一路由器的GR LSA且所述第一路由器记录有所述LSA的信息,则确定所述第二路由器接收到所述第一路由器的GR LSA;或者,
    如果所述LSA是所述第一路由器的Router LSA,则确定所述第二路由器接收到所述第一路由器的Router LSA。
  5. 根据权利要求4所述的方法,所述方法还包括:
    如果所述第一路由器没有所述第二路由器发送的DD报文中LSA的信息,或者,所述LSA的更新信息,则所述第一路由器向所述第二路由器请求所述LSA的信息。
  6. 一种路由器平滑重启的管理装置,包括:
    获取模块,设置为:在第一路由器通知第二路由器协助所述第一路由器进行平滑重启GR后,获取所述第二路由器发送的报文;
    确定模块,设置为:根据所述第二路由器发送的报文,确定所述第二路由器是否接收到所述第一路由器发送的通知,得到确定结果;
    控制模块,设置为:如果确定结果为所述第二路由器未接收到所述第一路由器的通知,则控制所述第一路由器结束GR操作。
  7. 根据权利要求6所述的装置,其中,所述获取模块设置为:获取所述第二路由器发送的数据库摘要描述DD报文和/或链路状态请求LSR报文。
  8. 根据权利要求6所述的装置,其中,所述确定模块设置为:
    在所述第二路由器处于数据库交互的协商阶段中,如果获取到的报文是所述第二路由器发送的DD报文,检查所述DD报文的选项字段中标志位O是否置位,如果标志位O没有置位,则得到确定结果为所述第二路由器未接收到所述第一路由器发送的通知;或者
    在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的LSR报文,获取所述LSR报文中的链路状态通告LSA的描述信息,如果所述LSA的描述信息是请求所述第一路由器的GR LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知;或者
    在所述第二路由器处于数据库摘要描述报文交互阶段中,如果获取到的报文是所述第二路由器发送的DD报文,根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA,在所述第一路由器处理完所述第二路由器发送的最后一个DD报文后,如果未确定出所述第二路由器接收到第一路由器的GR LSA或者第一路由器的Router LSA,则得到的确定结果为第二路由器未接收到所述第一路由器发送的通知。
  9. 根据权利要求8所述的装置,其中,所述确定模块设置为:通过如下方式根据所述DD报文中的LSA确定所述第二路由器是否接收到所述第一路由器的GR LSA或者所述第一路由器的Router LSA的,包括:
    获取接收到的DD报文中LSA;
    如果所述LSA是所述第一路由器的GR LSA且所述第一路由器记录有所述LSA的信息,则确定所述第二路由器接收到所述第一路由器的GR LSA;或者,
    如果所述LSA是所述第一路由器的Router LSA,则确定所述第二路由器接收到所述第一路由器的Router LSA。
  10. 根据权利要求9所述的装置,所述装置还包括:
    请求模块,设置为:如果所述第一路由器没有所述第二路由器发送的DD报文中LSA的信息,或者,所述LSA的更新信息,则向所述第二路由器请求所述LSA的信息。
PCT/CN2016/083180 2015-09-15 2016-05-24 路由器平滑重启的管理方法和装置 WO2017045431A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510585530.1A CN106533936B (zh) 2015-09-15 2015-09-15 路由器平滑重启的管理方法和装置
CN201510585530.1 2015-09-15

Publications (1)

Publication Number Publication Date
WO2017045431A1 true WO2017045431A1 (zh) 2017-03-23

Family

ID=58288127

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083180 WO2017045431A1 (zh) 2015-09-15 2016-05-24 路由器平滑重启的管理方法和装置

Country Status (2)

Country Link
CN (1) CN106533936B (zh)
WO (1) WO2017045431A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112350928B (zh) * 2020-10-14 2022-09-30 杭州迪普科技股份有限公司 一种基于ospf协议的平滑重启方法及装置
CN114726771A (zh) * 2021-01-05 2022-07-08 中国移动通信有限公司研究院 网间节点信息传播方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753454A (zh) * 2009-12-21 2010-06-23 华为技术有限公司 路由器平滑重启方法、路由器和网络系统
CN101860477A (zh) * 2010-04-20 2010-10-13 北京星网锐捷网络技术有限公司 一种优雅重启中处理异常的方法和装置
CN102325080A (zh) * 2011-07-12 2012-01-18 杭州华三通信技术有限公司 一种ospf协议平滑重启方法和装置
US20140173133A1 (en) * 2012-12-17 2014-06-19 Telefonaktiebolaget L M Ericsson (Publ) Method and system for efficient graceful restart in an open shortest path first (ospf) network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100558055C (zh) * 2006-11-10 2009-11-04 华为技术有限公司 减少错误平滑重启状态持续时长的方法及路由器
CN101459573B (zh) * 2007-12-13 2012-05-23 华为技术有限公司 一种路由器平滑重启的方法、路由器及通信网络
CN101505277B (zh) * 2009-03-10 2011-04-20 华为技术有限公司 一种退出优雅重启的方法、设备及系统
CN104486223B (zh) * 2014-12-17 2018-04-06 上海斐讯数据通信技术有限公司 一种基于ospf协议的gr方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753454A (zh) * 2009-12-21 2010-06-23 华为技术有限公司 路由器平滑重启方法、路由器和网络系统
CN101860477A (zh) * 2010-04-20 2010-10-13 北京星网锐捷网络技术有限公司 一种优雅重启中处理异常的方法和装置
CN102325080A (zh) * 2011-07-12 2012-01-18 杭州华三通信技术有限公司 一种ospf协议平滑重启方法和装置
US20140173133A1 (en) * 2012-12-17 2014-06-19 Telefonaktiebolaget L M Ericsson (Publ) Method and system for efficient graceful restart in an open shortest path first (ospf) network

Also Published As

Publication number Publication date
CN106533936B (zh) 2019-06-18
CN106533936A (zh) 2017-03-22

Similar Documents

Publication Publication Date Title
US20120275456A1 (en) Expedited graceful ospf restart
US9397747B2 (en) Method and apparatus for connectivity control in a data center network
JP6792701B2 (ja) プライマリ・バックアップ疑似回線pw切替
US20150215156A1 (en) Method and apparatus for network failure restoration
US20120320754A1 (en) Route calculating after switching occurs from a primary main control board to a standby main control board
US10164824B2 (en) Indicating a master network controller in a virtual router redundancy protocol
CN101984600B (zh) 路由协议的优雅重启方法、设备和系统
JP2005503055A (ja) Ospf冗長構成を実装する方法およびシステム
JP2010045760A (ja) 冗長化システム用コネクションリカバリ装置,方法および処理プログラム
WO2012122945A1 (zh) 用于虚拟网络单元的工作方法及装置
CN106789638B (zh) 一种处理路由的方法及网络设备
EP3355533B1 (en) Path switching
CN101753454B (zh) 路由器平滑重启方法、路由器和网络系统
WO2019174454A1 (zh) 链路恢复方法及装置、系统、存储介质、电子装置
CN109495345B (zh) 一种bfd处理方法及网络设备
WO2017045431A1 (zh) 路由器平滑重启的管理方法和装置
WO2010102560A1 (zh) 一种退出优雅重启的方法、设备及系统
EP2109969B1 (en) Intelligent database exchange for ospf
EP3322141B1 (en) Backup designated router election and designated router failure processing method and equipment
CA2572940A1 (en) System and method for preserving multicast data forwarding during control failures in a router
US9350621B2 (en) Synchronization after restart of a FC switch
WO2017148097A1 (zh) 平滑重启处理的方法及装置
JP4664258B2 (ja) 経路状態管理システム、制御装置、ネットワーク管理装置、通信装置および経路状態管理方法
WO2017152595A1 (zh) 一种响应网络拓扑变化的方法和装置
WO2016197817A1 (zh) 一种退出平滑重启的方法及装置

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16845545

Country of ref document: EP

Kind code of ref document: A1