CN104683233B - Shorten the method for active/standby router switching time - Google Patents

Shorten the method for active/standby router switching time Download PDF

Info

Publication number
CN104683233B
CN104683233B CN201310628233.1A CN201310628233A CN104683233B CN 104683233 B CN104683233 B CN 104683233B CN 201310628233 A CN201310628233 A CN 201310628233A CN 104683233 B CN104683233 B CN 104683233B
Authority
CN
China
Prior art keywords
router
priority
active
standby
chained list
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
CN201310628233.1A
Other languages
Chinese (zh)
Other versions
CN104683233A (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.)
Shanghai bige Network Technology Co., Ltd
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201310628233.1A priority Critical patent/CN104683233B/en
Publication of CN104683233A publication Critical patent/CN104683233A/en
Application granted granted Critical
Publication of CN104683233B publication Critical patent/CN104683233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention proposes a kind of methods for shortening active/standby router switching time, obtain the priority chained list of standby router first;If a certain interface down of active router falls, the current priority of the active router is that former priority subtracts value, also, by first priority ratio in current priority and chained list compared with;If current priority is greater than first priority, the active router continues to serve as active router;If less than first priority of current priority, the active router is changed into standby router, then carries out single election, generates new active router.Primary active/standby router election process is all only carried out, the active router for taking on data forwarding can be selected whenever the link failure for connecting active router in network using the method for the present invention.This not only reduces the transmissions of vrrp notification packet, more importantly shorten the switching time of active/standby router, enhance the safety of network communication.

Description

Shorten the method for active/standby router switching time
Technical field
The present invention relates to a kind of methods that active/standby router is elected in network environment, especially in vrrp network environment The method for electing active/standby router.
Background technique
Vrrp(Virtual Router Redundancy Protocol, Virtual Router Redundacy Protocol) it is a kind of default net Redundancy approach is closed, allows set of router to constitute a virtual router, belongs to the agreement of exploitation.In the agreement, to shared more The default gateway (Default Gateway) of terminal IP device carries out redundancy backup on access visit medium (such as Ethernet), from And when a routing device breaks down wherein, standby routing equipment takes over forwarding work in time, provides a user transparent Switching improves network service quality.
Currently, if some down falls in the monitoring interface of active router, working as in existing ethernet network environment It can be a random number that priority, which subtracts value(value, before preceding priority is equal to);And it sends and carries current priority Vrrp notification packet.
Situation one: when the standby router in network environment receives the vrrp notification packet, compared with the priority of itself Compared with if the priority of itself is not dealt with, i.e., the main equipment in network is constant greater than the priority of vrrp notification packet.
Situation two: when the standby router in network receives the vrrp notification packet, compared with the priority of itself, such as The priority of fruit itself is less than the priority of vrrp notification packet, then itself will be switched to active router, and sends carrying certainly The vrrp notification packet of body priority, only when the router for serving as main equipment before receives this part of vrrp notification packet, warp Priority ratio is crossed compared with itself being just switched to standby router, stop the transmission of vrrp notification packet.On this basis, if net There was only a standby router in network, then the notification packet that the same time only has this standby router to receive vrrp, active/standby road Once by device switching, but if there is more standby routers in network, the same time, Duo Taibei router will be all The vrrp notification packet is received, carries out priority ratio compared with the possible same time will appear multiple active routers, cause more parts of vrrp The sending of notification packet.Multiple main standby route election process, to make to obtain correctly active/standby router time delays in network It is longer.
Summary of the invention
Present invention technical problem to be solved is to provide a kind of method for shortening active/standby router switching time, only carries out Primary active/standby router election process.
In order to solve the above technical problems, the present invention devises a kind of method for shortening active/standby router switching time, Include the following steps:
Step1: obtaining the priority chained list of standby router, and the priority of each standby router is deposited according to sequence from big to small Storage is in chained list;
Step2: the interface of active router is monitored;
Step3: if a certain interface down of active router falls, the current priority of the active router is former preferential Grade subtracts value, also, by first priority ratio in current priority and chained list compared with;If current priority is greater than first A priority, then the active router continues to serve as active router;If less than first priority of current priority, the master Router is changed into standby router, and adjusts standby router priority sequence in chained list, retransmits vrrp notification packet;
Step4: all standby routers receive the vrrp notification packet, if current standby router priority is greater than vrrp The priority of notification packet and equal with first priority in chained list, then current standby router be immediately transferred to main road by Device, and standby router priority sequence in chained list is adjusted, retransmit vrrp notification packet;If current standby router priority is not Meet the priority for being greater than vrrp notification packet and, then only adjustment chained list in standby routing equal with first priority in chained list Device priority orders.
As a further improvement of that present invention, the value is customized integer value.
Using the method for the present invention, whenever the link for connecting active router in network breaks down, all only progress is primary active/standby Router election process can select the active router for taking on data forwarding.This not only reduces the hairs of vrrp notification packet It send, more importantly shortens the switching time of active/standby router, enhance the safety of network communication.
Detailed description of the invention
Fig. 1 is the flow chart for the method that the present invention shortens active/standby router switching time.
Specific embodiment
In order to make relevant technical staff in the field more fully understand technical solution of the present invention, below in conjunction with of the invention real The technical solution in embodiment of the present invention is clearly and completely described in the attached drawing for applying mode, it is clear that described reality The mode of applying is only some embodiments of the invention, rather than whole embodiments.
The present invention provides a kind of method for shortening active/standby router switching time, is applied in vrrp network environment, realizes The active/standby router of vrrp is switched fast, and shortens switching time.
The method that the present invention shortens active/standby router switching time is applied to complete in active/standby router election for the first time Afterwards, it in the case of network stabilization, when each active router link breaks down, is carried out again using the method for the present invention primary active/standby Router election, generates new active router.
As shown in Figure 1, the present invention shorten the method for active/standby router switching time the following steps are included:
Step1: firstly, it is necessary to obtain the priority chained list of standby router, the priority of each standby router according to from greatly to Small is stored sequentially in chained list.There is this chained list, when active/standby router switches, the priority of active router before is only needed With first priority ratio in chained list compared with.
Step2: monitoring the interface of active router, after first time, active router was elected, monitors the active router Interface carries out primary new active/standby router election if the unexpected down of a certain interface falls.In embodiment, 8 can be supported A interface.
Step3: if the unexpected down of a certain interface of active router falls, the current priority of the active router is original Priority subtracts value, also, by first priority ratio in current priority and chained list compared with;If current priority is greater than First priority, then the active router continues to serve as active router;If less than first priority of current priority, institute It states active router and is immediately transferred to standby router, and adjust standby router priority sequence in chained list, retransmit vrrp notice report Text.Priority is carry in vrrp notification packet.
Step4: in a network environment, all standby routers receive above-mentioned vrrp notification packet, according to vrrp notification packet Priority carry out single election, so that new active router will be generated.
If current standby router (i.e. a certain standby router) priority is greater than the priority and and chain of vrrp notification packet First priority in table is equal, then current standby router is changed into active router by election immediately, and adjusts standby in chained list Router priority sequence, retransmits vrrp notification packet.Described herein as, priority bit is in first standby router quilt in chained list It is selected as active router, meanwhile, active router successful switch before is standby router, and it is as standby router, preferential Grade is also stored into chained list, according to sequential storage from big to small.
If current standby router priority be unsatisfactory for greater than vrrp notification packet priority and with first in chained list A priority value is equal, then only adjusts standby router priority sequence in chained list.It is described herein as, other in chained list for router, I.e. priority make number one after other for router, or as standby router, and simultaneously, adjust standby routing in chained list Device priority orders.
The present invention, priority are greater than the priority of vrrp notification packet and equal with first priority value in chained list, Indicate that current router is priority bit primary standby router in chained list, the highest priority for router, quilt Election is active router.Single election only need to be carried out, that is, completes the switching of active/standby router, it is multiple without that will send again Vrrp notification packet, which conducts an election, to be compared.So not only reducing the transmission of vrrp notification packet, more importantly shorten The switching time of active/standby router enhances the safety of network communication.
The present invention is to have carried out running after the completion of active/standby router election for the first time in vrrp network environment.? After carrying out active/standby router election for the first time, that is, active router and other standby routers are produced.It is carrying out for the first time When active/standby router is elected, it can be obtained chained list, the priority of each standby router stored in the chained list, according to from big to small Sequence arranges.The method for carrying out active/standby router election for the first time includes: that in a network environment, router enables vrrp function, State is changed into standby state by the init state before enabling first by the router of enabled vrrp function, if a timing Between in range, do not receive the vrrp notification packet that other routers are sent, then transformation is main state, and starts to send and carries itself The vrrp notification packet of priority;The router of enabled vrrp function, according to the priority received in vrrp notification packet, and from Body priority ratio compared with.If the priority in vrrp notification packet is less than own priority, routed based on current router Device, otherwise current router is standby router.The router of all enabled vrrp functions, when receiving vrrp notification packet, Will by as the priority of standby router in the form of chained list list, according to sequential storage from big to small.
In the present invention, the value is customized integer value, and value can be big or small with artificially defined numerical value, if Value numerical value is big, then before active router when breaking down, priority, which subtracts value, become its priority will more It is small, in election below, standby router may be switched to;If value numerical value is small, priority value variation is little, possible main road It is also to continue with and is served as by device.
Only express one embodiment of the present invention above, the description thereof is more specific and detailed, but can not therefore and It is interpreted as limitations on the scope of the patent of the present invention.It should be pointed out that for those of ordinary skill in the art, not taking off Under the premise of from present inventive concept, various modifications and improvements can be made, and these are all within the scope of protection of the present invention.Cause This, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (2)

1. a kind of method for shortening active/standby router switching time, which comprises the steps of:
Step1: obtaining the priority chained list of standby router, and the priority of each standby router is according to being stored sequentially in from big to small In chained list;
Step2: the interface of active router is monitored;
Step3: if a certain interface down of active router falls, the current priority of the active router is that former priority subtracts Remove value, also, by first priority ratio in current priority and chained list compared with;If current priority is excellent greater than first First grade, then the active router continues to serve as active router;If less than first priority of current priority, the main road by Device is immediately transferred to standby router, and adjusts standby router priority sequence in chained list, retransmits vrrp notification packet;
Step4: all standby routers receive the vrrp notification packet, if current standby router priority is noticed greater than vrrp The priority of message and equal with first priority in chained list, then current standby router is immediately transferred to active router, and Standby router priority sequence in chained list is adjusted, vrrp notification packet is retransmited;If current standby router priority is unsatisfactory for Greater than the priority of vrrp notification packet and equal with first priority in chained list, then it is excellent only to adjust standby router in chained list First grade sequence;
Wherein, when first standby router is changed into active router, active router before switches priority bit in chained list For standby router, and active router before is used as standby its priority of router also to store into chained list, according to priority from big To small sequential storage.
2. the method according to claim 1 for shortening active/standby router switching time, which is characterized in that the value is Customized integer value.
CN201310628233.1A 2013-11-29 2013-11-29 Shorten the method for active/standby router switching time Active CN104683233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310628233.1A CN104683233B (en) 2013-11-29 2013-11-29 Shorten the method for active/standby router switching time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310628233.1A CN104683233B (en) 2013-11-29 2013-11-29 Shorten the method for active/standby router switching time

Publications (2)

Publication Number Publication Date
CN104683233A CN104683233A (en) 2015-06-03
CN104683233B true CN104683233B (en) 2019-07-19

Family

ID=53317852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310628233.1A Active CN104683233B (en) 2013-11-29 2013-11-29 Shorten the method for active/standby router switching time

Country Status (1)

Country Link
CN (1) CN104683233B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3142296B1 (en) * 2015-09-14 2018-04-18 Siemens Aktiengesellschaft Method for configuring a modular control device of an industrial automation system and modular control device
CN106941424B (en) * 2017-04-26 2020-09-01 北京东土科技股份有限公司 Redundancy switching method and device based on TTDP protocol
CN109995648A (en) * 2017-12-29 2019-07-09 北京华为数字技术有限公司 A kind of equipment switching method and forwarding device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968260A (en) * 2005-11-17 2007-05-23 华为技术有限公司 Method for implementing virtual router redundancy protocol switching between primary/standby devices
US7486610B1 (en) * 2005-05-11 2009-02-03 Cisco Technology, Inc. Multiple virtual router group optimization
CN101447858A (en) * 2008-01-17 2009-06-03 中兴通讯股份有限公司 Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system
CN101729426A (en) * 2009-12-29 2010-06-09 中兴通讯股份有限公司 Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7486610B1 (en) * 2005-05-11 2009-02-03 Cisco Technology, Inc. Multiple virtual router group optimization
CN1968260A (en) * 2005-11-17 2007-05-23 华为技术有限公司 Method for implementing virtual router redundancy protocol switching between primary/standby devices
CN101447858A (en) * 2008-01-17 2009-06-03 中兴通讯股份有限公司 Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system
CN101729426A (en) * 2009-12-29 2010-06-09 中兴通讯股份有限公司 Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)

Also Published As

Publication number Publication date
CN104683233A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
US10587494B2 (en) Network control method and apparatus
CN101860491B (en) Aggregation type link bidirectional forwarding detection method and device thereof
CN103534982B (en) The protection method of service reliability, equipment and network virtualization system
CN102761479B (en) Link selecting method and device
CN103812930A (en) Method and device for resource scheduling
CN100417141C (en) Group broadcasting business realizing method
US10819623B2 (en) Method and device for transmitting data
CN101252494A (en) Equipment and method for sharing traffic load
CN104683233B (en) Shorten the method for active/standby router switching time
CN105284150B (en) Service shunting method, control network element, gateway router and user entity
CN102571586B (en) Method and device for setting customer virtual local area network (CVLAN) in transparent interconnect of lots of links (TRILL) network
KR101658824B1 (en) Method, apparatus and computer program for updating flow rules of software defined network
CN102088400A (en) Provider edge (PE) equipment in virtual special network and switching method
CN108737262A (en) The method and communications router of transmission packet
CN104348743A (en) Whole-network load balancing method and device
CN102571520B (en) A kind of method realizing Fast Convergent in looped network
CN106130833B (en) Based on Inter-MAC layers of home network fusion method and device
CN104009903A (en) Flow forwarding method and device for RPR network
JP2013074380A (en) Network system
CN104301449A (en) Method and device for modifying IP address
CN113938955B (en) Data transmission method, device, equipment and system
CN108965147A (en) Network control method, device and the network equipment
CN103840972A (en) System and method for backup between link aggregation groups in packet switched network
CN103580932A (en) Status switching method and system based on Ethernet linear protection switching
CN105049367A (en) Traffic distribution method of aggregated link and access device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200417

Address after: 200030 room 02, floor 19, building 82, Lane 1198, Qinzhou North Road, Xuhui District, Shanghai

Patentee after: Shanghai bige Network Technology Co., Ltd

Address before: 201616 Shanghai city Songjiang District Guangfulin Road No. 4855 Building No. 90 big industry territory

Patentee before: Phicomm (Shanghai) Co.,Ltd.