CN101119304A - Neighbourhood establishing method and router - Google Patents

Neighbourhood establishing method and router Download PDF

Info

Publication number
CN101119304A
CN101119304A CNA2007100766400A CN200710076640A CN101119304A CN 101119304 A CN101119304 A CN 101119304A CN A2007100766400 A CNA2007100766400 A CN A2007100766400A CN 200710076640 A CN200710076640 A CN 200710076640A CN 101119304 A CN101119304 A CN 101119304A
Authority
CN
China
Prior art keywords
router
sign
handshake message
receive
bdr
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.)
Granted
Application number
CNA2007100766400A
Other languages
Chinese (zh)
Other versions
CN100579076C (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200710076640A priority Critical patent/CN100579076C/en
Publication of CN101119304A publication Critical patent/CN101119304A/en
Application granted granted Critical
Publication of CN100579076C publication Critical patent/CN100579076C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention provides a method of building relation with the neighborhood, comprising the follows: sending the first HELLO message and receiving the response HELLO message from the neighboring router; after receiving the HELLO message, estimating whether the DR identification or BDR identification taken by the content of the HELLO message is the local identification or not, and estimating whether the current interface receiving the HELLO message is at the WAITING state or not; in case the identification of the router is different from the local identification and the he current interface receiving the HELLO message is at the WAITING state, undertaking the DR voting. Furthermore, the present invention provides a router for the OSPF protocol system. The present invention can quickly build the neighboring relation with the neighboring router, shortening the service breaking time.

Description

A kind of neighborhood relationship building method and router
Technical field
The present invention relates to the communications field, more specifically, relate to router and neighborhood relationship building method thereof.
Background technology
OSPF (Open Shortest Path First, ospf) agreement is a kind of dynamic routing protocol of being used widely.
In this agreement, by set up neighborhood between router, exchanging chain line state descriptor obtains the information of other router then, and generates routing iinformation thus.
At broadcasting and NBMA (non-broadcast multi-access, non-broadcasting multichannel access) in the type network, the ospf protocol regulation is by election DR (Designated Router, Designated Router) and BDR (Backup Designated Router, BDR) reduce message interaction.The router of the same network segment is only set up neighborhood with DR and BDR router, and exchanging chain line state descriptor.The exchange of the Link State descriptor of router and DR and BDR router just can be carried out after having only election to finish.DR and BDR are generated by the election of the router in the network segment, so in broadcasting or NBMA type network, have a significant impact for network convergence speed the opportunity of DR election.
Most of existing route equipment implementation is active and standby plate mode, if master control borad breaks down, then automatically switches to and controls plate fully.This switching can cause the ospf neighbor relation of the routing device of this routing device and adjacency to rebulid, and route also needs to relearn.Will cause professional interruption like this.In addition, between the router of direct-connected two broadcasting or NBMA style interface,, also will cause rebuliding of neighborhood and relearning of route if wherein router is restarted or active and standby plate is switched.
Fig. 1 shows the router networking figure according to prior art, supposes that router has been set up neighborhood before this, and promptly neighbours' state reaches fully and to connect (FULL) state, now has at least a router that board switchover has taken place or restarts, and comprises among the figure:
The first router: board switchover has taken place or has restarted in this router, and the neighborhood between other router need rebulid, and the dynamic routing of originally learning by OSPF also needs to relearn; And
The second router: the router of the normal operation of not switching.
Broadcasting and NBMA online, switch or restart after the first router equipment send first packet HELLO (shaking hands) message, wait for the HELLO message that neighbours' the second router sends then.Fig. 2 shows the structure chart according to the HELLO message of prior art.If receive the router id that local router self is arranged in neighbours' route HELLO message, and statement local router oneself is DR and does not have BDR in the HELLO message, perhaps statement local router oneself is BDR in the HELLO message, (i.e. incident is found out in backup then to trigger the BackupSeen incident, be used to search DBR), the current DR election that promptly carries out.The BackupSeen incident is meant that there is the detection incident in BDR, detects among the neighbours whether have BDR.If found BDR, be DR then with bdr election, if can not find BDR, then from neighbor router, elect DR.
In realizing process of the present invention, the inventor finds that there are the following problems at least in the prior art: be enough to condition if the HELLO message of receiving is discontented, then have only and wait until that timer WaitTimer is overtime and just conduct an election.If switch such as the BDR router, then can not receive the HELLO message that satisfies above condition, just carry out DR election after can only waiting WaitTimer overtime.Because the WaitTimer time is longer, so after wait WaitTimer is overtime, conduct an election again neighborhood is set up in delay and neighbor router, cause service outage duration long.
Summary of the invention
The embodiment of the invention aims to provide router and the neighborhood relationship building method thereof in the ospf protocol system, sets up neighborhood in the prior art in long problem of time to solve.
One embodiment of the present of invention provide a kind of neighborhood relationship building method, comprising: send first packet HELLO message, receive the HELLO message that neighbor router is responded; Receive after the HELLO message judge whether the sign of the sign of the DR that the HELLO content of message is subsidiary or BDR different with the sign of this locality, and receive the HELLO message whether be in WAITING (wait) state when front port; If the sign of router is different with local sign and current interface that receive the HELLO message is in the WAITING state, then carry out DR election.
Another embodiment of the present invention provides a kind of neighborhood relationship building method, comprising: send first packet HELLO message, receive the HELLO message that neighbor router is responded; Receive after the HELLO message judge whether the sign of the sign of the DR that the HELLO content of message is subsidiary or BDR different with the sign of this locality, and receive the HELLO message whether be in the WAITING state when front port; And if the sign of router is different with local sign and current interface that receive the HELLO message is in the WAITING state, then the WAITING timer expiry just carries out DR election; Wherein, timer is configured to less than the time interval of declaring that neighbours disconnect.
Another embodiment of the present invention provides a kind of router that is used for the ospf protocol system, comprising: receiver module, be used to send first packet HELLO message, and receive the HELLO message that neighbor router is responded; Judge module is used for after receiving the HELLO message, judges whether the sign of the sign of the DR that the HELLO content of message is subsidiary or BDR different with the sign of this locality, and receive the HELLO message whether be in the WAITING state when front port; And the election module, if the sign that is used for router is different with local sign and current interface that receive the HELLO message is in the WAITING state, then carry out DR election.
Another embodiment of the present invention provides a kind of router that is used for the ospf protocol system, comprising: sending module is used to send the first packet handshake message; Receiver module is used for receiving the handshake message that neighbor router is responded after sending the first packet handshake message; Judge module is used for after receiving the HELLO message, judges whether the sign of the sign of the DR that the HELLO content of message is subsidiary or BDR different with the sign of this locality, and receive the HELLO message whether be in the WAITING state when front port; And the election module, if the sign of router is different with local sign and current interface that receive the HELLO message is in the WAITING state, then the WAITING timer expiry just carries out DR election; Wherein, timer is configured to the time interval less than declaration neighbours disconnection.
Technique scheme is receiving that satisfying certain condition is after subsidiary DR of HELLO content of message or BDR are the HELLO messages different with this locality, if and the sign of router is different with local sign and current interface that receive the HELLO message is in the WAITING state, the then current DR election that promptly carries out, therefore restart that router is very fast sets up neighborhood with neighbor router, shortened service outage duration.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, perhaps understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the specification of being write, claims and accompanying drawing.
Description of drawings
Fig. 1 shows the router networking figure according to prior art;
Fig. 2 shows the structure chart according to the HELLO message of prior art;
Fig. 3 shows the flow chart according to the neighborhood relationship building method of the embodiment of the invention;
Fig. 4 shows the block diagram according to the router of the embodiment of the invention.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
Fig. 3 shows the flow chart according to the neighborhood relationship building method of the embodiment of the invention, comprising:
Step S10, the router transmission first packet HELLO message of switching or restarting receives the HELLO message that neighbor router is responded;
Step S20 receives after the HELLO message, judges whether the sign of the sign of the DR that the HELLO content of message is subsidiary or BDR identical with the sign of this locality, and receive the HELLO message whether be in the WAITING state when front port; And
Step S30 if the sign of router is different with local sign and current interface that receive the HELLO message is in the WAITING state, then carries out DR election, to set up neighborhood with other routers.
Among this embodiment, receiving that satisfying certain condition is after subsidiary DR of HELLO content of message or BDR are the HELLO messages different with this locality, if current interface is in the WAITING state, the then current DR election that promptly carries out, thereby very fast and neighbor router is set up neighborhood, has shortened service outage duration.
This election may be different with the neighbor router current results in advance, but can reach consistent through (the follow-up HELLO message that also can constantly receive neighbor router is so also can trigger election) after the election several times.
The current DR election that promptly carries out specifically comprises: detecting in the neighbor router whether have BDR, if found BDR, is DR with bdr election then, if can not find BDR, then elects DR from neighbor router.Can by starting among the BackupSeen event detection neighbours whether have BDR.
Before execution in step S20, this is switched or the router of restarting can judge earlier whether the subsidiary neighbor router ID of HELLO message of neighbor router comprises the router id of oneself, if do not comprise, what illustrate then that the opposite end do not receive oneself restarts message (being first packet HELLO message), so still flow process is carried out routinely, for example this is switched or the router of restarting continues to retransmit first packet HELLO message to neighbor router, and perhaps interface keeps the WAITING state constant.If comprise, what illustrate then that the opposite end received oneself restarts message (being first packet HELLO message), so proceed above-mentioned step S20.
In another embodiment of the present invention, step S30 can also for: if subsidiary DR or the BDR of HELLO content of message is different with this locality, and receive this HELLO message when front port be to be in the WAITING state, the overtime DR election that just carries out of waiting timer Waittimer then; Wherein, timer is configured to less than Router Dead Interval (time interval that the declaration neighbours disconnect).
In the prior art, WaitTimer is general identical with RouterDeadInterval.This programme realizes that revising WaitTimer by configuration also can reach the effect of carrying out DR election in advance.After making WaitTimer configurable, the user can shorten the stand-by period as required, the proposed arrangement scope be (0, RouterDeadInterval).For example under RouterDeadInterval is 40 seconds situation, WaitTimer was configured to 10 seconds, then can shortens 30 second break period.
It is for example, current that to restart router be BDR.Restart the back:
If the HELLO message of receiving is sent (promptly by other Designated Routers, the sign of the sign of subsidiary DR or BDR is with local different in the HELLO message), and the current interface that receives this HELLO message is in the WAITING state, then trigger DR election, election results may with restart router election for DR (, and other current Designated Routers may be elected as BDR.After receiving the HELLO message that the DR router is sent again, trigger DR election once more.
Fig. 4 shows the block diagram according to the router of the embodiment of the invention, comprising:
Sending module 40 is used to send the first packet handshake message;
Receiver module 10 is used for after switching or restarting, and receives the HELLO message that neighbor router is responded behind the transmission first packet HELLO message;
Judge module 20 is used for after receiving the HELLO message, judges whether the sign of the sign of the DR that the HELLO content of message is subsidiary or BDR different with the sign of this locality, and receive the HELLO message whether be in the WAITING state when front port; And
Election module 30 if the sign that is used for router is different with local sign and current interface reception HELLO message is in the WAITING state, is then carried out DR election, to set up neighborhood with other routers.
Election module 20 can detect whether there is BDR among the neighbours, if found BDR, is DR with bdr election then, if can not find BDR, then elects DR from neighbor router.Specifically, can detect whether there is BDR among the neighbours by starting the BackupSeen incident.
This router also can comprise the affirmation module, does not comprise the ID of oneself if be used for the subsidiary neighbor router ID of HELLO message, confirms that then the sender of HELLO message does not also receive the message of restarting of oneself.If comprise, continue to judge then whether the HELLO content of message received subsidiary Designated Router or BDR different with this locality, and receive this HELLO message whether be in the WAITING state when front port; If do not comprise, confirm that then the sender of HELLO message does not also receive the message of restarting of oneself, and continue to retransmit first packet HELLO message to neighbor router, perhaps work as front port and keep the WAITING state constant.
According to another embodiment of the present invention, if it is different with this locality that election module 30 also can be used for the sign of the sign of the subsidiary DR of HELLO content of message or BDR, and receive this HELLO message when front port be to be in the WAITING state, the overtime DR election that just carries out of waiting timer Waittimer then; Wherein, timer is configured to less than RouterDeadInterval.
The above embodiment of the present invention is by when receiving the HELLO message, accelerates to trigger the DR election process, accelerates the foundation with the neighborhood of neighbor router, thereby realizes recovering interrupted service quickly.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.Should be understood that the variation in these concrete enforcements is conspicuous for a person skilled in the art, do not break away from spiritual protection range of the present invention.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a neighborhood relationship building method is characterized in that, comprising:
Send the first packet handshake message, receive the handshake message that neighbor router sends;
Receive after the described handshake message judge whether the sign of the sign of the Designated Router that described handshake message is subsidiary or BDR identical with the sign of this locality, and judge receive described handshake message whether be in wait state when front port;
If the sign of router is different with local sign and current interface that receive described handshake message is in wait state, then carry out the Designated Router election.
2. neighborhood relationship building method according to claim 1, it is characterized in that, carrying out the Designated Router election specifically comprises: detect whether there is BDR in the described neighbor router, if exist, then described BDR election is Designated Router, if there is no, then from described neighbor router, elect Designated Router.
3. neighborhood relationship building method according to claim 2 is characterized in that, finds out whether there is BDR among the event detection neighbours by starting backup.
4. neighborhood relationship building method according to claim 1, it is characterized in that, receive after the described handshake message, before whether the sign of judging the sign of the Designated Router that described handshake message is subsidiary or BDR identical with the sign of this locality, further comprising the steps of:
Judge at first whether the subsidiary neighbor router sign of described handshake message is local sign;
If, then receive after the described handshake message, whether the sign of judging the sign of the Designated Router that the content of described handshake message is subsidiary or BDR different with the sign of this locality, and receive described handshake message whether be in wait state when front port;
If not, confirm that then the sender of described handshake message does not also receive the message of restarting of oneself, and continue to retransmit the first packet handshake message to described neighbor router, perhaps make the described front port of working as keep wait state constant.
5. a neighborhood relationship building method is characterized in that, comprising:
Send the first packet handshake message, receive the handshake message that neighbor router is responded;
Receive after the described handshake message judge whether the sign of the sign of the Designated Router that the content of described handshake message is subsidiary or BDR different with the sign of this locality, and receive described handshake message whether be in wait state when front port; And
If the sign of router is different with local sign and current interface that receive described handshake message is in wait state, then waiting timer is overtime just carries out the Designated Router election;
Wherein,
Described timer was configured to less than the time interval of declaring that neighbours disconnect.
6. a router that is used for the open type shortest path priority protocol system is characterized in that, comprising:
Sending module is used to send the first packet handshake message;
Receiver module is used for receiving the handshake message that neighbor router is responded after sending the first packet handshake message;
Judge module, be used for after receiving described handshake message, whether the sign of judging the sign of the Designated Router that the content of described handshake message is subsidiary or BDR different with the sign of this locality, and receive described handshake message whether be in wait state when front port; And
The election module if the sign that is used for router is different with local sign and current interface that receive described handshake message is in wait state, is then carried out Designated Router and is elected.
7. router according to claim 6, it is characterized in that, described election module is used for detecting described neighbor router and whether has BDR, if exist, then described BDR election is Designated Router, if there is no, then from described neighbor router, elect Designated Router.
8. router according to claim 7 is characterized in that, described election module finds out whether there is BDR among the event detection neighbours by starting backup.
9. router according to claim 6 is characterized in that, also comprises the affirmation module, is used for described router and judges at first whether the subsidiary neighbor router sign of described handshake message is local sign; If then start described judge module; If not, confirm that then the sender of described handshake message does not also receive the message of restarting of oneself, and continue to retransmit the first packet handshake message to described neighbor router, perhaps make the described front port of working as keep wait state constant.
10. a router that is used for the open type shortest path priority protocol system is characterized in that, comprising:
Sending module is used to send the first packet handshake message;
Receiver module is used for receiving the handshake message that neighbor router is responded after sending the first packet handshake message;
Judge module, be used for after receiving described handshake message, whether the sign of judging the sign of the Designated Router that the content of described handshake message is subsidiary or BDR different with the sign of this locality, and receive described handshake message whether be in wait state when front port; And
The election module, if the sign of router is different with local sign and current interface that receive described handshake message is in wait state, then the overtime Designated Router that just carries out of waiting timer is elected; Wherein, described timer is configured to the time interval less than declaration neighbours disconnection.
CN200710076640A 2007-08-24 2007-08-24 Neighbourhood establishing method and router Expired - Fee Related CN100579076C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710076640A CN100579076C (en) 2007-08-24 2007-08-24 Neighbourhood establishing method and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710076640A CN100579076C (en) 2007-08-24 2007-08-24 Neighbourhood establishing method and router

Publications (2)

Publication Number Publication Date
CN101119304A true CN101119304A (en) 2008-02-06
CN100579076C CN100579076C (en) 2010-01-06

Family

ID=39055243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710076640A Expired - Fee Related CN100579076C (en) 2007-08-24 2007-08-24 Neighbourhood establishing method and router

Country Status (1)

Country Link
CN (1) CN100579076C (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215112A (en) * 2010-04-08 2011-10-12 杭州华三通信技术有限公司 Method applied to FCoE (Fiber Channel over Ethernet) networking and used for optimizing FSPE (Fiber Shortest Path First) protocol and switchboards
CN102281194A (en) * 2011-08-01 2011-12-14 华为技术有限公司 Message transmission method and network equipment
CN102318287A (en) * 2011-06-30 2012-01-11 华为技术有限公司 Methods and device to establish router neighbors
WO2014079334A1 (en) * 2012-11-20 2014-05-30 华为技术有限公司 Method and router device for neighbor relationship processing
CN105227459A (en) * 2014-05-29 2016-01-06 国际商业机器公司 The method performed by ospf router and corresponding ospf router
CN106559343A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 A kind of electoral machinery and device of Designated Router
CN107872382A (en) * 2016-09-26 2018-04-03 中国电信股份有限公司 For transmitting the method and system of routing iinformation
CN108075973A (en) * 2016-11-11 2018-05-25 大唐移动通信设备有限公司 A kind of equipment communication means and device
CN109873764A (en) * 2019-02-21 2019-06-11 杭州迪普科技股份有限公司 Establish method, apparatus, the electronic equipment of orientation ospf neighbor relationship

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215112A (en) * 2010-04-08 2011-10-12 杭州华三通信技术有限公司 Method applied to FCoE (Fiber Channel over Ethernet) networking and used for optimizing FSPE (Fiber Shortest Path First) protocol and switchboards
CN102215112B (en) * 2010-04-08 2013-11-27 杭州华三通信技术有限公司 Method applied to FCoE (Fiber Channel over Ethernet) networking and used for optimizing FSPE (Fiber Shortest Path First) protocol and switchboards
CN102318287A (en) * 2011-06-30 2012-01-11 华为技术有限公司 Methods and device to establish router neighbors
US9154401B2 (en) 2011-06-30 2015-10-06 Huawei Technologies Co., Ltd. Method and device for establishing router neighbor
CN102281194A (en) * 2011-08-01 2011-12-14 华为技术有限公司 Message transmission method and network equipment
WO2014079334A1 (en) * 2012-11-20 2014-05-30 华为技术有限公司 Method and router device for neighbor relationship processing
CN105227459A (en) * 2014-05-29 2016-01-06 国际商业机器公司 The method performed by ospf router and corresponding ospf router
CN106559343A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 A kind of electoral machinery and device of Designated Router
WO2017054471A1 (en) * 2015-09-28 2017-04-06 中兴通讯股份有限公司 Method of electing designated router and device utilizing same
CN107872382A (en) * 2016-09-26 2018-04-03 中国电信股份有限公司 For transmitting the method and system of routing iinformation
CN107872382B (en) * 2016-09-26 2020-11-24 中国电信股份有限公司 Method and system for transmitting routing information
CN108075973A (en) * 2016-11-11 2018-05-25 大唐移动通信设备有限公司 A kind of equipment communication means and device
CN109873764A (en) * 2019-02-21 2019-06-11 杭州迪普科技股份有限公司 Establish method, apparatus, the electronic equipment of orientation ospf neighbor relationship

Also Published As

Publication number Publication date
CN100579076C (en) 2010-01-06

Similar Documents

Publication Publication Date Title
CN100579076C (en) Neighbourhood establishing method and router
CN101425961B (en) Method for implementing link state database synchronization, router, circuit board and main control board
US9705782B2 (en) Method and system for efficient graceful restart in an open shortest path first (OSPF) network
CN103636174A (en) Expedited graceful OSPF restart
US8213320B2 (en) Method and switching device for stack port configuration
US7317731B2 (en) System and method for distributed resource reservation protocol-traffic engineering (RSVP-TE) hitless restart in multi-protocol label switching (MPLS) network
CN102624635B (en) Method and device for realizing graceful restart
CN100568854C (en) A kind of method and interface board that keeps neighborhood
CN101043370B (en) Communication connection control systems and methods
CN1980224A (en) Method and system for recovering business after apparatus state switching-over based on main and spare netgate
CN102255757B (en) Link switching method and device
US20080025207A1 (en) Switch and network fault recovery method
CN101373990B (en) Method and apparatus for link backup
CN101741738A (en) Method and device for realizing graceful restart of link state routing protocol
CN101841432A (en) Port backup method, device and system for service access router
WO2014173209A1 (en) Realizing graceful restart in is-is network
WO2012048585A1 (en) Switching method and router
WO2012048574A1 (en) Method and system for realizing router full protection
CN101505277B (en) Method, equipment and system for withdrawing from elegant restart
CN110769019B (en) Session processing method, device, system, storage medium and computing equipment
CN108234358B (en) Multicast message transmission method, device and machine readable storage medium
CN104717089A (en) Equipment switching method and routing bridge equipment and system
CN114244769A (en) Method, equipment and storage medium for sending keep-alive message
CN101964925B (en) Method and system for controlling recovery of planar node after restarting in automatic switched optical network
CN101304379A (en) Method and apparatus for deciding BGP route

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100106

Termination date: 20180824

CF01 Termination of patent right due to non-payment of annual fee