WO2017124738A1 - 平滑重启流量中断处理方法及装置 - Google Patents
平滑重启流量中断处理方法及装置 Download PDFInfo
- Publication number
- WO2017124738A1 WO2017124738A1 PCT/CN2016/095871 CN2016095871W WO2017124738A1 WO 2017124738 A1 WO2017124738 A1 WO 2017124738A1 CN 2016095871 W CN2016095871 W CN 2016095871W WO 2017124738 A1 WO2017124738 A1 WO 2017124738A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- router
- restarting
- digest
- auxiliary
- packet
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
Definitions
- This application relates to, but is not limited to, the field of communication technology.
- GR Graceful Restart
- the control and forwarding in the related art routers are all performed by the same processor, which not only discovers and maintains the neighbors through the routing protocol, but also maintains the routing table and the forwarding table.
- the network equipment generally adopts the control and forwarding separation technology
- the high-end router equipment in the related technology generally adopts a multi-processor structure
- the processor responsible for the control module such as the routing protocol is generally located on the main control board, and is responsible for the data packet forwarding processor. It is located on the line card to ensure that the data packet forwarding on the line card is not affected when the processor on the main control board is restarted.
- the GR technology can effectively avoid the short-term traffic forwarding interruption caused by the active/standby switchover and system upgrade. The principle of avoiding route flapping in the entire network can be attributed to this.
- the Open Shortest Path First (OSPF) protocol is a routing protocol proposed by The Internet Engineering Task Force (IETF). It is based on the link status. Each router is required to send link state broadcast information to all other routers in the same management area.
- OSPF The Open Shortest Path First
- the smooth restart router (GR Restarter, referred to as the restart router) establishes a neighbor relationship with the smooth restart assistant router (GR Helper, referred to as the secondary router) to obtain the entire link state database (Link State Data Base). , referred to as: LSDB) data, so as to ensure that the forwarding service is not interrupted.
- the restarting router and the secondary router send their respective database summary description messages, and the restarting router receives the database description message sent by the secondary router, and finds that there is no corresponding link state advertisement in the local database (referred to as: LSA) Or when the LSA is updated locally, the corresponding LSA is requested from the secondary router, and the secondary router sends the request message after receiving it.
- the corresponding LSA is used to restart the router to assist in restarting the router to quickly obtain the entire link state database.
- the secondary router deletes the sent LSA header file from the neighbor database summary list.
- the database summary description packet is an LSA header file, which is used to describe the content of the entire link state database. It is worth mentioning that in the OSPF protocol, the secondary router establishes a neighbor relationship with the restarting router and is a neighbor router.
- the router with the larger ID number controls the entire link state database interaction process.
- the master also called the master side
- the corresponding router with the smaller ID is the entire interaction process.
- the dependent party also known as the slave side.
- the two routers use the database description packet (Database Description Packet, DD packet for short) to describe their own LSDB and synchronize the database.
- the routers on the slave side do not send DD packets actively. Only the DD packets sent by the master router will send the corresponding DD packets.
- the DD packet More flag is 0, indicating that the neighbor router database summary information list is empty, and the database summary information has been sent.
- the router that is the master side receives the DD packet with the More flag bit being 0, and the neighbor database summary list in the local router is already empty, the database state summary interaction (Exchangedone) event is generated for the neighbor state machine;
- the neighboring router receives the DD packet with the More flag bit being 0, and the DD packet More flag bit that the local router is about to send is also 0, which generates an Exchangedone event for the neighbor state machine.
- the neighbor state machine refers to the neighbor router. Jump from one state to a different state.
- the router neighbor status is placed in the state of full adjacency (also called FULL), indicating that the neighbor router is synchronized with the local router LSDB, and the local router can no longer obtain data packets from the neighbor router.
- the router neighbor status is placed in the load (also called Loading) state, indicating that the local router needs to obtain the LSA from the neighbor router and synchronize the link state database.
- a router receives a local missing or locally updated LSA digest description, it sends a request to obtain the corresponding LSA. At this time, the router is in the digest interaction (also known as Exchange) or Loading state, and after the synchronization ends, switch to FULL state.
- the smooth restart technique in the related art has some problems, because the auxiliary router is still in the Exchange or Loading state after restarting the router to generate an Exchangedone event, and all traffic that is forwarded to the restart router through the secondary router is interrupted.
- This document provides a smooth restart traffic interrupt processing method and device to solve the problem of traffic interruption during smooth restart in the related art.
- a smooth restart traffic interruption processing method includes:
- the auxiliary router receives an indication message sent by the restarting router, where the indication message is a message that the restarting router instructs the secondary router to generate a digest interaction completion event for the restarting router;
- the auxiliary router generates the digest interaction completion event for the restarting router according to the indication message
- the auxiliary router adjusts the neighbor status of the secondary router to a completely adjacent FULL state according to the digest interaction completion event, and instructs the restart router to generate a digest interaction completion event for the auxiliary router.
- the auxiliary router instructs the restarting router to generate a digest interaction completion event for the auxiliary router, including:
- the auxiliary router when the indication message includes the marked first database description DD packet, instructs the restart router to generate the digest interaction completion event for the secondary router by sending the marked second DD packet.
- the first DD packet or the second DD packet is marked by setting a More flag of the DD packet to 0.
- the method further includes:
- the auxiliary router refuses to instruct the restart router to generate a digest interaction completion event for the auxiliary router if the first DD packet marked by the restart router is not received.
- the method further includes:
- the auxiliary router determines whether the neighbor database summary list and the neighbor request list are all empty;
- the auxiliary router receives the first DD packet with the More flag bit sent by the restarting router.
- the method further includes:
- the secondary router determines whether all link state advertisement LSAs in the neighbor database summary list have been added to the second DD packet. ;
- the auxiliary router determines that the neighbor request list is empty
- the auxiliary router determines that all the LSAs in the neighbor database summary list have been added to the second DD packet, set the More flag bit of the second DD packet to 0;
- the auxiliary router receives the first DD packet with the More flag bit sent by the restarting router.
- the method further includes:
- the auxiliary router determines that the neighbor database summary list and the neighbor request list are all empty if the ID number of the secondary router is greater than the ID number of the restarting router;
- the auxiliary router sets the More flag bit of the second DD packet to 0.
- the method further includes:
- the auxiliary router sets a timer when the ID number of the secondary router is greater than the ID number of the restarting router, and determines that the restarting router receives the second that the More flag is 0. DD message.
- a smooth restart traffic interruption processing method includes:
- the restarting router sends an indication message to the secondary router, where the indication message is a message that the restarting router instructs the secondary router to generate a digest interaction completion event for the restarting router;
- the restarting router generates a digest interaction completion event for the secondary router, where the digest interaction completion event is that the secondary router generates a digest interaction completion event for the restarting router according to the indication message, and interacts according to the digest After the completion event adjusts the neighbor state of the secondary router to be completely adjacent to the FULL state, it indicates that the restart router generates.
- a smooth restart traffic interruption processing device is applied to a secondary router, and the device includes:
- the receiving module is configured to: receive an indication message sent by the restarting router, where the indication message is a message that the restarting router instructs the auxiliary router to generate a digest interaction completion event for the restarting router;
- a first generating module configured to: generate, according to the indication message received by the receiving module, the digest interaction completion event for the restarting router;
- the adjusting module is configured to: adjust, according to the digest interaction completion event generated by the first generating module, a neighbor state of the auxiliary router to be a completely adjacent FULL state, and instruct the restarting router to generate a digest interaction for the auxiliary router. event.
- a smooth restart traffic interruption processing device is applied to restart a router, and the device includes:
- a sending module configured to: send an indication message to the secondary router, where the indication message is a message that the restarting router instructs the secondary router to generate a digest interaction completion event for the restarting router;
- a second generating module configured to: generate a digest interaction completion event for the auxiliary router, where the digest interaction completion event is that the auxiliary router generates the digest interaction completion event for the restarting router according to the indication message, And after the neighbor interaction status of the auxiliary router is adjusted to be completely adjacent to the FULL state, the restarting router is instructed to be generated according to the summary interaction completion event.
- auxiliary router receives an indication message sent by the restarting router, generating a digest interaction completion event for the restarting router, adjusting a neighboring state of the secondary router to a fully adjacency (FULL) state, and instructing the restarting router to generate a digest interaction completion event for the auxiliary router;
- the embodiment of the invention solves the problem of traffic interruption during the smooth restart process in the related art, thereby avoiding the occurrence of traffic interruption during the smooth restart process.
- FIG. 1 is a flowchart of a smooth restart traffic interruption processing method according to an embodiment of the present invention
- FIG. 2 is a flowchart of another smooth restart traffic interruption processing method according to an embodiment of the present invention.
- FIG. 3 is a schematic structural diagram of a device for smooth restart traffic interruption processing according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of another smooth restart traffic interruption processing apparatus according to an embodiment of the present disclosure.
- FIG. 5 is a schematic diagram of a smooth restart traffic interruption processing method in the related art
- FIG. 6 is a flowchart of still another method for smooth restart traffic interruption according to an embodiment of the present invention.
- FIG. 7 is a flowchart of still another method for smooth restart traffic interruption according to an embodiment of the present invention.
- FIG. 8 is a flowchart of a method for sending a last second DD packet in a smooth restart traffic interruption processing method according to an embodiment of the present invention.
- FIG. 1 is the present invention.
- a flowchart of a smooth restart traffic interruption processing method is provided in the embodiment.
- the smooth restart traffic interruption processing of the method provided in this embodiment may include the following steps, that is, steps 110 to 130:
- Step 110 The auxiliary router receives an indication message sent by the restarting router, where the indication message is a message that the restarting router instructs the secondary router to generate a digest interaction completion event for the restarting router;
- Step 120 The auxiliary router generates a digest interaction completion event for the restarting router according to the indication message.
- Step 130 The auxiliary router adjusts the neighbor status of the auxiliary router to a FULL state according to the digest interaction completion event, and instructs the restart router to generate a digest interaction completion event for the auxiliary router.
- the auxiliary router generates an abstract interaction completion event for the restarting router by receiving an indication message sent by the restarting router, and adjusts the neighboring state of the secondary router to a completely adjacent (FULL) state. And instructing the restarting router to generate a digest interaction completion event for the secondary router; the embodiment of the present invention solves the problem of traffic interruption during the smooth restart process in the related art, thereby avoiding traffic interruption during the smooth restart process.
- the indication message may be the first DD packet of the label, so that the first DD packet of the restarting router may be marked by setting the More flag to 0.
- the secondary router can instruct the restarting router to generate a digest interaction completion event for the secondary router by sending the marked second DD packet.
- the second DD packet of the secondary router can be marked by setting the More flag to 0. That is to say, the first DD packet or the second DD packet is marked by setting the More flag bit of the DD packet to 0.
- the auxiliary router instructs the restarting router to generate a digest interaction completion event for the auxiliary router, where the auxiliary router may include the marked first DD packet in the indication message.
- the sending of the marked second DD message instructs the restarting router to generate a digest interaction completion event for the secondary router.
- the auxiliary router may further include: if the secondary router does not receive the first DD packet that is marked by the restarting router, the router refuses to indicate the restarting router. A summary interaction completion event is generated for the secondary router.
- the step 120 may further include: the auxiliary router determines whether the neighbor database summary list and the neighbor request list are all empty; and the auxiliary router determines the neighbor database summary list. If the neighbor request list is empty, set the More flag of the second DD packet to 0. When the More flag bit of the second DD packet is 0, and the first DD packet with the More flag bit sent by the restarting router is 0, the secondary router generates a digest interaction completion event for the restarting router, and the secondary router is configured to The neighbor status bit is adjusted to the FULL state.
- the step 120 may further include: the identifier of the auxiliary router in the auxiliary router is smaller than the ID number of the restarting router.
- the secondary router determines that the neighbor database summary list and the neighbor request list are both empty, and the secondary router receives the More flag sent by the restarting router. The first DD packet with bit 0, and then the auxiliary router sets the More flag bit of the second DD packet to 0. Then, the secondary router generates a digest interaction completion event for restarting the router, and adjusts the neighbor status bit of the auxiliary router. Is the FULL state.
- the auxiliary router may further include: when the ID number of the auxiliary router is smaller than the ID number of the restarting router, the neighbor database summary list and the neighbor request list of the secondary router are both set to the scheme that the More flag bit of the second DD packet is 0. Since the master's database digest interaction is greater than the slave, the restart router will cause the More flag of the first DD packet to be 0. After the secondary router sets the More flag of the second DD packet to 0, the smooth restart time can be saved.
- the auxiliary router may further include: in the case that the ID number of the secondary router is smaller than the ID number of the restarting router, determining the neighbor database summary list. Whether all LSAs have been added to the second DD packet, and the secondary router determines that the neighbor request list is empty, and the secondary router determines that all LSAs in the neighbor database summary list have been added to the second DD packet. Setting the More flag of the second DD packet to 0; the secondary router receives the More flag sent by the restarting router to be 0. A DD message to save as much smooth restart time as possible.
- the auxiliary router may further include: when the ID number of the auxiliary router is greater than the ID number of the restarting router, that is, the auxiliary router is mainly used.
- the secondary router instructs the restart router to generate a digest interaction completion event for the secondary router by transmitting a second DD message with the More flag bit being 0, the secondary router setting The timer determines that the restarting router receives the second DD packet with the More flag being 0.
- FIG. 2 is a flowchart of another smooth restart traffic interruption processing method according to an embodiment of the present invention.
- the smooth restart traffic interruption processing method provided in this embodiment may include the following steps, that is, step 210 to step 220. :
- Step 210 The restarting router sends an indication message to the secondary router, where the indication message is a message that the restarting router instructs the secondary router to generate a digest interaction completion event for the restarting router;
- Step 220 The restarting router generates a digest interaction completion event for the auxiliary router, where the digest interaction completion event is that the auxiliary router generates a digest interaction completion event for the restarting router according to the indication message, and adjusts the auxiliary according to the digest interaction completion event. After the neighbor status of the router is FULL, it indicates the restart of the router.
- FIG. 3 is a schematic structural diagram of a smooth restart traffic interruption processing apparatus according to an embodiment of the present invention.
- the smooth restart traffic interruption processing apparatus provided in this embodiment may include: a receiving module 31, and a first generating module 32.
- the adjustment module 33 a brief description of each module below.
- the receiving module 31 is configured to: receive an indication message sent by the restarting router, where the indication message is a message that the restarting router instructs the secondary router to generate a digest interaction completion event for the restarting router;
- the first generating module 32 is configured to: generate a digest interaction completion event for the restarting router according to the indication message received by the receiving module 31;
- the adjusting module 33 is configured to: adjust the neighbor state of the auxiliary router to a fully adjacency (FULL) state according to the digest interaction completion event generated by the first generating module 32, and instruct the restarting router to generate a digest interaction completion event for the auxiliary router.
- FULL fully adjacency
- FIG. 4 is a schematic structural diagram of another smooth restart traffic interruption processing apparatus according to an embodiment of the present invention.
- the smooth restart traffic interruption processing apparatus provided in this embodiment may include: a sending module 41 and a second generating module. 42, a brief description of each module below.
- the sending module 41 is configured to: send an indication message to the secondary router, where the indication message is a message that the restarting router indicates the summary interaction completion event generated by the secondary router for the restarting router;
- the second generating module 42 is configured to: generate a digest interaction completion event for the auxiliary router, where the digest interaction completion event is that the auxiliary router generates a digest interaction completion event for the restarting router according to the indication message, and completes the interaction according to the digest After the event adjusts the neighbor state of the secondary router to a fully adjacency (FULL) state, it indicates that the restart router generates.
- the digest interaction completion event is that the auxiliary router generates a digest interaction completion event for the restarting router according to the indication message
- the processing method of the smooth restart traffic interruption may include the following steps, that is, steps 501 to 506.
- step 501 in the case that the secondary router is the master (master side), the restarting router performs a digest interaction with the secondary router.
- the digest interaction includes restarting the router to transmit the LSA header file to the secondary router, and the secondary router transmitting the LSA header file to the restarting router.
- Step 502 The secondary router sends a second DD packet with a More flag bit to the restart router.
- Step 503 Restart the router to determine that the first DD packet More flag of the restarting router is also sent to 0, generate a database digest exchange completion (Exchangedone) event for the neighbor state machine, and exit the digest interaction (Exchange) state.
- Exchangedone database digest exchange completion
- Step 504 the restarting router sends the last first DD packet to the auxiliary router; however, due to the link transmission problem, the auxiliary router does not receive the first DD packet with the More flag bit sent by the restarting router, and the auxiliary The router does not generate an Exchangedone event for the neighbor state machine.
- the neighbor request list of the restarting router is empty, indicating that the restarting router does not request the LSA from the secondary router, and the neighbor state of the restarting router is switched to the FULL state.
- Step 505 restarting the router to send a maximum age (Maxage) smooth restart to the auxiliary router
- the LSA notifies the secondary router to exit the smooth restart assist process.
- Step 506 after receiving the signal of the auxiliary smooth restart end sent by the restarting router, the auxiliary router immediately exits the smooth restart assistance, and regenerates the LSA that does not point to the restarting router.
- the secondary router cannot generate an Exchangedone event for the neighbor state machine, and the neighbor state will remain in the Exchange state.
- the regenerated LSA does not point to the restart router, causing all traffic to be forwarded to the restart router through the secondary router to be interrupted.
- the restart router neighbor state reaches the FULL state, and the secondary router neighbor state is in the loading state, and the secondary router is forwarded to the restarting router through the secondary router. All traffic is interrupted.
- the database of the restarting router is cleared, and the smooth restart link state notification is mainly used to inform the secondary router that the restarting router is smoothly restarting, and requests the secondary router to assist it to complete the smooth restart.
- the secondary router receives the secondary smooth restart request for restarting the router, the secondary restart router smoothly restarts.
- the router After the router restarts the smooth restart link state advertisement, it starts sending HELLO packets to re-establish neighbor relationships with the secondary router.
- the restarting router and the secondary routers that establish the neighbor relationship are mutually neighboring routers.
- the neighbor state of a router refers to the state of a neighbor router relative to the router.
- the neighbor status of the secondary router is Exchange, indicating that the restart router can transmit data packets to the secondary router.
- the auxiliary router is configured to send out the More flag in the second DD packet, so that the secondary router generates a database digest interaction for the neighbor state machine to complete the Exchangedone event before restarting the router.
- the master side master side
- the slave side slave side
- the secondary router is the slave side and the restarting router is the master side during the database digest interaction.
- the secondary router needs to send a new second DD packet, determine whether the secondary router neighbor database summary list and the neighbor request list are empty, if the secondary router neighbor database summary list is empty or all LSA header files in the neighbor database summary list.
- the More flag in the second DD packet is set to 0, which is used to notify the corresponding router of the restarting router that the neighboring database has been used. All the LSAs in the summary list are sent. In the remaining cases, the More flag in the second DD packet is set to 1. It is used to notify the restart router that there is an unsent LSA header file in the neighbor database summary list.
- the database digest is generated for the neighbor state machine to complete the Exchangedone event, and the neighbor state is switched to the FULL state.
- the restart router receives the second DD packet whose value is 0, and determines that the neighbor database summary list is empty, completes the database synchronization, and the neighbor status rises to the FULL state, indicating that the database synchronization is complete, and all the LSAs that are missing at the local end have been obtained. , exit the GR and notify the secondary router to also exit the GR assistance process.
- FIG. 6 is a flowchart of still another method for smooth restart traffic interruption processing according to an embodiment of the present invention, and FIG. 6 is a flowchart of a method for restarting a router in the embodiment shown in FIG.
- the ID number is greater than the ID number of the secondary router.
- the method provided in this embodiment may include the following steps, that is, steps 601 to 610:
- Step 601 In the case that the secondary router is in the slave side during the database digest interaction, the secondary router needs to send a new second DD packet.
- Step 602 it is determined whether the neighbor database summary list is empty; the determination result is yes, step 605 is performed, the determination result is no, step 603 is performed;
- Step 603 Add the LSA in the neighbor database summary list to the second DD packet.
- Step 604 it is determined whether all LSAs in the neighbor database summary list are added to the second DD packet; if the determination result is no, step 609 is performed; if the determination result is yes, step 605 is performed;
- Step 605 it is determined whether the neighbor request list is empty; the determination result is yes, step 606 is performed, the determination result is no, step 609 is performed;
- Step 606 setting the More flag bit in the second DD packet to 0;
- Step 607 it is determined whether the first DD packet with the More flag bit sent by the restarting router is 0 is received; if the determination result is yes, step 608 is performed, and the determination result is no, step 610 is performed;
- Step 608 generating a digest interaction completion event for the neighbor state machine, the neighbor state reaches the FULL state, and then performing step 610;
- Step 609 setting the More flag bit in the second DD packet to 1;
- step 610 the second DD packet is sent out, and the smooth restart is ended.
- the secondary router When the secondary router is in the slave side of the database digest, it does not send the second DD packet.
- the first DD packet sent by the restarting router will send the corresponding second DD packet.
- all the LSA header files of the local database are added to the neighbor database summary list.
- all LSA header files in the database summary list are sent to the neighbor routers, and the neighbor routers are sent. Know the details of the local router database. If the neighbor router is absent or does not have a local LSA, it will request the corresponding LSA from the local router. If the neighbor router sends a confirmation that the second DD packet was sent, the corresponding LSA header file will be sent from the local router. Deleted from the neighbor database summary list.
- the secondary router determines whether the neighbor database summary list and the neighbor request list are empty. If the neighbor database summary list is empty or all the LSA header files in the neighbor database summary list have been added to the second DD report. In the text, and the neighbor request list is empty, the secondary router sets the More flag in the second DD packet to 0, which is used to notify the restarting router that the secondary router has sent all the LSAs of the link state database, and the rest is set. The More flag in the second DD packet is 1. It is used to notify the restart router that there is an unsent LSA in the neighbor database summary list of the secondary router.
- the secondary router When the More flag in the second DD packet to be sent by the slave secondary router is set to 0 and the first DD packet with the More flag bit sent by the restarting router is received, the secondary router generates the neighbor state machine.
- the database digest interactively completes the Exchangedone event and the neighbor state switches to the FULL state.
- Restart the router to receive the second DD with the More flag set to 0 by the secondary router.
- the new one does not point to the router LSA that restarts the router connection, which in turn causes traffic disruption.
- FIG. 7 is a flowchart of still another method for processing a smooth restart traffic interruption according to an embodiment of the present invention.
- the ID number of the secondary router is greater than the ID number of the restarting router, as shown in FIG.
- the secondary router controls the entire link state database summary interaction process when the secondary router is the master (master side), and the following steps are performed, that is, steps 701 to 710:
- Step 701 In the case that the secondary router is the master (master side), the secondary router needs to send a new second DD packet;
- Step 702 it is determined whether the neighbor database summary list is empty; the determination result is yes, step 704 is performed, the determination result is no, step 703 is performed;
- Step 703 the LSA in the neighbor database summary list is added to the second DD packet, and then step 709 is performed;
- Step 704 it is determined whether the neighbor request list is empty; the determination result is yes, step 705 is performed, the determination result is no, step 709 is performed;
- Step 705 it is determined whether the first DD packet with the More flag bit sent by the restarting router is 0 is received; if the determination result is yes, step 706 is performed, and the determination result is no, step 709 is performed;
- Step 706 setting the More flag bit in the second DD packet to 0;
- Step 707 generating a digest interaction completion event for the neighbor state machine, and the neighbor state reaches a FULL state
- Step 708 the retransmission timer of the second DD packet is opened, and then step 710 is performed;
- Step 709 setting the More flag bit in the second DD packet to 1;
- step 710 the second DD packet is sent out.
- the secondary router determines whether the neighbor database summary list and the neighbor request list are both empty. If the neighbor database summary list and the neighbor request list are both empty, And the first DD packet sent by the restarting router with the More flag bit being 0 is received, and the second DD packet with the More flag bit is set to 0, and the database state digest is generated for the neighbor state machine to complete the Exchangedone event, and the router will be restarted.
- the state is switched to the FULL state, the retransmission timer of the second DD packet is opened, and the second DD packet is sent to the restarting router; in other cases, the More flag bit in the second DD packet is set to 1.
- the retransmission timer does not receive the restart router to confirm the second DD packet for a period of time, and retransmits the second DD packet.
- the neighboring state of the secondary router is switched to the FULL state, if the corresponding first DD packet sent by the restarting router is received, the retransmission timer of the second DD packet is deleted; if the restarting router is not received within a certain interval, The first DD packet is confirmed to retransmit the last second DD packet with the More flag being 0.
- the secondary router When the secondary router needs to send a new second DD packet, it is determined whether the secondary router neighbor database summary list and the neighbor request list are both empty, and if the neighbor database summary list and the neighbor's request list are both empty and have been received Restart the first DD packet sent by the router with the More flag set to 0. Set the More flag in the second DD packet of the secondary router to 0.
- the neighbor state machine generates the database digest interaction to complete the Exchangedone event.
- the neighbor status is switched to FULL state, and send the second DD packet with the More flag bit to 0 to the restart router.
- the restart router receives the second DD packet with the auxiliary router More flag set to 0, it generates a database digest interaction for the secondary router to complete the Exchangedone event, ensuring that the secondary router neighbor state switches to the FULL state before restarting the router neighbor state.
- the second DD packet with the More flag bit sent by the secondary router may be lost.
- the retransmission timer of the second DD packet is opened. If the corresponding first DD packet is not received within a certain period of time, the retransmission timer retransmits the second DD packet.
- the Exchangedone event is not generated for the neighbor state machine to complete the Exchangedone event. This ensures that the neighbor state of the restarting router is later than the neighboring state of the secondary router and reaches the FULL state. This prevents the related technology from switching to the FULL state and then notifying the neighbor state.
- the neighbor router exits the GR assistance process, and the neighbor router generates a new problem that does not point to the router LSA that restarts the router connection, causing traffic interruption.
- FIG. 8 is a flowchart of a method for sending a last second DD packet in a smooth restart traffic interruption processing method according to an embodiment of the present invention.
- the ID number of the secondary router is greater than the ID of the restarting router.
- the process of retransmitting the second DD packet when the secondary router is the master side includes the following steps, that is, steps 801 to 802:
- Step 801 If the secondary router does not receive the first DD packet acknowledgement sent by the restarting router within a certain interval, the secondary router resets the retransmission timer and retransmits the last second DD packet with the More flag being 0.
- Step 802 If the first DD packet sent by the neighbor restart router is received, the acknowledgment receives the last first DD packet, deletes the retransmission timer of the second DD packet, and ends the entire smooth restart assistance process.
- the secondary router opens a retransmission timer for the last second DD packet to ensure that the restarting router receives the second DD packet with the More flag bit sent by the secondary router.
- 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.
- 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 auxiliary router receives the indication message sent by the restarting router, generates a digest interaction completion event for the restarting router, adjusts the neighboring state of the secondary router to a fully adjacency (FULL) state, and indicates that the restarting router is the
- the auxiliary router generates a summary interaction completion event.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
一种平滑重启流量中断处理方法及装置,其中,该方法包括:辅助路由器接收重启路由器发送的指示消息,该指示消息为重启路由器指示辅助路由器为该重启路由器产生摘要交互完成事件的消息;辅助路由器根据指示消息为重启路由器产生摘要交互完成事件;辅助路由器根据摘要交互完成事件调整该辅助路由器的邻居状态为完全邻接状态,并指示重启路由器为该辅助路由器产生摘要交互完成事件。
Description
本申请涉及但不限于通信技术领域。
平滑重启(Graceful Restart,简称为:GR)是一种在路由协议重启的时候保证数据转发层面功能正常,以保证关键业务不中断的技术,该平滑重启技术已经被广泛使用于主备切换和系统升级等方面,从而保证关键业务不间断转发。
相关技术的路由器中的控制和转发都是由同一个处理器完成的,这个处理器既通过路由协议发现并维护邻居,同时也维护路由表和转发表。随着网络设备普遍采用控制和转发分离技术,相关技术中的高端路由器设备普遍采用多处理器的结构,负责路由协议等控制模块的处理器一般位于主控板,负责数据报文转发的处理器则位于线卡,以尽可能保障主控板上的处理器重启时线卡上的数据报文转发不受影响。GR技术可以有效避免主备切换、系统升级等情况下带来的短时间内的流量转发中断,避免全网中路由震荡的原理可以归结于此。
开放式最短路径优先(Open Shortest Path First,简称为:OSPF)协议是国际互联网工程任务组(The Internet Engineering Task Force,简称为:IETF)提出的一种路由协议,它以链路状态为基础,需要每个路由器都向同一管理区域的所有其他路由器发送链路状态广播信息。OSPF协议中平滑重启路由器(GR Restarter,简称为:重启路由器)平滑重启时,与平滑重启辅助路由器(GR Helper,简称为:辅助路由器)建立邻居关系,获得整个链路状态数据库(Link State Data Base,简称为:LSDB)数据,从而保证转发业务不中断。也就是说,重启路由器与辅助路由器发送各自的数据库摘要描述报文,重启路由器接收辅助路由器发送的数据库描述报文,发现本地数据库中没有对应的链路状态通告(Link State Advertisement,简称为:LSA)或比本地更新的LSA时,向辅助路由器索要相应的LSA,辅助路由器收到请求报文后便会发送
相应的LSA给重启路由器,以辅助重启路由器快速获取整个链路状态数据库。经重启路由器确认,辅助路由器会将已发送的LSA头部文件从邻居数据库摘要列表中删除,其中,数据库摘要描述报文为LSA头部文件,用以描述整个链路状态数据库的内容。值得一提的是,在OSPF协议中辅助路由器与重启路由器建立邻居关系,互为邻居路由器。
当重启路由器主备倒换后,标识号(又称ID号)较大的路由器控制整个链路状态数据库交互过程,为主方(也称master方),相应的ID较小的路由器为整个交互过程的从属方(也称slave方)。两台路由器在邻接关系初始化时,用数据库描述报文(Database Description Packet,简称为:DD报文)来描述自己的LSDB,进行数据库的同步。在数据库摘要交互过程中,处于slave方的路由器不会主动发送DD报文,只有接收到master方路由器发来的DD报文才会发送相应的DD报文。
相关技术中,DD报文More标志位为0表示邻居路由器数据库摘要信息列表为空,已经将数据库摘要信息发送完毕。当身为master方的路由器接收到More标志位为0的DD报文,且本端路由器中邻居数据库摘要列表已经为空,为邻居状态机产生数据库摘要交互完成(Exchangedone)事件;当身为slave方的路由器接收到More标志位为0的DD报文,且本端路由器即将发送出去的DD报文More标志位也为0,为邻居状态机产生Exchangedone事件;其中,邻居状态机是指邻居路由器从一个状态跳转到不同的状态。
此时,当邻居请求列表为空,路由器邻居状态被置于完全邻接(又称FULL)状态,表明邻居路由器与本端路由器LSDB达到同步,本端路由器不能再从邻居路由器处获取数据报文;当邻居请求列表不为空,路由器邻居状态被置于装载(又称Loading)状态,表明本端路由器需要从邻居路由器处获得LSA,同步链路状态数据库。当一个路由器收到本地缺失或比本地更新的LSA摘要描述后,会发送请求要求获取相应的LSA,此时该路由器处于摘要交互(又称Exchange)或Loading状态,并在同步结束后,切换到FULL状态。
然而,相关技术中的平滑重启技术还存在一些问题,由于辅助路由器在重启路由器产生Exchangedone事件之后尚处于Exchange或Loading状态,而导致通过该辅助路由器转发到该重启路由器的所有流量中断。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
针对相关技术中平滑重启过程中流量中断的问题,尚未提出有效的解决方案。
本文提供一种平滑重启流量中断处理方法及装置,以解决相关技术中平滑重启过程中流量中断的问题。
一种平滑重启流量中断处理方法,包括:
辅助路由器接收重启路由器发送的指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;
所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件;
所述辅助路由器根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态,并指示所述重启路由器为所述辅助路由器产生摘要交互完成事件。
可选地,所述辅助路由器指示所述重启路由器为所述辅助路由器产生摘要交互完成事件,包括:
所述辅助路由器在所述指示消息包括标记的第一数据库描述DD报文的情况下,通过发送标记的第二DD报文指示所述重启路由器为所述辅助路由器产生所述摘要交互完成事件。
可选地,所述第一DD报文或所述第二DD报文为通过设置本DD报文的More标志位为0进行标记的。
可选地,所述辅助路由器根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为FULL状态之前,所述方法还包括:
所述辅助路由器在未接收到所述重启路由器标记的所述第一DD报文的情况下,拒绝指示所述重启路由器为所述辅助路由器产生摘要交互完成事件。
可选地,所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件之前,所述方法还包括:
所述辅助路由器判断邻居数据库摘要列表和邻居请求列表是否都为空;
所述辅助路由器在判断出所述邻居数据库摘要列表和所述邻居请求列表都为空时,设置所述第二DD报文的More标志位为0;
所述辅助路由器接收所述重启路由器发送的More标志位为0的所述第一DD报文。
可选地,所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件之前,所述方法还包括:
所述辅助路由器在所述辅助路由器的标识ID号小于所述重启路由器的ID号的情况下,判断邻居数据库摘要列表中所有链路状态通告LSA是否都已经添加到所述第二DD报文中;
所述辅助路由器确定邻居请求列表为空;
所述辅助路由器在判断出所述邻居数据库摘要列表中所有LSA都已经添加到所述第二DD报文中时,设置所述第二DD报文的More标志位为0;
所述辅助路由器接收所述重启路由器发送的More标志位为0的所述第一DD报文。
可选地,所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件之前,所述方法还包括:
所述辅助路由器在所述辅助路由器的ID号大于所述重启路由器的ID号的情况下,确定邻居数据库摘要列表和邻居请求列表都为空;
所述辅助路由器接收所述重启路由器发送的More标志位为0的所述第一DD报文;
所述辅助路由器设置所述第二DD报文的More标志位为0。
可选地,所述方法还包括:
所述辅助路由器在所述辅助路由器的ID号大于所述重启路由器的ID号的情况下,设置定时器,确定所述重启路由器接收到More标志位为0的所述第二
DD报文。
一种平滑重启流量中断处理方法,包括:
重启路由器向辅助路由器发送指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;
所述重启路由器为所述辅助路由器产生摘要交互完成事件,其中,所述摘要交互完成事件为所述辅助路由器根据所述指示消息为所述重启路由器产生摘要交互完成事件,并根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态后,指示所述重启路由器产生的。
一种平滑重启流量中断处理装置,应用于辅助路由器,所述装置包括:
接收模块,设置为:接收重启路由器发送的指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;
第一产生模块,设置为:根据所述接收模块接收的所述指示消息为所述重启路由器产生所述摘要交互完成事件;
调整模块,设置为:根据所述第一产生模块产生的所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态,并指示所述重启路由器为所述辅助路由器产生摘要交互完成事件。
一种平滑重启流量中断处理装置,应用于重启路由器,所述装置包括:
发送模块,设置为:向辅助路由器发送指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;
第二产生模块,设置为:为所述辅助路由器产生摘要交互完成事件,其中,所述摘要交互完成事件为所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件,并根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态后,指示所述重启路由器产生的。
本发明实施例提供的平滑重启流量中断处理方法及装置,辅助路由器通
过接收重启路由器发送的指示消息,为该重启路由器产生摘要交互完成事件,将该辅助路由器的邻居状态调整为完全邻接(FULL)状态,并指示该重启路由器为该辅助路由器产生摘要交互完成事件;本发明实施例解决了相关技术中平滑重启过程中流量中断的问题,进而避免了在平滑重启过程中发生流量中断。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例提供的一种平滑重启流量中断处理方法的流程图;
图2为本发明实施例提供的另一种平滑重启流量中断处理方法的流程图;
图3为本发明实施例提供的一种平滑重启流量中断处理装置的结构示意图;
图4为本发明实施例提供的另一种平滑重启流量中断处理装置的结构示意图;
图5为相关技术中的一种平滑重启流量中断处理方法的示意图;
图6为本发明实施例提供的又一种平滑重启流量中断处理方法的流程图;
图7为本发明实施例提供的再一种平滑重启流量中断处理方法的流程图;
图8为本发明实施例提供的平滑重启流量中断处理方法中一种发送最后一个第二DD报文的方法的流程图。
下文中将结合附图对本发明的实施方式进行详细说明。需要说明的是,在不冲突的情况下,本文中的实施例及实施例中的特征可以相互任意组合。
在附图的流程图示出的步骤可以在诸根据一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
在本发明实施例中提供了一种平滑重启流量中断处理方法,图1为本发明
实施例提供的一种平滑重启流量中断处理方法的流程图,如图1所示,本实施例提供的方法平滑重启流量中断处理可以包括如下步骤,即步骤110~步骤130:
步骤110,辅助路由器接收重启路由器发送的指示消息,其中,该指示消息为该重启路由器指示该辅助路由器为该重启路由器产生摘要交互完成事件的消息;
步骤120,辅助路由器根据该指示消息为该重启路由器产生摘要交互完成事件;
步骤130,辅助路由器根据该摘要交互完成事件调整该辅助路由器的邻居状态为FULL状态,并指示该重启路由器为该辅助路由器产生摘要交互完成事件。
本发明实施例提供的平滑重启流量中断处理方法,辅助路由器通过接收重启路由器发送的指示消息,为该重启路由器产生摘要交互完成事件,将该辅助路由器的邻居状态调整为完全邻接(FULL)状态,并指示该重启路由器为该辅助路由器产生摘要交互完成事件;本发明实施例解决了相关技术中平滑重启过程中流量中断的问题,进而避免了在平滑重启过程中发生流量中断。
可选地,在本发明实施例中,上述指示消息可以为标记的第一DD报文,从而可以通过设置More标志位为0标记该重启路由器的第一DD报文。同理,该辅助路由器可以通过发送标记的第二DD报文指示该重启路由器为辅助路由器产生摘要交互完成事件。另外,可以通过设置More标志位为0标记该辅助路由器的第二DD报文。也就是说,第一DD报文或第二DD报文为通过设置本DD报文的More标志位为0进行标记的。
可选地,在本发明实施例中,上述步骤120中辅助路由器指示重启路由器为该辅助路由器产生摘要交互完成事件的实现方式可以为:辅助路由器在指示消息包括标记的第一DD报文的情况下,通过发送标记的第二DD报文指示重启路由器为该辅助路由器产生摘要交互完成事件。
可选地,在本发明实施例中,上述步骤130之前还可以包括:辅助路由器在未接收到重启路由器标记的第一DD报文的情况下,拒绝指示该重启路由器
为该辅助路由器产生摘要交互完成事件。
可选地,在本发明实施例的一种应用场景中,上述步骤120之前还可以包括:辅助路由器判断邻居数据库摘要列表和邻居请求列表是否都为空;该辅助路由器在判断出邻居数据库摘要列表和邻居请求列表都为空的情况下,设置该第二DD报文的More标志位为0。当该第二DD报文的More标志位为0,且接收到重启路由器发送的More标志位为0的第一DD报文时,辅助路由器为重启路由器产生摘要交互完成事件,将该辅助路由器的邻居状态位调整为FULL状态。
可选地,在本发明实施例的另一种应用场景中,上述步骤120之前还可以包括:辅助路由器在该辅助路由器的标识(Identification,简称为:ID)号大于重启路由器的ID号的情况下,即辅助路由器为主方控制整个链路状态数据库摘要交互过程的情况下,该辅助路由器确定邻居数据库摘要列表和邻居请求列表都为空,并且该辅助路由器接收到该重启路由器发送的More标志位为0的第一DD报文,随后,该辅助路由器设置第二DD报文的More标志位为0,随后,辅助路由器为重启路由器产生摘要交互完成事件,将该辅助路由器的邻居状态位调整为FULL状态。
可选地,在本发明实施例的又一种应用场景中,上述步骤120之前还可以包括:辅助路由器在该辅助路由器的ID号小于重启路由器的ID号的情况下,也即重启路由器为主方控制整个链路状态数据库摘要交互过程的情况下,采取该辅助路由器的邻居数据库摘要列表和邻居请求列表都为空设置第二DD报文的More标志位为0的方案。由于主方的数据库摘要交互要大于从属方,因而重启路由器将第一DD报文的More标志位置0发生在辅助路由器将第二DD报文的More标志位置0之后,可节约平滑重启的时间。
可选地,在本发明实施例的再一种应用场景中,上述步骤120之前还可以包括:辅助路由器在该辅助路由器的ID号小于重启路由器的ID号的情况下,判断邻居数据库摘要列表中所有LSA是否都已经添加到第二DD报文中,并且该辅助路由器确定邻居请求列表为空,该辅助路由器在判断出邻居数据库摘要列表中所有LSA都已经添加到所述第二DD报文中时,设置第二DD报文的More标志位为0;该辅助路由器接收该重启路由器发送的More标志位为0的第
一DD报文,以尽可能节约平滑重启的时间。
可选地,在本发明实施例的再一种应用场景中,上述步骤120之前还可以包括:辅助路由器在该辅助路由器的ID号大于重启路由器的ID号的情况下,也即辅助路由器为主方控制整个链路状态数据库摘要交互过程的情况下,在该辅助路由器通过发送More标志位为0的第二DD报文指示该重启路由器为该辅助路由器产生摘要交互完成事件之后,该辅助路由器设置定时器,确定该重启路由器接收到More标志位为0的第二DD报文。
图2为本发明实施例提供的另一种平滑重启流量中断处理方法的流程图,如图2所示,本实施例提供的平滑重启流量中断处理方法可以包括如下步骤,即步骤210~步骤220:
步骤210,重启路由器向辅助路由器发送指示消息,其中,该指示消息为该重启路由器指示该辅助路由器为该重启路由器产生摘要交互完成事件的消息;
步骤220,重启路由器为该辅助路由器产生摘要交互完成事件,其中,该摘要交互完成事件为该辅助路由器根据该指示消息为该重启路由器产生摘要交互完成事件,并根据该摘要交互完成事件调整该辅助路由器的邻居状态为FULL状态后,指示该重启路由器产生的。
图3为本发明实施例提供的一种平滑重启流量中断处理装置的结构示意图,如图3所示,本实施例提供的平滑重启流量中断处理装置可以包括:接收模块31、第一产生模块32和调整模块33,下面对每个模块进行简要说明。
接收模块31,设置为:接收重启路由器发送的指示消息,其中,该指示消息为该重启路由器指示该辅助路由器为该重启路由器产生摘要交互完成事件的消息;
第一产生模块32,设置为:根据接收模块31接收的指示消息为该重启路由器产生摘要交互完成事件;
调整模块33,设置为:根据第一产生模块32产生的摘要交互完成事件调整该辅助路由器的邻居状态为完全邻接(FULL)状态,并指示该重启路由器为该辅助路由器产生摘要交互完成事件。
图4为本发明实施例提供的另一种平滑重启流量中断处理装置的结构示意图,如图4所示,本实施例提供的平滑重启流量中断处理装置可以包括:发送模块41和第二产生模块42,下面对每个模块进行简要说明。
发送模块41,设置为:向辅助路由器发送指示消息,其中,该指示消息为该重启路由器指示该辅助路由器为该重启路由器产生的摘要交互完成事件的消息;
第二产生模块42,设置为:为该辅助路由器产生摘要交互完成事件,其中,该摘要交互完成事件为该辅助路由器根据该指示消息为该重启路由器产生摘要交互完成事件,并根据该摘要交互完成事件调整该辅助路由器的邻居状态为完全邻接(FULL)状态后,指示该重启路由器产生的。
下面结合应用实例对本发明实施例进行详细说明。
图5为相关技术中的一种平滑重启流量中断处理方法的示意图,图5所示应用场景中,辅助路由器的ID号大于重启路由器的ID号的情况下,如图5所示,相关技术中平滑重启流量中断的处理方法可以包括如下步骤,即步骤501~步骤506。
步骤501,在辅助路由器为主方(master方)的情况下,重启路由器与辅助路由器进行摘要交互。摘要交互包括重启路由器向辅助路由器传输LSA头部文件,以及辅助路由器向重启路由器传输LSA头部文件。
步骤502,辅助路由器向重启路由器发送More标志位为0的第二DD报文。
步骤503,重启路由器判断该重启路由器即将发送出去的第一DD报文More标志位也为0,为邻居状态机产生数据库摘要交互完成(Exchangedone)事件,退出摘要交互(Exchange)状态。
步骤504,重启路由器将最后一个第一DD报文发送给辅助路由器;然而由于链路传输问题导致该辅助路由器没有接收到该重启路由器发送的More标志位为0的第一DD报文,该辅助路由器不会为邻居状态机产生Exchangedone事件。此时,该重启路由器的邻居请求列表为空,表明重启路由器没有向辅助路由器请求LSA,重启路由器的邻居状态会切换到FULL状态。
步骤505,重启路由器向辅助路由器发送最大年龄(Maxage)平滑重启
LSA,通知该辅助路由器退出平滑重启辅助过程。
步骤506,辅助路由器收到该重启路由器发送来的辅助平滑重启结束的信号后,会立即退出平滑重启协助,重新产生没有指向重启路由器的LSA。然而,由于未能接收到该重启路由器More标志位为0的第一DD报文,该辅助路由器不能为邻居状态机产生Exchangedone事件,邻居状态将一直处于Exchange状态。重新产生的LSA没有指向该重启路由器,导致通过该辅助路由器转发到该重启路由器的所有流量中断。
类似的,当辅助路由器需要向重启路由器请求更多链路状态数据库LSA的情况下,会出现重启路由器邻居状态到达FULL状态,辅助路由器邻居状态处于Loading状态而导致通过该辅助路由器转发到该重启路由器的所有流量中断。
当主备路由器倒换后,重启路由器的数据库清空,发送平滑重启链路状态通告主要是用来告知辅助路由器该重启路由器正在平滑重启,请求辅助路由器来协助其完成平滑重启。辅助路由器收到重启路由器的辅助平滑重启请求后,辅助重启路由器平滑重启。
重启路由器发送完平滑重启链路状态通告后,开始发送HELLO报文用来与辅助路由器重新建立邻居关系。在OSPF协议中,重启路由器与建立了邻居关系的辅助路由器互为彼此的邻居路由器。当重启路由器的邻居状态上升至Exchange状态,开始进行数据库摘要的交互。所谓路由器的邻居状态是指邻居路由器相对于该路由器的状态。举例说明,辅助路由器的邻居状态为Exchange,表示重启路由器可向该辅助路由器传输数据报文。调整辅助路由器设置发送出去第二DD报文中More标志位,以使得辅助路由器先于重启路由器为邻居状态机产生数据库摘要交互完成Exchangedone事件。根据路由器的ID号的大小,数据库摘要交互过程中有可以控制整个数据交互过程的主方(master方),和从属方(slave方)的区别。下面对辅助路由器为master方相应的重启路由器为slave方,以及辅助路由器为slave方相应的重启路由器为master方这两种情况分别展开描述。
重启路由器的ID号大于辅助路由器的ID号的情况下,数据库摘要交互过程中辅助路由器为slave方,重启路由器为master方。
当辅助路由器需要发送新的第二DD报文时,判断辅助路由器邻居数据库摘要列表和邻居请求列表是否为空,如果辅助路由器邻居数据库摘要列表为空或者邻居数据库摘要列表中的所有LSA头部文件都已经添加到第二DD报文中,并且辅助路由器的邻居请求列表也为空时,设置第二DD报文中的More标志位为0,用来通告重启路由器相应的辅助路由器已经将邻居数据库摘要列表中所有LSA发送完毕,其余情况下设置第二DD报文中的More标志位为1,用来通告重启路由器相应的辅助路由器邻居数据库摘要列表中还有未发送完的LSA头部文件。
当辅助路由器DD位已置0并且已经接收到重启路由器发来的More标志位为0的第一DD报文时,为邻居状态机产生数据库摘要交互完成Exchangedone事件,邻居状态切换为FULL状态。重启路由器接收到More标志位为0的第二DD报文,判断本身邻居数据库摘要列表为空,完成数据库同步,邻居状态上升至FULL状态,表示数据库同步完成,已经获取到本端缺少的所有LSA,退出GR并且通知辅助路由器也退出GR协助过程。
辅助路由器收到的重启路由器发来的退出GR协助过程信号时,会立刻退出GR协助过程;辅助路由器收到的重启路由器发来的退出GR协助过程信号时,会立刻退出GR协助过程;该退出该GR协助信号可以为最大年龄Maxage的GR LSA。下面结合附图6说明辅助路由器为slave方时平滑重启协助流程,图6为本发明实施例提供的又一种平滑重启流量中断处理方法的流程图,图6所示实施例中,重启路由器的ID号大于辅助路由器的ID号,如图6所示,本实施例提供的方法可以包括以下步骤,即步骤601~步骤610:
步骤601,在辅助路由器在数据库摘要交互过程中处于从方(slave方)的情况下,辅助路由器需要发送新的第二DD报文;
步骤602,判断邻居数据库摘要列表是否为空;判断结果为是,执行步骤605,判断结果为否,执行步骤603;
步骤603,将邻居数据库摘要列表中的LSA添加到第二DD报文中;
步骤604,判断邻居数据库摘要列表中所有LSA是否都添加到第二DD报文中;判断结果为否,执行步骤609;判断结果为是,执行步骤605;
步骤605,判断邻居请求列表是否为空;判断结果为是,执行步骤606,判断结果为否,执行步骤609;
步骤606,设置第二DD报文中的More标志位为0;
步骤607,判断是否接收到重启路由器发送的More标志位为0的第一DD报文;判断结果为是,执行步骤608,判断结果为否,执行步骤610;
步骤608,为邻居状态机产生摘要交互完成事件,邻居状态到达FULL状态,随后执行步骤610;
步骤609,设置第二DD报文中的More标志位为1;
步骤610,将第二DD报文发送出去,结束平滑重启。
当辅助路由器在数据库摘要交互过程中处于slave方时,不会主动发送第二DD报文,只有接收到重启路由器发来的第一DD报文才会发送相应的第二DD报文。在数据库交互协商完成时,会将本地数据库所有LSA头部文件添加到邻居数据库摘要列表中,邻居数据库摘要交互过程中,会将数据库摘要列表中所有LSA头部文件发送给邻居路由器,让邻居路由器知道本端路由器数据库的详细信息。邻居路由器缺少或者没有本地LSA新,会向本端路由器请求对应LSA,如果收到邻居路由器发来了先前发送第二DD报文的确认,会将已发送地与之对应的LSA头部文件从邻居数据库摘要列表中删除。
发送第二DD报文时,辅助路由器判断邻居数据库摘要列表和邻居请求列表是否为空,如果邻居数据库摘要列表为空或者邻居数据库摘要列表中的所有LSA头部文件都已经添加到第二DD报文中,并且邻居请求列表为空,辅助路由器设置第二DD报文中的More标志位为0,用来通告重启路由器该辅助路由器已经将链路状态数据库所有LSA发送完毕,其余情况下设置第二DD报文中的More标志位为1,用来通告重启路由器该辅助路由器邻居数据库摘要列表中还有未发送完的LSA。
当从属方辅助路由器即将发送的第二DD报文中的More标志位设置为0并且已经接收到重启路由器发来的More标志位为0的第一DD报文时,辅助路由器为邻居状态机产生数据库摘要交互完成Exchangedone事件,邻居状态切换到FULL状态。重启路由器接收到辅助路由器发送的More标志位为0的第二DD
报文,为邻居状态机产生数据库交互完成Exchangedone事件。这样就保证了辅助路由器端的邻居状态先于重启路由器端邻居状态到达FULL状态,从而也就避免了相关技术中由于重启路由器邻居状态先切换到FULL状态进而通知辅助路由器退出GR协助过程,辅助路由器产生新的没有指向重启路由器连接的路由器LSA,进而导致流量中断的问题。
图7为本发明实施例提供的再一种平滑重启流量中断处理方法的流程图,图7所示实施例中,辅助路由器的ID号大于重启路由器的ID号,如图7所示,当辅助路由器的ID更大的情况下,数据库摘要交互过程中辅助路由器为主方(master方)时,辅助路由器控制整个链路状态数据库摘要交互过程包括以下步骤,即步骤701~步骤710:
步骤701,在辅助路由器为主方(master方)的情况下,辅助路由器需要发送新的第二DD报文;
步骤702,判断邻居数据库摘要列表是否为空;判断结果为是,执行步骤704,判断结果为否,执行步骤703;
步骤703,将邻居数据库摘要列表中的LSA添加到第二DD报文中,随后执行步骤709;
步骤704,判断邻居请求列表是否为空;判断结果为是,执行步骤705,判断结果为否,执行步骤709;
步骤705,判断是否接收到重启路由器发送的More标志位为0的第一DD报文;判断结果为是,执行步骤706,判断结果为否,执行步骤709;
步骤706,设置第二DD报文中的More标志位为0;
步骤707,为邻居状态机产生摘要交互完成事件,邻居状态到达FULL状态;
步骤708,打开第二DD报文的重传定时器,随后执行步骤710;
步骤709,设置第二DD报文中的More标志位为1;
步骤710,将第二DD报文发送出去。
当需要发送新的第二DD报文时,辅助路由器判断邻居数据库摘要列表和邻居请求列表是否都为空,如果邻居数据库摘要列表和邻居请求列表都为空,
并且已经接收到重启路由器发来More标志位为0的第一DD报文,设置More标志位为0的空第二DD报文,为邻居状态机产生数据库摘要交互完成Exchangedone事件,将重启路由器的状态切换到FULL状态,打开该第二DD报文的重传定时器,并将该第二DD报文发送给重启路由器;其余情况下设置第二DD报文中的More标志位为1。该重传定时器在一段时间内没有接收到重启路由器对第二DD报文确认,会重传该第二DD报文。
当辅助路由器的邻居状态切换到FULL状态时,如果接收到重启路由器发来的相应第一DD报文确认,删除第二DD报文的重传定时器;如果一定间隔内没有接收到重启路由器发来的第一DD报文确认,将重传最后一个More标志位为0的空第二DD报文。
当辅助路由器需要发送新的第二DD报文时,判断该辅助路由器邻居数据库摘要列表和邻居请求列表是否都为空,如果邻居数据库摘要列表和邻居的请求列表都为空时,并且已经接收到重启路由器发来的More标志位为0的第一DD报文,设置辅助路由器的第二DD报文中的More标志位为0,为邻居状态机产生数据库摘要交互完成Exchangedone事件,邻居状态切换到FULL状态,并向重启路由器发送More标志位为0的第二DD报文。重启路由器接收到辅助路由器More标志位为0的第二DD报文后,为辅助路由器产生数据库摘要交互完成Exchangedone事件,保证辅助路由器邻居状态先于重启路由器邻居状态切换至FULL状态。
由于辅助路由器最后发送出去的More标志位为0的第二DD报文可能出现丢失,打开该DD第二报文的重传定时器。如果一段时间内没有接收到相应的第一DD报文确认,该重传定时器会重传该第二DD报文。
由于辅助路由器发送More标志位为0的第二DD报文不会早于其将自身的邻居状态转化为FULL状态,而重启路由器在没有接收到More标志位为0的第二DD报文时,不会为邻居状态机产生数据库摘要交互完成Exchangedone事件,从而保证了重启路由器端的邻居状态晚于辅助路由器端邻居状态到达FULL状态,避免了相关技术中由于重启路由器邻居状态先切换到FULL状态进而通知邻居路由器退出GR协助过程,邻居路由器产生新的没有指向重启路由器连接的路由器LSA而导致流量中断的问题。
图8为本发明实施例提供的平滑重启流量中断处理方法中一种发送最后一个第二DD报文的方法的流程图,图8所示实施例中,辅助路由器的ID号大于重启路由器的ID号,如图8所示,辅助路由器为master方时重传第二DD报文的处理流程包括以下步骤,即步骤801~步骤802:
步骤801,辅助路由器如果在一定间隔内没有接收到重启路由器发来的第一DD报文确认,将重置重传定时器,重传最后一个More标志位为0的空第二DD报文。
步骤802,如果接收到邻居重启路由器发来的第一DD报文,确认接收到该最后一个第一DD报文,删除第二DD报文的重传定时器,结束整个平滑重启协助过程。
本实施例提供的技术方案,辅助路由器会为最后一个第二DD报文打开重传定时器,以确保重启路由器接收到辅助路由器发送的More标志位为0的第二DD报文。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(根据系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
本发明实施例中,辅助路由器通过接收重启路由器发送的指示消息,为该重启路由器产生摘要交互完成事件,将该辅助路由器的邻居状态调整为完全邻接(FULL)状态,并指示该重启路由器为该辅助路由器产生摘要交互完成事件;本发明实施例解决了相关技术中平滑重启过程中流量中断的问题,进而避免了在平滑重启过程中发生流量中断。
Claims (11)
- 一种平滑重启流量中断处理方法,包括:辅助路由器接收重启路由器发送的指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件;所述辅助路由器根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态,并指示所述重启路由器为所述辅助路由器产生摘要交互完成事件。
- 根据权利要求1所述的方法,其中,所述辅助路由器指示所述重启路由器为所述辅助路由器产生摘要交互完成事件,包括:所述辅助路由器在所述指示消息包括标记的第一数据库描述DD报文的情况下,通过发送标记的第二DD报文指示所述重启路由器为所述辅助路由器产生所述摘要交互完成事件。
- 根据权利要求2所述的方法,其中,所述第一DD报文或所述第二DD报文为通过设置本DD报文的More标志位为0进行标记的。
- 根据权利要求2所述的方法,其中,所述辅助路由器根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为FULL状态之前,所述方法还包括:所述辅助路由器在未接收到所述重启路由器标记的所述第一DD报文的情况下,拒绝指示所述重启路由器为所述辅助路由器产生摘要交互完成事件。
- 根据权利要求3所述的方法,其中,所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件之前,所述方法还包括:所述辅助路由器判断邻居数据库摘要列表和邻居请求列表是否都为空;所述辅助路由器在判断出所述邻居数据库摘要列表和所述邻居请求列表都为空时,设置所述第二DD报文的More标志位为0;所述辅助路由器接收所述重启路由器发送的More标志位为0的所述第一DD报文。
- 根据权利要求3所述的方法,其中,所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件之前,所述方法还包括:所述辅助路由器在所述辅助路由器的标识ID号小于所述重启路由器的ID号的情况下,判断邻居数据库摘要列表中所有链路状态通告LSA是否都已经添加到所述第二DD报文中;所述辅助路由器确定邻居请求列表为空;所述辅助路由器在判断出所述邻居数据库摘要列表中所有LSA都已经添加到所述第二DD报文中时,设置所述第二DD报文的More标志位为0;所述辅助路由器接收所述重启路由器发送的More标志位为0的所述第一DD报文。
- 根据权利要求3所述的方法,其中,所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件之前,所述方法还包括:所述辅助路由器在所述辅助路由器的ID号大于所述重启路由器的ID号的情况下,确定邻居数据库摘要列表和邻居请求列表都为空;所述辅助路由器接收所述重启路由器发送的More标志位为0的所述第一DD报文;所述辅助路由器设置所述第二DD报文的More标志位为0。
- 根据权利要求3或7所述的方法,还包括:所述辅助路由器在所述辅助路由器的ID号大于所述重启路由器的ID号的情况下,设置定时器,确定所述重启路由器接收到More标志位为0的所述第二DD报文。
- 一种平滑重启流量中断处理方法,包括:重启路由器向辅助路由器发送指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;所述重启路由器为所述辅助路由器产生摘要交互完成事件,其中,所述摘要交互完成事件为所述辅助路由器根据所述指示消息为所述重启路由器产生摘要交互完成事件,并根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态后,指示所述重启路由器产生的。
- 一种平滑重启流量中断处理装置,应用于辅助路由器,所述装置包括:接收模块,设置为:接收重启路由器发送的指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;第一产生模块,设置为:根据所述接收模块接收的所述指示消息为所述重启路由器产生所述摘要交互完成事件;调整模块,设置为:根据所述第一产生模块产生的所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态,并指示所述重启路由器为所述辅助路由器产生摘要交互完成事件。
- 一种平滑重启流量中断处理装置,应用于重启路由器,所述装置包括:发送模块,设置为:向辅助路由器发送指示消息,其中,所述指示消息为所述重启路由器指示所述辅助路由器为所述重启路由器产生摘要交互完成事件的消息;第二产生模块,设置为:为所述辅助路由器产生摘要交互完成事件,其中,所述摘要交互完成事件为所述辅助路由器根据所述指示消息为所述重启路由器产生所述摘要交互完成事件,并根据所述摘要交互完成事件调整所述辅助路由器的邻居状态为完全邻接FULL状态后,指示所述重启路由器产生的。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610040821.7A CN106992928B (zh) | 2016-01-21 | 2016-01-21 | 平滑重启流量中断处理方法及装置 |
CN201610040821.7 | 2016-01-21 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017124738A1 true WO2017124738A1 (zh) | 2017-07-27 |
Family
ID=59361371
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/095871 WO2017124738A1 (zh) | 2016-01-21 | 2016-08-18 | 平滑重启流量中断处理方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106992928B (zh) |
WO (1) | WO2017124738A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060171404A1 (en) * | 2004-04-28 | 2006-08-03 | Gargi Nalawade | Network routing apparatus that performs soft graceful restart |
CN102404228A (zh) * | 2011-12-12 | 2012-04-04 | 杭州华三通信技术有限公司 | 一种基于ospf协议的gr处理方法和设备 |
CN102769571A (zh) * | 2012-07-30 | 2012-11-07 | 杭州华三通信技术有限公司 | 一种平滑重启实现方法及设备 |
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 |
CN104639434A (zh) * | 2015-02-06 | 2015-05-20 | 杭州华三通信技术有限公司 | 一种开放最短路径优先协议平滑重启方法及装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101860477A (zh) * | 2010-04-20 | 2010-10-13 | 北京星网锐捷网络技术有限公司 | 一种优雅重启中处理异常的方法和装置 |
CN102546427B (zh) * | 2012-02-02 | 2015-04-29 | 杭州华三通信技术有限公司 | 一种基于ospf协议的平滑重启方法和路由器 |
CN103973562B (zh) * | 2014-05-20 | 2017-11-10 | 新华三技术有限公司 | 一种避免平滑重启时业务中断的方法及设备 |
-
2016
- 2016-01-21 CN CN201610040821.7A patent/CN106992928B/zh active Active
- 2016-08-18 WO PCT/CN2016/095871 patent/WO2017124738A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060171404A1 (en) * | 2004-04-28 | 2006-08-03 | Gargi Nalawade | Network routing apparatus that performs soft graceful restart |
CN102404228A (zh) * | 2011-12-12 | 2012-04-04 | 杭州华三通信技术有限公司 | 一种基于ospf协议的gr处理方法和设备 |
CN102769571A (zh) * | 2012-07-30 | 2012-11-07 | 杭州华三通信技术有限公司 | 一种平滑重启实现方法及设备 |
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 |
CN104639434A (zh) * | 2015-02-06 | 2015-05-20 | 杭州华三通信技术有限公司 | 一种开放最短路径优先协议平滑重启方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN106992928A (zh) | 2017-07-28 |
CN106992928B (zh) | 2020-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7804770B2 (en) | Method and apparatus for performing a graceful restart in a NSF-capable router without enhancing link state routing protocols | |
US7573811B2 (en) | Network transparent OSPF-TE failover | |
JP5828954B2 (ja) | サーバ故障中のパケット処理方法及びルータ | |
WO2009067865A2 (en) | Method, router, line card and active master card for realizng a link state database synchronization | |
WO2012122945A1 (zh) | 用于虚拟网络单元的工作方法及装置 | |
US20120275456A1 (en) | Expedited graceful ospf restart | |
WO2012000234A1 (zh) | 链路间快速切换的方法、装置和系统 | |
DK2465233T3 (en) | Router and successful reboot procedure | |
WO2008014696A1 (fr) | Méthode et dispositif pour effectuer un transfert de communications | |
CN102546427B (zh) | 一种基于ospf协议的平滑重启方法和路由器 | |
WO2008141557A1 (fr) | Procédé destiné à une convergence de routage, un dispositif de routage et un pupitre de commande principal dans le dispositif de routage | |
US8238309B1 (en) | Stateful home agent recovery protocol (SHARP) | |
JP2010226393A (ja) | 自律分散制御によるパス設定方法およびシステム並びに通信装置 | |
JP2008278337A (ja) | 情報配信システム、同システムに用いる端末装置及びプログラム、並びに循環接続回避方法 | |
CN103986649A (zh) | 一种边界网关协议平滑重启方法及路由设备 | |
WO2019174454A1 (zh) | 链路恢复方法及装置、系统、存储介质、电子装置 | |
US8060628B2 (en) | Technique for realizing high reliability in inter-application communication | |
WO2010102560A1 (zh) | 一种退出优雅重启的方法、设备及系统 | |
CN104717144A (zh) | 一种基于网内缓存和逐跳确认的可靠组播方法 | |
US7953015B2 (en) | Method for ensuring reliability in network | |
CN102769571B (zh) | 一种平滑重启实现方法及设备 | |
CN102136936B (zh) | 避免控制平面故障影响转发平面运行的方法、节点及系统 | |
WO2017124738A1 (zh) | 平滑重启流量中断处理方法及装置 | |
WO2007124629A1 (fr) | Procédé de traitement de message lmp, unité et noeud de traitement de message lmp | |
WO2019001487A1 (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: 16885998 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: 16885998 Country of ref document: EP Kind code of ref document: A1 |