WO2013041009A1 - 自动保护切换状态机处理方法及装置 - Google Patents

自动保护切换状态机处理方法及装置 Download PDF

Info

Publication number
WO2013041009A1
WO2013041009A1 PCT/CN2012/081505 CN2012081505W WO2013041009A1 WO 2013041009 A1 WO2013041009 A1 WO 2013041009A1 CN 2012081505 W CN2012081505 W CN 2012081505W WO 2013041009 A1 WO2013041009 A1 WO 2013041009A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
physical link
primary
switch
state machine
Prior art date
Application number
PCT/CN2012/081505
Other languages
English (en)
French (fr)
Inventor
于立元
肖念堃
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013041009A1 publication Critical patent/WO2013041009A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user

Definitions

  • the present invention relates to the field of communications, and in particular to an automatic protection switching state machine processing method and apparatus.
  • the Link Aggregation Control Protocol (LACP) virtualizes two or more physical links into one logical link, and the logical link as a whole is transparently presented to the upper layer application, and the logical link
  • the bandwidth is the sum of the bandwidths of all the physical links that can work.
  • the physical ports bound to the same logical link should have the same Ethernet link layer characteristics, such as port rate, duplex, port status, etc. The advantage of this is that when one of the physical links goes down, the fault
  • the services carried by the physical link can be shared by other physical links. As long as there are a certain number of working physical links in the logical link, the upper layer services will not be affected.
  • LACP technology increases the bandwidth of the link and enables link redundancy backup.
  • This logical link is called a Link Aggregation Group (LAG).
  • LAG Link Aggregation Group
  • the link aggregation group also supports static configuration mode. In addition to being affected by the status of the physical link port, the physical link of the link aggregation group in the static configuration mode does not require protocol interaction and bandwidth and rate limitation. This makes the configuration more flexible and more adaptable to the networking.
  • This IEEE802.3AD standard protocol mode is called protocol mode, and this static configuration mode is ON mode. Although there is no protocol interaction in the ON mode, the two ends of the physical link can be reached by association with a detection protocol, such as Bidirectional Forwarding Detection (BFD) or Connection Fault Management (CFM).
  • BFD Bidirectional Forwarding Detection
  • CFM Connection Fault Management
  • each vendor also supports the active/standby mode. A part of the physical link of the active/standby mode link aggregation group is in the forwarding state, and another part of the physical link is in the standby state.
  • the active/standby mode can theoretically support M (main): N (standby), in fact, the 1 (main):1 (standby) mode is simple to implement, reliable in operation, accurate in bandwidth control, and fast in switching speed (meeting 50ms switching) The advantages of performance indicators) have been used for large-scale start-up applications.
  • an automatic protection switching state machine processing method including: determining a current state of a state machine, wherein the state machine is a state machine in which automatic protection switching is merged into a state machine; Determining a current state of the state machine and requesting acquisition of a corresponding action output; migrating the state of the state machine to a state corresponding to the action output.
  • the state machine is a local request of the automatic protection switching, and the state machine corresponding to the 1+1 one-way non-inversion mode is merged with the state machine corresponding to the local request 1+1 one-way inversion mode.
  • the state machine increases the state of the state machine by at least one of the following: compared to the state machine of the automatic protection switching before the fusion: 1+1 one-way non-inversion mode increases waiting for recovery with respect to the local request (Wait To Restore) state, adding a non-reverse (Do Not Revert) state to the local request 1+1 one-way inversion mode; Waiting for a handover (Wait To Switch) state, indicating a state waiting for a handover when the primary physical link is abnormal Only the status of the primary physical link (Only Master) indicates that only the primary physical link exists and the primary physical link is normal.
  • the status of the Primary Signal Fail is present, indicating that only the primary physical link exists and the primary The status of the physical link is abnormal. Only the status of the standby physical link (Only Backup) indicates that only the standby physical link exists and the physical link is normal. Only the After Backup Signal Fail status indicates that only A physical link is prepared and the physical link is abnormal.
  • the NULL state indicates that there is no primary physical link and no physical link exists. . Preferably, the Wait To Switch state is used to suppress the primary physical link from oscillating.
  • the state machine increases the request of the state machine by at least one of the following: compared to the state machine of the automatic protection switching before the fusion: a standby return timeout request (WTR Timer expired); the primary physical link The spoofing suppression timeout request (WTS Timer expired); the primary physical port add request (Master Join); the primary physical port delete request (Master Leave); the backup physical port add request (Backup Join); the backup physical port delete request (Backup Leave); The backup master returns a configuration request (Restore Change); the primary link flapping suppression timeout configuration request (WTS Timer Change).
  • the primary physical port addition corresponding to the primary physical port add request includes: configuring a physical port to be added to the link aggregation group, configuring a backup physical port backup attribute, and adding a line card restart power-on interface; the primary physical port
  • the backup primary return configuration corresponding to the backup primary return configuration request includes at least one of the following: a backup primary return disable, a backup primary return enable, and a backup primary return timeout.
  • the state machine is compared with the state machine of the automatic protection switching before the fusion, and the operation of the state machine is modified by at least one of the following: the current state of the state machine is state A, and The request of the state machine is abnormal for the primary physical link, and the action of the state machine is modified to: switch to state D when the switch delay time is 0, otherwise switch to state I; the current state of the state machine is D, And the request of the state machine recovers from the failure of the primary signal of the primary physical link, and the action of the state machine is modified to: when the physical link is not configured, return to the primary physical link and switch to the state H, otherwise Switch to state A or state G; if the backup physical link has been configured, then the return time to the primary physical link is 0, then switch to state A, otherwise switch to state G; the current state of the
  • the state machine increases the action of the state machine by at least one of the following: compared to the state machine of the automatic protection switching before the fusion: if the switching delay time is 0, it switches to the state D, otherwise switches to State I; If the backup master switchback is not configured to switch to state H, otherwise switch to state A or G; if the configured backup master return time is 0, switch to state A, otherwise switch to G; determine whether the main signal failure occurs.
  • an automatic protection switching state machine processing apparatus includes: a determining module configured to determine a current state of a state machine, wherein the state machine is a state machine of automatic protection switching.
  • the state machine is configured to obtain a corresponding action output according to the current state and the request of the state machine; and the migration module is configured to migrate the state of the state machine to a state corresponding to the action output.
  • the state machine is a local request of the automatic protection switching, and the state machine corresponding to the 1+1 one-way non-inversion mode is merged with the state machine corresponding to the local request 1+1 one-way inversion mode.
  • the current state of the state machine includes a state of the primary physical link and the standby physical link, where the active/standby relationship between the primary physical link and the standby physical link is statically configured, and is 1 The +1 active/standby relationship, where the primary physical link and the link aggregation group to which the standby physical link belongs are only one primary physical port and/or one standby physical port.
  • the current state of the state machine is determined, wherein the state machine is a state machine that automatically switches the switch to form a state machine; and the corresponding action output is obtained according to the current state of the state machine and the request;
  • the state of the state machine migrates to the state corresponding to the action output, which solves the problem of flexibility, maneuverability, and ease of use of the 1:1 active/standby mode control, thereby achieving flexibility, maneuverability, and ease of use. Higher use effect.
  • FIG. 1 is a flowchart of a method for processing an automatic protection switching state machine according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of an automatic protection switching state machine processing apparatus according to an embodiment of the present invention
  • FIG. 3 is an application according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of processing of a state machine module according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for automatically protecting a switching state machine according to an embodiment of the present invention, as shown in FIG.
  • the method includes the following steps: Step S102: Determine a current state of the state machine, where the state machine is a state machine that automatically switches the switching state, for example, the state machine is a local request switched by the automatic protection.
  • the state machine corresponding to the 1+1 one-way non-reversal mode is merged with the state machine corresponding to the local request 1+1 one-way inversion mode; step S104, according to the current state and request of the state machine (or called an event request) Obtaining a corresponding action output; Step S106, migrating the state of the state machine to a state corresponding to the action output.
  • the perfect state may be obtained by using one of the following preferred modes.
  • the effect of the machine if a combination of various preferred methods is adopted, will achieve the effect of further perfecting the effect of the state machine.
  • the state machine increases the state of the state machine by at least one of the following: compared to the state machine of the automatic protection switching before the fusion: increasing the Wait To Restore state with respect to the local request 1+1 one-way non-inversion mode, A non-reverse (Do Not Revert) state is added with respect to the local request 1+1 one-way inversion mode; Waiting for the switch (Wait To Switch) state, indicating the state of waiting for the switch when the primary physical link is abnormal.
  • Only the status of the primary physical link indicates that only the primary physical link exists and the primary physical link is normal.
  • the status of the main signal is abnormal, indicating that only the primary physical link exists and the primary physical link is abnormal.
  • Only the standby physical backup (Only Backup) state exists, indicating that only the standby physical link exists and the physical link is prepared.
  • the normal status of the path; only the status of the standby signal Fail is displayed, indicating that only the physical link is prepared and the physical link is abnormal.
  • the NULL state indicates that the primary physical link does not exist. The status of the standby physical link.
  • the state machine increases the request of the state machine by at least one of the following: compared to the state machine of the automatic protection switching before the fusion: the standby return timeout request (WTR Timer expired); the primary physical link oscillation suppression timeout request (WTS) Timer expired); Primary physical port add request (Master Join); Primary physical port delete request (Master Leave); Standby physical port add request (Backup Join); Standby physical port delete request (Backup Leave); Ready to return configuration request to the master (Restore Change), preferably, the backup master return configuration corresponding to the primary return configuration request may include at least one of the following: a backup to the primary return disable, a backup primary return enable, and a backup primary return timeout; Main link flapping suppression timeout configuration request (WTS Timer Change).
  • the primary physical port can be added in the following ways: Add the physical port to the link aggregation group, configure the backup physical port backup attribute, and add the line card restart power-on interface.
  • the primary physical port delete request corresponds to the primary physics.
  • Port deletion includes: Configuring the physical port to leave the link aggregation group and configure the physical port. Attributes, and the line card restart interface is removed; and/or, the standby physical port addition includes: configuring the physical port's backup attribute and the line card restarting the power-on standby attribute interface to be added;
  • the physical port deletion corresponding to the physical port deletion request includes: The standby attribute of the standby physical port and the line card restart reserve attribute interface leave.
  • the state machine performs a revision of at least one of the following states of the state machine of the automatic protection switching before the fusion: the current state of the state machine is state A, and the request of the state machine is the primary physical link.
  • the action of the state machine is modified to: switch to state D when the switch delay time is 0, otherwise switch to state I; the current state of the state machine is D, and the state machine requests the master physical link from the main signal If the active physical link is not configured, the action of the state machine is changed to: If the standby physical link is not configured, the switch returns to the status H to the primary physical link, otherwise it switches to the state A or the state G.
  • the state machine If the physical link return time is 0, it will switch to state A, otherwise it will switch to state G; the current state of the state machine is E, and the state machine's request recovers from the main signal failure for the primary physical link, and the state machine's action is modified. If: If the main signal fails, switch to state D, otherwise switch to state A; for example, the state machine is compared to the state machine before automatic fusion switching.
  • the action of the machine is increased by at least one of the following: If the switch delay time is 0, switch to state D, otherwise switch to state I; if the backup master switch is not configured to switch to state H, otherwise switch to state A or G; The configured backup master return time is 0 to switch to state A, otherwise switch to G; determine whether the primary signal failure has occurred; determine whether the standby signal has failed; save the user switching command to lock LOCK, force the switch FS, manually switch the MS; Clear the user switching command LOCK, FS, MS; if the user switching command LOCK exists to switch to state B, if the user switching command FS exists to switch to state C, otherwise switch to state D; if the user switching command LOCK exists to switch to state B, otherwise Switch to state E; if the configuration backup master does not return to switch to state H; if the configuration backup to master returns to state A or hold state G, if the configuration backup master return time is 0, then switch to state A, otherwise maintain state G and reset the standby master return time; if the configuration backup
  • an automatic protection switching state machine processing device is also provided, which is configured to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
  • 2 is a structural block diagram of an automatic protection switching state machine processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a determining module 22, an obtaining module 24, and a migration module 26. The device will be described below.
  • the determining module 22 is configured to determine a current state of the state machine, wherein the state machine is a state machine that automatically switches the state machine to be merged; the obtaining module 24 is configured to obtain a corresponding state according to the current state of the state machine and the request The action output; the migration module 26 is configured to migrate the state of the state machine to a state corresponding to the action output.
  • the current state of the state machine in the preferred embodiment includes the state of the primary physical link and the standby physical link, where the primary and backup relationships of the primary physical link and the standby physical link are statically configured and are 1+1 primary.
  • This embodiment provides a state machine that supports static configuration 1 : 1 active and standby based on APS state machine fusion.
  • the state machine can implement main exception processing, standby exception processing, and standby main return (whether to prepare for primary return switching).
  • FIG. 3 is a schematic diagram of an application networking according to an embodiment of the present invention.
  • device 1 and device 2 respectively configure an aggregation group including two physical interfaces, aggregation group 1 and aggregation group 2; gigabit port_1/ 1 (Gigabit port _1/4) is connected in pairs; configure Gigabit port_1/1 as the physical port of the standby attribute.
  • the APS state machine supports the static configuration.
  • the primary and backup methods are as follows: 1. Configure the active and standby interfaces on the physical port of the link aggregation group of the local device.
  • the local request 1+1 unidirectional inversion mode and the local request 1+1 unidirectional non-reversal mode are merged; Delete; merge standby to the main return configuration operation, main link oscillation suppression configuration operation; execution state machine running process: specific request, fusion state machine processing, specific action output.
  • the physical port of the link aggregation group of the local device is manually configured as follows: In a link aggregation group, the configuration of the standby attribute command forms the standby physical port. If the standby attribute command is not configured, the physical port defaults to the primary physics. You must ensure that there are at most two physical ports in the link aggregation group and no other physical ports. You can only have one primary physical port or one standby physical port in the link aggregation group. Select this physical port directly.
  • the APS protocol is a protocol for collaborative information decision-making between two entities.
  • the protocol enables two entities using the protocol to coordinate the switching information through the APS PDUs to adjust the position of the respective selectors to implement the switching from the working tunnel to the protection tunnel.
  • Table 1 is the state machine after fusion.
  • the left side ie, the column
  • the upper ie, the row
  • the request which is represented by the lowercase “abc”
  • the lower horizontal and horizontal crossing position
  • the action indicates the action
  • the uppercase “ABC” represents the corresponding state on the right side
  • the left side "Master” indicates the main
  • the "Backup” indicates the standby
  • the left “Active” indicates the selected
  • “Standby” Indicates that it is unchecked
  • the action "N/A” indicates that this event will not occur in this state
  • "0” indicates that the request does not work because it has a lower priority than the current state, skipping directly.
  • State machine state description Increase the Wait To Restore (state G) with respect to the local request 1+1 one-way non-reverse mode, and increase the Do Not Revert state (state) with respect to the local request 1+1 one-way inversion mode.
  • H Add the value of the Wait To Switch (WTS) state (state 1), indicating that the primary physical link is in a state of agitation, and is used to suppress the primary physical link from being oscillating.
  • WTS Wait To Switch
  • state J indicates that only the primary exists.
  • On-Master Signal Fail (M) state state K
  • Adding the Only Backup state state L
  • Normal state of the road If the status of the standby physical network link is abnormal, the status of the standby physical link is abnormal. The state of the standby physical link is abnormal. The status of the link.
  • the first request is a physical port add request
  • the second request is a physical port up (normal) request, that is, After the physical port is added, the default physical port of the state machine is down.
  • the first request is a physical port down request
  • the second request is a physical port leave request, that is, a physical port. Before leaving, you need to issue a physical port down request to the state machine.
  • the purpose of the state machine action output of the physical port add event is that it does not affect the current primary or backup selection, and does not affect the current traffic forwarding. This is very important.
  • Description of the backup configuration to the master The backup master return configuration includes: the backup to the master does not enable, the backup to the master returns the enable, the backup to the master returns the timeout period, and the backup to the master returns the timeout only in the backup to the primary return It is effective when it is possible.
  • Description of the main link flapping suppression configuration The main link flapping suppression configuration includes: The main link flapping suppression timeout period.
  • Step S402 a state in which the state machine is currently located
  • Step S404 a state machine event request
  • Step S1 the current state of the state machine is A; Step S2, the state machine event request is a; Step S3, the corresponding action output is searched by the state machine design table; Step S4, according to the state machine Action output, state transition to state B, set LOCK state, select master.
  • the state machine based on APS state machine fusion supported by the above-mentioned preferred embodiment supports static configuration 1 : 1 active and standby state machine, achieves the purpose of combining multiple functions in a unified state machine, and solves the flexibility of 1:1 active/standby mode. , maneuverability, and ease of use.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device so that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or Multiple modules or steps are made into a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Hardware Redundancy (AREA)

Abstract

本发明公开了一种自动保护切换状态机处理方法及装置,该方法包括确定状态机的当前状态,其中,所述状态机是自动保护切换的状态机融合而成一个状态机;根据所述状态机的当前状态和请求获取对应的动作输出;将所述状态机的状态迁移到所述动作输出对应的状态。本发明解决了相关技术中1:1主备模式控制的灵活性、可操纵性、易用性较差的问题,进而达到了使用灵活,操纵性、易用性较高的效果。

Description

自动保护切换状态机处理方法及装置 技术领域 本发明涉及通信领域, 具体而言,涉及一种自动保护切换状态机处理方法及装置。 背景技术 链路汇聚控制协议 (Link Aggregation Control Protocol, 简称为 LACP) 将两个或 更多物理链路虚拟成一个逻辑链路,逻辑链路作为一个整体,透明地呈现给上层应用, 逻辑链路的带宽是可工作的全部物理链路的带宽之和。 绑定到同一个逻辑链路的物理 端口应该具备相同的以太网链路层特性, 例如, 端口速率、 双工、 端口状态等, 这样 做的好处是, 当其中某一条物理链路 down即故障的时候, 该物理链路承载的业务可 以通过其他物理链路负荷分担, 只要逻辑链路中存在一定数量可以工作的物理链路, 就不会影响到上层业务。 LACP 技术增加了链路的带宽, 实现了链路冗余备份。 这种 逻辑链路被称为链路聚合组 (Link Aggregation Group, 简称为 LAG)。 链路聚合组除了使用 IEEE802.3AD标准协议实现以外,各个厂商还支持静态配置 模式。 除了受到物理链路端口状态影响外, 静态配置模式链路聚合组的物理链路之间 不需要进行协议交互、 没有带宽和速率的限制, 这样就使配置更加灵活, 组网适应性 更强。 这种 IEEE802.3AD标准协议模式被称为协议模式, 这种静态配置模式为 ON模 式。 虽然 ON模式没有协议交互, 但是可以通过和检测协议, 例如, 双向转发检测 (Bidirectional Forwarding Detection,简称为 BFD)或连接故障管理(Connectivity Fault Management, 简称为 CFM) 关联, 达到物理链路两端的端口状态一致的目的。 按照配置的负荷分担模式(例如, 逐包模式、逐流模式等), 数据流量在链路聚合 组的所有物理链路进行转发, 以达到增加带宽的目的, 这种传统的支持所有物理链路 进行转发的模式被称为负荷分担模式。 除了负荷分担模式以外, 各个厂商还支持主备 模式, 主备模式链路聚合组的一部分物理链路处于转发状态, 另外一部分物理链路处 于备用状态。 虽然理论上主备模式可以支持 M (主) : N (备), 但是实际上 1 (主) :1 (备) 模式凭借其实现简单、 运行可靠、 带宽控制精准、 切换速度快 (满足 50ms切 换性能指标) 等优点得到了大面积的开局应用。
1: 1主备模式控制的灵活性、 可操纵性、 易用性较差。 发明内容 针对现有技术中 1 : 1主备模式控制的灵活性、 可操纵性、 易用性较差的问题, 本 发明提供了一种自动保护切换状态机处理方法及装置, 以至少解决上述问题。 根据本发明的一方面, 提供了一种自动保护切换状态机处理方法, 包括: 确定状 态机的当前状态, 其中, 所述状态机是自动保护切换的状态机融合而成一个状态机; 根据所述状态机的当前状态和请求获取对应的动作输出; 将所述状态机的状态迁移到 所述动作输出对应的状态。 优选地, 所述状态机是自动保护切换的本地请求 1+1单向非反转模式对应的状态 机和本地请求 1+1单向反转模式对应的状态机融合而成。 优选地, 所述状态机相比于融合前的所述自动保护切换的状态机, 所述状态机的 状态增加以下至少之一: 相对于本地请求 1+1单向非反转模式增加等待恢复(Wait To Restore)状态, 相对于本地请求 1+1单向反转模式增加非反转(Do Not Revert)状态; 等待切换 (Wait To Switch) 状态, 表示主物理链路异常时等待切换的状态; 只有主物 理链路 (Only Master) 状态, 表示只存在主物理链路并且主物理链路正常的状态; 只 存在主信号异常 (Only Master Signal Fail) 状态, 表示只存在主物理链路并且主物理 链路异常的状态; 只存在备物理链路(Only Backup)状态, 表示只存在备物理链路并 且备物理链路正常的状态; 只存在备信号异常 (Only Backup Signal Fail) 状态, 表示 只存在备物理链路并且备物理链路异常的状态; 空 (NULL) 状态, 表示不存在主物 理链路也不存在备物理链路的状态。 优选地, 所述等待切换 (Wait To Switch) 状态用于抑制所述主物理链路震荡。 优选地, 所述状态机相比于融合前的所述自动保护切换的状态机, 所述状态机的 请求增加以下至少之一: 备向主返回超时请求 (WTR Timer expired); 主物理链路震 荡抑制超时请求 (WTS Timer expired); 主物理端口添加请求 (Master Join); 主物理 端口删除请求(Master Leave); 备物理端口添加请求(Backup Join); 备物理端口删除 请求 (Backup Leave); 备向主返回配置请求 (Restore Change); 主链路震荡抑制超时 时间配置请求 (WTS Timer Change )。 优选地, 所述主物理端口添加请求对应的主物理端口添加包括: 配置物理端口添 加到链路聚合组、 配置清除备物理端口的备属性以及线卡重启上电接口添加; 所述主 物理端口删除请求对应的主物理端口删除包括: 配置物理端口从链路聚合组离开、 配 置物理端口的备属性, 以及线卡重启接口离开; 和 /或, 所述备物理端口添加请求对应 的备物理端口添加包括: 配置物理端口的备属性和线卡重启上电备属性接口添加; 所 述被物理端口删除请求对应的备物理端口删除包括: 清除备物理端口的备属性以及线 卡重启备属性接口离开。 优选地, 所述备向主返回配置请求对应的备向主返回配置包括以下至少之一: 备 向主返回不使能、 备向主返回使能、 备向主返回超时时间。 优选地, 所述状态机相比于融合前的所述自动保护切换的状态机, 所述状态机的 动作进行以下至少之一的修订: 所述状态机的当前状态为状态 A, 并且, 所述状态机 的请求为主物理链路异常, 所述状态机的动作修改为: 当切换延时时间为 0时切换到 状态 D, 否则切换到状态 I; 所述状态机的当前状态为 D, 并且, 所述状态机的请求为 主物理链路从主信号失效中恢复, 所述状态机的动作修改为: 当如果未配置备物理链 路则向主物理链路返回切换到状态 H, 否则切换到状态 A或状态 G; 如果已经配置的 备物理链路则向主物理链路返回时间是 0则切换到状态 A, 否则切换到状态 G; 所述 状态机的当前状态为 E, 并且, 所述状态机的请求为主物理链路从主信号失效中恢复, 所述状态机的动作修改为: 如果主信号失效发生过则切换到状态 D, 否则切换到状态 A; 其中, 没有请求状态并且主物理链路被选中而备物理链路未被选中为状态 A; 主 信号失效并且主物理链路未选中而备物理链路选中状态为状态 D; 备信号失效并且主 物理链路被选中而备物理链路未被选中为状态 E; 等待切换状态并且主物理链路被选 中而备物理链路未被选中为状态 I;等待回复状态并且主物理链路未被选中而备物理链 路被选中为状态 G; 非反转状态并且主物理链路未被选中而备物理链路被选中为状态 H。 优选地, 所述状态机相比于融合前的所述自动保护切换的状态机, 所述状态机的 动作增加以下至少之一: 如果当切换延迟时间为 0时切换到状态 D, 否则切换到状态 I; 如果未配置备向主返回切换到状态 H, 否则切换到状态 A或 G; 如果已经配置的备 向主返回时间是 0切换到状态 A, 否则切换到 G; 确定主信号失效是否发生过; 确定 备信号失效是否发生过; 保存用户切换命令锁定 LOCK、强制切换 FS、手工切换 MS; 清除用户切换命令 LOCK、 FS、 MS; 如果用户切换命令 LOCK存在切换到状态 B、 如果用户切换命令 FS存在切换到状态 C,否则切换到状态 D;如果用户切换命令 LOCK 存在切换到状态 B, 否则切换到状态 E; 如果配置备向主不返回切换到状态 H; 如果 配置备向主返回切换到状态 A或保持状态 G, 如果配置备向主返回时间是 0则切换到 状态 A, 否则保持状态 G并重新设置备向主返回时间; 如果配置备向主返回切换到状 态 A或状态 G, 如果配置备向主返回时间是 0则切换到状态 A, 否则切换到 G; 如果 配置主链路震荡抑制超时时间为 0,则切换到状态 D,否则保持状态 I并重新设置主链 路震荡抑制超时时间; 其中, 没有请求状态并且主物理链路被选中而备物理链路未被 选中为状态 A; 解锁状态且主物理链路被选中而备物理链路未被选中为状态 B; 强制 切换状态且主物理链路未被选中而备物理链路被选中为状态 C; 主信号失效并且主物 理链路未选中而备物理链路选中状态为状态 D; 备信号失效并且主物理链路被选中而 备物理链路未被选中为状态 E; 等待切换状态并且主物理链路被选中而备物理链路未 被选中为状态 I; 等待回复状态并且主物理链路未被选中而备物理链路被选中为状态 G; 非反转状态并且主物理链路未被选中而备物理链路被选中为状态11。 优选地, 所述状态机的当前状态包括主物理链路和备物理链路的状态, 其中, 所 述主物理链路和所述备物理链路的主备关系是静态配置的, 并且为 1+1主备关系, 所 述主物理链路和所述备物理链路所属的链路聚合组中只有一个主物理端口和 /或一个 备物理端口。 根据本发明的另一方面提供了一种自动保护切换状态机处理装置, 包括: 确定模 块, 设置为确定状态机的当前状态, 其中, 所述状态机是自动保护切换的状态机融合 而成一个状态机; 获取模块, 设置为根据所述状态机的当前状态和请求获取对应的动 作输出; 迁移模块, 设置为将所述状态机的状态迁移到所述动作输出对应的状态。 优选地, 所述状态机是自动保护切换的本地请求 1+1单向非反转模式对应的状态 机和本地请求 1+1单向反转模式对应的状态机融合而成。 优选地, 所述状态机的当前状态包括主物理链路和备物理链路的状态, 其中, 所 述主物理链路和所述备物理链路的主备关系是静态配置的, 并且为 1+1主备关系, 所 述主物理链路和所述备物理链路所属的链路聚合组中只有一个主物理端口和 /或一个 备物理端口。 通过本发明, 采用确定状态机的当前状态, 其中, 所述状态机是自动保护切换的 状态机融合而成一个状态机;根据所述状态机的当前状态和请求获取对应的动作输出; 将所述状态机的状态迁移到所述动作输出对应的状态,解决了 1 : 1主备模式控制的灵 活性、 可操纵性、 易用性较差的问题, 进而达到了使用灵活, 操纵性、 易用性较高的 效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的自动保护切换状态机处理方法的流程图; 图 2是根据本发明实施例的自动保护切换状态机处理装置的结构框图; 图 3是根据本发明实施例的应用组网示意图; 图 4是根据本发明实施例的状态机模块的处理流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在本实施例中提供了一种自动保护切换 (Automatic Protection Switching, 简称为 APS) 状态机处理方法, 图 1是根据本发明实施例的自动保护切换状态机处理方法的 流程图, 如图 1所示, 该方法包括如下步骤: 步骤 S102, 确定状态机的当前状态, 其中, 该状态机是自动保护切换的状态机融 合而成一个状态机, 例如, 该状态机是由自动保护切换的本地请求 1+1单向非反转模 式对应的状态机和本地请求 1+1单向反转模式对应的状态机融合而成; 步骤 S104, 根据该状态机的当前状态和请求(或称为事件请求)获取对应的动作 输出; 步骤 S106, 将该状态机的状态迁移到动作输出对应的状态。 通过上述步骤, 自动保护切换中的多个状态机融合为一个状态机, 从而通过一个 状态机就可以实现控制, 提高了灵活性、 可操纵性、 以及易用性。 作为一个优选实施方式, 为了使状态机的控制更加完善可以对状态机的状态、 请 求和 /或动作进行修改或者添加, 需要说明的是, 只要采用了以下优选方式的之一就可 以取得完善状态机的效果, 如果采用的多种优选方式的组合会达到对状态机效果进一 步完善的效果。 例如, 状态机相比于融合前的自动保护切换的状态机, 状态机的状态增加以下至 少之一: 相对于本地请求 1+1单向非反转模式增加等待恢复(Wait To Restore)状态, 相对 于本地请求 1+1单向反转模式增加非反转 (Do Not Revert) 状态; 等待切换 (Wait To Switch) 状态, 表示主物理链路异常时等待切换的状态; 只有主物理链路 (Only Master) 状态, 表示只存在主物理链路并且主物理链路正 常的状态; 只存在主信号异常 (Only Master Signal Fail) 状态, 表示只存在主物理链路并且 主物理链路异常的状态; 只存在备物理链路(Only Backup)状态, 表示只存在备物理链路并且备物理链路 正常的状态; 只存在备信号异常 (Only Backup Signal Fail) 状态, 表示只存在备物理链路并且 备物理链路异常的状态; 空 (NULL) 状态, 表示不存在主物理链路也不存在备物理链路的状态。 又例如, 状态机相比于融合前的自动保护切换的状态机, 状态机的请求增加以下 至少之一: 备向主返回超时请求 (WTR Timer expired); 主物理链路震荡抑制超时请求 (WTS Timer expired); 主物理端口添加请求 (Master Join); 主物理端口删除请求 ( Master Leave ); 备物理端口添加请求 (Backup Join); 备物理端口删除请求 ( Backup Leave ); 备向主返回配置请求 (Restore Change), 优选地, 备向主返回配置请求对应的备 向主返回配置可以包括以下至少之一: 备向主返回不使能、 备向主返回使能、 备向主 返回超时时间; 主链路震荡抑制超时时间配置请求 (WTS Timer Change)。 可以通过以下的优选方式来实现主物理端口的添加: 配置物理端口添加到链路聚 合组、 配置清除备物理端口的备属性以及线卡重启上电接口添加; 主物理端口删除请 求对应的主物理端口删除包括: 配置物理端口从链路聚合组离开、 配置物理端口的备 属性, 以及线卡重启接口离开; 和 /或, 备物理端口添加包括: 配置物理端口的备属性 和线卡重启上电备属性接口添加; 被物理端口删除请求对应的备物理端口删除包括: 清除备物理端口的备属性以及线卡重启备属性接口离开。 在以下的示例中, 没有请求状态并且主物理链路被选中而备物理链路未被选中为 状态 A; 解锁状态且主物理链路被选中而备物理链路未被选中为状态 B; 强制切换状 态且主物理链路未被选中而备物理链路被选中为状态 C; 主信号失效并且主物理链路 未选中而备物理链路选中状态为状态 D; 备信号失效并且主物理链路被选中而备物理 链路未被选中为状态 E; 等待切换状态并且主物理链路被选中而备物理链路未被选中 为状态 I;等待回复状态并且主物理链路未被选中而备物理链路被选中为状态 G;非反 转状态并且主物理链路未被选中而备物理链路被选中为状态 H。 又例如, 状态机相比于融合前的自动保护切换的状态机, 状态机的动作进行以下 至少之一的修订: 状态机的当前状态为状态 A, 并且, 状态机的请求为主物理链路异常, 状态机的 动作修改为: 当切换延时时间为 0时切换到状态 D, 否则切换到状态 I; 状态机的当前状态为 D, 并且,状态机的请求为主物理链路从主信号失效中恢复, 状态机的动作修改为: 如果未配置备物理链路则向主物理链路返回切换到状态 H, 否 则切换到状态 A或状态 G; 如果已经配置的备物理链路则向主物理链路返回时间是 0 则切换到状态 A, 否则切换到状态 G; 状态机的当前状态为 E, 并且, 状态机的请求为主物理链路从主信号失效中恢复, 状态机的动作修改为: 如果主信号失效发生过则切换到状态 D, 否则切换到状态 A; 又例如, 状态机相比于融合前的自动保护切换的状态机, 状态机的动作增加以下 至少之一: 如果当切换延迟时间为 0时切换到状态 D, 否则切换到状态 I; 如果未配置备向主返回切换到状态 H, 否则切换到状态 A或 G; 如果已经配置的 备向主返回时间是 0切换到状态 A, 否则切换到 G; 确定主信号失效是否发生过; 确定备信号失效是否发生过; 保存用户切换命令锁定 LOCK、 强制切换 FS、 手工切换 MS; 清除用户切换命令 LOCK、 FS、 MS; 如果用户切换命令 LOCK存在切换到状态 B、 如果用户切换命令 FS存在切换到 状态 C, 否则切换到状态 D; 如果用户切换命令 LOCK存在切换到状态 B, 否则切换到状态 E; 如果配置备向主不返回切换到状态 H; 如果配置备向主返回切换到状态 A或保持状态 G, 如果配置备向主返回时间是 0 则切换到状态 A, 否则保持状态 G并重新设置备向主返回时间; 如果配置备向主返回切换到状态 A或状态 G, 如果配置备向主返回时间是 0则切 换到状态 A, 否则切换到 G; 如果配置主链路震荡抑制超时时间为 0,则切换到状态 D,否则保持状态 I并重新 设置主链路震荡抑制超时时间。 在本实施例中还提供了一种自动保护切换状态机处理装置, 该装置设置为实现上 述实施例及优选实施方式, 已经进行过说明的不再赘述。 如以下所使用的, 术语 "模 块"可以实现预定功能的软件和 /或硬件的组合。 尽管以下实施例所描述的装置较佳地 以软件来实现, 但是硬件, 或者软件和硬件的组合的实现也是可能并被构想的。 图 2 是根据本发明实施例的自动保护切换状态机处理装置的结构框图, 如图 2所示, 该装 置包括确定模块 22、 获取模块 24和迁移模块 26。 下面对该装置进行说明。 确定模块 22, 设置为确定状态机的当前状态, 其中, 该状态机是自动保护切换的 状态机融合而成一个状态机; 获取模块 24, 设置为根据该状态机的当前状态和请求获取对应的动作输出; 迁移模块 26, 设置为将该状态机的状态迁移到动作输出对应的状态。 下面结合一个优选实施例进行说明, 该优选实施例结合了上述优选实施方式。 该优选实施例中的状态机的当前状态包括主物理链路和备物理链路的状态,其中, 主物理链路和备物理链路的主备关系是静态配置的, 并且为 1+1主备关系, 主物理链 路和备物理链路所属的链路聚合组中只有一个主物理端口和 /或一个备物理端口。 针对现有技术中 1 : 1主备模式手段过于简单, 灵活性、 可操纵性、 易用性较差的 问题。本实施例提供了一种基于 APS状态机融合的支持静态配置 1 : 1主备的状态机, 通过该状态机可以实现主异常处理、备异常处理、备向主返回(是否备向主返回切换、 备向主返回切换超时时间)、 主链路震荡抑制 (主异常时延迟切换)、 用户命令切换 LOCK (锁定)、 FS (强制切换)、 MS (手工切换)、 CLEAR (清除切换命令)、 单主、 单备、 主添加、 主离开、 备添加、 备离开等功能。 图 3是根据本发明实施例的应用组网示意图, 如图 3所示, 设备 1和设备 2分别 配置包含两个物理口的聚合组, 聚合组 1和聚合组 2; 千兆口 _1/1 (千兆口_1/4)两两 相连; 配置千兆口 _1/1为备属性物理口。 基于上述组网示意图, APS状态机融合的支持静态配置 1 : 1主备的方法包括: 对 本地设备链路聚合组的物理端口手工配置主备,这样 LAG的主备就是明确的主备,不 会随着物理端口参数、物理状态、管理状态、协议状态变化而变化; 融合本地请求 1+1 单向反转模式和本地请求 1+1单向非反转模式; 融合主备物理端口添加、 删除; 融合 备向主返回配置操作、主链路震荡抑制配置操作; 执行状态机的运行流程: 特定请求、 融合状态机处理、 特定动作输出。 需要说明的是, 对本地设备链路聚合组的物理端口手工配置主备如下: 一个链路 聚合组中, 配置备属性命令形成备物理端口, 如果没有配置备属性命令, 物理端口默 认为主物理端口; 配置备属性命令前, 必须保证链路聚合组内最多有两个物理端口, 不能存在其他备物理端口; 允许链路聚合组中只存在一个主物理端口或一个备物理端 口的情况, 此时直接选择此物理端口。
APS协议是用于两个实体之间倒换信息协同决策的协议, 该协议能使得使用该协 议的两个实体通过 APS PDU协同切换信息从而调整各自 selector位置, 实现工作隧道 到保护隧道的切换。 实际上在这里只是借鉴并融合 APS最简单的两个状态机, 并不需 要关心 APS的具体实现。 表 1是融合后的状态机,如表 1所示,左侧(即纵列)代表状态,用大写的" ABC" 表示; 上面 (即横列)代表请求, 用小写的 "abc"表示; 右下 (横纵交叉的位置)表 示动作,用大写的" ABC"代表进入右侧相应的状态;左侧" Master"表示主, "Backup" 表示备; 左侧 "Active"表示选中, " Standby"表示未选中; 动作 "N/A"表示这个事 件在这个状态不会发生; "0"表示这个请求因为比当前状态优先级低而不起作用, 直 接跳过。 表 1
State Request
a b c d e f g h
Lockout Forced Signal Master Signal Backup Manual Clear
Switch Fail on Recovers Fail on Recovers Switch
Master from SF Backup from SF
A No Request ->B ->C ->纖1、 N/A ->E N/A ->F O
Master/Active
Backup/Standby
B Lockout O o o O O O O ->A Master/ Active or Backup/Standby ->Ό3)
->E4)
C Forced Switch ->B o o O ->E N/A O ->(A|H) Master/ Standby 2) or Backup/ Active ->Ό3)
D Signal Fail(M) ->B ->c N/A •>fAIGIffi ->E N/A o O Master/ Standby 21
Backup/ Active
E Signal Fail(B) ->B o O o N/A -> (AID) o O Master/ Active 3)_
Backup/Standby
F Manual Switch ->B ->c ->D N/A ->E N/A o ->(A Master/ Standby 刚 Backup/ Active
G Wait To Restore ->B ->c ->D N/A ->E N/A ->F ->A Master/ Standby
Backup/ Active
H Do Not Revert ->B ->c ->D N/A ->E N/A ->F O Master/ Standby
Backup/ Active
Wait To Switc ->B ->c N/A ->A ->E N/A ->F @
Master/Active
Backup/Stand : >Y
1 Only Master 05) 05) ->K N/A N/A N/A 05) 06)
Master/Activ e
Only Master 05) 05) N/A ->J N/A N/A 05) 06) Signal Fail(M、
Master/ Acti\
s Only Backup 05) 05) N/A N/A -> N/A 05) 06) Backup /Activ e
Only Backup 05) 05) N/A N/A N/A ->L 05) 06) Signal Fail(B) State Request
a b c d e f g h
Lockout Forced Signal Master Signal Backup Manual Clear
Switch Fail on Recovers Fail on Recovers Switch
Master from SF Backup from SF
Backup 1 Active
NULL 05) 05) N/A N/A N/A N/A 05) 06)
Figure imgf000012_0001
Figure imgf000013_0001
( 1 ) 状态机的状态说明: 相对于本地请求 1+1单向非反转模式增加 Wait To Restore ( state G), 相对于本地 请求 1+1单向反转模式增加 Do Not Revert状态 (state H); 增加 Wait To Switch (WTS)状态(state 1), 表示主物理链路异常时等待切换的状 态, 用来抑制主物理链路震荡; 增加 Only Master状态(state J),表示只存在主物理链路并且主物理链路正常的状
增加 Only Master Signal Fail(M)状态 (state K), 表示只存在主物理链路并且主物 理链路异常的状态; 增加 Only Backup状态 (state L), 表示只存在备物理链路并且备物理链路正常的 状态; 增加 Only Backup Signal Fail(B) 状态(state M),表示只存在备物理链路并且备物 理链路异常的状态; 增加 NULL状态 ( state N), 表示不存在主物理链路也不存在备物理链路的状态。
(2) 状态机的请求说明: 相对于本地请求 1+1单向非反转模式增加备向主返回超时请求 WTR Timer expired (Request i); 增加主链路震荡抑制超时请求 WTS Timer expired (Request j ); 增加主物理端口添加请求 Master Join (Request k); 增加主物理端口删除请求 Master Leave (Request 1); 增加备物理端口添加请求 Backup Join (Request m); 增加备物理端口删除请求 Backup Leave (Request n); 增加备向主返回配置请求 Restore Change (Request o); 增加主链路震荡抑制超时时间配置请求 WTS Timer Change (Request p)。
(3 ) 状态机的动作说明: 右下表示融合后状态机的输出。 带下划线的字体表示在 APS的两个状态机融合的基础上做的修订: Ac-> (D|I) 1 ), 支持跳转到状态 I是为了支持主链路震荡抑制功能; Dd-> (A|G|H) 2), APS状态机的问题在于没有考虑返回到 A的情况; Ef-> (A|D) 3 ), APS状态机的问题在于没有考虑返回到 D的情况。 带方框的部分表示新增的动作输出。 动作注释:
1 ) 如果当切换延迟时间为 0时切换到状态 D, 否则切换到状态 I。
2) 如果未配置备向主返回切换到状态 H, 否则切换到状态 A或 G; 如果已经配 置的备向主返回时间是 0切换到状态 A, 否则切换到 G。 3 ) 如果 SF (主信号失效)发生过。
4) 如果 SF-B (备信号失效)发生过。
5 ) 保存用户切换命令 LOCK、 FS、 MS。
6) 清除用户切换命令 LOCK、 FS、 MS。 7)如果用户切换命令 LOCK存在切换到状态8、 如果用户切换命令 FS存在切换 到状态 C, 否则切换到 D。
8) 如果用户切换命令 LOCK存在切换到状态 B, 否则切换到 E。
9) 如果配置备向主不返回切换到状态 H。
10)如果配置备向主返回切换到状态 A或保持状态 G; 如果配置备向主返回时间 是 0切换到状态 A, 否则保持状态 G并重新设置备向主返回时间。
11 ) 如果配置备向主返回切换到状态 A或 G; 如果配置备向主返回时间是 0切换 到状态 A, 否则切换到 G。
12)如果配置主链路震荡抑制超时时间为 0, 切换到状态 D, 否则保持状态 I并重 新设置主链路震荡抑制超时时间。 对物理端口添加、 删除的说明: 主物理端口添加: 配置物理端口添加到链路聚合组、 配置清除备物理端口的备属 性, 线卡重启上电接口添加。 主物理端口删除: 配置物理端口从链路聚合组离开、 配 置物理端口的备属性, 线卡重启接口离开。 备物理端口添加: 配置物理端口的备属性, 线卡重启上电备属性接口添加。 备物 理端口删除: 清除备物理端口的备属性, 线卡重启备属性接口离开。 接口状态 up (正常) 的物理端口添加到链路聚合组时会对状态机发出两个请求, 第一个请求是物理端口添加请求, 第二个请求是物理端口 up (正常)请求, 也就是说, 物理端口添加后, 状态机默认物理端口是 down (异常) 的。 接口状态 up (正常) 的 物理端口离开链路聚合组时会对状态机发出两个请求, 第一个请求是物理端口 down 请求, 第二个请求是物理端口离开请求, 也就是说, 物理端口离开前, 需要向状态机 发出物理端口 down (异常) 请求。 物理端口添加事件的状态机动作输出的实现宗旨是不影响当前主或备的选择、 不 影响当前流量转发, 这一点很重要。 备向主返回配置的说明: 备向主返回配置包括: 备向主返回不使能、 备向主返回使能、 备向主返回超时时 间, 备向主返回超时时间只在备向主返回使能的情况下有效。 主链路震荡抑制配置的说明: 主链路震荡抑制配置包括: 主链路震荡抑制超时时间。 通过采用上述实施方式及优选实施方式,提供了一种基于 APS状态机融合的支持 静态配置 1 : 1主备的状态机解决了 1 : 1主备模式手段过于简单, 灵活性、 可操纵性、 易用性较差的问题, 秉承高内聚的软件设计原则, 达到了多种功能融合在一个统一的 状态机的效果。 图 4是根据本发明实施例的状态机模块的处理流程图, 如图 4所示, 该流程包括 如下步骤: 步骤 S402, 状态机当前所处状态; 步骤 S404, 状态机事件请求; 步骤 S406, 状态机设计表; 步骤 S408, 状态机动作输出。 下面以一个例子说明上述的流程: 步骤 Sl, 状态机当前所处状态为 A; 步骤 S2, 状态机事件请求为 a; 步骤 S3, 通过状态机设计表查找对应动作输出; 步骤 S4, 根据状态机动作输出, 状态跃迁到状态 B, 设置 LOCK状态, 选中主。 通过上述优选实施例提供的基于 APS状态机融合的支持静态配置 1 : 1主备的状 态机,达到了多种功能融合在一个统一的状态机的目的,解决了 1 : 1主备模式灵活性、 可操纵性、 易用性较差的问题。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而可以将 它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限 制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种自动保护切换状态机处理方法, 包括:
确定状态机的当前状态, 其中, 所述状态机是自动保护切换的状态机融合 而成一个状态机;
根据所述状态机的当前状态和请求获取对应的动作输出;
将所述状态机的状态迁移到所述动作输出对应的状态。
2. 根据权利要求 1所述的方法,其中,所述状态机是自动保护切换的本地请求 1+1 单向非反转模式对应的状态机和本地请求 1+1单向反转模式对应的状态机融合 而成。
3. 根据权利要求 2所述的方法, 其中, 所述状态机相比于融合前的所述自动保护 切换的状态机, 所述状态机的状态增加以下至少之一:
相对于本地请求 1+1单向非反转模式增加等待恢复 (Wait To Restore)状态, 相对于本地请求 1+1单向反转模式增加非反转 (Do Not Revert) 状态;
等待切换(Wait To Switch)状态,表示主物理链路异常时等待切换的状态; 只有主物理链路 (Only Master) 状态, 表示只存在主物理链路并且主物理 链路正常的状态;
只存在主信号异常 (Only Master Signal Fail) 状态, 表示只存在主物理链 路并且主物理链路异常的状态;
只存在备物理链路(Only Backup)状态, 表示只存在备物理链路并且备物 理链路正常的状态;
只存在备信号异常 (Only Backup Signal Fail) 状态, 表示只存在备物理链 路并且备物理链路异常的状态;
空 (NULL) 状态, 表示不存在主物理链路也不存在备物理链路的状态。
4. 根据权利要求 3所述的方法, 其中, 所述等待切换 (Wait To Switch)状态用于 抑制所述主物理链路震荡。
5. 根据权利要求 2至 4中任一项所述的方法, 其中, 所述状态机相比于融合前的 所述自动保护切换的状态机, 所述状态机的请求增加以下至少之一: 备向主返回超时请求 (WTR Timer expired);
主物理链路震荡抑制超时请求 (WTS Timer expired);
主物理端口添加请求 (Master Join);
主物理端口删除请求 ( Master Leave );
备物理端口添加请求 (Backup Join);
备物理端口删除请求 ( Backup Leave );
备向主返回配置请求 (Restore Change);
主链路震荡抑制超时时间配置请求 (WTS Timer Change)。
6. 根据权利要求 5所述的方法, 其中, 所述主物理端口添加请求对应的主物理端口添加包括: 配置物理端口添加 到链路聚合组、 配置清除备物理端口的备属性以及线卡重启上电接口添加; 所 述主物理端口删除请求对应的主物理端口删除包括: 配置物理端口从链路聚合 组离开、 配置物理端口的备属性, 以及线卡重启接口离开; 和 /或,
所述备物理端口添加请求对应的备物理端口添加包括: 配置物理端口的备 属性和线卡重启上电备属性接口添加; 所述被物理端口删除请求对应的备物理 端口删除包括: 清除备物理端口的备属性以及线卡重启备属性接口离开。
7. 根据权利要求 5所述的方法, 其中, 所述备向主返回配置请求对应的备向主返 回配置包括以下至少之一: 备向主返回不使能、 备向主返回使能、 备向主返回 超时时间。
8. 根据权利要求 2至 5中任一项所述的方法, 其中, 所述状态机相比于融合前的 所述自动保护切换的状态机, 所述状态机的动作进行以下至少之一的修订: 所述状态机的当前状态为状态 A, 并且, 所述状态机的请求为主物理链路 异常, 所述状态机的动作修改为: 当切换延时时间为 0时切换到状态 D, 否则 切换到状态 I;
所述状态机的当前状态为 D, 并且, 所述状态机的请求为主物理链路从主 信号失效中恢复, 所述状态机的动作修改为: 当如果未配置备物理链路则向主 物理链路返回切换到状态 H, 否则切换到状态 A或状态 G; 如果已经配置的备 物理链路则向主物理链路返回时间是 0则切换到状态 A, 否则切换到状态 G; 所述状态机的当前状态为 E, 并且, 所述状态机的请求为主物理链路从主 信号失效中恢复, 所述状态机的动作修改为: 如果主信号失效发生过则切换到 状态 D, 否则切换到状态 A; 其中, 没有请求状态并且主物理链路被选中而备物理链路未被选中为状态 A; 主信号失效并且主物理链路未选中而备物理链路选中状态为状态 D; 备信 号失效并且主物理链路被选中而备物理链路未被选中为状态 E; 等待切换状态 并且主物理链路被选中而备物理链路未被选中为状态 I; 等待回复状态并且主 物理链路未被选中而备物理链路被选中为状态 G; 非反转状态并且主物理链路 未被选中而备物理链路被选中为状态 H。
9. 根据权利要求 2至 5中任一项所述的方法, 其中, 所述状态机相比于融合前的 所述自动保护切换的状态机, 所述状态机的动作增加以下至少之一:
如果当切换延迟时间为 0时切换到状态 D, 否则切换到状态 I; 如果未配置备向主返回切换到状态 H, 否则切换到状态 A或 G; 如果已经 配置的备向主返回时间是 0切换到状态 A, 否则切换到 G;
确定主信号失效是否发生过;
确定备信号失效是否发生过;
保存用户切换命令锁定 LOCK、 强制切换 FS、 手工切换 MS; 清除用户切换命令 LOCK、 FS、 MS;
如果用户切换命令 LOCK存在切换到状态 B、 如果用户切换命令 FS存在 切换到状态 C, 否则切换到状态 D;
如果用户切换命令 LOCK存在切换到状态 B, 否则切换到状态 E;
如果配置备向主不返回切换到状态 H;
如果配置备向主返回切换到状态 A或保持状态 G, 如果配置备向主返回时 间是 0则切换到状态 A, 否则保持状态 G并重新设置备向主返回时间;
如果配置备向主返回切换到状态 A或状态 G, 如果配置备向主返回时间是 0则切换到状态 A, 否则切换到 G;
如果配置主链路震荡抑制超时时间为 0, 则切换到状态 D, 否则保持状态 I 并重新设置主链路震荡抑制超时时间; 其中, 没有请求状态并且主物理链路被选中而备物理链路未被选中为状态 A; 解锁状态且主物理链路被选中而备物理链路未被选中为状态 B; 强制切换 状态且主物理链路未被选中而备物理链路被选中为状态 C; 主信号失效并且主 物理链路未选中而备物理链路选中状态为状态 D; 备信号失效并且主物理链路 被选中而备物理链路未被选中为状态 E; 等待切换状态并且主物理链路被选中 而备物理链路未被选中为状态 I; 等待回复状态并且主物理链路未被选中而备 物理链路被选中为状态 G; 非反转状态并且主物理链路未被选中而备物理链路 被选中为状态 H。
10. 根据权利要求 1或 2所述的方法, 其中, 所述状态机的当前状态包括主物理链 路和备物理链路的状态, 其中, 所述主物理链路和所述备物理链路的主备关系 是静态配置的, 并且为 1+1主备关系, 所述主物理链路和所述备物理链路所属 的链路聚合组中只有一个主物理端口和 /或一个备物理端口。
11. 一种自动保护切换状态机处理装置, 包括:
确定模块, 设置为确定状态机的当前状态, 其中, 所述状态机是自动保护 切换的状态机融合而成一个状态机;
获取模块,设置为根据所述状态机的当前状态和请求获取对应的动作输出; 迁移模块, 设置为将所述状态机的状态迁移到所述动作输出对应的状态。
12. 根据权利要求 11 所述的装置, 其中, 所述状态机是自动保护切换的本地请求 1+1单向非反转模式对应的状态机和本地请求 1+1单向反转模式对应的状态机 融合而成。
13. 根据权利要求 11或 12所述的装置, 其中, 所述状态机的当前状态包括主物理 链路和备物理链路的状态, 其中, 所述主物理链路和所述备物理链路的主备关 系是静态配置的, 并且为 1+1主备关系, 所述主物理链路和所述备物理链路所 属的链路聚合组中只有一个主物理端口和 /或一个备物理端口。
PCT/CN2012/081505 2011-09-21 2012-09-17 自动保护切换状态机处理方法及装置 WO2013041009A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110281660.8A CN102355414B (zh) 2011-09-21 2011-09-21 自动保护切换状态机处理方法及装置
CN201110281660.8 2011-09-21

Publications (1)

Publication Number Publication Date
WO2013041009A1 true WO2013041009A1 (zh) 2013-03-28

Family

ID=45578911

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/081505 WO2013041009A1 (zh) 2011-09-21 2012-09-17 自动保护切换状态机处理方法及装置

Country Status (2)

Country Link
CN (1) CN102355414B (zh)
WO (1) WO2013041009A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065590A (zh) * 2022-06-28 2022-09-16 烽火通信科技股份有限公司 一种分布式双状态机实现线性保护的方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355414B (zh) * 2011-09-21 2017-11-03 中兴通讯股份有限公司 自动保护切换状态机处理方法及装置
CN104821957B (zh) * 2015-04-16 2018-08-07 瑞斯康达科技发展股份有限公司 一种bfd状态机的实现方法、装置及系统
CN108647113B (zh) * 2018-03-30 2022-02-18 创新先进技术有限公司 一种灾难恢复方法及服务器
CN111093125B (zh) * 2019-12-27 2021-11-02 瑞斯康达科技发展股份有限公司 光线路终端实现主干光纤保护的方法、装置及存储介质
CN114221735A (zh) * 2021-12-23 2022-03-22 安徽皖通邮电股份有限公司 基于otn链路动态冗余的方法、存储介质及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6446173B1 (en) * 1997-09-17 2002-09-03 Sony Corporation Memory controller in a multi-port bridge for a local area network
CN101201753A (zh) * 2007-12-13 2008-06-18 浪潮通信信息系统有限公司 一种多状态机管理引擎的配置管理方法
CN101355515A (zh) * 2008-09-05 2009-01-28 中兴通讯股份有限公司 一种链路聚合控制协议的优雅重启方法
CN102355414A (zh) * 2011-09-21 2012-02-15 中兴通讯股份有限公司 自动保护切换状态机处理方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101945042B (zh) * 2010-09-03 2014-01-01 中兴通讯股份有限公司 一种链路聚合的方法及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6446173B1 (en) * 1997-09-17 2002-09-03 Sony Corporation Memory controller in a multi-port bridge for a local area network
CN101201753A (zh) * 2007-12-13 2008-06-18 浪潮通信信息系统有限公司 一种多状态机管理引擎的配置管理方法
CN101355515A (zh) * 2008-09-05 2009-01-28 中兴通讯股份有限公司 一种链路聚合控制协议的优雅重启方法
CN102355414A (zh) * 2011-09-21 2012-02-15 中兴通讯股份有限公司 自动保护切换状态机处理方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065590A (zh) * 2022-06-28 2022-09-16 烽火通信科技股份有限公司 一种分布式双状态机实现线性保护的方法及装置
CN115065590B (zh) * 2022-06-28 2023-05-26 烽火通信科技股份有限公司 一种分布式双状态机实现线性保护的方法及装置

Also Published As

Publication number Publication date
CN102355414A (zh) 2012-02-15
CN102355414B (zh) 2017-11-03

Similar Documents

Publication Publication Date Title
WO2013041009A1 (zh) 自动保护切换状态机处理方法及装置
CN110912780B (zh) 一种高可用集群检测方法、系统及受控终端
TWI380629B (en) Routing component located on a first network device in a cluster of network devices
US20170163473A1 (en) Link aggregation split-brain detection and recovery
JP4520802B2 (ja) ストレージネットワーク管理サーバ、ストレージネットワーク管理方法、ストレージネットワーク管理用プログラムおよびストレージネットワーク管理システム
EP2985952B1 (en) Method and device for protecting service reliability, and network virtualization system
WO2012122945A1 (zh) 用于虚拟网络单元的工作方法及装置
US8873369B2 (en) Fiber channel 1:N redundancy
WO2014083447A1 (en) Method and apparatus for facilitating process restart in an is-is system
JP2015530829A (ja) ミドルウェアマシン環境における劣化ファットツリーの発見およびルーティングをサポートするためのシステムおよび方法
US20150229560A1 (en) Method, switch and system for updating route
CN104025513A (zh) 数据中心网络中的控制层级
US8724517B1 (en) System and method for managing network traffic disruption
WO2020114017A1 (zh) 数据中心流量互通方法、装置、设备及存储介质
CN104731727A (zh) 一种双控存储系统监控管理系统及方法
US20150103644A1 (en) Unconstrained supervisor switch upgrade
JP2012231223A (ja) アクセスシステムおよび冗長切替方法
WO2015066894A1 (zh) 转发面迁移方法、控制器及网关
CN103441940A (zh) 网络设备由备状态到主状态的切换方法、装置及网络设备
EP2030378A1 (en) Uninterrupted network control message generation during local node outages
CN107734037A (zh) 一种nas集群和数据访问方法
US9577872B2 (en) Fiber channel 1:N redundancy
WO2014048126A1 (zh) 业务流量保护方法和装置
CN108900441A (zh) 网络切换方法、第一电子设备及可读存储介质
US20050237943A1 (en) Transmission device

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: 12833942

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: 12833942

Country of ref document: EP

Kind code of ref document: A1