CN103986649B - A kind of Border Gateway Protocol smooth restarting method and routing device - Google Patents

A kind of Border Gateway Protocol smooth restarting method and routing device Download PDF

Info

Publication number
CN103986649B
CN103986649B CN201410234199.4A CN201410234199A CN103986649B CN 103986649 B CN103986649 B CN 103986649B CN 201410234199 A CN201410234199 A CN 201410234199A CN 103986649 B CN103986649 B CN 103986649B
Authority
CN
China
Prior art keywords
routing
routing device
neighbours
tcp connections
iinformation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410234199.4A
Other languages
Chinese (zh)
Other versions
CN103986649A (en
Inventor
樊超
王伟
王海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201410234199.4A priority Critical patent/CN103986649B/en
Publication of CN103986649A publication Critical patent/CN103986649A/en
Application granted granted Critical
Publication of CN103986649B publication Critical patent/CN103986649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of Border Gateway Protocol smooth restarting method, this method is applied to first routing device, and the first routing device enables BGP and uninterruptedly route, and backs up itself bgp routing information;When switching, if TCP connections disconnect extremely, first routing device switches to GR Restarter, calculates routing iinformation digest value corresponding with neighbours' routing device during TCP connections disconnect;If routing iinformation changes during TCP connections disconnect, routing iinformation digest value corresponding with neighbours' routing device is then calculated by the bgp routing information of renewal again after TCP connections recovery, if the above-mentioned informative abstract value calculated twice is unequal, then the first routing device sends the routing iinformation after TCP connections recover and gives neighbours' routing device, the routing iinformation for making it update self record, if equal, transmission switches end notification packet and gives neighbours' routing device.

Description

A kind of Border Gateway Protocol smooth restarting method and routing device
Technical field
The present invention relates to network communication and transmission technology, particularly a kind of Border Gateway Protocol smooth restarting method and route are set It is standby.
Background technology
Border Gateway Protocol (Border Gateway Protocol, BGP) smooth restarting (Graceful Restart, GR it is) that one kind ensures the unbroken mechanism of forwarding service when masterslave switchover or bgp protocol are restarted.GR has two roles:
Smooth restarting equipment GR Restarter:Generation masterslave switchover or agreement are restarted, and the equipment with GR abilities.
Smooth restarting auxiliary equipment GR Helper:There is neighborhood with GR Restarter, assist to complete GR flows Equipment.GR Helper also have GR abilities.
Equipment both can be used as GR Helper again as GR Restarter.The role of equipment is existed by the equipment Effect during BGP GR is determined.
The BGP GR course of work is:
(1) GR Restarter and GR Helper pass through Open interacting message GR abilities.Only both sides have GR abilities When, it is established that bgp session just possess GR abilities.
(2) set up after the bgp session for possessing GR abilities, when GR Restarter progress masterslave switchovers or bgp protocol are restarted, GR Restarter will not delete routing information base (Routing Information Base, RIB) and forwarding information storehouse (Forwarding Information Base, FIB) list item, E-Packets still according to original forwarding-table item.GR After Helper has found that GR Restarter progress masterslave switchovers or bgp protocol are restarted, GR Helper will not be deleted from the GR The route that Restarter learns, but these routing labels are route for short duration failure (Stale), still it is route according to these E-Packet, so that it is guaranteed that during GR Restarter carry out masterslave switchover or bgp protocol is restarted, message forwarding will not Interrupt.
(3) after the completion of GR Restarter masterslave switchovers or bgp protocol are restarted, it can set up BGP with GRHelper again Session.If not being successfully established bgp session, GR Helper in the bgp session reconstruction time that GR Restarter are noticed The route labeled as failure can be deleted.
(4) if being successfully established bgp session, GR in the bgp session reconstruction time that GR Restarter are noticed Restarter and GR Helper foundation the enterprising walking along the street of bgp session by information exchange, so as to GRRestarter restoration routes Information, GR Helper delete the invalid markers of route according to the route learnt.
(5) after bgp session is set up, on GR Restarter and GR Helper can all start routing information base terminates (End-Of-RIB) (value of timer passes through graceful-restart timer wait-for-rib to mark waiting timer Order configuration), the timer is used for controlling the convergent speed of routing iinformation.If timer expiry does not complete routing iinformation Interaction, then GR Restarter no longer receive new route, update RIB list items according to the bgp routing information learnt, delete Except the RIB list items of aging;GR Helper then delete the route labeled as failure.
(6) if there is no the interaction for completing routing iinformation, GRRestarter in RIB routing aging timer expiries Meeting compulsory withdrawal GR processes, RIB list items are updated according to the bgp routing information learnt, delete the RIB list items of aging.
According to the RFC that requests for comments (Request For Comments) 4724 regulation, GR rebuilds Restart ends after neighbours Need to resend and be all routed to Helper.
And BGP uninterruptedly route (Nonstop Routing, NSR) be one kind by standby between the active and standby process of bgp protocol The necessary protocol status of part and data (such as bgp neighbor information and routing iinformation) so that standby when the host process of bgp protocol is interrupted Part process is capable of the work of seamlessly adapter host process, so that it is guaranteed that peer awareness is interrupted less than bgp protocol, keeps BGP roads By, and ensure the technology that forwarding will not be interrupted.
BGP NSR and BGP GR have following difference:
Requirement to bgp peer is different:During using BGP NSR functions, bgp peer will not perceive local device The failures such as the abnormal restarting or masterslave switchover of bgp process, because BGP routes oneself have been backed up, and TCP connections, therefore should not Bgp peer assists to recover bgp routing information.
BGP GR require that bgp peer has GR abilities, and when bgp session interrupts recovery, bgp peer can be made Local device is assisted to recover bgp routing information for GR helper.
Typical case's application of message digest algorithm the 5th edition (Message Digest Algorithm5.0, MD5) is to one section Information (Message) produces informative abstract (Message-Digest), to prevent from being tampered.Such as, have many soft under UNIX Part has a filename identical when downloading, the entitled .md5 of file extent file, in this document generally only A line text, general configuration is such as:
MD5 (tanajiya.tar.gz)=0ca175b9c0f726a831d895e269332361
Here it is the digital signature of tanajiya.tar.gz files.MD5 by whole file as one big text message, Scaling method is become by its irreversible character string, this unique MD5 informative abstract is generated.If propagating this text afterwards During part, no matter the content of file, which there occurs, any type of changes (including circuit in artificial modification or downloading process Error of transmission etc. caused by unstable), as long as it finds that informative abstract is differed when you recalculate MD5 to this file, It is possible thereby to determine the simply incorrect file that you obtain.If the third-party certification authority of yet another, with MD5 also " denial " of paper writer can be prevented, here it is so-called digital signature applications.
The content of the invention
In view of this, the present invention proposes a kind of Border Gateway Protocol smooth restarting method and routing device, effectively solves Some equipment TCP do not support NSR or TCP connections surprisingly to disconnect and can not apply BGP when switching in the prior art Sent in the problem of NSR modes are switched, and BGP GR switchover modes bandwidth occupancy caused by a large amount of unnecessary routes, The problem of routing convergence is excessively slow.Technical scheme proposed by the present invention is:
A kind of Border Gateway Protocol smooth restarting method, this method is applied to first routing device, and the first via is by setting Standby to set up neighborhood with least one neighbours' routing device, the first routing device and at least one neighbours route are set Standby to possess the informative abstract value ability for calculating routing iinformation, it is uninterrupted that the first routing device enables Border Gateway Protocol (BGP) NSR is route, this method includes:
The first routing device backs up itself bgp routing information;
The first routing device is switched, if TCP connections disconnect extremely, itself is switched into smooth restarting equipment GR Restarter, enter smoothness rebooting GR Restart patterns;
The first routing device calculates routing iinformation corresponding with neighbours' routing device by the bgp routing information of backup Digest value MD5-1;
If routing iinformation changes during TCP connections disconnect, the first routing device updates the BGP routes of backup Information, road corresponding with neighbours' routing device is calculated after TCP connections recovery again by the backup bgp routing information after renewal By informative abstract value MD5-2, if the MD5-2 and the MD5-1 are unequal, the first routing device is sent after renewal Routing iinformation give neighbours' routing device, the routing iinformation for making it update self record, if the MD5-2 and the MD5-1 Equal, then the first routing device transmission switches end notification packet and gives neighbours' routing device, it is deleted itself route letter Short duration failure mark Stale on breath, exits smooth restarting auxiliary GR Help patterns.
In such scheme, this method further comprises:
If routing iinformation is unchanged during TCP connections disconnect, the first routing device, which is sent, switches end notice report Text gives neighbours' routing device, it is deleted the short duration failure mark Stale on itself routing iinformation, exits smooth restarting auxiliary GR Help patterns.
In such scheme, the method that routing iinformation changes during judging the TCP connections disconnection is:
The first routing device by local routing information change judgement TCP connections disconnect during routing iinformation hair Changing, and/or the first routing device receive the routing update information judgement neighbours of neighbours' routing device transmission The routing iinformation of routing device changes, and the routing update information is neighbours' routing device before TCP connections recovery Calculate routing iinformation digest value corresponding with the first routing device respectively afterwards, and judge that TCP connections are counted twice before and after recovering The informative abstract value of calculation is sent to the first routing device when unequal.
In such scheme, the unconverted method of routing iinformation is during judging the TCP connections disconnection:
The local routing information of the first routing device is unchanged, and the first routing device receives all neighbours The unchanged notification packet of route that routing device is sent, routing iinformation is unchanged during judging the TCP connections disconnection.
In such scheme, this method further comprises:
If the TCP connections are normal, the first routing device is performed according to BGP NSR modes and switched.
A kind of routing device, the equipment and at least one neighbours' routing device set up neighborhood, and the routing device and At least one neighbours' routing device possesses the informative abstract value ability for calculating routing iinformation, and the routing device enables border net Close agreement BGP and uninterruptedly route NSR, the equipment includes:
Memory module, for backing up itself bgp routing information;
Processing module, during for switching, if TCP connections disconnect extremely, smooth restarting equipment is switched to by itself GR Restarter, enter smoothness rebooting GR Restart patterns;
Computing module, calculates routing iinformation corresponding with neighbours' routing device for the bgp routing information by backup and plucks Value MD5-1;
Whether judge module, change for routing iinformation during judging TCP connections disconnection;
If routing iinformation changes during TCP connections disconnect, the memory module is additionally operable to update the BGP roads of backup By information;
If it is determined that routing iinformation changes during module judges TCP connections disconnection, the computing module is additionally operable to TCP connections calculate routing iinformation corresponding with neighbours' routing device again after recovering by the backup bgp routing information after renewal Digest value MD5-2;
The judge module is additionally operable to judge whether the MD5-2 is equal with the MD5-1;
Sending module, when judging that the MD5-2 and MD5-1 is unequal for the judge module, sends TCP connections and recovers Routing iinformation afterwards gives neighbours' routing device, the routing iinformation for making it update self record;Be additionally operable to the MD5-2 with it is described When MD5-1 is equal, transmission switches end notification packet and gives neighbours' routing device, it is deleted the of short duration mistake on itself routing iinformation Criterion remembers Stale, exits smooth restarting auxiliary GRHelp patterns.
It is described to send if routing iinformation is unchanged during the judge module judges TCP connections disconnection in such scheme Module is further used for, and transmission switches end notification packet and gives neighbours' routing device, deletes it short on itself routing iinformation Temporary invalid markers Stale, exits smooth restarting auxiliary GR Help patterns.
In such scheme, the equipment also includes receiving module, the routing update letter for receiving the transmission of neighbours' routing device Breath, sends the first notice message to judge module, and the routing update information is that neighbours' routing device recovers in TCP connections Before and after front and rear calculating routing iinformation digest value corresponding with the first routing device respectively, and judgement TCP connection recoveries twice The informative abstract value of calculating is sent to the first routing device when unequal;
The judge module is further used for, and changed road during judging TCP connections disconnection by local routing information Changed by information, and/or receive road during the first notice message judgement TCP connection disconnections that the receiving module is sent Changed by information.
In such scheme,
The receiving module is additionally operable to, and receives the unchanged notification packet of route that all neighbours' routing devices are sent, hair The second notice message is sent to judge module;
The judge module is further used for, and receives the second notice message that the receiving module is sent, and judges local road It is unchanged by information.
In such scheme, the processing module is further used for, if TCP connections are normal, according to BGP NSR sides Formula is performed and switched.
In summary, the present invention proposes a kind of Border Gateway Protocol smooth restarting method and routing device, when route is set When preparation life is switched, if the routing device transmission control protocol (Transmission Control Protocol, TCP) is propped up Hold NSR or TCP connections normal, due to having had backed up the routing iinformation on the routing device, during switching bgp neighbor will not in Disconnected, normal transceiving data is switched in BGP NSR modes, and peer awareness is interrupted less than bgp protocol, keeps BGP routes; If it happens the routing device switched does not support NSR or TCP disconnectings, then the routing device switches to GR Restarter, its neighbours' routing device switches to GR Helper, GR Restarter to save route stand-by, GR Helper Stale routes are saved, by increasing MD5 digest algorithm, judge to route whether to change during because of TCP connections disconnection to determine Whether plan is needed to resend routing iinformation, so as to accelerate routing convergence, the CPU for reducing bandwidth and processing routing update is accounted for With.
Brief description of the drawings
Fig. 1 is the networking structure figure of embodiment of the method one and embodiment of the method two;
Fig. 2 is the flow chart of embodiment of the method one;
Fig. 3 is the flow chart of embodiment of the method two;
Fig. 4 is the routing device structure chart of the embodiment of the present invention.
Embodiment
According to the RFC that requests for comments (Request For Comments) 4724 regulation, GR rebuilds Restarter after neighbours End needs, which are resend, is all routed to Helper, and actually its route is recovered from Helper side, and Helper has been protected at end Routing iinformation is deposited, in most cases, such retransmission mechanism is probably unnecessary, GR convergences can be caused slack-off.
NSR modes do not need peer-to-peer to coordinate route recovery, and control plane route information needs to backup to slave board, simultaneously Needing the TCP of agreement to link supports NSR to ensure heartbeat message, and neighbours are not interrupted.But some routing device TCP do not support NSR Function, or TCP disconnect and can not switched using NSR modes extremely.
Based on this, the invention provides a kind of Border Gateway Protocol smooth restarting method and routing device.Routing device is first The bgp routing information of itself is first backed up, when it is switched, if TCP NSR are normal, and TCP connections are normal, then the route Equipment is switched according to BGP NSR modes;Otherwise the routing device switches to GR Restarter, into GR flows.Such as Whether fruit is switched in GR modes, by increasing MD5 digest algorithm, judge to route and change during because of TCP connections disconnection Come whether decision-making needs to resend routing iinformation, so as to accelerate routing convergence, reduce bandwidth and handle the CPU of routing update Take.
To make being more clearly understood for the object, technical solutions and advantages of the present invention expression, below in conjunction with the accompanying drawings and specifically The present invention is further described in more detail for embodiment.
The technical scheme of the embodiment of the present invention is:
The first routing device backs up itself bgp routing information;
The first routing device is switched, if TCP connections disconnect extremely, itself is switched into smooth restarting equipment GR Restarter, enter smoothness rebooting GR Restart patterns;
The first routing device calculates routing iinformation corresponding with neighbours' routing device by the bgp routing information of backup Digest value MD5-1;
If routing iinformation changes during TCP connections disconnect, the first routing device updates the BGP routes of backup Information, road corresponding with neighbours' routing device is calculated after TCP connections recovery again by the backup bgp routing information after renewal By informative abstract value MD5-2, if the MD5-2 and the MD5-1 are unequal, the first routing device is sent after renewal Routing iinformation give neighbours' routing device, the routing iinformation for making it update self record, if the MD5-2 and the MD5-1 Equal, then the first routing device transmission switches end notification packet and gives neighbours' routing device, it is deleted itself route letter Short duration failure mark Stale on breath, exits smooth restarting auxiliary GR Help patterns.
Embodiment of the method one
Technical solution of the present invention is illustrated by taking the route networking schematic diagram in Fig. 1 as an example, in Fig. 1, on routing device A The local routing information that is designated as on a, routing device B of local routing information be designated as local routing information on b, routing device C It is designated as c.Routing device A and routing device B sets up neighborhood, and routing device B and routing device C sets up neighborhood.Set up Local routing information is sent to its neighbour route by each routing device respectively after neighborhood, i.e. routing device A is by local road Routing device B is sent to by information a, local routing information c is sent to routing device B by routing device C, routing device B is by road Routing device A is sent to by information b and c, routing iinformation b and a are sent to routing device C.Divide afterwards on routing device A, B, C Routing iinformation a, b and c are not have recorded.And routing device A, B, C are respectively provided with the ability for the informative abstract value for calculating routing iinformation.This Embodiment is illustrated so that routing device B is switched as an example to technical solution of the present invention, and assumes road during TCP connections disconnection Do not updated by device A, B, C local routing information a, b, c.Fig. 2 is the flow chart of the embodiment of the present invention, as shown in Fig. 2 Comprise the following steps:
Step 201:Routing device B backup bgp routing informations.
In this step, routing device B is by the local routing information b of self record and neighbours' routing iinformation a, c full backup It is identical with prior art NSR processing modes to slave board, do not describe in detail.
Step 202:Generation is switched, routing device B judges whether itself can be switched using NSR modes, if it is, Step 203 is performed, step 204 is otherwise performed.
In this step, if routing device B will be applied successfully NSR modes and be switched, not only need to back up in step 201 Routing iinformation, in addition it is also necessary to which TCP connections are also supported NSR and successfully backed up, and the TCP of the low side routing device under some scenes is NSR is not supported, this may result in routing device and can not be switched according to NSR modes;Or the TCP connections branch of routing device NSR is held, but unsuccessfully causes TCP to interrupt during TCP connections backup, these situations cause routing device can not use NSR modes Switched, need to perform step 204 in this case.
Step 203:Routing device B is switched according to NSR modes.
Judged result based on step 202, routing device B can be switched according to NSR modes, then according to NSR modes Switched, the part is prior art, be will not be described in detail herein.
Step 204:Switch into GR flows, routing device B switches to GR Restarter, its neighbours' routing device A and C Switch to GR Helper.
Judged result based on step 202, routing device B can not be switched according to NSR modes, then outside to use GR side Formula realizes and switched that routing device A and C assists routing device B to be switched as GR Helper equipment.
Step 205:Routing device B calculates routing iinformation digest value corresponding with neighbours' routing device.
Routing device B has backed up routing iinformation a, b, c of record in step 201, although switches, still there is backup thereon Routing iinformation, therefore routing iinformation digest value corresponding with neighbours' routing device can be calculated.Described and neighbours' routing device pair The routing iinformation answered is that router B should be sent to the routing iinformation of neighbours' routing device.
Routing iinformation corresponding with neighbours' routing device A is b, c, then it is MD5 (BA_1_ to calculate obtained informative abstract value bc);Routing iinformation corresponding with neighbours' routing device C is a, b, then it is MD5 (BC_1_bc) to calculate obtained informative abstract value.
Step 206:Neighbours' routing device calculates routing iinformation digest value corresponding with routing device B respectively.
In this step, neighbours' routing device A and C switch to GR Helper, calculate route letter corresponding with routing device B Cease digest value.The routing iinformation corresponding with routing device B should be sent to route for neighbours' routing device A and C and set respectively Standby B routing iinformation.
Neighbours' routing device A route routing iinformations corresponding with routing device B are a, then calculate obtained informative abstract value For MD5 (AB_1_a);Neighbours' routing device C route routing iinformations corresponding with routing device B are c, then calculate obtained information Digest value is MD5 (CB_1_c).
Step 207:The route that neighbours' routing device A and C flag routing device B are sent is Stale.
In this step, neighbours' routing device A and C have found that routing device B is switched, then mark switches the preceding road of generation respectively It is Stale, i.e. short duration failure by the equipment B routing iinformations sent, specifically, routing device A sets the route locally preserved The routing iinformation b and c that standby B is sent are labeled as Stale, the route that routing device C sends the routing device B locally preserved Information a and b are labeled as Stale.
Step 208:TCP connections recover normal, and neighbours' routing device calculates route corresponding with routing device B respectively again Informative abstract value.
In this step, after TCP connections recover normal, neighbours' routing device calculates corresponding with routing device B respectively again Routing iinformation digest value.
The informative abstract value that neighbours' routing device A is calculated is designated as MD5 (AB_2_a), the informative abstract be routing device A with The informative abstract of the corresponding route a routing iinformations of routing device B;The informative abstract value that neighbours' routing device C is calculated is designated as MD5 (CB_2_c), the informative abstract is the informative abstract of routing device C route c routing iinformations corresponding with routing device B.
Due to present embodiment assumes that routing device A, B, C local routing information a, b, c do not have during TCP connections disconnection Update, therefore certainly exist MD5 (AB_1_a)=MD5 (AB_2_a), MD5 (CB_1_c)=MD5 (CB_2_c).
Step 209:Neighbours' routing device sends the unchanged notification packet of route and gives routing device B, informs routing device B roads It is unchanged by information.
Due to the route of the corresponding routing device B that neighbours' routing device A is calculated before and after TCP connections recover in step 208 Informative abstract value is identical, then sends the unchanged notification packet of route and give routing device B, inform routing device B routing iinformations without change Change;Equally, the routing iinformation digest value also phase for the corresponding routing device B that neighbours' routing device C is calculated before and after TCP connections recover Together, then send the unchanged notification packet of route and give routing device B, inform that routing device B routing iinformations are unchanged.
The unchanged notification packet of the route can be specifically EOR_127 messages, the EOR_127 messages be with 127.0.0.1/32 as prefix revocation type UPDATE messages.The function of terminating is sent with notice route.Route is set Standby B receives the neighbours' routing device local routing for confirming to send the message after the message without renewal.
Step 210:Routing device B send respectively switch end notification packet give routing device A, C, switch end.
In this step, because routing device B receives the unchanged notification packet of route that all neighbor devices are sent, really The local routing information for recognizing neighbor device is unchanged, and routing device B local routing informations b is also unchanged, then sends respectively Change end notification packet and give routing device A, C, notify each neighbor device convergence to terminate so that each neighbor device, which is received, switches knot Remove the Stale marks of the routing iinformation that routing device B is sent in step 207 after beam notification packet.So far, end is switched.
Embodiment of the method two
Embodiment of the method one is so that the local routing information of routing device A, B, C during TCP connections disconnect are unchanged as an example Technical solution of the present invention is illustrated, the present embodiment still uses networking structure and parameter setting in embodiment one, it is assumed that TCP Routing device A local routing information a is updated to a ' during connection disconnects, and Fig. 3 is the flow chart of the present embodiment, including following step Suddenly:
Step 301~step 307 is identical with step 201~step 207, will not be repeated here.
Step 308:TCP connections recover normal, and neighbours' routing device calculates route corresponding with routing device B respectively again Informative abstract value.
In this step, after TCP connections recover normal, neighbours' routing device calculates corresponding with routing device B respectively again Routing iinformation digest value.
The informative abstract value that neighbours' routing device A is calculated is designated as MD5 (AB_2_a '), the information that neighbours' routing device C is calculated Digest value is designated as MD5 (CB_2_c).
Due to present embodiment assumes that routing device A local routing information a is updated to a ' during TCP connections disconnection, therefore Certainly exist MD5 (AB_1_a) ≠ MD5 (AB_2_a '), MD5 (CB_1_c)=MD5 (CB_2_c).
Step 309:Routing device A sends more new routing information a ' and gives routing device B, routing device C to send route without change Change notification packet and give routing device B.
In this step, routing device B receives the more new routing information a ' of routing device A transmissions, updates the BGP roads of backup It is a ', b, c by the bgp routing information backed up after information, renewal on routing device B.
Step 310:Routing device B calculates the informative abstract value that correspondence is sent to neighbours' routing device again.
Because routing device B receives the renewal that part neighbours' routing device (the present embodiment is routing device A) is sent Routing iinformation, illustrates that neighbours' routing iinformation is changed, and now routing device B, which needs to calculate again to correspond to, is sent to each neighbours' route The informative abstract value of equipment.
The routing iinformation that correspondence is sent to neighbours' routing device A is b, c, then the informative abstract value calculated is MD5 (BA_ 2_bc);The routing iinformation that correspondence is sent to neighbours' routing device C is a ', b, then the informative abstract value calculated is MD5 (BC_2_ A ' b), then certainly exist MD5 (BA_1_bc)=MD5 (BA_2_bc), MD5 (BC_1_ab) ≠ MD5 (BC_2_a ' b).
Step 311:Routing device B transmissions switch end notification packet and give routing device A, send more new routing information a ', b Give routing device C.
The corresponding routing device A calculated before and after recovering due to TCP connections routing iinformation digest value is identical, therefore route is set The routing iinformation at standby A ends is without updating, and routing device B transmissions switch end notification packet and give routing device A, notify its to route nothing Change, makes it receive the Stale marks switched and terminated to remove after notification packet on routing iinformation;
The routing iinformation digest value for the corresponding routing device C that TCP connections are calculated before and after recovering is differed, because routing device A local routing information is updated to a ' by a, and it is a that routing device C, which is still recorded, and routing device B needs that routing device will be updated The routing iinformation of C-terminal, thus send routing iinformation a ', b give routing device C, finally send one switch end notification packet to Routing device C, informs that route is sent, and switches end.
In the present embodiment, if routing device A, C local routing are unchanged during TCP connections disconnect, and it route Equipment B local routing information is updated to b ' by b, and the route for receiving routing device A, C transmission in routing device B is unchanged logical Accuse and still need to calculate the informative abstract value that correspondence is sent to neighbours' routing device again after message, and the digest value and TCP calculated The digest value that connection is calculated before recovering is unequal, it is therefore desirable to routing iinformation a, b ' are sent into routing device C, will be route Information b ', c are sent to routing device A, and handling process is identical with the present embodiment, is no longer described in detail.
For the above method, the present invention also provides a kind of routing device, the equipment that the present invention is provided as shown in figure 4, including:
Memory module 401, for backing up itself bgp routing information.
Processing module 402, during for switching, if TCP connections disconnect extremely, switches to smooth restarting equipment GR Restarter, enters smoothness rebooting GR Restart patterns.
Computing module 403, for calculating routing iinformation corresponding with neighbours' routing device by the bgp routing information of backup Digest value MD5-1.
Whether judge module 404, change for routing iinformation during judging TCP connections disconnection.
If routing iinformation changes during TCP connections disconnect, the memory module 401 is additionally operable to update backup Bgp routing information.
If routing iinformation changes during the judge module 404 judges TCP connections disconnection, the computing module 403 are additionally operable to after TCP connections recover calculate road corresponding with neighbours' routing device again by the bgp routing information after renewal By informative abstract value MD5-2.
Judge module 404 is additionally operable to, and judges whether the MD5-2 is equal with the MD5-1.
Sending module 405, for the MD5-2 and the MD5-1 it is unequal when, send the route after TCP connections recovery Information gives neighbours' routing device, the routing iinformation for making it update self record;It is additionally operable to the MD5-2 equal with the MD5-1 When, transmission switches end notification packet and gives neighbours' routing device, it is deleted the short duration failure mark on itself routing iinformation Stale, exits smooth restarting auxiliary GR Help patterns.
If it is determined that routing iinformation is unchanged during module 404 judges TCP connections disconnection, the sending module 505 enters one Walking is used for, and transmission switches end notification packet and gives neighbours' routing device, it is deleted the short duration failure mark on itself routing iinformation Remember Stale, exit GR Help patterns.
The equipment also includes receiving module 405, the routing update information for receiving the transmission of neighbours' routing device, sends the One notice message is to judge module, and the routing update information is neighbours' routing device difference before and after TCP connections recover Routing iinformation digest value corresponding with the first routing device is calculated, and judges the letter that TCP connections are calculated twice before and after recovering Breath digest value is sent to the first routing device when unequal.
The judge module 404 is further used for, and is changed by local routing information during judging that TCP connections disconnect Routing iinformation changes, and/or receives during the first notice message that the receiving module sends judges TCP connections disconnection Routing iinformation changes.
The receiving module 406 is additionally operable to, and receives the unchanged notification packet of route that all neighbours' routing devices are sent, The second notice message is sent to judge module.
The judge module 404 is further used for, and receives the second notice message that the receiving module is sent, and judges local Routing iinformation is unchanged.
The processing module 402 is further used for, if TCP connections are normal, is performed down according to BGP NSR modes Change.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention Any modification, equivalent substitution and improvements done within refreshing and principle etc., should be included within the scope of protection of the invention.

Claims (10)

1. a kind of Border Gateway Protocol smooth restarting method, it is characterised in that this method is applied to first routing device, described the One routing device sets up neighborhood, the first routing device and at least one neighbour with least one neighbours' routing device Occupy routing device and possess the informative abstract value ability for calculating routing iinformation, the first routing device enables Border Gateway Protocol BGP uninterruptedly route NSR, and this method includes:
The first routing device backs up itself bgp routing information;
The first routing device is switched, if TCP connections disconnect extremely, itself will switch to smooth restarting equipment GR Restarter, enters smoothness rebooting GR Restart patterns;
The first routing device calculates routing iinformation corresponding with neighbours' routing device by the bgp routing information of backup and made a summary Value MD5-1;
If routing iinformation changes during TCP connections disconnect, the first routing device updates the BGP route letters of backup Breath, route corresponding with neighbours' routing device is calculated after TCP connections recovery again by the backup bgp routing information after renewal Informative abstract value MD5-2, if the MD5-2 and the MD5-1 are unequal, the first routing device is sent after renewal Routing iinformation gives neighbours' routing device, the routing iinformation for making it update self record, if the MD5-2 and the MD5-1 phases Deng then the first routing device, which is sent, switches end notification packet and gives neighbours' routing device, it is deleted itself routing iinformation On short duration failure mark Stale, exit smooth restarting auxiliary GR Help patterns.
2. according to the method described in claim 1, it is characterised in that this method further comprises:
If routing iinformation is unchanged during TCP connections disconnection, the first routing device send switch end notification packet to Neighbours' routing device, makes it delete the short duration failure mark Stale on itself routing iinformation, exits smooth restarting auxiliary GR Help patterns.
3. according to the method described in claim 1, it is characterised in that routing iinformation occurs during judging the TCP connections disconnection The method of change is:
The first routing device is become by the local routing information routing iinformation during judgement TCP connections disconnection that changes Change, and/or the first routing device receives routing update information judgement neighbours' route of neighbours' routing device transmission The routing iinformation of equipment changes, and the routing update information is that neighbours' routing device divides before and after TCP connections recover Not Ji Suan routing iinformation digest value corresponding with the first routing device, and judge what is calculated twice before and after TCP connections recovery Informative abstract value is sent to the first routing device when unequal.
4. method according to claim 2, it is characterised in that routing iinformation is without change during judging the TCP connections disconnection The method of change is:
The local routing information of the first routing device is unchanged, and the first routing device receives all neighbours' routes The unchanged notification packet of route that equipment is sent, routing iinformation is unchanged during judging the TCP connections disconnection.
5. according to the method described in claim 1, it is characterised in that this method further comprises:
If the TCP connections are normal, the first routing device is performed according to BGP NSR modes and switched.
6. a kind of routing device, it is characterised in that the equipment sets up neighborhood, and the road with least one neighbours' routing device Possesses the informative abstract value ability for calculating routing iinformation by equipment and at least one neighbours' routing device, the routing device makes Energy Border Gateway Protocol (BGP) uninterruptedly route NSR, and the equipment includes:
Memory module, for backing up itself bgp routing information;
Processing module, during for switching, if TCP connections disconnect extremely, itself will switch to smooth restarting equipment GR Restarter, enters smoothness rebooting GR Restart patterns;
Computing module, for calculating routing iinformation digest value corresponding with neighbours' routing device by the bgp routing information of backup MD5-1;
Whether judge module, change for routing iinformation during judging TCP connections disconnection;
If routing iinformation changes during TCP connections disconnect, the memory module is additionally operable to update the BGP route letters of backup Breath;
If it is determined that routing iinformation changes during module judges TCP connections disconnection, the computing module is additionally operable to connect in TCP Routing iinformation digest value corresponding with neighbours' routing device is calculated by the backup bgp routing information after renewal again after connecing recovery MD5-2;
The judge module is additionally operable to judge whether the MD5-2 is equal with the MD5-1;
Sending module, when judging that the MD5-2 and MD5-1 is unequal for the judge module, sends after TCP connections recovery Routing iinformation gives neighbours' routing device, the routing iinformation for making it update self record;It is additionally operable to the MD5-2 and the MD5-1 When equal, transmission switches end notification packet and gives neighbours' routing device, it is deleted the short duration failure mark on itself routing iinformation Remember Stale, exit smooth restarting auxiliary GRHelp patterns.
7. equipment according to claim 6, it is characterised in that if during the judge module judges that TCP connections disconnect Routing iinformation is unchanged, and the sending module is further used for, and transmission switches end notification packet and gives neighbours' routing device, makes it The short duration failure mark Stale on itself routing iinformation is deleted, smooth restarting auxiliary GR Help patterns are exited.
8. equipment according to claim 6, it is characterised in that
The equipment also includes receiving module, the routing update information for receiving the transmission of neighbours' routing device, sends first and notifies Message to judge module, the routing update information is neighbours' routing device calculated respectively before and after TCP connections recover and The corresponding routing iinformation digest value of the first routing device, and judge the informative abstract that is calculated twice before and after TCP connections recovery The first routing device is sent to when being worth unequal;
The judge module is further used for, and changes to route during judgement TCP connections disconnect by local routing information and believes Breath changes, and/or receives route letter during the first notice message judgement TCP connection disconnections that the receiving module is sent Breath changes.
9. equipment according to claim 7, it is characterised in that
The receiving module is additionally operable to, and receives the unchanged notification packet of route that all neighbours' routing devices are sent, and sends the Two notice messages are to judge module;
The judge module is further used for, and receives the second notice message that the receiving module is sent, and judges local routing letter Breath is unchanged.
10. equipment according to claim 6, it is characterised in that the processing module is further used for, if the TCP Connection is normal, then performs and switch according to BGP NSR modes.
CN201410234199.4A 2014-05-28 2014-05-28 A kind of Border Gateway Protocol smooth restarting method and routing device Active CN103986649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410234199.4A CN103986649B (en) 2014-05-28 2014-05-28 A kind of Border Gateway Protocol smooth restarting method and routing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410234199.4A CN103986649B (en) 2014-05-28 2014-05-28 A kind of Border Gateway Protocol smooth restarting method and routing device

Publications (2)

Publication Number Publication Date
CN103986649A CN103986649A (en) 2014-08-13
CN103986649B true CN103986649B (en) 2017-08-11

Family

ID=51278476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410234199.4A Active CN103986649B (en) 2014-05-28 2014-05-28 A kind of Border Gateway Protocol smooth restarting method and routing device

Country Status (1)

Country Link
CN (1) CN103986649B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302187B (en) * 2015-05-15 2020-03-27 中兴通讯股份有限公司 Database synchronization method and device and router
CN105915457B (en) * 2016-04-29 2018-12-11 清华大学 A kind of route renewing method of the Border Gateway Protocol based on routing check
CN106059793B (en) * 2016-05-16 2021-04-20 新华三技术有限公司 Routing information processing method and device based on graceful restart
CN106506376B (en) * 2016-10-27 2021-02-23 新华三技术有限公司 Method and device for sending monitored neighbor initial routing information
CN106603272A (en) * 2016-11-17 2017-04-26 上海斐讯数据通信技术有限公司 Controller protection method and system based on smooth restart
CN108696433B (en) * 2018-07-24 2021-04-06 新华三技术有限公司 Route oscillation suppression method and BGP routing equipment
CN113300950B (en) * 2020-04-01 2023-03-24 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable medium
CN117395189A (en) * 2023-12-08 2024-01-12 新华三技术有限公司 Routing processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7406030B1 (en) * 2003-08-25 2008-07-29 Juniper Networks, Inc. Dynamic renegotiation of graceful restart time to avoid double-failure traffic loss
CN101459573A (en) * 2007-12-13 2009-06-17 华为技术有限公司 Method, router and communication network for router smoothly restarting
CN101488863A (en) * 2009-02-19 2009-07-22 华为技术有限公司 Method, apparatus and system for eliminating route oscillation in neighbor reconstruction
CN102404228A (en) * 2011-12-12 2012-04-04 杭州华三通信技术有限公司 GR processing method and equipment based on OSPF protocol
CN102624635A (en) * 2012-04-23 2012-08-01 杭州华三通信技术有限公司 Method and device for realizing graceful restart
CN103139081A (en) * 2011-11-28 2013-06-05 中兴通讯股份有限公司 Update method and nodes for distributed hash table routing lists

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7406030B1 (en) * 2003-08-25 2008-07-29 Juniper Networks, Inc. Dynamic renegotiation of graceful restart time to avoid double-failure traffic loss
CN101459573A (en) * 2007-12-13 2009-06-17 华为技术有限公司 Method, router and communication network for router smoothly restarting
CN101488863A (en) * 2009-02-19 2009-07-22 华为技术有限公司 Method, apparatus and system for eliminating route oscillation in neighbor reconstruction
CN103139081A (en) * 2011-11-28 2013-06-05 中兴通讯股份有限公司 Update method and nodes for distributed hash table routing lists
CN102404228A (en) * 2011-12-12 2012-04-04 杭州华三通信技术有限公司 GR processing method and equipment based on OSPF protocol
CN102624635A (en) * 2012-04-23 2012-08-01 杭州华三通信技术有限公司 Method and device for realizing graceful restart

Also Published As

Publication number Publication date
CN103986649A (en) 2014-08-13

Similar Documents

Publication Publication Date Title
CN103986649B (en) A kind of Border Gateway Protocol smooth restarting method and routing device
US9013978B2 (en) Synchronization between active TCP application and standby TCP application
US8149691B1 (en) Push-based hierarchical state propagation within a multi-chassis network device
US7573811B2 (en) Network transparent OSPF-TE failover
CN102006189B (en) Primary access server determination method and device for dual-machine redundancy backup
US7549078B2 (en) Redundancy in routing devices
WO2017219779A1 (en) Device active/standby switchover method and apparatus based on link protocol, and storage medium
CN101164307A (en) Method and gateway equipment for resuming service after switching status of main/standby gateway device
WO2014083445A1 (en) Method and apparatus for protocol data unit recovery in an is-is system
WO2009067865A2 (en) Method, router, line card and active master card for realizng a link state database synchronization
WO2012122945A1 (en) Operating method and device for virtual network element
WO2004004247A1 (en) Method and system for implementing is-is protocol redundancy
CN103780407A (en) Gateway dynamic switching method and apparatus in distributed resilient network interconnection (DRNI)
CN103354521B (en) The optimization method of a kind of LSP based on LDP renewal and device
WO2008014696A1 (en) Method and apparatus for realizing communication take-over
CN103581013A (en) Method and device for achieving non-stop routing of routing protocol
WO2014090083A1 (en) Service bearing method and apparatus during distributed resilient network interconnect
CN109547269B (en) Method and device for realizing LSP protection of IP RAN equipment
EP1921797A1 (en) Recovery method and apparatus for optical network lsp occuring abnormal delete
CN102769571B (en) Graceful restart realization method and equipment
CN109302328B (en) Hot standby switching method and system for VXLAN (virtual extensible local area network)
WO2012088909A1 (en) Method and device for updating vpn routing
WO2013146785A1 (en) Communication system, communication apparatus, control apparatus, communication apparatus control method and program
CN106130783B (en) Port fault processing method and device
WO2015135280A1 (en) Method, system and access router for realizing on demand smart dialing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant