[go: up one dir, main page]

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
identifier
handshake message
receiving
neighbor
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

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

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

Neighbor relation establishing method and router
Technical Field
The present invention relates to the field of communications, and in particular, to a router and a neighbor relation establishing method thereof.
Background
The Open Shortest Path First (OSPF) protocol is a dynamic routing protocol that is widely used.
In this protocol, information of other routers is obtained by establishing a neighbor relation between the routers and then exchanging link state description information, and thus routing information is generated.
In broadcast and NBMA (non-broadcast multi-access) type networks, the OSPF protocol provides for reducing packet interaction by electing DR (Designated Router) and BDR (Backup Designated Router). The routers in the same network segment only establish the neighbor relation with DR and BDR routers and exchange link state description information. The exchange of link state description information between the router and the DR and BDR routers can only be performed after the election is completed. DR and BDR are generated by router elections in the segments, so in broadcast or NBMA type networks the timing of DR elections has a large impact on the network convergence speed.
Most of the existing routing equipment is realized in a main and standby mode, and if the main control board fails, the main control board is automatically switched to a standby control board. Such a handover may result in the routing device needing to re-establish the OSPF neighbor relationship with the neighboring routing device, and the route also needs to be learned again. This causes service interruption. In addition, if one router is restarted or switched between main boards and standby boards, the router between two directly connected broadcast or NBMA type interfaces will also cause the reestablishment of the neighbor relation and the relearning of the route.
Fig. 1 shows a router networking diagram according to the prior art, assuming that a router has already established a neighbor relationship before, that is, the state of the neighbor reaches a fully connected (FULL) state, and at least one router has a board switch or restart, where the diagram includes:
a first router: when the router is switched or restarted by a single board, the neighbor relation between the router and other routers needs to be reestablished, and the dynamic route learned by OSPF also needs to be learned again; and
a second router: and the router which is normally operated and has not been switched.
On the broadcast and NBMA network, the first router device after switching or restarting sends out a first packet HELLO (handshake) message, and then waits for the HELLO message sent by the neighboring second router. Fig. 2 shows a block diagram of a HELLO packet according to the prior art. If the received neighbor routing HELLO message contains the router ID of the local router itself, and the HELLO message declares that the local router itself is DR and has no BDR, or the HELLO message declares that the local router itself is BDR, a BackupSeen event (i.e. a backup detection event for searching the DBR) is triggered, and DR election is performed currently. The BackupSeen event refers to a BDR existence detection event and detects whether a BDR exists in the neighborhood or not. If the BDR is found, the BDR is elected as DR, if the BDR can not be found, the DR is elected from the neighbor router.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: if the received HELLO message does not meet the conditions, the election is carried out only when the WaitTimer of the timer is overtime. For example, if the BDR router is switched, the HELLO packet satisfying the above conditions will not be received, and DR election can only be performed after WaitTimer times out. Since the WaitTimer time is long, election is performed after WaitTimer time out, which delays establishing a neighbor relation with a neighbor router, resulting in a long service interruption time.
Disclosure of Invention
The embodiment of the invention aims to provide a router in an OSPF protocol system and a neighbor relation establishing method thereof, so as to solve the problem that the time for establishing the neighbor relation is long in the prior art.
An embodiment of the present invention provides a neighbor relation establishing method, including: sending a first HELLO message, and receiving the HELLO message responded by the neighbor router; after receiving the HELLO message, judging whether the DR identifier or BDR identifier attached to the content of the HELLO message is different from the local identifier, and whether the current interface receiving the HELLO message is in a WAITING state; and if the identifier of the router is different from the local identifier and the current interface for receiving the HELLO message is in the WAITING state, performing DR election.
Another embodiment of the present invention provides a neighbor relation establishing method, including: sending a first HELLO message, and receiving the HELLO message responded by the neighbor router; after receiving the HELLO message, judging whether the DR identifier or BDR identifier attached to the content of the HELLO message is different from the local identifier, and whether the current interface receiving the HELLO message is in a WAITING state; if the identifier of the router is different from the local identifier and the current interface receiving the HELLO message is in the WAITING state, the WAITING timer is overtime to perform DR election; wherein the timer is configured to be less than a time interval for announcing the neighbor to disconnect.
Another embodiment of the present invention provides a router for an OSPF protocol system, including: the receiving module is used for sending a first HELLO message and receiving the HELLO message responded by the neighbor router; the judging module is used for judging whether a DR identifier or a BDR identifier attached to the content of the HELLO message is different from a local identifier or not after the HELLO message is received, and whether a current interface for receiving the HELLO message is in a WAITING state or not; and an election module, configured to perform DR election if the identifier of the router is different from the local identifier and the current interface receiving the HELLO packet is in a WAITING state.
Another embodiment of the present invention provides a router for an OSPF protocol system, including: a sending module, configured to send a first packet handshake message; the receiving module is used for receiving the handshake message responded by the neighbor router after the first packet of handshake message is sent; the judging module is used for judging whether a DR identifier or a BDR identifier attached to the content of the HELLO message is different from a local identifier or not after the HELLO message is received, and whether a current interface for receiving the HELLO message is in a WAITING state or not; and an election module, if the identifier of the router is different from the local identifier and the current interface receiving the HELLO message is in a WAITING state, the WAITING timer is overtime to perform DR election; wherein the timer is configured to be less than a time interval to announce neighbor disconnection.
According to the technical scheme, after a certain condition is met, namely the DR or BDR attached to the content of the HELLO message is the HELLO message different from the local, and if the identifier of the router is different from the local identifier and the current interface for receiving the HELLO message is in the WAITING state, DR election is performed at present, so that the router is restarted to quickly establish a neighbor relation with the neighbor router, and the service interruption time is shortened.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
FIG. 1 illustrates a router networking diagram according to the prior art;
fig. 2 shows a block diagram of a HELLO packet according to the prior art;
FIG. 3 shows a flow chart of a neighbor relation establishment method according to an embodiment of the present invention;
fig. 4 shows a block diagram of a router according to an embodiment of the invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 3 shows a flowchart of a neighbor relation establishing method according to an embodiment of the present invention, including:
step S10, the router which is switched or restarted sends a first packet HELLO message, and receives the HELLO message responded by the neighbor router;
step S20, after receiving the HELLO message, judging whether the DR identifier or BDR identifier attached to the content of the HELLO message is the same as the local identifier, and whether the current interface receiving the HELLO message is in a WAITING state; and
step S30, if the identifier of the router is different from the local identifier and the current interface receiving the HELLO message is in the WAITING state, DR election is performed to establish a neighbor relation with other routers.
In the embodiment, after receiving the HELLO message which meets a certain condition, namely the DR or BDR attached to the content of the HELLO message is different from the local HELLO message, if the current interface is in the WAITING state, DR election is performed at present, so that a neighbor relation is quickly established with a neighbor router, and the service interruption time is shortened.
This early election may be different from the current result of the neighbor router, but it will be consistent after several elections (and will continuously receive HELLO messages from the neighbor router, so will trigger election).
The current DR election specifically comprises the following steps: and detecting whether the neighbor router has the BDR or not, electing the BDR as the DR if the BDR is found, and electing the DR from the neighbor router if the BDR cannot be found. The presence of a BDR in a neighborhood may be detected by initiating a BackupSeen event.
Before step S20 is executed, the router that has undergone switching or restarting may first determine whether the neighbor router ID attached to the HELLO packet of the neighbor router contains its own router ID, and if not, it indicates that the opposite end has not received its own restart message (i.e., the first packet HELLO packet), so that the process is still performed according to the conventional procedure, for example, the router that has undergone switching or restarting continues to resend the first packet HELLO packet to the neighbor router, or the interface remains in the state of wait. If yes, it indicates that the peer has received its own restart message (i.e., the first HELLO packet), so the process continues to step S20.
In another embodiment of the present invention, step S30 may further be: if the DR or BDR attached to the content of the HELLO message is different from the local, and the current interface receiving the HELLO message is in a WAITING state, WAITING for the timeout of the timer Waittimer to perform DR election; wherein the timer is configured to be smaller than Router Dead Interval (time Interval for announcing neighbor disconnection).
In the prior art, WaitTimer is generally the same as routerdeaddinterval. The scheme realizes that the WaitTimer is modified through configuration, and the effect of DR election in advance can be achieved. After the WaitTimer is configurable, the user can shorten the waiting time as required, and the recommended configuration range is (0, routerdeaddinterval). For example, if the routerdeaddinterval is 40 seconds, the WaitTimer is configured to 10 seconds, and the interruption time can be shortened by 30 seconds.
For example, the current restart router is a BDR. After the restart:
if the received HELLO message is sent by other specified routers (namely, the identifier of DR or the identifier of BDR attached to the HELLO message is different from that of the local router), and the current interface receiving the HELLO message is in the state of WAITING, a DR election is triggered, and the restart router may be elected as DR as an election result (while the current other specified routers may be elected as BDR.
Fig. 4 shows a block diagram of a router according to an embodiment of the invention, comprising:
a sending module 40, configured to send a first packet handshake message;
a receiving module 10, configured to send a first HELLO packet and then receive a HELLO packet responded by a neighboring router after the switching or restarting occurs;
a determining module 20, configured to determine, after receiving the HELLO packet, whether an identifier of a DR or an identifier of a BDR attached to the content of the HELLO packet is different from a local identifier, and whether a current interface receiving the HELLO packet is in a WAITING state; and
and an election module 30, configured to perform DR election to establish a neighbor relationship with another router if the identifier of the router is different from the local identifier and the current interface receiving the HELLO packet is in a WAITING state.
The election module 20 may detect whether there is a BDR in the neighborhood, elect the BDR as DR if found, and elect DR from the neighbor router if not found. In particular, the presence of a BDR in a neighborhood may be detected by initiating a BackupSeen event.
The router may further include a confirmation module configured to confirm that the sender of the HELLO packet has not received the restart message of the sender if the neighbor router ID attached to the HELLO packet does not include the own ID. If yes, continuing to judge whether the designated router or the backup designated router attached to the content of the received HELLO message is different from the local router or not, and whether the current interface receiving the HELLO message is in a WAITING state or not; if not, confirming that the sender of the HELLO message has not received the own restart message, and continuously retransmitting the first HELLO message to the neighbor router, or keeping the WAITING state of the current interface unchanged.
According to another embodiment of the present invention, the election module 30 may also be configured to wait for the Waittimer to time out before performing DR election if the DR identifier or BDR identifier attached to the content of the HELLO packet is different from the local identifier and the current interface receiving the HELLO packet is in the WAITING state; wherein the timer is configured to be less than RouterDeadInterval.
The embodiment of the invention accelerates the establishment of the neighbor relation with the neighbor router by accelerating the DR election triggering process when the HELLO message is received, thereby realizing the rapid recovery of the interrupted service.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software. It is to be understood that variations in these specific implementations may be apparent to those skilled in the art without departing from the spirit and scope of the invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A neighbor relation establishing method is characterized by comprising the following steps:
sending a first packet of handshake messages, and receiving handshake messages sent by neighbor routers;
after receiving the handshake message, judging whether the identifier of the designated router attached to the handshake message or the identifier of the backup designated router is the same as the local identifier, and judging whether the current interface receiving the handshake message is in a waiting state;
and if the identifier of the router is different from the local identifier and the current interface receiving the handshake message is in a waiting state, performing designated router election.
2. The neighbor relation establishing method according to claim 1, wherein the electing the designated router specifically comprises: and detecting whether the neighbor router has a backup designated router or not, if so, electing the backup designated router as the designated router, and if not, electing the designated router from the neighbor router.
3. The neighbor relation establishing method according to claim 2, wherein detecting whether there is a backup designated router in the neighbor by initiating a backup-probing event.
4. The neighbor relation establishing method according to claim 1, wherein after receiving the handshake message, before determining whether an identifier of the designated router attached to the handshake message or an identifier of the backup designated router is the same as a local identifier, the method further comprises the following steps:
firstly, judging whether a neighbor router mark attached to the handshake message is a local mark;
if yes, after receiving the handshake message, judging whether the identifier of the designated router attached to the content of the handshake message or the identifier of the backup designated router is different from a local identifier, and whether a current interface receiving the handshake message is in a waiting state;
if not, confirming that the sender of the handshake message has not received the own restart message, and continuously retransmitting the first packet handshake message to the neighbor router, or keeping the waiting state of the current interface unchanged.
5. A neighbor relation establishing method is characterized by comprising the following steps:
sending a first packet of handshake messages, and receiving handshake messages responded by neighbor routers;
after receiving the handshake message, judging whether the identifier of the designated router attached to the content of the handshake message or the identifier of the backup designated router is different from a local identifier, and whether a current interface receiving the handshake message is in a waiting state; and
if the identifier of the router is different from the local identifier and the current interface receiving the handshake message is in a waiting state, the designated router election is carried out when the waiting timer is overtime;
wherein,
configuring the timer to be less than a time interval to announce neighbor disconnection.
6. A router for an open shortest path first protocol system, comprising:
a sending module, configured to send a first packet handshake message;
the receiving module is used for receiving the handshake message responded by the neighbor router after the first packet of handshake message is sent;
a judging module, configured to, after receiving the handshake message, judge whether an identifier of an assigned router attached to the content of the handshake message or an identifier of a backup assigned router is different from a local identifier, and judge whether a current interface receiving the handshake message is in a waiting state; and
and the election module is used for performing designated router election if the identifier of the router is different from the local identifier and the current interface receiving the handshake message is in a waiting state.
7. The router of claim 6, wherein the election module is configured to detect whether a backup designated router exists among the neighboring routers, and if so, elect the backup designated router as the designated router, and if not, elect the designated router from among the neighboring routers.
8. The router of claim 7, wherein the election module detects whether a backup designated router exists in a neighborhood by initiating a backup-aware event.
9. The router according to claim 6, further comprising a determining module, configured to determine, by the router, whether a neighbor router identifier attached to the handshake packet is a local identifier; if yes, starting the judging module; if not, confirming that the sender of the handshake message has not received the own restart message, and continuously retransmitting the first packet handshake message to the neighbor router, or keeping the waiting state of the current interface unchanged.
10. A router for an open shortest path first protocol system, comprising:
a sending module, configured to send a first packet handshake message;
the receiving module is used for receiving the handshake message responded by the neighbor router after the first packet of handshake message is sent;
a judging module, configured to, after receiving the handshake message, judge whether an identifier of an assigned router attached to the content of the handshake message or an identifier of a backup assigned router is different from a local identifier, and judge whether a current interface receiving the handshake message is in a waiting state; and
the election module is used for carrying out the designated router election when the waiting timer is overtime if the identifier of the router is different from the local identifier and the current interface for receiving the handshake message is in a waiting state; wherein the timer is configured to be less than a time interval to announce neighbor 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
CN100558055C (en) Method and router for reducing duration of error graceful restart state
US8331222B2 (en) Link fault handling method and data forwarding apparatus
CN101060485B (en) Topology changed messages processing method and processing device
US7894383B2 (en) Multi-interface communication device, terminal, and path switching method
US9276898B2 (en) Method and device for link fault detecting and recovering based on ARP interaction
US20080076405A1 (en) Method of handling radio link failure in wireless communications system and related device
KR101591102B1 (en) Method for router of virtual router redundancy protocol and communication system therefor
CN101110848B (en) Method for detecting channel trouble
CN1889579B (en) Method and apparatus for raising route information protocol route convergence rate
EP2702729A1 (en) Expedited graceful ospf restart
EP2698948A1 (en) Method and device for determining failure elimination based on oam protocol
CN107911291A (en) VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN102355416B (en) Method for establishing route by linking routing information protocol with bidirectional forwarding detection and equipment
CN103354521B (en) The optimization method of a kind of LSP based on LDP renewal and device
CN111447094A (en) Master-slave switching method of dual computers, terminal equipment and computer readable storage medium
CN101984600A (en) Graceful restart method, equipment and system of routing protocol
CN109873719B (en) Fault detection method and device
CN113645312A (en) Method and device for protecting sub-ring network link based on ERPS protocol
US7860090B2 (en) Method for processing LMP packets, LMP packet processing unit and LMP packet processing node
WO2015168892A1 (en) Protection switching method, node and control device
CN107786436B (en) VPN network and protection switching method
CN101938395B (en) Method and system for refreshing single ring address of Ethernet ring network
CN115550106A (en) Control method of ring network node, network device and storage medium
WO2009071024A1 (en) Vpn failure processing method and network provider edge router

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