CN102006189A - Primary access server determination method and device for dual-machine redundancy backup - Google Patents
Primary access server determination method and device for dual-machine redundancy backup Download PDFInfo
- Publication number
- CN102006189A CN102006189A CN2010105601938A CN201010560193A CN102006189A CN 102006189 A CN102006189 A CN 102006189A CN 2010105601938 A CN2010105601938 A CN 2010105601938A CN 201010560193 A CN201010560193 A CN 201010560193A CN 102006189 A CN102006189 A CN 102006189A
- Authority
- CN
- China
- Prior art keywords
- access server
- priority
- active
- current
- bfds
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000002457 bidirectional effect Effects 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 7
- 230000002776 aggregation Effects 0.000 claims description 3
- 238000004220 aggregation Methods 0.000 claims description 3
- 230000009977 dual effect Effects 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000007547 defect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 229910001369 Brass Inorganic materials 0.000 description 2
- 239000010951 brass Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 101100218648 Toxoplasma gondii (strain ATCC 50611 / Me49) BFD1 gene Proteins 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明提供一种主用接入服务器确定方法及装置,该方法包括:在第一接入服务器和第二接入服务器之间分别关联两组BFD;当第一接入服务器和/或第二接入服务器所关联的一组BFD断开时,将该接入服务器的优先级从当前的配置优先级降低一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD断开时,将该接入服务器的优先级从预定的基准优先级降低两个级数,以当前优先级高的接入服务器作为主用接入服务器。在本发明中,通过为主用和备用接入服务器关联合适的双BFD,以及设置作为参考的基准优先级,使得主备接入服务器的优先级不会出现相同的情况,从而避免了双机热备份中的双主用的问题。
The present invention provides a method and device for determining a primary access server, the method comprising: associating two groups of BFDs between the first access server and the second access server; when the first access server and/or the second When a group of BFDs associated with an access server is disconnected, the priority of the access server is lowered by one level from the current configuration priority; when two When the group BFD is disconnected, the priority of the access server is lowered by two stages from the predetermined reference priority, and the access server with the current higher priority is used as the active access server. In the present invention, by associating the appropriate dual BFD with the active and standby access servers, and setting the reference priority as a reference, the priorities of the active and standby access servers will not be the same, thereby avoiding the dual-system The problem of dual-active in hot backup.
Description
技术领域technical field
本发明涉及通信领域,具体而言,涉及一种用于双机冗余备份的主用接入服务器确定方法及装置。The present invention relates to the field of communications, in particular to a method and device for determining a primary access server for dual-machine redundancy backup.
背景技术Background technique
在电信业务IP化,IP网络电信化的发展趋势下,针对NGN/3G等业务接入到IP承载网的需求,在NGN(Next Generation Network,下一代网络)承载网中,NGN业务系统设备一般双归连接到两个接入路由器设备,以保证电信业务的可靠性,接入路由器作为PE(Provider Edge,运营商边缘)设备,两台设备之间跑VRRP(Virtual Router RedundancyProtocol,虚拟路由器冗余协议),实现主备冗余备份。但是基础VRRP协议存在收敛时间长的缺陷,不能满足支持50ms的电信级倒换需求。在基础VRRP协议基础上通过关联BFD(Bidirectional Forwarding Detection,双向转发检测)的VRRP增强协议,提高了收敛速度,但是这些技术存在着或多或少的缺陷。Under the development trend of IP-based telecommunication services and IP network telecommunication, in order to meet the needs of NGN/3G and other services to access IP bearer networks, in the NGN (Next Generation Network, next-generation network) bearer network, NGN service system equipment is generally Dual-homing connection to two access routers to ensure the reliability of telecom services. The access router is used as a PE (Provider Edge, operator edge) device, and VRRP (Virtual Router Redundancy Protocol, Virtual Router Redundancy Protocol) runs between the two devices. agreement), to achieve active and standby redundancy backup. However, the basic VRRP protocol has the defect of long convergence time, which cannot meet the requirement of supporting 50 ms carrier-grade switching. On the basis of the basic VRRP protocol, the VRRP enhancement protocol associated with BFD (Bidirectional Forwarding Detection, bidirectional forwarding detection) improves the convergence speed, but these technologies have more or less defects.
目前业界有VRRP特性增强协议,VRRP绑定BFD并增加提升优先级的操作,是在原来VRRP监视接口的功能的基础上更好的扩充了备份功能。通过增加一条新的命令,使VRRP中的track命令不仅仅可以对接口的变化,还可以对绑定的BFD的状态发生变化时,升高、降低或者恢复以前的优先级,缺省情况下优先级变化的单位为10。这样当Master路由器down时,处于Backup状态的路由器通过监视指定接口或BFD Session的状态,在无法快速感知的情况下,可以根据BFD的状态判断是否进行VRRP的状态快速切换,Slave主动快速升级成Master,接管上行流量。Currently, there is a VRRP feature enhancement protocol in the industry. VRRP is bound to BFD and the operation of increasing the priority is added, which better expands the backup function on the basis of the original VRRP monitoring interface function. By adding a new command, the track command in VRRP can not only change the interface, but also increase, decrease or restore the previous priority when the state of the bound BFD changes. The default priority The unit of level change is 10. In this way, when the Master router is down, the router in the Backup state monitors the status of the specified interface or BFD Session. If it cannot be quickly detected, it can judge whether to quickly switch the VRRP state according to the BFD status, and the Slave actively and quickly upgrades to the Master. , to take over the upstream traffic.
但是该方法存在缺陷,当遇到BFD down时,该方法直接降低优先级,对于关联有一组以上的BFD时,如果该VRRP的一个Peer(路由器)遇到一组BFD down,而另一个Peer遇到二组BFD down,并且两个Peer降低优先级之后的值相等,将出现VRRP无法切换的问题。However, this method has defects. When encountering BFD down, this method directly lowers the priority. When there are more than one group of BFD associated, if one Peer (router) of the VRRP encounters a group of BFD down, and another Peer encounters When the two groups of BFD are down, and the values of the two peers are equal after lowering the priority, there will be a problem that VRRP cannot be switched.
现有的双机热备份方法可以规避以上问题,在双机热备份方法中,当遇到BFD down时没有采用优先级降低,而是直接down主用设备。具体结构如图1所示,包括主用BRAS(Broadband Remote Access Server,宽带远程接入服务器)、与主用BRAS直连的交换机SW1、备用BRAS、与备用BRAS直连的交换机SW2。在主用BRAS与备用BRAS之间的链路,主用BRAS与交换机SW1之间的链路以及备用BRAS与交换机SW2之间的链路上分别关联有一组BFD。The existing dual-system hot backup method can avoid the above problems. In the dual-system hot backup method, when encountering BFD down, the priority is not lowered, but the primary device is directly down. The specific structure is shown in Figure 1, including the main BRAS (Broadband Remote Access Server, broadband remote access server), the switch SW1 directly connected to the main BRAS, the backup BRAS, and the switch SW2 directly connected to the backup BRAS. A group of BFDs are respectively associated with the link between the active BRAS and the standby BRAS, the link between the active BRAS and the switch SW1, and the link between the standby BRAS and the switch SW2.
在双机热备份方法中,主备机的切换遵循以下两条原则,In the dual-machine hot backup method, the switching of the main and standby machines follows the following two principles,
1、当备用机发现和交换机SW2直连的BFD状态为UP,BRAS直连BFD状态DOWN时,备用机切换到主用;1. When the standby machine finds that the BFD status directly connected to the switch SW2 is UP, and the BFD status directly connected to the BRAS is DOWN, the standby machine switches to the main one;
2、当主用机发现和交换机SW1直连的BFD,以及BRAS直连的BFD状态都是DOWN时,主用BRAS切换到备用。2. When the active machine discovers that the BFD directly connected to the switch SW1 and the BFD directly connected to the BRAS are all in DOWN state, the active BRAS switches to the standby.
这么做的原因是,假如VRRP只关联BRAS之间的BFD时,当出现这种情况时,会造成主备BRAS误认为主用BRAS和交换机之间的链路down,而造成错误的VRRP切换。The reason for this is that if VRRP is only associated with BFD between BRASs, when this happens, the active and standby BRASs will mistakenly believe that the link between the active BRAS and the switch is down, resulting in a wrong VRRP switchover.
但是在双机热备份方法中,存在以下问题:当备用机上连主用机的心跳线断开了,根据第一条原则,就会出现双主用的情况。However, in the dual-machine hot backup method, there are the following problems: when the heartbeat line connected to the main machine on the standby machine is disconnected, according to the first principle, a dual-active situation will occur.
发明内容Contents of the invention
本发明的主要目的在于提供一种用于双机冗余备份的主用接入服务器确定方法及装置,以至少解决双机热备份的口字型组网中可能导致的双主机问题。The main purpose of the present invention is to provide a method and device for determining the primary access server for dual-machine redundant backup, so as to at least solve the dual-host problem that may be caused in the word-of-mouth network of dual-machine hot backup.
根据本发明的一个方面,提供了一种用于双机冗余备份的主用接入服务器确定方法,包括以下步骤:在第一接入服务器和与之直连的交换机之间的下行链路、第二接入服务器和与之直连的交换机之间的下行链路、第一接入服务器经下行链路至第二接入服务器之间的链路分别关联一组双向转发检测BFD;当第一接入服务器和/或第二接入服务器所关联的一组BFD断开时,将该接入服务器的优先级从当前的配置优先级降低一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD断开时,将该接入服务器的优先级从预定的基准优先级降低两个级数,其中基准优先级小于或等于第一接入服务器和第二接入服务器中配置优先级小的接入服务器的配置优先级;比较第一接入服务器和第二接入服务器的当前优先级,以当前优先级高的接入服务器作为主用接入服务器。According to one aspect of the present invention, a method for determining an active access server for dual-machine redundancy backup is provided, including the following steps: the downlink between the first access server and the switch directly connected to it , the downlink between the second access server and the switch directly connected to it, and the link between the first access server and the second access server through the downlink are respectively associated with a group of bidirectional forwarding detection BFD; when When a group of BFDs associated with the first access server and/or the second access server is disconnected, the priority of the access server is lowered from the current configuration priority by one level; when the first access server and/or Or when the two groups of BFDs associated with the second access server are disconnected, reduce the priority of the access server by two levels from the predetermined base priority, where the base priority is less than or equal to the first access server and the second Configure the configuration priority of the access server with the lower priority in the second access server; compare the current priority of the first access server and the second access server, and use the access server with the higher current priority as the primary access server .
进一步地,该方法还包括:当第一接入服务器和/或第二接入服务器所关联的一组BFD恢复连接时,将该接入服务器的当前优先级提高一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD恢复连接时,将该接入服务器的当前优先级恢复到其的配置优先级;比较第一接入服务器和第二接入服务器的当前优先级,以当前优先级高的接入服务器作为主用接入服务器。Further, the method further includes: when a group of BFDs associated with the first access server and/or the second access server restores the connection, increasing the current priority of the access server by one level; when the first access server When the two groups of BFDs associated with the ingress server and/or the second access server restore the connection, restore the current priority of the access server to its configured priority; compare the Current priority, the access server with the highest current priority is used as the primary access server.
进一步地,优先级的范围为0-255,其中,优先级的一个级数大小为10。Further, the range of the priority is 0-255, wherein the number of a series of the priority is 10.
进一步地,第一接入服务器和第二接入服务器通过抢占模式确定主用接入服务器。Further, the first access server and the second access server determine the active access server through the preemption mode.
进一步地,第一接入服务器和第二接入服务器通过链路聚合形成逻辑接口,逻辑接口之间采用桥接协议连接。Further, the first access server and the second access server form logical interfaces through link aggregation, and the logical interfaces are connected using a bridging protocol.
根据本发明的另一方面,提供了一种用于双机冗余备份的主用接入服务器确定装置,该装置包括:关联模块,在第一接入服务器和与之直连的交换机之间的下行链路、第二接入服务器和与之直连的交换机之间的下行链路、第一接入服务器经下行链路至第二接入服务器之间的链路分别关联一组双向转发检测BFD;优先级调整模块,用于当第一接入服务器和/或第二接入服务器所关联的一组BFD断开时,将该接入服务器的优先级从当前的配置优先级降低一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD断开时,将该接入服务器的优先级从预定的基准优先级降低两个级数,其中基准优先级小于或等于第一接入服务器和第二接入服务器中配置优先级小的接入服务器的配置优先级;主用接入服务器确定模块,用于比较第一接入服务器和第二接入服务器的当前优先级,以当前优先级高的接入服务器作为主用接入服务器。According to another aspect of the present invention, a device for determining an active access server for dual-machine redundancy backup is provided, the device includes: an association module, between the first access server and the switch directly connected to it The downlink between the second access server and the directly connected switch, and the link between the first access server and the second access server through the downlink are respectively associated with a group of two-way forwarding Detecting BFD; a priority adjustment module, configured to reduce the priority of the access server by one from the current configuration priority when a group of BFD associated with the first access server and/or the second access server is disconnected Number of levels: when the two groups of BFDs associated with the first access server and/or the second access server are disconnected, the priority of the access server is lowered by two levels from the predetermined base priority, where the base priority The configuration priority of the access server with the lower configuration priority among the first access server and the second access server; the main access server determination module is used to compare the first access server and the second access server The current priority of the server, the access server with the highest current priority is used as the primary access server.
进一步地,优先级调整模块还用于当第一接入服务器和/或第二接入服务器所关联的一组BFD恢复连接时,将该接入服务器的当前优先级提高一个级数,以及当第一接入服务器和/或第二接入服务器所关联的两组BFD恢复连接时,将该接入服务器的当前优先级恢复到其的配置优先级。Further, the priority adjustment module is further configured to increase the current priority of the access server by one level when a group of BFDs associated with the first access server and/or the second access server restores the connection, and when When the two groups of BFDs associated with the first access server and/or the second access server restore the connection, the current priority of the access server is restored to its configured priority.
在本发明中,通过为主用和备用接入服务器关联双BFD,以及设置基准优先级,当接入服务器所关联的双BFD断开时,该接入服务器的优先级从基准优先级降低两个级数,从而可以避免双机热备份中的双主用的问题。In the present invention, by associating dual BFDs with the active and standby access servers and setting the base priority, when the dual BFDs associated with the access server are disconnected, the priority of the access server is reduced by two levels from the base priority. A series, so as to avoid the problem of dual-active in dual-system hot backup.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:
图1是根据相关技术的双机热备份网络结构示意图;Fig. 1 is a schematic diagram of a dual-machine hot backup network structure according to related technologies;
图2是根据本发明实施例的主用接入服务器确定方法所应用的网络结构示意图;FIG. 2 is a schematic diagram of a network structure to which a method for determining an active access server according to an embodiment of the present invention is applied;
图3是根据本发明实施例的主用接入服务器确定方法流程图;FIG. 3 is a flowchart of a method for determining an active access server according to an embodiment of the present invention;
图4是根据本发明实施例的主用接入服务器确定装置结构框图;FIG. 4 is a structural block diagram of an apparatus for determining an active access server according to an embodiment of the present invention;
图5是根据本发明实施例一的BFD状态断开时的流程图;以及FIG. 5 is a flow chart when the BFD state is disconnected according to Embodiment 1 of the present invention; and
图6是根据本发明实施例一的BFD状态恢复连接时的流程图。FIG. 6 is a flow chart of BFD state recovery connection according to Embodiment 1 of the present invention.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
图2是根据本发明实施例的主用接入服务器确定方法所应用的网络结构示意图,如图2所示,该网络是由第一接入服务器、第一交换机、第二交换机和第二接入服务器组成的一个口字型结构,第一接入服务器和第二接入服务器各关联有两组BFD,在工作状态下,第一接入服务器和第二接入服务器中的一个为主用接入服务器,另一个作为备用接入服务器,根据所关联的BFD的状态,第一接入服务器和第二接入服务器可进行主备用的状态切换。VRRP通过第一接入服务器和第二接入服务器之间采用桥接协议,通过SMARTGROUP技术来保证可靠性(链路聚合形成的逻辑接口称为SMARTGROUP,可以把SMARTGROUP当做普通端口使用,保证了链路的可靠性),桥接协议使得物理上不在一个信道上的两台服务器,通过逻辑接口或者vlan(虚拟局域网)等连接在一起。Fig. 2 is a schematic diagram of a network structure applied to a method for determining a primary access server according to an embodiment of the present invention. As shown in Fig. 2, the network is composed of a first access server, a first switch, a second switch and a second The first access server and the second access server are each associated with two sets of BFD. In the working state, one of the first access server and the second access server is the master The access server and the other serve as a standby access server. According to the state of the associated BFD, the first access server and the second access server can switch between active and standby states. VRRP uses the bridging protocol between the first access server and the second access server, and uses SMARTGROUP technology to ensure reliability (the logical interface formed by link aggregation is called SMARTGROUP, and SMARTGROUP can be used as a common port to ensure link Reliability), the bridging protocol enables two servers that are not physically on the same channel to be connected together through a logical interface or vlan (virtual local area network).
当然,在实际的应用的双机冗余备份中,网络结构较复杂,但基本上都可以抽象成上述的网络结构模型。Of course, in the dual-machine redundant backup of the actual application, the network structure is relatively complicated, but basically it can be abstracted into the above-mentioned network structure model.
图3是根据本发明实施例的主用接入服务器确定方法流程图,该方法应用于图2所示的网络结构环境中,如图3所示,包括以下步骤:FIG. 3 is a flow chart of a method for determining a primary access server according to an embodiment of the present invention. The method is applied in the network structure environment shown in FIG. 2 , as shown in FIG. 3 , and includes the following steps:
步骤S302,在第一接入服务器与第一交换机之间的链路、第二接入服务器与第二交换机之间的链路、第一接入服务器经第一交换机和第二交换机至第二接入服务器之间的链路分别关联一组双向转发检测BFD。Step S302, the link between the first access server and the first switch, the link between the second access server and the second switch, the first access server to the second switch through the first switch and the second switch Links between access servers are associated with a group of bidirectional forwarding detection BFD.
步骤S304,当第一接入服务器和/或第二接入服务器所关联的一组BFD断开时,将该接入服务器的优先级从当前的配置优先级降低一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD断开时,将该接入服务器的优先级从预定的基准优先级降低两个级数,其中基准优先级小于或等于第一接入服务器和第二接入服务器中配置优先级小的接入服务器的配置优先级。Step S304, when a group of BFDs associated with the first access server and/or the second access server is disconnected, lower the priority of the access server by one level from the current configuration priority; When the access server and/or the two groups of BFDs associated with the second access server are disconnected, the priority of the access server is lowered by two levels from the predetermined base priority, where the base priority is less than or equal to the first access server. The configuration priority of the access server with the lower configuration priority among the ingress server and the second access server.
步骤S306,比较第一接入服务器和第二接入服务器的当前优先级,以当前优先级高的接入服务器作为主用接入服务器。Step S306, comparing the current priorities of the first access server and the second access server, and using the access server with the higher current priority as the primary access server.
在上述方法中,通过为主用和备用接入服务器关联双BFD,以及设置基准优先级,当接入服务器所关联的双BFD断开时,该接入服务器的优先级从基准优先级降低两个级数,从而可以避免双机热备份中的双主用的问题。In the above method, by associating dual BFDs with the active and standby access servers and setting the base priority, when the dual BFD associated with the access server is disconnected, the priority of the access server is reduced by two levels from the base priority. A series, so as to avoid the problem of dual-active in dual-system hot backup.
在步骤S306之后,还包括:当第一接入服务器和/或第二接入服务器所关联的一组BFD恢复连接时,将该接入服务器的当前优先级提高一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD恢复连接时,将该接入服务器的当前优先级恢复到其的配置优先级;比较第一接入服务器和第二接入服务器的当前优先级,以当前优先级高的接入服务器作为主用接入服务器,优先级的一个级数大小可以设置为10,主用接入服务器的确定采用抢占模式。第一接入服务器与第二接入服务器之间走过桥协议,通过SMARTGROUP保证链路可靠性。After step S306, it also includes: when a group of BFDs associated with the first access server and/or the second access server restores the connection, increasing the current priority of the access server by one level; when the first access server When the two groups of BFDs associated with the ingress server and/or the second access server restore the connection, restore the current priority of the access server to its configured priority; compare the For the current priority, the access server with the highest current priority is used as the active access server, and the number of priority levels can be set to 10, and the determination of the active access server adopts the preemptive mode. The bridge protocol is passed between the first access server and the second access server, and link reliability is guaranteed through SMARTGROUP.
其中,在上述方法中,两个接入服务器组成一个VRRP组,每个接入服务器为VRRP组的一个PEER,通过VRRP协议进行优先级协商。基准优先级是指,在VRRP的某一个Peer需要降低优先级时,以该基准优先级为基础,在基准优先级以下降低Peer的优先级。当VRRP某一Peer关联的BFD状态down时,该VRRP的peer优先级必须降低到比基准优先级低某一幅度,当该Peer关联的BFD状态全部UP时,该VRRP的Peer优先级必须恢复到配置的优先级。该基准优先级的选取可以根据需要来配置,也可以采用VRRP组两个Peer中较小的优先级,但是必须小于VRRP组中2个Peer优先级较小的一个。Wherein, in the above method, two access servers form a VRRP group, each access server is a PEER of the VRRP group, and priority negotiation is performed through the VRRP protocol. The base priority means that when a certain peer of VRRP needs to lower the priority, the priority of the peer is lowered below the base priority based on the base priority. When the BFD state associated with a VRRP peer is down, the peer priority of the VRRP must be reduced to a certain range lower than the base priority. When the BFD state associated with the peer is all up, the peer priority of the VRRP must be restored to Configuration priority. The selection of the base priority can be configured as required, and the smaller priority of the two peers in the VRRP group can also be used, but it must be smaller than the smaller priority of the two peers in the VRRP group.
采用基准优先级是因为:假设一个peer优先级是60,另一个是40。优先级为60的bras到直连交换机的链路down,假设优先级在原来的优先级基础上,down一个bfd降低优先级10,那么原来优先级为60的那个peer因为down了2个bfd,所以优先级是60-20=40,优先级为40的那个peer优先级是40-10=30,这样会造成down的那个peer优先级是40,没down的那个优先级是30,vrrp无法切换。所以使用优先级方式vrrp切换并且支持双BFD时,必须有一个可以参考的优先级,而且该优先级必须小于等于VRRP的peer的两个优先级的最小值。The base priority is used because: Suppose one peer priority is 60 and the other is 40. The link from the bras with a priority of 60 to the directly connected switch is down. Assuming that the priority is based on the original priority, one bfd is down and the priority is lowered by 10. Then the peer with the original priority of 60 has 2 bfds down. So the priority is 60-20=40, the priority of the peer with priority 40 is 40-10=30, which will cause the priority of the down peer to be 40, and the priority of the non-down peer to be 30, and vrrp cannot be switched . Therefore, when using the priority mode of vrrp switching and supporting dual BFD, there must be a priority that can be referred to, and the priority must be less than or equal to the minimum value of the two priorities of the VRRP peer.
图4是根据本发明实施例的主用接入服务器确定装置结构框图,如图4所示,该确定装置包括:依次连接的关联模块10、优先级调整模块20和主用接入服务器确定模块30。Fig. 4 is a structural block diagram of an apparatus for determining an active access server according to an embodiment of the present invention. As shown in Fig. 4, the apparatus for determining includes: an association module 10 connected in sequence, a priority adjustment module 20, and an active access server determining module 30.
其中,关联模块10,用于第一接入服务器与第一交换机之间的链路、第二接入服务器与第二交换机之间的链路、第一接入服务器经第一交换机和第二交换机至第二接入服务器之间的链路分别关联一组双向转发检测BFD;优先级调整模块20,用于当第一接入服务器和/或第二接入服务器所关联的一组BFD断开时,将该接入服务器的优先级从当前的配置优先级降低一个级数;当第一接入服务器和/或第二接入服务器所关联的两组BFD断开时,将该接入服务器的优先级从预定的基准优先级降低两个级数,其中基准优先级小于或等于第一接入服务器和第二接入服务器中配置优先级小的接入服务器的配置优先级;主用接入服务器确定模块30,用于比较第一接入服务器和第二接入服务器的当前优先级,以当前优先级高的接入服务器作为主用接入服务器。Among them, the association module 10 is used for the link between the first access server and the first switch, the link between the second access server and the second switch, the first access server via the first switch and the second The links between the switch and the second access server are respectively associated with a group of bidirectional forwarding detection BFD; the priority adjustment module 20 is configured to disconnect a group of BFD associated with the first access server and/or the second access server When enabled, the priority of the access server is lowered by one level from the current configuration priority; when the two groups of BFDs associated with the first access server and/or the second access server are disconnected, the access server The priority of the server is lowered by two levels from the predetermined reference priority, wherein the reference priority is less than or equal to the configuration priority of the access server with the lower configuration priority among the first access server and the second access server; The access server determination module 30 is configured to compare the current priorities of the first access server and the second access server, and use the access server with the higher current priority as the primary access server.
在上述装置中,通过为主用和备用接入服务器关联双BFD,以及设置基准优先级,当接入服务器所关联的双BFD断开时,该接入服务器的优先级从基准优先级降低两个级数,从而可以避免双机热备份中的双主用的问题。In the above device, by associating dual BFDs with the active and standby access servers and setting the base priority, when the dual BFDs associated with the access server are disconnected, the priority of the access server is reduced by two levels from the base priority. A series, so as to avoid the problem of dual-active in dual-system hot backup.
在上述的主用接入服务器确定装置中,优先级调整模块还用于当第一接入服务器和/或第二接入服务器所关联的一组BFD恢复连接时,将该接入服务器的当前优先级提高一个级数,以及当第一接入服务器和/或第二接入服务器所关联的两组BFD恢复连接时,将该接入服务器的当前优先级恢复到其的配置优先级。In the above-mentioned device for determining the primary access server, the priority adjustment module is further configured to: when a group of BFDs associated with the first access server and/or the second access server resumes connection, the current The priority is increased by one level, and when the two groups of BFDs associated with the first access server and/or the second access server recover the connection, the current priority of the access server is restored to its configured priority.
实施例一Embodiment one
在本实例中,采用图2所示的口字型网络结构,在VRRP的每个Peer关联两组BFD的情况下,对于BFD状态导致VRRP的Peer优先级变迁,有如下4种情况:In this example, the network structure shown in Figure 2 is adopted. When each peer of VRRP is associated with two sets of BFD, the BFD state causes the priority of VRRP peers to change, as follows:
当1个关联的BFD状态down时,该Peer的VRRP优先级比“本身优先级”降低一个数量,例如10。When an associated BFD state is down, the VRRP priority of the peer is lowered by an amount, for example, 10, than the "self priority".
当2个BFD状态down时,该Peer的VRRP优先级比“基准优先级”降低两个数量。When two BFD states are down, the VRRP priority of the peer is lower than the "base priority" by two numbers.
当1个BFD状态UP时,该Peer的VRRP优先级比基准优先级升高一个数量。When a BFD state is UP, the VRRP priority of the peer is increased by an amount higher than the base priority.
当2个BFD状态UP时,该Peer的VRRP优先级恢复原来的配置优先级。When the two BFD states are UP, the VRRP priority of the peer returns to the original configured priority.
在上述的过程中,当VRRP的Peer优先级改变时,主动改变方立刻开始主用PEER的重新选举。In the above process, when the VRRP Peer priority changes, the active change party immediately starts the re-election of the primary PEER.
图5是根据本发明实施例一的BFD状态断开时的流程图,在本实施例中,假设原来bras1的VRRP优先级是50,bras2是40,基准优先级是40,那么当有关联的BFD状态断开时的情况如图5所示,包括以下步骤:Fig. 5 is a flowchart according to the first embodiment of the present invention when the BFD state is disconnected. In this embodiment, assuming that the original VRRP priority of bras1 is 50, bras2 is 40, and the reference priority is 40, then when there is an associated The situation when the BFD state is disconnected is shown in Figure 5, including the following steps:
步骤S502,链路或节点发生故障,BFD状态down。例如,bras1和sw1之间链路down。In step S502, a link or node fails, and the BFD state is down. For example, the link between bras1 and sw1 is down.
步骤S504,该peer根据down的链路条数开始降低VRRP优先级。bras1的vrrp关联的BFD1和BFD3全down,优先级降低为40-20=10;而bras2只down了bfd3,优先级降低为40-10=30。Step S504, the peer starts to lower the VRRP priority according to the number of down links. The BFD1 and BFD3 associated with the vrrp of bras1 are all down, and the priority is reduced to 40-20=10; while bras2 only downs bfd3, the priority is reduced to 40-10=30.
步骤S506,立即重新开始VRRP主备选举,其中,主备选举采用抢占模式,抢占模式,是VRRP协议的一种模式,当Backup路由器收到VRRP通告报文后,会将自己的优先级与通告报文中的优先级进行比较;如果大于通告报文中的优先级,则成为主用设备,否则将保持备用状态。在本实施例中,bras2的当前优先级高于bras1的当前优先级,bras1作为主用设备。Step S506, restart VRRP master-standby election immediately, wherein, master-standby election adopts preemption mode, and preemption mode is a kind of mode of VRRP agreement, after the Backup router receives VRRP notification message, can compare its priority with the notification message The priority in the message is compared; if it is higher than the priority in the notification message, it will become the active device, otherwise it will remain in the standby state. In this embodiment, the current priority of bras2 is higher than the current priority of bras1, and bras1 acts as the master device.
步骤S508,判断是否VRRP主备切换,是转步骤S510,否则转步骤S512。bras1当选为主用设备,需要进行主备切换。Step S508, judging whether VRRP master/standby switching, if yes, go to step S510, otherwise go to step S512. bras1 is selected as the master device, and a master-standby switchover is required.
步骤S510,触发主备切换和路由处理,bras1切换为主用服务器,bras2切换为备用服务器。Step S510, triggering active/standby switching and routing processing, bras1 is switched to be the active server, and bras2 is switched to be the standby server.
步骤S512,不做处理。Step S512, do not process.
在上述的步骤中,还存在以下两种情况:In the above steps, the following two situations also exist:
当sw1和sw2之间链路down时:bras1和bras2都只有一个bfd的状态down,因此bras1优先级降低为50-10=40;bras2降低为40-10=30,根据vrrp规则还是bras1为主。When the link between sw1 and sw2 is down: both bras1 and bras2 have only one bfd state down, so the priority of bras1 is reduced to 50-10=40; bras2 is reduced to 40-10=30, according to the vrrp rule, bras1 is still the main .
当bras2和sw2之间链路down时:bras1只down了bfd3,优先级降低为50-10=40,bras2的2个vrrp关联的bfd全down,优先级降低为40-20=10根据vrrp切换规则,bras1为主。When the link between bras2 and sw2 is down: bras1 only down bfd3, the priority is reduced to 50-10=40, the bfd associated with the two vrrp of bras2 is all down, the priority is reduced to 40-20=10 according to vrrp switching As a rule, bras1 is the main one.
在上述两种情况中,通过优先级的降低,同样避免了双主用的问题。In the above two cases, the problem of dual active use is also avoided by reducing the priority.
图6是根据本发明实施例一的BFD状态恢复连接时的流程图,如图6所示,包括以下步骤:Fig. 6 is a flow chart according to the first embodiment of the present invention when the BFD state restores the connection, as shown in Fig. 6, including the following steps:
步骤S602,Peer的BFD状态up。Step S602, the BFD state of the Peer is up.
步骤S604,判断是否BFD全部up,如果是,则转步骤S606,否则转步骤S608Step S604, judge whether all BFDs are up, if yes, go to step S606, otherwise go to step S608
步骤S606,该Peer的VRRP优先级恢复为配置优先级。Step S606, the VRRP priority of the Peer is restored to the configured priority.
步骤S608,将该Peer的当前VRRP优先级提高1个数量。Step S608, increasing the current VRRP priority of the Peer by 1 amount.
步骤S610,立即重新开始VRRP主备选举,其中主备的选举采用抢占模式。In step S610, the VRRP master/standby election is restarted immediately, wherein the master/standby election adopts a preemptive mode.
步骤S612,是否VRRP主备切换,如果是,则转步骤S614,否则转步骤S616Step S612, whether VRRP master/standby switching, if yes, go to step S614, otherwise go to step S616
步骤S614,触发主备切换和路由处理。Step S614, triggering active/standby switchover and routing processing.
步骤S616,不做处理。Step S616, do not process.
在本发明的上述实施例中,通过为主用和备用接入服务器关联合适的双BFD,以及设置作为参考的基准优先级,当接入服务器所关联的双BFD断开时,该接入服务器的优先级从基准优先级降低两个级数,使得主备接入服务器的优先级不会出现相同的情况,从而避免了双机热备份中的双主用的问题。In the above embodiments of the present invention, by associating appropriate dual BFDs with the active and standby access servers, and setting the reference priority as a reference, when the dual BFD associated with the access server is disconnected, the access server The priority of the server is lowered by two levels from the baseline priority, so that the priority of the active and standby access servers will not be the same, thereby avoiding the problem of dual active use in dual-machine hot backup.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010560193.8A CN102006189B (en) | 2010-11-25 | 2010-11-25 | Primary access server determination method and device for dual-machine redundancy backup |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010560193.8A CN102006189B (en) | 2010-11-25 | 2010-11-25 | Primary access server determination method and device for dual-machine redundancy backup |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102006189A true CN102006189A (en) | 2011-04-06 |
CN102006189B CN102006189B (en) | 2014-09-10 |
Family
ID=43813281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010560193.8A Active CN102006189B (en) | 2010-11-25 | 2010-11-25 | Primary access server determination method and device for dual-machine redundancy backup |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102006189B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104731071A (en) * | 2015-03-17 | 2015-06-24 | 成都智慧之芯科技有限公司 | Redundant-waste heat backup method of mater engine in centralized control system |
CN105577444A (en) * | 2015-12-30 | 2016-05-11 | 迈普通信技术股份有限公司 | Wireless controller management method and wireless controller |
CN105939224A (en) * | 2016-06-12 | 2016-09-14 | 杭州迪普科技有限公司 | Method and device for solving double-master problem of double-equipment hot standby |
WO2017024697A1 (en) * | 2015-08-11 | 2017-02-16 | 国电南瑞科技股份有限公司 | Cross-network segment message forwarding method for dispatching automation system |
CN106506364A (en) * | 2016-12-08 | 2017-03-15 | 努比亚技术有限公司 | A kind of cut-in method, client and routing server |
WO2017054471A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Method of electing designated router and device utilizing same |
CN104038362B (en) * | 2013-03-08 | 2018-03-23 | 中国移动通信集团广东有限公司 | A kind of network system |
CN108667695A (en) * | 2017-09-06 | 2018-10-16 | 新华三技术有限公司 | Backup method and device for BRAS transfer control separation |
CN108667575A (en) * | 2017-09-06 | 2018-10-16 | 新华三技术有限公司 | A kind of BRAS turns the backup method and device of control separation |
CN109617761A (en) * | 2018-12-10 | 2019-04-12 | 北京明朝万达科技股份有限公司 | A kind of active/standby server switching method and device |
CN110417599A (en) * | 2019-08-01 | 2019-11-05 | 青岛聚看云科技有限公司 | The switching method and node server of main-standby nodes |
CN110875880A (en) * | 2018-08-29 | 2020-03-10 | 北京华为数字技术有限公司 | A data transmission method, related equipment, system and computer storage medium |
WO2022193885A1 (en) * | 2021-03-16 | 2022-09-22 | 华为技术有限公司 | User access processing method and related device |
CN115941448A (en) * | 2022-11-17 | 2023-04-07 | 天翼云科技有限公司 | A master/standby switching method for application layer services based on BFD and domain name resolution |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101132320A (en) * | 2007-09-18 | 2008-02-27 | 华为技术有限公司 | Method for detecting interface failure and network node equipment |
CN101447858A (en) * | 2008-01-17 | 2009-06-03 | 中兴通讯股份有限公司 | Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system |
-
2010
- 2010-11-25 CN CN201010560193.8A patent/CN102006189B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101132320A (en) * | 2007-09-18 | 2008-02-27 | 华为技术有限公司 | Method for detecting interface failure and network node equipment |
CN101447858A (en) * | 2008-01-17 | 2009-06-03 | 中兴通讯股份有限公司 | Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104038362B (en) * | 2013-03-08 | 2018-03-23 | 中国移动通信集团广东有限公司 | A kind of network system |
CN104731071A (en) * | 2015-03-17 | 2015-06-24 | 成都智慧之芯科技有限公司 | Redundant-waste heat backup method of mater engine in centralized control system |
WO2017024697A1 (en) * | 2015-08-11 | 2017-02-16 | 国电南瑞科技股份有限公司 | Cross-network segment message forwarding method for dispatching automation system |
WO2017054471A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Method of electing designated router and device utilizing same |
CN105577444A (en) * | 2015-12-30 | 2016-05-11 | 迈普通信技术股份有限公司 | Wireless controller management method and wireless controller |
CN105577444B (en) * | 2015-12-30 | 2019-02-22 | 迈普通信技术股份有限公司 | A kind of wireless controller management method and wireless controller |
CN105939224A (en) * | 2016-06-12 | 2016-09-14 | 杭州迪普科技有限公司 | Method and device for solving double-master problem of double-equipment hot standby |
CN106506364A (en) * | 2016-12-08 | 2017-03-15 | 努比亚技术有限公司 | A kind of cut-in method, client and routing server |
CN108667575A (en) * | 2017-09-06 | 2018-10-16 | 新华三技术有限公司 | A kind of BRAS turns the backup method and device of control separation |
CN108667695A (en) * | 2017-09-06 | 2018-10-16 | 新华三技术有限公司 | Backup method and device for BRAS transfer control separation |
CN108667695B (en) * | 2017-09-06 | 2020-12-29 | 新华三技术有限公司 | A backup method and device for BRAS transfer control separation |
CN108667575B (en) * | 2017-09-06 | 2021-04-27 | 新华三技术有限公司 | Backup method and device for BRAS transfer control separation |
CN110875880A (en) * | 2018-08-29 | 2020-03-10 | 北京华为数字技术有限公司 | A data transmission method, related equipment, system and computer storage medium |
CN110875880B (en) * | 2018-08-29 | 2022-03-25 | 北京华为数字技术有限公司 | A data transmission method, related equipment, system and computer storage medium |
CN109617761A (en) * | 2018-12-10 | 2019-04-12 | 北京明朝万达科技股份有限公司 | A kind of active/standby server switching method and device |
CN109617761B (en) * | 2018-12-10 | 2020-02-21 | 北京明朝万达科技股份有限公司 | Method and device for switching main server and standby server |
CN110417599A (en) * | 2019-08-01 | 2019-11-05 | 青岛聚看云科技有限公司 | The switching method and node server of main-standby nodes |
WO2022193885A1 (en) * | 2021-03-16 | 2022-09-22 | 华为技术有限公司 | User access processing method and related device |
CN115941448A (en) * | 2022-11-17 | 2023-04-07 | 天翼云科技有限公司 | A master/standby switching method for application layer services based on BFD and domain name resolution |
Also Published As
Publication number | Publication date |
---|---|
CN102006189B (en) | 2014-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102006189A (en) | Primary access server determination method and device for dual-machine redundancy backup | |
CN110912780B (en) | High-availability cluster detection method, system and controlled terminal | |
US8339940B2 (en) | Multi-active detection method and stack member device | |
JP5913635B2 (en) | Redundant network connection | |
US20100306572A1 (en) | Apparatus and method to facilitate high availability in secure network transport | |
WO2015007096A1 (en) | Switching method and apparatus for main and standby devices | |
CN106603261B (en) | Hot backup method, first main device, standby device and communication system | |
CN111030926B (en) | A method and device for improving network high availability | |
WO2011143876A1 (en) | Master/backup switching method and device for service nodes | |
WO2008014696A1 (en) | Method and apparatus for realizing communication take-over | |
EP3029883B1 (en) | Network protection method and apparatus, next-ring node, and system | |
CN105577444A (en) | Wireless controller management method and wireless controller | |
CN102187627B (en) | Method and device for load sharing, broadband access server system | |
CN111371680B (en) | Route management method, device, device and storage medium for dual-system hot backup | |
CN102143047B (en) | Routing switching triggering method and service provider-end provider edge equipment | |
WO2021098806A1 (en) | Message transmission path switching method, device and system | |
CN101330404A (en) | Method, system and device for managing network device port status | |
CN108234358B (en) | Multicast message transmission method, device and machine readable storage medium | |
CN104901880B (en) | A kind of method and device of service operation | |
KR20200072941A (en) | Method and apparatus for handling VRRP(Virtual Router Redundancy Protocol)-based network failure using real-time fault detection | |
US20090316572A1 (en) | Method and system for managing port statuses of a network device and relay device | |
CN116248581B (en) | Cloud scene gateway cluster master-slave switching method and system based on SDN | |
CN102136936B (en) | Method, node and system for preventing control plane faults from influencing operation of forward data plane | |
CN113852514A (en) | Data processing system with uninterrupted service, processing equipment switching method and connecting equipment | |
CN110875880B (en) | A data transmission method, related equipment, system and computer storage medium |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201228 Address after: 251700 resident of Shimiao Town, Huimin County, Binzhou City, Shandong Province Patentee after: Shandong Huanghe grain and oil Technology Co.,Ltd. Address before: 518057 No. 55 South Science and technology road, Shenzhen, Guangdong, Nanshan District Patentee before: ZTE Corp. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210319 Address after: No. 99-321, Taizhong Road, cross strait science and Technology Industrial Park, Nanjing, Jiangsu, 211800 Patentee after: Nanjing Pukou Kechuang investor group Co.,Ltd. Address before: 251700 resident of Shimiao Town, Huimin County, Binzhou City, Shandong Province Patentee before: Shandong Huanghe grain and oil Technology Co.,Ltd. |