WO2016061943A1 - 实现生成树协议保护倒换的方法、装置及计算机存储介质 - Google Patents
实现生成树协议保护倒换的方法、装置及计算机存储介质 Download PDFInfo
- Publication number
- WO2016061943A1 WO2016061943A1 PCT/CN2015/072170 CN2015072170W WO2016061943A1 WO 2016061943 A1 WO2016061943 A1 WO 2016061943A1 CN 2015072170 W CN2015072170 W CN 2015072170W WO 2016061943 A1 WO2016061943 A1 WO 2016061943A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- port
- stp
- protection switching
- module
- link
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
Definitions
- the present invention relates to data communication and transmission technologies, and in particular, to a method, an apparatus, and a computer storage medium for Spanning Tree Protocol (STP) protection switching.
- STP Spanning Tree Protocol
- STP is a Layer 2 network management protocol.
- STP Rapid Spanning Tree Protocol
- MSTP Multiple Spanning Tree Protocol
- the STP protocol versions are backward compatible.
- RSTP is optimized on the basis of STP, which greatly improves the STP performance and can meet the network requirements of low latency and high reliability.
- MSTP is a further improvement based on RSTP.
- MSTP allows multiple virtual local area networks (Virtual).
- the Local Area Network (VLAN) is bundled into a spanning tree instance.
- VLAN virtual local area networks
- the spanning tree is determined by the sending and receiving protocol packets to determine whether the link is normal. Therefore, when the physical link is interrupted, especially when an abnormal link occurs in an intermediate network that is not enabled with the spanning tree, the spanning tree cannot know the link fault in time. You need to wait for the STP packet to expire before starting the protocol recalculation. As a result, the service interruption time is too long.
- STP cannot detect the performance status of the link. Therefore, when a service link service is seriously damaged, if there are a large number of errors, the STP switchover cannot be triggered when the packet is lost.
- the embodiment of the invention provides a method, a device and a computer storage medium for implementing STP protection switching, which can quickly learn the fault state of the link, and trigger the corresponding STP protection switching action in time, thereby reducing the service interruption caused by the link failure. time.
- the embodiment of the invention provides a method for implementing STP protection switching, and the method further includes:
- the detection packet is sent periodically in the bidirectional forwarding detection (BFD) session of the port to the port;
- BFD bidirectional forwarding detection
- the STP protection switching indication message is sent.
- the method when detecting that a port does not receive the detection packet of the peer port, the method further includes:
- the link connection status between the port and the peer port is identified as a link fault.
- the method further includes:
- the STP protection switching indication message is sent again.
- the method further includes:
- the abnormal performance value of each port is counted.
- the port cost of each port is determined according to the abnormal performance value of each port. According to the determined port cost of each port, select the link with the lowest cost as the working link in the network topology. road.
- the method further includes:
- An embodiment of the present invention further provides an apparatus for implementing STP protection switching, where the apparatus includes a first sending module and a second sending module;
- the first sending module is configured to periodically send a detection packet in the created port-to-port BFD session
- the second sending module is configured to send an STP protection switching indication message when detecting that the port does not receive the detection packet of the peer port.
- the device further includes an identification module
- the identifier module is configured to identify that the link connectivity between the port and the peer port is a link fault when detecting that the port does not receive the detection packet of the peer port.
- the apparatus further includes a third sending module
- the third sending module is configured to send an STP protection switching indication message again when detecting that the port receives the detection packet of the peer port again.
- the apparatus further includes a statistics module, a determining module, and a selecting module;
- the statistics module is configured to collect abnormal performance values of each port.
- the determining module is configured to determine a port cost of each current port according to the abnormal performance value of each port that is counted;
- the selecting module is configured to select a link with the smallest overhead as the working link in the network topology according to the determined port cost of each port.
- the apparatus further includes a blocking module
- the blocking module is configured to block all ports when it is detected that a write heartbeat register value indicating that the software operating environment has not changed.
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing STP protection switching according to the embodiment of the invention.
- the method, the device, and the computer storage medium for implementing the STP protection switching according to the embodiment of the present invention periodically send a detection packet in a port-to-port BFD session; when detecting that a port does not receive the detection packet of the peer port, The STP protection switching indication message is sent to notify the STP to perform protection switching in real time. In this way, the fault state of the link can be quickly learned, and the corresponding STP protection switching action is triggered in time, thereby reducing the service interruption time caused by the link failure.
- FIG. 1 is a schematic flowchart 1 of a method for implementing STP protection switching according to an embodiment of the present invention
- FIG. 2 is a second schematic flowchart of a method for implementing STP protection switching according to an embodiment of the present invention
- FIG. 3 is a schematic flowchart 3 of a method for implementing STP protection switching according to an embodiment of the present invention
- FIG. 4 is a schematic flowchart 4 of a method for implementing STP protection switching according to an embodiment of the present invention
- FIG. 5 is a schematic structural diagram 1 of a device for implementing STP protection switching according to an embodiment of the present invention
- FIG. 6 is a schematic structural diagram 2 of a device for implementing STP protection switching according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram 3 of a device for implementing STP protection switching according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram 4 of a device for implementing STP protection switching according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram 5 of a device for implementing STP protection switching according to an embodiment of the present invention.
- the detection packet is sent periodically in the created port-to-port BFD session.
- the STP protection switching indication message is sent.
- the ports involved in the embodiment of the present invention all refer to a spanning tree protocol instance port, that is, an STP instance port.
- FIG. 1 is a schematic flowchart 1 of a method for implementing STP protection switching according to an embodiment of the present invention. As shown in FIG. 1 , a method for implementing STP protection switching in an embodiment of the present invention includes:
- Step S101 Send a detection packet periodically in the created BFD session from the port to the port;
- the BFD detection module configured on each port periodically sends a detection packet to the created port-to-port BFD session.
- a port-to-port BFD detection module needs to be configured for each port in the STP Ethernet ring network.
- a BFD session is established on both ends of the link in the Ethernet ring network.
- the BFD detection module configured on each port can periodically send BFD detection packets to the peer end to implement fast detection of link connectivity.
- the BFD protocol is a path connectivity detection protocol.
- the BFD protocol can quickly detect faults in the forwarding path.
- the BFD protocol provides connectivity detection in both directions of the link through the three-way handshake mechanism.
- Step S102 Send an STP protection switching indication message when detecting that the port does not receive the detection packet of the peer port.
- the STP protection switching instruction message is sent to the STP processing module in the STP Ethernet ring network.
- the BFD session is set up on the two ends of the Ethernet ring network.
- the BFD detection module sends the detection packet periodically in the BFD session. If a port does not receive the detection packet from the peer, you can determine that the link connectivity between the port and the peer port is faulty. In this case, the STP protection switching instruction message is sent to the STP processing module in the STP Ethernet ring network to notify the STP of the protection switching in real time.
- the method may further include:
- Step S103 Identify that the link connection state between the port and the peer port is a link fault.
- the BFD detection module identifies that the link connectivity between the port and the peer port is a link fault.
- step S102 and step S103 there is no sequence in the execution process in step S102 and step S103.
- the two steps may be performed synchronously, that is, when detecting that a port does not receive the peer port.
- the STP protection switching indication message is sent to notify the STP of the protection switching in real time.
- the link connectivity between the port and the peer port is identified as a link fault.
- the method for implementing the STP protection switching in the embodiment of the present invention can quickly learn the fault state of the link, and trigger the corresponding STP protection switching action in time, thereby reducing the service interruption time caused by the link failure.
- the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the method for implementing STP protection switching according to the first embodiment of the present invention.
- FIG. 2 is a schematic flowchart 2 of a method for implementing STP protection switching according to an embodiment of the present invention. As shown in FIG. 2, the method for implementing STP protection switching in the embodiment of the present invention includes:
- Step S101 Send a detection packet periodically in the created BFD session from the port to the port;
- Step S102 Send an STP protection switching indication message when detecting that the port does not receive the detection packet of the peer port;
- Step S103 Identify that the link connectivity between the port and the peer port is a link fault.
- Steps S101 to S103 in the second embodiment of the present invention can be referred to the steps S101 to S103 in the first embodiment, respectively.
- Step S201 When detecting that the port re-receives the detection packet of the peer port, the STP protection switching indication message is sent again.
- the BFD detection module detects that the port receives the detection packet of the peer port, it sends an STP protection switching indication message to the STP processing module in the STP Ethernet ring network.
- the port and the peer can be determined.
- the link connectivity between the ports is faulty. Therefore, the link between the port and the peer port is in real time.
- the link is faulty. In this case, the Ethernet ring topology changes and the STP protection needs to be sent.
- the switching indication message is used to notify the STP in real time for protection switching.
- step S201 when detecting that the port receives the detection packet of the peer port, it may be determined that the link connectivity state between the identified port and the peer port is restored from the link failure to The normal working status, at this time, indicates that the Ethernet ring topology has changed. You need to send the STP protection switching indication message again to notify the STP of the protection switching in real time.
- the method for implementing the STP protection switching in the embodiment of the present invention can quickly learn the fault state of the link, and trigger the corresponding STP protection switching action in time, thereby reducing the service interruption time caused by the link failure.
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the method for implementing STP protection switching according to the second embodiment of the present invention.
- FIG. 3 is a schematic flowchart 3 of a method for implementing STP protection switching according to an embodiment of the present invention. As shown in FIG. 3, the method for implementing STP protection switching in the embodiment of the present invention includes:
- Step S101 Send a detection packet periodically in the created BFD session from the port to the port;
- Step S102 Send an STP protection switching indication message when detecting that the port does not receive the detection packet of the peer port;
- Steps S101 to S102 in the third embodiment of the present invention can be referred to the steps S101 to S102 in the first embodiment, respectively.
- Step S301 Statistics of abnormal performance values of each port
- the abnormal performance value may include a combination of any one or more of performance items that reflect link performance degradation, such as a packet loss rate, a bit error rate, and an error frame number.
- the abnormal performance value of each port is counted, and the combination of any one or more of the performance items that reflect link performance degradation, such as the packet loss rate, the error rate, and the number of error frames of each port, is counted.
- the manner of counting the abnormal performance values of the respective ports is not limited.
- the bit error rate can be easily calculated according to the number of error frames/(normal frame number + error frame number), or the operation chain can be detected through the Operation Administration and Maintenance (OAM) protocol.
- the error rate is obtained by statistical means such as the road error rate.
- the conversion relationship corresponding to the abnormal performance value and the port cost needs to be established in advance.
- the port cost of the port is the port cost defined in the spanning tree protocol, that is, the normal port cost.
- the port cost of the port can be set to: (1+10%)* normal port cost, when the port has a bit error rate of 50%, The port cost of the port can be set to: (1 + 50%) * normal port cost.
- the conversion relationship between the abnormal performance value and the port cost can be determined according to the actual network condition.
- Step S302 determining a port cost of each current port according to the abnormal performance value of each port that is counted;
- determining, according to the abnormal performance value of each port, the current port cost of each port includes: determining, by using a pre-established abnormal performance value and a conversion relationship corresponding to the port cost, according to the abnormal performance value of each port.
- the port cost corresponding to the port is a correspondence conversion table of the abnormal performance value and the port cost, it can directly search for each port of the statistics.
- the abnormal performance value gives the port cost of the port.
- Step S303 Select a link with the smallest overhead as the working link in the network topology according to the determined port cost of each port.
- the cost of each link in the network topology is recalculated according to the determined port cost of each port, so that the link with the least overhead is selected, that is, the optimal link is used as the working link.
- the STP protection switching method is implemented in the embodiment of the present invention.
- a service link service is seriously damaged, if a large number of errors occur, the performance status of the link can be sensed in time, and the STP protection switching can be implemented in time.
- Select an optimal link as the working link in the network topology.
- the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the method for implementing STP protection switching according to the third embodiment of the present invention.
- FIG. 4 is a schematic flowchart of a method for implementing STP protection switching according to an embodiment of the present invention. As shown in FIG. 4, the method for implementing STP protection switching in the embodiment of the present invention includes:
- Step S101 Send a detection packet periodically in the created BFD session from the port to the port;
- Step S102 Send an STP protection switching indication message when detecting that the port does not receive the detection packet of the peer port;
- Steps S101 to S102 in the fourth embodiment of the present invention can be referred to the steps S101 to S102 in the first embodiment, respectively.
- Step S401 Block all ports when it is detected that the write heartbeat register value for indicating the software running environment has not changed.
- the STP processing task state may be periodically detected by using a write heartbeat register of the software running environment of the STP; when the STP processing task is abnormally suspended or the memory is insufficient, the writing heartbeat is detected.
- the register stops writing the heartbeat, that is, the writing heart
- the value of the hop register stops changing.
- all ports can be disabled by blocking all ports to isolate the STP Ethernet loop from the Ethernet ring to prevent broadcast storms.
- the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the method for implementing STP protection switching according to Embodiment 4 of the present invention.
- FIG. 5 is a schematic structural diagram 1 of a device for implementing STP protection switching according to an embodiment of the present invention. As shown in FIG. 5, the device includes a first sending module 501 and a second sending module 502.
- the first sending module 501 is configured to periodically send a detection packet in a bidirectional forwarding detection BFD session of the created port to the port;
- the second sending module 502 is configured to send an STP protection switching indication message when detecting that the port does not receive the detection packet of the peer port.
- the device further includes an identification module 503;
- the identifier module 503 is configured to identify that the link connection state between the port and the peer port is a link fault when detecting that the port does not receive the detection packet of the peer port.
- the device further includes a third sending module 504;
- the third sending module 504 is configured to send an STP protection switching indication message again when detecting that the port receives the detection packet of the peer port again.
- the device further includes a statistics module 505, a determining module 506, and a selecting module 507;
- the statistic module 505 is configured to collect an abnormal performance value of each port.
- the determining module 506 is configured to determine a port cost of each current port according to the abnormal performance value of each port that is counted;
- the selecting module 507 is configured to select a link with the smallest overhead as the working link in the network topology according to the determined port cost of each port.
- the device further includes a blocking module 508;
- the blocking module 508 is configured to block all ports when it is detected that a write heartbeat register value indicating that the software operating environment has not changed.
- the first sending module 501, the second sending module 502, the identifying module 503, the third sending module 504, the statistic module 505, the determining module 506, the selecting module 507, and the blocking module 508 can all be implemented by the present invention.
- a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA) is implemented in a device that implements STP protection switching.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- the STP protection switching instruction message is sent in the BFD session of the port to the port.
- the STP protection switching instruction message is sent to notify the STP in real time. Switched. In this way, the fault state of the link can be quickly learned, and the corresponding STP protection switching action is triggered in time, thereby reducing the service interruption time caused by the link failure.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明实施例提供一种实现生成树协议(STP)保护倒换的方法、装置及计算机存储介质,定期在创建的端口到端口的双向转发检测(BFD)会话中发送检测报文;当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
Description
本发明涉及数据通信和传输技术,尤其涉及一种生成树协议(Spanning Tree Protocol,STP)保护倒换的方法、装置及计算机存储介质。
STP是一种二层网络管理协议。在数据通信领域,存在三种STP协议版本:STP、快速生成树协议(Rapid Spanning Tree Protocol,RSTP),多生成树协议(Multiple Spanning Tree Protocol,MSTP)。所述STP协议版本之间保持向下兼容。其中,RSTP是在STP基础上的优化,极大的提升了STP性能,能够满足低延时、高可靠性的网络要求;MSTP是在RSTP基础上的进一步改进,MSTP允许多个虚拟局域网(Virtual Local Area Network,VLAN)捆绑到一个生成树实例中。
相关技术中,虽然STP协议版本得到了逐步优化,但是目前STP仍然存在如下问题:
1)由于生成树是靠收发协议报文来判断链路是否正常,因此当物理链路中断,特别是当未启用生成树的某中间网络出现链路异常时,生成树无法及时获知链路故障,需要等接收STP报文超时才启动协议重算,从而导致业务中断时间过长。
2)由于STP无法感知链路的性能状态,因此当某工作链路业务损伤严重,如存在大量误码,丢包时并不能触发STP倒换。
3)在设备的现实运行环境中,通常会出现软件层面程序运行异常而硬件层面业务转发正常的情况。在这种情况下,STP报文被抓取到设备的中央处理器(Central Processing Unit,CPU)后,由于CPU无法正常处理STP
报文并继续转发,使得STP报文被异常中止,从而产生广播风暴。
对于上述问题,相关技术中并不存在有效的解决方案。
发明内容
本发明实施例提供一种实现STP保护倒换的方法、装置及计算机存储介质,能够快速获知链路的故障状态,从而及时触发相应的STP保护倒换动作,进而减少因链路故障所导致的业务中断时间。
本发明实施例的技术方案是这样实现的:
本发明实施例提供一种实现STP保护倒换的方法,该方法还包括:
定期在创建的端口到端口的双向转发检测(Bidirectional Forwarding Detection,BFD)会话中发送检测报文;
当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
在一实施例中,当检测有端口未接收到对端端口的检测报文时,所述方法还包括:
标识所述端口与对端端口之间的链路连通状态为链路故障。
在一实施例中,所述标识所述端口与对端端口之间的链路连通状态为故障状态之后,所述方法还包括:
当检测有所述端口重新接收到对端端口的检测报文时,再次发送STP保护倒换指示消息。
在一实施例中,所述方法还包括:
统计各个端口的异常性能值;根据所统计的各个端口的异常性能值确定当前各个端口的端口代价;根据所确定的各个端口的端口代价,在网络拓扑中选择一条开销最小的链路作为工作链路。
在一实施例中,所述方法还包括:
当检测有用于指示所述软件运行环境的写心跳寄存器值未发生变化
时,阻塞所有端口。
本发明实施例还提供一种实现STP保护倒换的装置,该装置包括第一发送模块和第二发送模块;其中,
所述第一发送模块,配置为定期在创建的端口到端口的BFD会话中发送检测报文;
所述第二发送模块,配置为当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
在一实施例中,所述装置还包括标识模块;
所述标识模块,配置为当检测有端口未接收到对端端口的检测报文时,标识所述端口与对端端口之间的链路连通状态为链路故障。
在一实施例中,所述装置还包括第三发送模块;
所述第三发送模块,配置为当检测有所述端口重新接收到对端端口的检测报文时,再次发送STP保护倒换指示消息。
在一实施例中,所述装置还包括统计模块、确定模块和选择模块;
所述统计模块,配置为统计各个端口的异常性能值;
所述确定模块,配置为根据所统计的各个端口的异常性能值确定当前各个端口的端口代价;
所述选择模块,配置为根据所确定的各个端口的端口代价,在网络拓扑中选择一条开销最小的链路作为工作链路。
在一实施例中,所述装置还包括阻塞模块;
所述阻塞模块,配置为当检测有用于指示所述软件运行环境的写心跳寄存器值未发生变化时,阻塞所有端口。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的实现STP保护倒换的方法。
本发明实施例所提供的实现STP保护倒换的方法、装置及计算机存储介质,定期在创建的端口到端口的BFD会话中发送检测报文;当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息,以实时通知STP进行保护倒换。如此,能够快速获知链路的故障状态,从而及时触发相应的STP保护倒换动作,进而减少因链路故障所导致的业务中断时间。
图1为本发明实施例实现STP保护倒换的方法的流程示意图一;
图2为本发明实施例实现STP保护倒换的方法的流程示意图二;
图3为本发明实施例实现STP保护倒换的方法的流程示意图三;
图4为本发明实施例实现STP保护倒换的方法的流程示意图四;
图5为本发明实施例实现STP保护倒换的装置的组成结构示意图一;
图6为本发明实施例实现STP保护倒换的装置的组成结构示意图二;
图7为本发明实施例实现STP保护倒换的装置的组成结构示意图三;
图8为本发明实施例实现STP保护倒换的装置的组成结构示意图四;
图9为本发明实施例实现STP保护倒换的装置的组成结构示意图五。
在本发明实施例中,定期在创建的端口到端口的BFD会话中发送检测报文;当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
这里,需要说明的是,在本发明实施例中所涉及的端口均指代生成树协议实例端口,即STP实例端口。
下面结合附图及具体实施例对本发明再作进一步详细的说明。
实施例一
图1为本发明实施例实现STP保护倒换的方法的流程示意图一,如图1所示,本发明实施例实现STP保护倒换的方法包括:
步骤S101:定期在创建的端口到端口的BFD会话中发送检测报文;
具体地,通过每个端口中所配置的BFD检测模块定期在创建的端口到端口的BFD会话中发送检测报文。
在本发明实施例中,需要预先在STP的以太环网中分别为每个端口配置端口到端口的BFD检测模块。同时,在以太环网中的各链路两端建立BFD会话,即创建端口到端口的BFD会话。这样,当所述端口到端口的BFD会话建立之后,各端口中所配置的BFD检测模块之间可以通过协商,定期向对端发送BFD检测报文,来实现对链路连通状态的快速检测。
这里,BFD协议是一种路径连通性检测协议。BFD协议可以快速检测到转发路径中的故障。BFD协议通过三次握手机制,能提供链路来回两个方向的连通性检测。
步骤S102:当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
具体地,当通过所述BFD检测模块检测有某一端口未接收到对端端口的检测报文时,向STP以太环网中的STP处理模块发送STP保护倒换指示消息。
这里,在以太环网中的各链路两端建立BFD会话为例,两个端口中的BFD检测模块在其所建立BFD会话中周期性的发送检测报文,当所述BFD检测模块检测有某个端口未接收到对端的检测报文时,则可以确定所述端口与对端端口之间的链路连通状态发生了故障。此时,说明以太网拓扑发生变化,需要向STP以太环网中的STP处理模块发送STP保护倒换指示消息,以实时通知STP进行保护倒换。
在本发明实施例中,所述方法还可以包括:
步骤S103:标识所述端口与对端端口之间的链路连通状态为链路故障。
具体地,所述BFD检测模块标识所述端口与对端端口之间的链路连通状态为链路故障。
需要说明的是,在实际应用中,步骤S102和步骤S103在执行过程中并无先后顺序,所述两个步骤通常可以是同步执行的,即当检测有某一端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息,以实时通知STP进行保护倒换,同时,标识所述端口与对端端口之间的链路连通状态为链路故障。
如此,通过本发明实施例所述实现STP保护倒换的方法,能够快速获知链路的故障状态,从而及时触发相应的STP保护倒换动作,进而减少因链路故障所导致的业务中断时间。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例一所述的实现STP保护倒换的方法。
实施例二
图2为本发明实施例实现STP保护倒换的方法的流程示意图二,如图2所示,本发明实施例实现STP保护倒换的方法包括:
步骤S101:定期在创建的端口到端口的BFD会话中发送检测报文;
步骤S102:当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息;
步骤S103:标识所述端口与对端端口之间的链路连通状态为链路故障;
本发明实施例二中的步骤S101至步骤S103可以分别对应地参见实施例一中的步骤S101至步骤S103,为节约篇幅,这里不再赘述。
步骤S201:当检测有所述端口重新接收到对端端口的检测报文时,再次发送STP保护倒换指示消息。
具体地,当所述BFD检测模块检测有所述端口接收到对端端口的检测报文时,向STP以太环网中的STP处理模块发送STP保护倒换指示消息。
这里,在以太网中的各链路两端建立BFD会话为例,在步骤S102~103中,当检测有某个端口未接收到对端的检测报文时,则可以确定所述端口与对端端口之间的链路连通状态发生了故障,故实时标识所述端口与对端端口之间的链路连通状态为链路故障,此时,说明以太环网拓扑发生了变化,需要发送STP保护倒换指示消息,以实时通知STP进行保护倒换。进一步地,在步骤S201中,当检测有所述端口接收到对端端口的检测报文时,可以确定所述已标识的端口与对端端口之间的链路连通状态从链路故障恢复至正常工作状态,此时,说明以太环网拓扑发生了变化,需要再次发送STP保护倒换指示消息,以实时通知STP进行保护倒换。
如此,通过本发明实施例所述实现STP保护倒换的方法,能够快速获知链路的故障状态,从而及时触发相应的STP保护倒换动作,进而减少因链路故障所导致的业务中断时间。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例二所述的实现STP保护倒换的方法。
实施例三
图3为本发明实施例实现STP保护倒换的方法的流程示意图三,如图3所示,本发明实施例实现STP保护倒换的方法包括:
步骤S101:定期在创建的端口到端口的BFD会话中发送检测报文;
步骤S102:当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息;
本发明实施例三中的步骤S101至步骤S102可以分别对应地参见实施例一中的步骤S101至步骤S102,为节约篇幅,这里不再赘述。
步骤S301:统计各个端口的异常性能值;
这里,所述异常性能值可以包括丢包率、误码率、错误帧数等能反映链路性能劣化的性能项中的任何一种或多种的组合。相应的,统计各个端口的异常性能值包括统计各个端口的丢包率、误码率、错误帧数等能反映链路性能劣化的性能项中的任何一种或多种的组合。
在本发明实施例中,并不限定统计各个端口的异常性能值的方式。以误码率为例,可以简单的根据错误帧数/(正常帧数+错误帧数)的计算方式统计得到误码率,也可以通过操作维护管理(Operation Administration and Maintenance,OAM)协议检测链路误码率等业界通用手段统计得到误码率。
另外,需要说明的是,在本发明实施例中,需要预先建立异常性能值和端口代价所对应的转换关系。当端口的异常性能值为零,即不存在异常性能时,所述端口的端口代价为生成树协议中所定义的端口代价,即正常端口代价。当端口的异常性能越差时,即异常性能值越高时,所述端口的端口代价则越高。以误码率为例,当端口的误码率为10%时,所述端口的端口代价可以设置为:(1+10%)*正常端口代价,当端口的误码率为50%时,所述端口的端口代价可以设置为:(1+50%)*正常端口代价。在实际应用中,异常性能值和端口代价所对应的转换关系可以根据实际的网络状况做出决定。
步骤S302:根据所统计的各个端口的异常性能值确定当前各个端口的端口代价;
具体地,根据所统计的各个端口的异常性能值确定当前各个端口的端口代价包括:利用预先建立的异常性能值和端口代价所对应的转换关系,根据所统计的各个端口的异常性能值确定各端口所对应的端口代价。这里,如果预先所建立的异常性能值和端口代价所对应的转换关系为异常性能值和端口代价的对应关系转换表时,可以直接通过查找所统计的各个端口的
异常性能值,得到所述端口的端口代价。
步骤S303:根据所确定的各个端口的端口代价,在网络拓扑中选择一条开销最小的链路作为工作链路。
具体地,根据所确定的各个端口的端口代价,重新计算网络拓扑中各链路的开销,以选择一条开销最小的链路,即最优链路作为工作链路。
如此,通过本发明实施例所述的实现STP保护倒换的方法,当某工作链路业务损伤严重,如存在大量误码的情况下,可以及时感知链路的性能状态,及时实施STP保护倒换,以在网络拓扑中选择一条最优链路作为工作链路。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例三所述的实现STP保护倒换的方法。
实施例四
图4为本发明实施例实现STP保护倒换的方法的流程示意图四,如图4所示,本发明实施例实现STP保护倒换的方法包括:
步骤S101:定期在创建的端口到端口的BFD会话中发送检测报文;
步骤S102:当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息;
本发明实施例四中的步骤S101至步骤S102可以分别对应地参见实施例一中的步骤S101至步骤S102,为节约篇幅,这里不再赘述。
步骤S401:当检测有用于指示所述软件运行环境的写心跳寄存器值未发生变化时,阻塞所有端口。
在本发明实施例中,可以预先通过指示STP的软件运行环境的写心跳寄存器来定时检测STP处理任务状态;当检测到存在STP处理任务异常挂起或内存不足等异常情况时,所述写心跳寄存器停止写心跳,即所述写心
跳寄存器的值停止变化。此时,可以通过阻塞所有端口的方式来禁用所有端口,以使所述STP以太网环路从以太环网中隔离,从而防止广播风暴产生。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例四所述的实现STP保护倒换的方法。
实施例五
图5为本发明实施例实现STP保护倒换的装置的组成结构示意图一,如图5所示,所述装置包括第一发送模块501和第二发送模块502;其中,
所述第一发送模块501,配置为定期在创建的端口到端口的双向转发检测BFD会话中发送检测报文;
所述第二发送模块502,配置为当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
在本发明实施例中,如图6所示,所述装置还包括标识模块503;
所述标识模块503,配置为当检测有端口未接收到对端端口的检测报文时,标识所述端口与对端端口之间的链路连通状态为链路故障。
在本发明实施例中,如图7所示,所述装置还包括第三发送模块504;
所述第三发送模块504,配置为当检测有所述端口重新接收到对端端口的检测报文时,再次发送STP保护倒换指示消息。
在本发明实施例中,如图8所示,所述装置还包括统计模块505、确定模块506和选择模块507;
所述统计模块505,配置为统计各个端口的异常性能值;
所述确定模块506,配置为根据所统计的各个端口的异常性能值确定当前各个端口的端口代价;
所述选择模块507,配置为根据所确定的各个端口的端口代价,在网络拓扑中选择一条开销最小的链路作为工作链路。
在本发明实施例中,如图9所示,所述装置还包括阻塞模块508;
所述阻塞模块508,配置为当检测有用于指示所述软件运行环境的写心跳寄存器值未发生变化时,阻塞所有端口。
在实际应用中,所述第一发送模块501、第二发送模块502、标识模块503、第三发送模块504、统计模块505、确定模块506、选择模块507、以及阻塞模块508均可由本发明实施例实现STP保护倒换的装置中的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)、或现场可编程门阵列(FPGA)等实现。
本发明实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。
本发明实施例通过定期在创建的端口到端口的BFD会话中发送检测报文;当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息,以实时通知STP进行保护倒换。如此,能够快速获知链路的故障状态,从而及时触发相应的STP保护倒换动作,进而减少因链路故障所导致的业务中断时间。
Claims (11)
- 一种实现生成树协议STP保护倒换的方法,所述方法还包括:定期在创建的端口到端口的双向转发检测BFD会话中发送检测报文;当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
- 根据权利要求1所述的方法,其中,当检测有端口未接收到对端端口的检测报文时,所述方法还包括:标识所述端口与对端端口之间的链路连通状态为链路故障。
- 根据权利要求2所述的方法,其中,所述标识所述端口与对端端口之间的链路连通状态为故障状态之后,所述方法还包括:当检测有所述端口重新接收到对端端口的检测报文时,再次发送STP保护倒换指示消息。
- 根据权利要求1至3任一项所述的方法,其中,所述方法还包括:统计各个端口的异常性能值;根据所统计的各个端口的异常性能值确定当前各个端口的端口代价;根据所确定的各个端口的端口代价,在网络拓扑中选择一条开销最小的链路作为工作链路。
- 根据权利要求1至3任一项所述的方法,其中,所述方法还包括:当检测有用于指示所述软件运行环境的写心跳寄存器值未发生变化时,阻塞所有端口。
- 一种实现生成树协议STP保护倒换的装置,所述装置包括第一发送模块和第二发送模块;所述第一发送模块,配置为定期在创建的端口到端口的双向转发检测BFD会话中发送检测报文;所述第二发送模块,配置为当检测有端口未接收到对端端口的检测报文时,发送STP保护倒换指示消息。
- 根据权利要求6所述的装置,其中,所述装置还包括标识模块;所述标识模块,配置为当检测有端口未接收到对端端口的检测报文时,标识所述端口与对端端口之间的链路连通状态为链路故障。
- 根据权利要求7所述的装置,其中,所述装置还包括第三发送模块;所述第三发送模块,配置为当检测有所述端口重新接收到对端端口的检测报文时,再次发送STP保护倒换指示消息。
- 根据权利要求6至8任一项所述的装置,其中,所述装置还包括统计模块、确定模块和选择模块;所述统计模块,配置为统计各个端口的异常性能值;所述确定模块,配置为根据所统计的各个端口的异常性能值确定当前各个端口的端口代价;所述选择模块,配置为根据所确定的各个端口的端口代价,在网络拓扑中选择一条开销最小的链路作为工作链路。
- 根据权利要求6至8任一项所述的装置,其特征在于,所述装置还包括阻塞模块;所述阻塞模块,配置为当检测有用于指示所述软件运行环境的写心跳寄存器值未发生变化时,阻塞所有端口。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的实现STP保护倒换的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410571022.3 | 2014-10-23 | ||
CN201410571022.3A CN105530113A (zh) | 2014-10-23 | 2014-10-23 | 一种实现生成树协议保护倒换的方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016061943A1 true WO2016061943A1 (zh) | 2016-04-28 |
Family
ID=55760133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/072170 WO2016061943A1 (zh) | 2014-10-23 | 2015-02-03 | 实现生成树协议保护倒换的方法、装置及计算机存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105530113A (zh) |
WO (1) | WO2016061943A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110808873A (zh) * | 2019-10-21 | 2020-02-18 | 锐捷网络股份有限公司 | 一种检测链路故障的方法及装置 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111010319B (zh) * | 2019-12-20 | 2021-11-16 | 锐捷网络股份有限公司 | 基于vsf的链路检测方法及装置 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043433A (zh) * | 2006-06-24 | 2007-09-26 | 华为技术有限公司 | 一种桥模式弹性分组环mac地址学习表的老化方法 |
CN101083625A (zh) * | 2007-07-13 | 2007-12-05 | 华为技术有限公司 | 一种加快链路收敛的方法及装置 |
US20130016606A1 (en) * | 2011-07-12 | 2013-01-17 | Tellabs San Jose, Inc. | Methods and apparatus for improving network communication using ethernet switching protection |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340346A (zh) * | 2008-08-11 | 2009-01-07 | 中兴通讯股份有限公司 | 一种以太环网系统中环控制的方法及装置 |
-
2014
- 2014-10-23 CN CN201410571022.3A patent/CN105530113A/zh not_active Withdrawn
-
2015
- 2015-02-03 WO PCT/CN2015/072170 patent/WO2016061943A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043433A (zh) * | 2006-06-24 | 2007-09-26 | 华为技术有限公司 | 一种桥模式弹性分组环mac地址学习表的老化方法 |
CN101083625A (zh) * | 2007-07-13 | 2007-12-05 | 华为技术有限公司 | 一种加快链路收敛的方法及装置 |
US20130016606A1 (en) * | 2011-07-12 | 2013-01-17 | Tellabs San Jose, Inc. | Methods and apparatus for improving network communication using ethernet switching protection |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110808873A (zh) * | 2019-10-21 | 2020-02-18 | 锐捷网络股份有限公司 | 一种检测链路故障的方法及装置 |
CN110808873B (zh) * | 2019-10-21 | 2022-02-22 | 锐捷网络股份有限公司 | 一种检测链路故障的方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN105530113A (zh) | 2016-04-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8213296B2 (en) | Link aggregation protection | |
JP4128974B2 (ja) | レイヤ2ループ検知システム | |
US8441941B2 (en) | Automating identification and isolation of loop-free protocol network problems | |
US8169896B2 (en) | Connectivity fault management traffic indication extension | |
WO2016107369A1 (zh) | 一种管理数据传输通道的方法及装置 | |
EP2204947A1 (en) | Method and node device of ethernet failure detecting and converging | |
US20080267081A1 (en) | Link layer loop detection method and apparatus | |
US8804485B2 (en) | Method and apparatus for coordinating fault recovery techniques among domains | |
US9641396B2 (en) | Packet processing method and system | |
JP2015508631A (ja) | 冗長ネットワーク接続 | |
EP2883334A1 (en) | Techniques for flooding optimization for link state protocols in a network topology | |
KR20130055392A (ko) | 점 대 다점 네트워크에서의 보호 절체 방법 및 장치 | |
US20110167119A1 (en) | Systems and Methods for Processing Heartbeat Messages | |
EP2922247A2 (en) | Method and apparatus for rapidly restoring spanning tree backup port | |
WO2016086548A1 (zh) | 一种伪线双归保护切换系统、方法和装置 | |
US20140092725A1 (en) | Method and first network node for managing an ethernet network | |
US9413642B2 (en) | Failover procedure for networks | |
US10033573B2 (en) | Protection switching method, network, and system | |
WO2015039456A1 (zh) | 网络数据自环回的控制方法及装置 | |
WO2015180265A1 (zh) | 多链路保护倒换的方法及装置 | |
WO2016061943A1 (zh) | 实现生成树协议保护倒换的方法、装置及计算机存储介质 | |
WO2016138705A1 (zh) | 一种负荷分担中链路的管理方法和装置 | |
CN103618630B (zh) | 一种基于双上行链路的数据安全传输方法及设备 | |
JP2011223172A (ja) | リング型ネットワークシステム、通信装置および障害検出方法 | |
EP3462681A1 (en) | Apparatus and method for transmitting multicast service |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15852406 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15852406 Country of ref document: EP Kind code of ref document: A1 |