一种在分组双环网上实现保护切换的方法 技术领域 Method for realizing protection switching on packet double-ring network
本发明涉及分组环网技术领域,尤其是涉及一种在分组双环网上实 现保护切换的方法。 发明背景 The present invention relates to the technical field of packet ring networks, and in particular, to a method for implementing protection switching on a packet dual ring network. Background of the invention
随着分组网络的逐步普及和应用, 用户对网络可靠性的需求也越来 越高。 图 1为双环网结构示意图, 如图 1所示, 环网上的各个节点分为 a侧和 b侧 , 各个节点上的 a侧和 b侧互为邻侧( Mate侧),各个节点的 a侧用于外环信号的接收和发送, b侧用于内环信号的接收和发送,环网 上节点一侧的邻节点为与该侧相邻的节点, 环网上节点一侧的下一节点 为与该侧邻侧相邻的节点。 例如: A节点分为 a侧和 b侧, B节点也分 为 a侧和!?侧, B节点和 D节点为 A节点的邻节点, D节点为 A节点 a 侧的邻节点, B节点为 A节点 b侧的邻节点, A节点 a侧的下一节点为 B节点, A节点 b侧的下一节点为 D节点。 双环网上的每个节点之间都 由两条方向不同的光纤连接, 当一条光纤出现故障时, 节点可发生保护 切换, 将信号切换到另一条光纤上, 为双环之间的互相保护提供了实现 基础。 当双环网上发生单点、 多点各个级别的故障时, 需要一种机制来 对 H上发生的故障进行处理、 分析, 并且自动完成光纤的切换, 从而完 成网上业务的自动保护。 With the gradual popularization and application of packet networks, users have increasingly demanded network reliability. Figure 1 is a schematic diagram of the structure of a dual ring network. As shown in Figure 1, each node on the ring network is divided into a side and b side. It is used to receive and send signals on the outer ring, and side b is used to receive and send signals on the inner ring. The neighboring node on the side of the node on the ring network is a node adjacent to that side, and the next node on the side of the node on the ring network is the This side is adjacent to the adjacent nodes. For example: Node A is divided into side a and b, and node B is divided into side a and sum! ? Side, node B and node D are neighboring nodes of node A, node D is a neighboring node of node A and side a, node B is a neighboring node of node A and b side, and the next node on node a and side a is node B and node A The next node on the b side is the D node. Each node on the dual ring network is connected by two fibers with different directions. When one fiber fails, the node can switch protection and switch the signal to another fiber, which provides the mutual protection between the dual rings basis. When single-point and multi-point faults occur on the dual ring network, a mechanism is required to process and analyze the faults occurring on H, and automatically complete the switchover of the optical fiber, so as to complete the automatic protection of online services.
在网络上发生的请求有以下几种, 按优先级从高到低的排序为: a、 当对环网上节点进行配置, 强制当前节点发生切换时, 发生强 制切换请求 ( FS , Force Switch ); There are the following types of requests on the network, in order of priority from high to low: a. When a node on the ring network is configured to force the current node to switch, a forced switch request (FS, Force Switch) occurs;
b、 当光纤上发生信号失效故障时, 发生信号失效请求(SF, Signal
Failure ); b. When a signal failure fault occurs on the fiber, a signal failure request (SF, Signal Failure);
c、 当光纤上发生信号衰减故障时, 发生信号衰减请求(SD, Signal Degrade ); c. When a signal attenuation fault occurs on the optical fiber, a signal attenuation request (SD, Signal Degrade) occurs;
d、 当对环网上节点进行配置, 使当前节点发生切换时, 发生手动 切换请求(MS, Manual Switch ), 该 MS请求和 FS作用一样, 但优先 级比较低; d. When the nodes on the ring network are configured so that the current node is switched, a manual switch request (MS, Manual Switch) occurs. The MS request has the same function as the FS, but has a lower priority.
e、 当环网上节点故障清除后, 节点需要等待一段时间, 然后节点 才返回非切换状态, 以避免节点发生振荡, 这段时间的故障请求被称为 等待恢复请求(WTR, Wait To Restore ); e. After the fault of the node on the ring network is cleared, the node needs to wait for a period of time before the node returns to the non-switching state to avoid node oscillation. The fault request during this time is referred to as a wait to restore request (WTR, Wait To Restore);
f、 没有发生故障的请求被称为空请求, 用 IDLE表示。 f. A request that has not failed is called an empty request, which is represented by IDLE.
上述请求中的 FS、 SF、 SD、 MS和 WTR为故障请求, IDLE为非 故障请求。 FS, SF, SD, MS, and WTR in the above requests are fault requests, and IDLE are non-fault requests.
在 RFC2892、 IEEE802.17草案中有类似的技术来完成网络的智能保 护切换, 其实现方法如下: There are similar technologies in RFC2892 and IEEE802.17 draft to complete the intelligent protection switching of the network. The implementation method is as follows:
将分组双环网上的各个节点的状态在物理上分为切换状态和非切 换状态; 在逻辑上分为: 1、 空闲状态; 2、 切换状态; 3、 穿过状态; 4、 等待恢复状态。 其中, 当逻辑上处于空闲状态和穿过状态时, 对应的物 理状态为非切换状态; 当逻辑上处于切换状态和等待恢复状态时, 对应 的物理状态为切换状态。 The status of each node on the packet dual ring network is physically divided into a switched state and a non-switched state; logically divided into: 1. an idle state; 2. a switched state; 3. a pass-through state; 4. a state waiting to be restored. Wherein, when the logic is in the idle state and the passing state, the corresponding physical state is the non-switching state; when the logic is in the switching state and the waiting for recovery state, the corresponding physical state is the switching state.
在双环网中, 由一个节点发出的请求如果只能到达该节点相邻的节 点, 则该请求为短路径请求; 由一个节点发出的请求如果不仅能到达该 节点相邻的节点, 而且可越过相邻节点到达其他的节点, 则该请求为长 路径请求。 In a dual ring network, if a request sent by a node can only reach a node adjacent to the node, the request is a short path request; if a request issued by a node can not only reach the node adjacent to the node, it can also be crossed If neighboring nodes reach other nodes, the request is a long path request.
分组双环网上的各个节点在初始化之后处于空闲状态, 在此状态 下, 节点处于准备保护切换, 当前节点向相邻节点发送空请求。 当某段
光纤发生故障,此处假设图 1中的 A节点和 B节点之间的光纤发生故障, 则该 A节点收到本地故障请求, 随即发生保护切换, 逻辑上处于切换状 态, 并向 B节点发送短路径请求, 向 D节点发送长路径请求。 B节点收 到来自 A节点的短路径非空请求,则 B节点物理上发生切换, 同时逻辑 上进入切换状态;如果 A节点收到本地故障清除请求,则 A节点在物理 上恢复到非切换状态, 同时逻辑上进入空闲状态, 并向 B节点发送短路 径空请求; B节点接收到来自 A节点的短路径空请求, 在物理上恢复到 非切换状态, 同时逻辑上进入空闲状态。 Each node on the packet dual ring network is in an idle state after initialization. In this state, the node is in a protection-preparing handover, and the current node sends a null request to a neighboring node. When a paragraph The optical fiber is faulty. It is assumed here that the optical fiber between node A and node B in Figure 1 fails. Then node A receives a local fault request, and then a protection switchover occurs. It is logically in the switching state and sends a short message to node B. The path request sends a long path request to the D node. When node B receives a short path non-empty request from node A, node B physically switches and enters the switching state logically; if node A receives a local fault clearing request, node A physically returns to the non-switched state At the same time, it logically enters the idle state and sends a short path empty request to node B; node B receives the short path empty request from node A and physically recovers to the non-switching state while logically entering the idle state.
处于空闲状态的 D节点收到来自相邻 A节点的长路径请求, 则逻 辑上进入穿过状态。 当 D节点处于穿过状态时, 表示环上有其他节点发 生保护切换, D节点没有文保护切换, 只是作为切换信息穿过节点, D 节点将收到的长路径消息向下一个节点转发。如果 D节点收到来自 A节 点的空请求, 则逻辑上进入空闲状态, 如果检测到本地请求且本地请求 的优先级大于当前请求, 或者接收到短路径请求且此请求的优先级大于 当前请求, 则 D节点发生切换, 同时 D节点逻辑上进入切换状态, 所述 的当前请求为当前正在处理的请求。 The D node in the idle state receives the long path request from the neighboring A node, and then enters the through state logically. When the D node is in the passing state, it indicates that other nodes on the ring have switched protection. The D node has no protection switch, but only passes through the node as switching information. The D node forwards the received long path message to the next node. If node D receives a null request from node A, it logically enters the idle state. If a local request is detected and the priority of the local request is greater than the current request, or a short path request is received and the priority of this request is greater than the current request, Then, the node D is switched, and at the same time, the node D logically enters a switching state, and the current request is a request currently being processed.
环网上的各个节点按照'如上描述的方法, 通过对当前节点收到的本 地请求和接收到的邻节点发送请求的处理、 自身的物理状态的切换、 逻 辑状态的切换以及相邻节点间请求的发送, 各个节点互相协调, 完成整 个环网上业务的自动切换, 从而保证了环网业务的智能保护。 In accordance with the method described above, each node on the ring network processes the local request received by the current node and the request sent by the neighboring node, the switch of its physical state, the switch of the logical state, and the request between neighboring nodes. Send, the nodes coordinate with each other to complete the automatic switching of services on the entire ring network, thereby ensuring the intelligent protection of ring network services.
上述现有技术的缺点是: 现有技术所述的方法以节点作为最基本的 处理单位, 将节点的两侧视为一种状态来处理, 但是双环网上的每一个 节点两侧的状态并不完全一致, 它们对消息的处理以及应该发送的消息 也不完全一致, 所以现有技术所述的方法在处理消息、 发送消息的时候 有很多复杂的地方, 处理速度緩慢, 难以同时实现网络上故障节点的切
换和对网络上业务的智能保护; 另外, 现有技术中的逻辑切换状态只有 一个, 但处于切换状态的节点的各个侧, 例如收到故障请求的侧、 该侧 的邻侧以及收到故障请求侧的相邻节点侧实际上状态是不完全一致的, 它们对消息的处理以及应该发送的消息也不完全一致, 如果将其视为一 种状态, 则会在处理消息、发送消息的时候增加处理的复杂程度; 此外, 现有技术中的等待恢复状态也只有一个, 但处于等待恢复状态的节点的 各个侧实际上状态是不完全一致的, 它们对消息的处理以及应该发送的 消息也不完全一致, 如果将其视为一种状态, 则会在处理消息、 发送消 息的时候增加处理的复杂程度, 而且现有技术也没有给出如何在等待恢 复状态和其他状态之间进行转换, 这种情况下, 如果网络上有一段光纤 处于不稳定状态, 由于反复上报故障发生和故障清除, 与此段光纤相连 接的节点就会不停的切换和切换恢复, 这样整个网絡就会处于不停的反 复振荡之中。 发明内容 本发明的目的是克服已有技术的缺点, 提出一种在分组双环网上实 现保护切换的方法, 以便能够简单、 快速、 方便地在分组双环网上实现 多点、 单点在多种故障时的智能保护切换。 The disadvantages of the foregoing prior art are: The method described in the prior art uses a node as the most basic processing unit, and treats both sides of the node as a state to process, but the state on both sides of each node on the dual ring network They are completely the same, and their processing of messages and the messages that should be sent are not exactly the same. Therefore, the methods described in the prior art have many complexities when processing and sending messages. The processing speed is slow and it is difficult to implement network faults at the same time. Node cut And intelligent protection of services on the network; in addition, there is only one logical switching state in the prior art, but each side of the node in the switching state, such as the side receiving the fault request, the side adjacent to the side, and the receiving fault The status of the neighboring nodes on the requesting side is not exactly the same. Their processing of messages and the messages that should be sent are not completely the same. If they are regarded as a state, they will be processed and sent. Increase the complexity of processing; In addition, in the prior art, there is only one waiting-to-recovery state, but the actual status of each side of the node in the waiting-to-recovery state is not completely consistent. Their processing of messages and messages that should be sent are also It is not completely consistent. If it is regarded as a state, it will increase the processing complexity when processing messages and sending messages, and the prior art does not give how to switch between waiting for recovery and other states. In this case, if a piece of fiber on the network is in an unstable state, And clearing a fault occurs, it will stop and the switching of the switching node recovery and fiber connected to this section, so that the entire network will be in a constantly being repeated oscillation. SUMMARY OF THE INVENTION The purpose of the present invention is to overcome the shortcomings of the prior art, and propose a method for implementing protection switching on a packet dual-ring network, so that multiple points, single points, and multiple faults can be easily, quickly, and conveniently implemented on the packet dual-ring network. Intelligent protection switching.
本发明的目的是这样实现的: The object of the present invention is achieved as follows:
一种在分组双环网上实现保护切换的方法, 该方法在同一节点两侧 分别运行状态机, 该方法包括以下步骤: A method for implementing protection switching on a packet dual-ring network. The method runs state machines on both sides of the same node. The method includes the following steps:
a、 完成双环网上节点一侧的初始化, 设置该侧的逻辑状态和物理 状态; a. Complete the initialization of the node side of the dual ring network, and set the logical state and physical state of the node;
b、 该侧根据自身所处的状态定时向该侧邻节点和该侧邻侧发送请 求, 同时, 该侧接收来自本侧、 该侧邻侧以及该侧邻节点的请求;
c、该侧对接收到的新请求进行处理,并艮据处理结果完成逻辑状态和物 理状态的切换, 并返回步骤 b。 b. The side periodically sends requests to the side neighbor node and the side neighbor side according to the state in which it is located, and at the same time, the side receives requests from the side, the side neighbor side, and the side neighbor node; c. The side processes the received new request, completes the switching of the logical state and the physical state according to the processing result, and returns to step b.
所述的逻辑状态为空闲状态、 本侧切换状态、 短路径切换状态、 邻 侧切换状态、 穿过状态、 主动等待恢复状态、 短路径等待恢复状态或邻 侧等待恢复状态中的任意一种。 The logical state is any one of an idle state, a local switching state, a short path switching state, a neighboring switching state, a through state, an active waiting for recovery state, a short path waiting for recovery state, or a neighboring waiting recovery state.
所述环网上节点的一侧完成初始化, 将该侧的逻辑状态初始化为空 闲状态, 物理状态初始化为非切换状态, 当前请求初始化为空请求, 则 所述步骤 b中, 所述节点一侧定时向邻节点和邻侧发送第一请求。 One side of the node on the ring network is initialized, the logical state of the side is initialized to an idle state, the physical state is initialized to a non-switched state, and the current request is initialized to an empty request. In step b, the node side is timed. Send a first request to a neighboring node and a neighboring side.
所述环网上节点的一侧, 逻辑上处于本侧切换状态, 物理上处于切 换状态时, 则在步骤 b中: 所述节点一侧定时向邻节点发送第二请求, 向邻侧发送第三请求。 One side of a node on the ring network is logically in a local switching state, and when it is physically in a switching state, in step b: the node side sends a second request to a neighboring node at regular intervals, and a third request is sent to the neighboring side. request.
所述环网上节点的一侧, 逻辑上处于短路径切换状态, 物理上处于 切换状态时,则在步驟 b中:所述节点一侧定时向邻节点发送第四请求, 向邻侧发送第三请求。 One side of the node on the ring network is logically in a short path switching state, and when it is physically in the switching state, in step b: the node side periodically sends a fourth request to the neighboring node, and sends a third request to the neighboring side. request.
所述环网上节点的一侧, 逻辑上处于邻侧切换状态, 物理上处于切 换状态时, 则在步骤 b中: 所述节点一侧定时向邻节点发送第三请求。 One side of a node on the ring network is logically in a neighboring switching state and physically is in a switching state, in step b: the node side sends a third request to a neighboring node at a regular time.
所述环网上节点的一侧, 逻辑上处于穿过状态, 物理上处于非切换 状态时, 则在步骤 b中: 所述节点一侧不发送任何请求, 当该侧收到长 路径请求后, 向下一节点转发该请求。 When one side of a node on the ring network is logically in a through state and is physically in a non-switching state, in step b: the node side does not send any request, and when the side receives a long path request, Forward the request to the next node.
所述环网上节点的一侧, 逻辑上处于主动等待恢复状态, 物理上处 于切换状态时, 则在步骤 b中: 所述节点一侧定时向邻节点发送第五请 求, 向邻侧发送第六请求。 One side of the node on the ring network is logically in an active waiting state for recovery, and when it is physically in a switching state, in step b: the node side periodically sends a fifth request to a neighboring node, and sends a sixth to the neighboring side. request.
所述环网上节点的一侧, 逻辑上处于短路径等待恢复状态, 物理上 处于切换状态时, 则在步骤 b中: 所述节点一侧定时向邻节点发送第七 请求, 向邻侧发送第六请求。
所述环网上节点的一侧, 逻辑上处于邻侧等待恢复状态, 物理上处 于切换状态时, 则在步骤 b中: 所述节点一侧定时向邻节点发送第六请 求。 One side of the node on the ring network is logically in a short path waiting for recovery state, and when it is physically in a switching state, in step b: the node side periodically sends a seventh request to a neighboring node, and sends a first request to the neighboring side. Six requests. One side of the node on the ring network is logically in a state of waiting for recovery, and when it is physically in a switching state, in step b: the node side periodically sends a sixth request to the neighboring node.
所述的第一请求为 [IDLE, 0, S]请求, 第二请求为 [R, W, S]请求, 第三请求为 [R, W, L]请求, 笫四请求为 [IDLE, W, S]请求, 第五请求为 [WTR, W,S], 第六请求为 [WTR, W,L], 第七请求为 [IDLE, W,S] The first request is a [IDLE, 0, S] request, the second request is a [R, W, S] request, the third request is a [R, W, L] request, and the fourth request is a [IDLE, W , S] request, the fifth request is [WTR, W, S], the sixth request is [WTR, W, L], and the seventh request is [IDLE, W, S]
第一至第七请求三元组中, 第一个元素表示发送请求的类型, IDLE 表示空请求, WTR表示等待恢复请求, R表示当前请求, 该当前请求为 强制切换请求(FS )、 信号失效请求(SF )、 信号衰减请求(SD )、 手动 切换请求(MS )、 等待恢复请求(WTR )或空请求(IDLE )中的任何一 种; 第二个元素表示发送此请求的一侧物理上是否处于切换状态, W表 示处于切换状态, 0表示处于非切换状态; 第三个元素表示发送此请求 是长路径请求, 还是短路径请求, L表示长路径请求, S表示短路径请 求。 In the first to seventh request triples, the first element indicates the type of the transmission request, IDLE indicates an empty request, WTR indicates a waiting for recovery request, and R indicates a current request. The current request is a forced switch request (FS) and the signal is invalid. Any one of a request (SF), a signal attenuation request (SD), a manual switch request (MS), a wait for recovery request (WTR), or an empty request (IDLE); the second element indicates that the side sending this request is physically Whether it is in a handover state, W means in a handover state, 0 means in a non-handover state; the third element indicates whether the request is sent as a long path request or a short path request, L indicates a long path request, and S indicates a short path request.
上述网絡上发生的请求按优先级从高到低的次序为: FS、 SF、 SD、 The requests that occur on the above network in order of priority are: FS, SF, SD,
MS、 WTR、 IDLE。 MS, WTR, IDLE.
所述步骤 c为: 所述节点一侧根据接收到的新请求的优先级与当前 正在处理请求的优先级进行判断和处理, 将当前不能处理的请求放入挂 起队列中, 并根据处理结果完成逻辑状态和物理状态的切换, 并返回步 骤 b。 The step c is: the node side judges and processes according to the received priority of the new request and the priority of the request currently being processed, puts a request that cannot be currently processed into a pending queue, and according to the processing result Complete the switch between the logical state and the physical state, and return to step b.
本发明提出的在分组双环网上实现保护切换的方法, 其特点是将环 网上的两侧完全分开, 同一节点的两侧分别进行状态切换, 以 "侧" 而非 "节点" 为基本运行单位。 状态数目增加至八个, 将原先的切换状 态扩展至本侧切换状态、 短路径切换状态和邻侧切换状态; 将原先的等 待恢复状态扩展至主动等待恢复状态、 短路径等待恢复状态和邻侧等待
恢复状态。 环网上每个节点的两侧, 在接收到本侧检测到的故障后, 作 相应的状态转换和切换动作, 同时向邻侧以及部节点发送消息。 相邻侧 和相邻节点接收到消息后, 也作同样的处理, 然后再向其他节点发送消 息。 这样通过整个网络上所有节点对消息的协同处理, 最终完成网络上 故障节点的切换和对网络上业务的智能保护。 使用本发明的方法, 可以 筒单、 快速、 方便地在分组双环网上实现多点、 单点、 多种故障的智能 保护切换, 大大提高了工作效率; 另外, 本发明所述的方法将原先的等 待恢复状态扩展至主动等待恢复状态、 短路径等待恢复状态和邻侧等待 恢复状态, 并可完成相应的状态转变, 从而避免了由于网络上一段光纤 处于不稳定状态, 而导致的整个网络不停的反复振荡。 附图简要说明 The method for implementing protection switching on a packet dual-ring network proposed by the present invention is characterized in that two sides of the ring network are completely separated, and two sides of the same node are switched respectively, and "side" instead of "node" is the basic operating unit. Increase the number of states to eight, extend the original switching state to the local switching state, the short path switching state, and the neighboring switching state; expand the original waiting recovery state to the active waiting recovery state, the short path waiting to recover state, and the neighboring side Waiting Recovery status. On both sides of each node on the ring network, after receiving the fault detected on the local side, they perform corresponding state transitions and switching actions, and simultaneously send messages to the neighboring side and the nodes. After receiving the message, the neighboring side and the neighboring node do the same, and then send the message to other nodes. In this way, through the cooperative processing of messages by all nodes on the entire network, the switching of the faulty nodes on the network and the intelligent protection of services on the network are finally completed. By using the method of the present invention, intelligent protection switching of multiple points, single points, and multiple faults can be implemented on a packet dual-ring network in a simple, fast, and convenient manner, which greatly improves working efficiency. In addition, the method described in the present invention will The waiting for recovery state is extended to the active waiting for recovery state, the short path waiting for recovery state, and the neighboring side waiting for recovery state, and the corresponding state transition can be completed, thereby avoiding the entire network non-stop caused by the unstable state of a fiber on the network. Repeated oscillations. Brief description of the drawings
图 1为汉环网结构示意图; Figure 1 is a schematic diagram of the Chinese ring network structure;
图 2为本发明所述方法的流程图; 2 is a flowchart of a method according to the present invention;
图 3为本发明所述实施例第一种处理方案的状态迁移图; 图 4为本发明所述实施例笫二种处理方案的状态迁移图; 图 5为本发明所述实施例第三种处理方案的状态迁移图; 图 6为本发明所述实施例第四种处理方案的状态迁移图; 图 7为本发明所述实施例第五种处理方案的状态迁移图; 图 8为本发明所述实施例第六种处理方案的状态迁移图; 图 9为本发明所述实施例第七种处理方案的状态迁移图; 图 10为本发明所述实施例第八种处理方案的状态迁移图。 实施本发明的方式 3 is a state transition diagram of a first processing scheme of the embodiment of the present invention; FIG. 4 is a state transition diagram of two processing schemes of the embodiment of the present invention; FIG. 5 is a third state of the embodiment of the present invention State transition diagram of the processing scheme; FIG. 6 is a state transition diagram of the fourth processing scheme of the embodiment of the present invention; FIG. 7 is a state transition diagram of the fifth processing scheme of the embodiment of the present invention; FIG. 8 is the present invention State transition diagram of the sixth processing scheme of the embodiment; FIG. 9 is a state transition diagram of the seventh processing scheme of the embodiment of the present invention; FIG. 10 is state transition diagram of the eighth processing scheme of the embodiment of the present invention Illustration. Mode of Carrying Out the Invention
下面结合附图对本发明进行详细描述。
本发明所述的方法将双环网上同一节点的两侧所处的状态完全分 开, 对同一节点的两侧分别运行状态机, 以 "侧" 为基本运行单位来完 成请求的处理, 如图 2所示, 本发明所述方法的总体实现步骤为: The present invention is described in detail below with reference to the drawings. The method described in the present invention completely separates the states of two sides of the same node on a dual ring network, and runs a state machine on both sides of the same node, and uses "side" as the basic operating unit to complete the request processing, as shown in Figure 2. It is shown that the overall implementation steps of the method of the present invention are:
a、 完成双环网上节点一侧的初始化, 设置该侧的逻辑状态和物理 状态; a. Complete the initialization of the node side of the dual ring network, and set the logical state and physical state of the node;
b、 该侧 据该侧所处的状态定时向该侧邻节点和该侧的邻侧发送 请求, 同时, 该侧接收来自本侧、 该侧邻侧以及该侧邻节点的请求; c、 该侧对接收到的新请求进行处理, 即根据接收到的新请求的优 先级与当前请求的优先级进行判断和处理, 将当前不能处理的请求放入 挂起队列中, 并根据处理结果完成逻辑状态和物理状态的切换, 并返回 步骤 b。 这里, 所述的当前请求为当前正在处理的请求, 所述挂起队列 为该侧当前不能处理的请求按照顺序排成的队列。 b. The side periodically sends requests to the side neighboring node and the side neighboring side according to the state of the side, and at the same time, the side receives requests from the side, the side neighboring side, and the side neighboring node; c, the The side processes the received new request, that is, judges and processes according to the priority of the received new request and the priority of the current request, puts the request that cannot be currently processed in the pending queue, and completes the logic according to the processing result State and physical state, and return to step b. Here, the current request is a request that is currently being processed, and the pending queue is a queue in which requests that cannot be currently processed by the side are arranged in order.
本发明所述的方法将物理状态分为切换状态和非切换状态; 逻辑状 态分为: 1、 空闲状态 (IDLE ); 2、 本侧切换状态 (LOCAL— WRAP ); 3、短路径切换状态( SHORT— WRAP ); 4、邻侧切换状态( MATE_WRAP ); 5、 穿过状态 ( PASS— THROUGH ); 6、 主动等待恢复状态 ( ACTIVE— WTR ); 7、 短路径等待恢复状态( SHORT— WRT ); 8、 邻侧 等待恢复状态(MATE— WRT )。 其中, 当逻辑上处于空闲状态和穿过状 态时, 对应的物理状态为非切换状态; 当逻辑上处于本侧切换状态、 短 路径切换状态、 邻侧切换状态、 主动等待恢复状态、 短路径等待恢复状 态以及邻侧等待恢复状态时, 对应的物理状态为切换状态。 The method according to the present invention divides the physical state into a switching state and a non-switching state; the logical state is divided into: 1. an idle state (IDLE); 2. a local switching state (LOCAL-WRAP); 3. a short path switching state ( SHORT— WRAP); 4. Adjacent side switching state (MATE_WRAP); 5. Pass-through state (PASS — THROUGH); 6. Active waiting for recovery state (ACTIVE — WTR); 7. Short path waiting for recovery state (SHORT — WRT) ; 8. The neighbor is waiting for recovery (MATE-WRT). Wherein, when it is logically in an idle state and a through state, the corresponding physical state is a non-switching state; when it is logically in a local side switching state, a short path switching state, a neighboring side switching state, an active waiting for recovery state, and a short path waiting When the recovery state and the neighboring side are waiting for the recovery state, the corresponding physical state is a switching state.
上述处理过程中, 节点的一侧发出的请求有七种类型, 第一请求为 [IDLE, 0, S]请求, 第二请求为 [R, W, S]请求, 第三请求为 [R, W, L]请 求, 第四请求为 [IDLE, W, S]请求, 第五请求为 [WTR, W, S], 第六请求 为 [WTR, W, L] , 第七请求为 [IDLE, W, S]。
第一至第七请求三元组中, 第一个元素表示发送请求的类型, IDLE 表示空请求, WTR表示等待恢复请求, R表^当前请求, 该当前请求为 强制切换请求(FS )、 信号失效请求(SF )、 信号衰减请求(SD )、 手动 切换请求(MS )、 等待恢复请求(WTR )或空请求(IDLE )中的任何一 种; 第二个元素表示发送此请求的一侧物理上是否处于切换状态, W表 示处于切换状态, 0表示处于非切换状态; 第三个元素表示发送此请求 是长路径请求, 还是短路径请求, L表示长路径请求, S表示短路径请 求。 In the above process, there are seven types of requests sent by one side of the node. The first request is [IDLE, 0, S], the second request is [R, W, S], and the third request is [R, W, L] request, the fourth request is [IDLE, W, S] request, the fifth request is [WTR, W, S], the sixth request is [WTR, W, L], and the seventh request is [IDLE, W, S]. In the first to seventh request triples, the first element indicates the type of the transmission request, IDLE indicates an empty request, WTR indicates a waiting to resume request, and R indicates the current request. The current request is a forced switch request (FS), a signal Any one of the invalidation request (SF), signal attenuation request (SD), manual handover request (MS), waiting for recovery request (WTR), or empty request (IDLE); the second element indicates the physical side of the request Whether the switch is in a switching state, W indicates a switching state, 0 indicates a non-switching state; the third element indicates whether the request is sent as a long path request or a short path request, L indicates a long path request, and S indicates a short path request.
当双环网上节点的一侧处于上述不同的状态时, 在上述的步骤 b至 步骤 e中会有不同的处理过程, 因为该侧逻辑上有八种不同的状态, 所 以有八种不同的处理方案, 下面分别进行说明: When one side of a node on a dual ring network is in the different states described above, there will be different processing procedures in the above steps b to e. Because there are eight different states on this side logically, there are eight different processing schemes. Here are the explanations:
第一种处理方案如图 3所示: 当环网上节点的一侧完成初始化后, 物理上处于非切换状态, 逻辑上处于空闲状态, 设定该侧当前请求为空 请求, 所述当前请求为当前正在处理的请求, 该侧定时向邻节点和邻侧 发送第一请求, 并接收来自本侧、邻侧以及邻节点的请求, 并进行处理。 根据收到的请求类型, 有五种不同情况: The first processing scheme is shown in Figure 3: After one side of a node on the ring network completes initialization, it is physically in a non-switching state and logically in an idle state. The current request on this side is set to an empty request, and the current request is For a request that is currently being processed, the side periodically sends a first request to the neighboring node and the neighboring side, and receives and processes the request from the local side, the neighboring side, and the neighboring node. There are five different situations depending on the type of request received:
第一种情况 310: 该侧收到本侧故障请求, 处理过程如下: 步骤 311 : 将接收到的本侧故障请求保存为当前请求, 物理上进入 切换状态, 向邻节点发送 [R, W, S]请求, 向邻侧发送邻侧长路径请求, 逻辑上进入本侧切换状态。 The first case 310: The side receives the local fault request, and the process is as follows: Step 311: Save the received local fault request as the current request, enter the switching state physically, and send [R, W, S] request, send a neighbor long path request to the neighbor, and logically enter the local switch state.
第二种情况 320: 该侧接收到邻节点的非空短路径请求, 处理过程 如下: Second case 320: The side receives a non-empty short path request from a neighboring node, and the processing process is as follows:
步骤 321: 物理上进入切换状态, 并将接收到的非空短路径请求保 存为当前请求, 向邻节点发送 [R, W, S]请求, 向邻侧发送邻侧长路径请 求;
步骤 322: 若此非空短路径请求为 WTR, 则逻辑上进入短路径等待 恢复状态, 否则逻辑上进入短路径切换状态。 Step 321: Enter a handover state physically, save the received non-empty short path request as the current request, send a [R, W, S] request to a neighboring node, and send a neighboring long path request to the neighboring side; Step 322: If the non-empty short path request is WTR, logically enter the short path waiting for recovery state; otherwise, enter the short path switching state logically.
第三种情况 330: 该侧接收到来自邻节点的长路径请求, 处理过程 如下: Third case 330: The side receives a long path request from a neighboring node, and the process is as follows:
步骤 331 : 向邻节点转发收到的新请求, 并将接收到的请求保存为 当前请求, 向邻节点转发该请求, 逻辑上进入穿过状态。 Step 331: Forward the received new request to the neighboring node, save the received request as the current request, forward the request to the neighboring node, and logically enter the through state.
第四种情况 340: 该侧接收到来自邻侧的长路径请求, 处理过程如 下: Fourth case 340: The side receives a long path request from the neighboring side, and the processing process is as follows:
步骤 341 : 物理上进入切换状态, 将当前请求更改为所接收到的新 请求, 向邻节点发送长路径请求; Step 341: Enter a handover state physically, change the current request to a new request received, and send a long path request to a neighboring node;
步骤 342: 若接收到的新请求为 WTR, 则逻辑上进入邻侧等待恢复 状态, 否则逻辑上进入邻侧切换状态。 Step 342: If the received new request is a WTR, it logically enters the neighbor-side waiting recovery state, otherwise it logically enters the neighbor-side switching state.
第五种情况 350: 该侧接收到其他请求, 则不做处理。 Fifth case 350: The side receives no other request, and does not process it.
第二种处理方案如图 4所示: 当环网上节点的一侧, 逻辑上处于本 侧切换状态,物理上处于切换状态时,本侧定时向邻节点发送第二请求 , 向邻侧发送第三请求, 该侧接收来自本侧、 邻侧以及邻节点的请求, 并 进行处理。 根据收到的请求类型, 有六种不同情况:: The second processing scheme is shown in Figure 4: When one side of a node on the ring network is logically in the local switching state and physically in the switching state, the local side periodically sends a second request to the neighboring node, and sends the first request to the neighboring side. Three requests, the side receives requests from the local side, the neighboring side, and the neighboring nodes and processes them. Depending on the type of request received, there are six different situations:
第一种情况 410: 该侧接收到来自本侧的本侧故障清除请求, 其处 理过程如下: The first case 410: The side receives a local fault clearing request from the local side, and the processing process is as follows:
步骤 411 : 检查此请求是否在挂起队列中, 若该请求在挂起队列中, 则删除此挂起请求, 否则执行步骤 412; Step 411: Check whether the request is in the pending queue, and if the request is in the pending queue, delete the pending request, otherwise perform step 412;
步骤 412:检查挂起队列中是否有 SF或者 SD,若有则执行步骤 413; 否则, 该侧逻辑上进入主动等待恢复状态, 当前请求更改为 WTR, 结 束本处理过程; Step 412: Check whether there is SF or SD in the pending queue, and if there is, execute step 413; otherwise, the side logically enters the active waiting for recovery state, and the current request is changed to WTR, and the process is ended;
步骤 413: 将挂起队列中优先级最高的请求取出, 并将当前请求更
改为此请求, 状态不变。 Step 413: Remove the highest priority request from the pending queue, and update the current request. Instead, the status is unchanged.
第二种情况 420: 该侧接收到本侧故障请求, 其处理过程如下: 步骤 421 : 若该请求的优先级比本侧当前请求的优先级高, 则执行 步骤 422, ; 否则, 执行步骤 423; The second case 420: The side receives the fault request from the local side, and the processing process is as follows: Step 421: If the priority of the request is higher than the priority of the current request from the local side, step 422 is performed; otherwise, step 423 is performed ;
步骤 422: 将当前请求放入挂起队列, 并将当前请求更改为所接收 到的本侧故障请求, 状态不变, 结束流程; Step 422: Put the current request into the pending queue, and change the current request to the received local fault request, the status remains unchanged, and the process ends;
步骤 423: 若该请求的优先级比本侧当前请求的优先级低, 则将当 前请求放入挂起队列, 保持状态不变, 结束流程; 否则, 不做处理。 Step 423: If the priority of the request is lower than the priority of the current request on the local side, the current request is placed in the pending queue, the state remains unchanged, and the process ends; otherwise, no processing is performed.
第三种情况 430: 该侧接收到邻节点的短路径请求, 其处理过程如 下: Third case 430: The side receives a short path request from a neighboring node, and the processing process is as follows:
步骤 431 : 若该侧的当前请求优先级高于 SD, 则不做处理, 并结束 流程; 否则, 执行步骤 432; Step 431: If the current request priority of the side is higher than SD, no processing is performed, and the process ends; otherwise, step 432 is performed;
步骤 432:若接收到的新请求的优先级高于该侧当前请求的优先级, 则将执行步骤 433 , 否则, 不做处理, 并结束流程; Step 432: If the priority of the received new request is higher than the priority of the current request on that side, step 433 will be performed; otherwise, no processing is performed and the process ends;
步骤 433: 当前请求放入桂起队列, 并将该侧的当前请求更改为所 接收到的新请求, 逻辑上进入短路径切换状态。 Step 433: Put the current request into the Guiqi queue, change the current request on the side to the new request received, and logically enter the short path switching state.
第四种情况 440: 该侧接收到邻节点的长路径请求, 其处理过程如 下: Fourth case 440: The side receives a long path request from a neighboring node, and the processing process is as follows:
步骤 441 : 若该侧的当前请求的优先级高于 SD, 则不做处理, 并结 束本流程; 否则, 执行步骤 442; Step 441: If the priority of the current request on the side is higher than SD, no processing is performed and the process ends; otherwise, step 442 is performed;
步驟 442: 若接收到的新请求的优先级高于或等于该侧当前请求的 优先级, 则执行步驟 443 , 否则, 不故处理, 并结束本流程; Step 442: If the priority of the received new request is higher than or equal to the priority of the current request of the side, step 443 is performed; otherwise, the processing is not performed and the process is ended;
步骤 443: 将当前请求放入挂起队列, 将该侧的当前请求更改为所 接收到的新请求的, 同时将该请求转发到邻侧, 将该侧物理上恢复为非 切换状态, 逻辑上进入穿过状态。
第五种情况 450: 该侧接收到来自邻侧的长路径请求, 其处理过程 如下: Step 443: Put the current request into the pending queue, change the current request on the side to the received new request, and forward the request to the neighboring side, and physically restore the side to the non-switched state. Logically Into the through state. Fifth case 450: The side receives a long path request from the neighboring side, and the processing process is as follows:
步驟 451 : 若该侧的当前请求的优先级高于 SD, 则不做处理, 并结 束流程, 否则, 执行步骤 452; Step 451: If the priority of the current request on the side is higher than SD, no processing is performed and the process is ended, otherwise, step 452 is performed;
步骤 452:若接收到的新请求的优先級高于该侧当前请求的优先级, 或所接收到的新请求的优先级等于该侧当前请求的优先级且该侧为节 点的 b侧, 则执行步骤 453 , 否则, 不做处理, 并结束流程; Step 452: If the priority of the received new request is higher than the priority of the current request of the side, or the priority of the received new request is equal to the priority of the current request of the side and the side is the b side of the node, Step 453 is performed; otherwise, no processing is performed, and the process ends;
步骤 453: 将当前请求放入挂起队列, 将该侧的当前请求更改为所 接收到的新请求, 且该侧逻辑上进入邻侧切换状态。 Step 453: Put the current request into the pending queue, change the current request on the side to the received new request, and the side logically enters the neighboring-side switching state.
第六种情况 460: 该侧接收到邻侧转发来的长路径请求, 其处理过 程如下: The sixth case 460: The side receives the long path request forwarded by the neighboring side, and the processing process is as follows:
步骤 461 : 若该侧的当前请求的优先级高于 SD, 则执行步驟 463; 否则, 执行步骤 462; Step 461: If the priority of the current request on the side is higher than SD, go to step 463; otherwise, go to step 462;
步驟 462: 若接收到的新请求的优先级高于或等于当前请求, 则执 行步驟 464; 否则, 执行步骤 463; Step 462: If the priority of the received new request is higher than or equal to the current request, step 464 is performed; otherwise, step 463 is performed;
步骤 463: 以当前请求给邻侧发送邻侧长路径请求,保持状态不变; 步一银 464: 将该侧的当前请求放入挂起队列, 将该侧当前侧物理上 恢复非切换状态, 将该侧的当前请求更改为所接收到的新请求, 并使该 侧逻辑上进入穿过状态。 Step 463: Send the neighboring side long path request to the neighboring side with the current request, keeping the state unchanged. Step one silver 464: Put the current request on the side into the pending queue, and physically restore the non-switched state on the current side of the side. Change the current request on the side to the new request received, and logically put the side into the through state.
第三种处理方案如图 5所示: 当环网上节点的一侧, 逻辑上处于短 路径切换状态, 物理上处于切换状态时, 该侧定时向邻节点发送第四请 求,向邻侧发送第三请求,该侧接收本侧和来自邻侧以及邻节点的请求, 并进行处理。 该处理过程有五种不同情况: The third processing scheme is shown in FIG. 5: When one side of a node on a ring network is logically in a short path switching state and physically in a switching state, the side periodically sends a fourth request to a neighboring node, and sends a first request to the neighboring side. Three requests. This side receives and processes requests from the local side and from neighboring sides and neighboring nodes. There are five different situations in this process:
第一种情况 510: 该侧接收到本侧请求清除的信息,其处理过程为: 步骤 511 : 检查该请求是否在挂起队列中, 若在挂起队列中, 则删
除此挂起请求, 否则, 不做处理。 The first case 510: The side receives the information requested by the side to clear, and the processing process is as follows: Step 511: Check whether the request is in the pending queue, and delete it if it is in the pending queue. Except for this pending request, no processing is performed.
第二种情况 520: 该侧接收到本侧故障请求, 其处理过程为: 步骤 521 : 若该接收到的新请求 FS或 SF, 则执行步骤 522; 否贝 执行步骤 523; The second case 520: The side receives the fault request from the side, and the processing process is as follows: Step 521: If the new request FS or SF is received, go to step 522; if no, go to step 523;
步骤 522: 将该侧的当前请求更改为接收到的新请求, 该侧逻辑上 进入本侧切换状态, 并结束流程; Step 522: Change the current request on the side to a new request received, the side logically enters the switching state on the side, and ends the process;
步骤 523: 若新请求比当前请求的优先级高, 则执行步骤 522; 否 贝' J , 执行步驟 524; Step 523: If the new request has a higher priority than the current request, go to step 522; if no, 'J, go to step 524;
步骤 524: 将接收到的新请求放入挂起队列, 并保持状态不变。 第三种情况 530: 该侧接收到来自邻节点的短路径请求, 其处理过 程如下: Step 524: Put the received new request into the pending queue, and keep the state unchanged. Third case 530: The side receives a short path request from a neighboring node, and the processing process is as follows:
步骤 531 : 若接收到的新请求若该侧的当前请求不是 WTR, 则执行 步骤 532; 否则, 执行步驟 533 ; Step 531: if the received new request is not a WTR, then execute step 532; otherwise, execute step 533;
步驟 532: 将当前请求更改为所接收到的新请求, 并保持状态不变, 结束流程; Step 532: Change the current request to the received new request, keep the state unchanged, and end the process.
步骤 533: 若挂起队列中没有 SD, 则该侧逻辑上进入短路径等待恢 复状态, 并结束流程, 否则, 执行步骤 534; Step 533: If there is no SD in the suspend queue, the side logically enters a short path to wait for recovery and ends the process, otherwise, execute step 534;
步骤 534: 将当前挂起队列中的 SD取出, 将该侧的当前请求更改 为 SD, 该侧逻辑上进入本侧切换状态。 Step 534: Remove the SD in the currently suspended queue, change the current request on the side to SD, and the side logically enters the switching state on the side.
第四种情况 540: 该侧接收到来自邻节点的长路径请求,其处理过程 如下: The fourth case 540: The side receives a long path request from a neighboring node, and the processing process is as follows:
步驟 541 : 若该侧的当前请求的优先级高于 SD, 则不做处理, 并结 束本流程, 否则, 执行步驟 542; Step 541: If the priority of the current request on the side is higher than SD, no processing is performed and the process ends, otherwise, step 542 is performed;
步骤 542: 若接收到的新请求优先级高于或等于该侧的当前请求的 优先级, 则执行步骤 543, 否则, 不做处理, 并结束本流程;
步骤 543: 将该侧的当前请求更改为所接收到的新请求, 同时将所 接收到的新请求转发到邻侧, 该侧逻辑上进入穿过状态, 将该侧物理上 恢复为非切换状态。 Step 542: If the priority of the received new request is higher than or equal to the priority of the current request on that side, step 543 is performed; otherwise, no processing is performed and the process ends; Step 543: Change the current request on the side to the received new request, and forward the received new request to the neighboring side, the side logically enters the through state, and the side is physically restored to the non-switched state. .
第五种情况 550: 该侧接收到来自邻侧的长路径请求, 其处理过程 如下: Fifth case 550: The side receives a long path request from the neighboring side, and the processing process is as follows:
步骤 551 : 若该侧的当前请求的优先级高于 S D, 则不做处理, 并 结束流程, 否则, 执行步骤 552; Step 551: If the priority of the current request on the side is higher than SD, no processing is performed, and the process ends, otherwise, step 552 is performed;
步骤 552: 若所接收到的新请求的优先级高于该侧当前请求的优先 级, 则执行步骤 554, 否则, 执行步骤 553; Step 552: If the priority of the received new request is higher than the priority of the current request of the side, step 554 is performed, otherwise, step 553 is performed;
步驟 553: 若所接收到的新请求的优先级等于该侧当前请求的优先 级, 且该侧为节点的 b侧, 则执行步骤 554, 否则, 不做处理, 并结束 流程; Step 553: If the priority of the received new request is equal to the priority of the current request of the side, and the side is the b side of the node, step 554 is performed, otherwise, no processing is performed, and the process ends;
554: 将当前请求放入挂起队列 , 的当前请求更改为 所接收到的新请求, 该侧逻辑上进入邻侧切换状态。 554: The current request is put into a pending queue, and the current request is changed to a new request received, and the side logically enters a neighboring-side switching state.
第六种情况 560: 该侧接收到邻侧转发长路径请求, 其处理过程如 下: The sixth case 560: The side receives the forward long path request from the neighboring side, and the processing process is as follows:
步骤 561 : 若该侧当前请求的优先级高于 SD, 则执行步骤 563 , 否 贝1 执行步骤 562; Step 561: If the priority of the request side is higher than the current SD, step 563 is performed, step 562 whether the shell 1;
步驟 562:若所接收到的新请求优先级高于或等于当前请求优先级, 则执行步骤 564, 否则执行步驟 563; Step 562: If the priority of the received new request is higher than or equal to the current request priority, step 564 is performed, otherwise step 563 is performed;
步骤 563: 该侧以当前请求给部侧发送邻侧长路径请求, 并保持状 态不变, 结束流程; Step 563: The side sends a neighboring side long path request to the department side with the current request and keeps the state unchanged, and ends the process;
步骤 564: 则将该侧物理上恢复为非切换状态, 然后将当前请求放 入挂起队列, 并将该侧的当前请求更改为所接收到的新请求, 该侧逻辑 上进入穿过状态。
第四种处理方案如图 6所示: 上述方法中, 当环网上节点的一侧, 逻辑上处于邻侧切换状态, 物理上处于切换状态时, 该侧定时向邻节点 发送第三请求, 该侧接收本侧、 邻侧以及部节点的请求, 并进行处理。 该处理过程有八种不同情况: Step 564: The side is physically restored to the non-switching state, and then the current request is put into the pending queue, and the current request on the side is changed to the received new request, and the side logically enters the through state. The fourth processing scheme is shown in FIG. 6: In the above method, when one side of a node on a ring network is logically in a neighboring switching state and physically in a switching state, the side periodically sends a third request to the neighboring node. The side receives requests from the local side, the neighboring side, and the nodes and processes them. There are eight different situations in this process:
第一种情况 610: 该侧接收到本侧请求清除信息, 其处理过程为: 步骤 611 : 检查此请求是否在挂起队列中, 若在挂起队列中, 则删 除此挂起请求, 否则, 不做处理。 The first case 610: The side receives the request for clearing information from its own side, and the process is as follows: Step 611: Check whether the request is in the pending queue, and if it is in the pending queue, delete the pending request, otherwise, Do nothing.
第二种情况 620: 该侧接收到本侧故障请求, 其处理过程如下: 步骤 621 :若所接收到的新请求的优先级高于 SD,则执行步骤 623 , 否则, 执行步驟 622; The second case 620: The side receives the fault request from the side, and the processing process is as follows: Step 621: If the priority of the received new request is higher than SD, go to step 623, otherwise, go to step 622;
步骤 622: 若所接收到的新请求的优先级高于该侧当前请求的优先 级, 则执行步驟 623; 否则, 执行步骤 624; Step 622: If the priority of the received new request is higher than the priority of the current request of the side, step 623 is performed; otherwise, step 624 is performed;
步骤 623: 将该侧当前请求更改为所接收到的新请求, 逻辑上进入 本侧切换状态, 结束流程; Step 623: Change the current request on the side to the received new request, logically enter the switching state on the side, and end the process;
步骤 624: 将所接收到的新请求放入挂起队列, 保持状态不变。 第三种情况 630: 该侧接收到来自邻节点的短路径请求, 其处理过 程如下: Step 624: Put the received new request into the pending queue, and keep the state unchanged. Third case 630: The side receives a short path request from a neighboring node, and the process is as follows:
步骤 631 : 若所接收到的新请求高于 SD, 则执行步骤 634, 否则, 执行步骤 632; Step 631: If the received new request is higher than SD, go to step 634, otherwise, go to step 632;
步骤 632: 若所接收到的新请求优先级低于当前请求, 则不做处理, 若所接收到的新请求优先级等于当前请求, 则执行步骤 633 , 若所接收 到的新请求优先级高于当前请求, 则执行步骤 634; Step 632: If the priority of the received new request is lower than the current request, no processing is performed. If the priority of the received new request is equal to the current request, step 633 is performed. If the priority of the received new request is high At the current request, step 634 is performed;
步骤 633: 立即向邻侧发送一个邻侧长路径请求, 并保持状态不变, 结束流程; Step 633: Immediately send a neighboring long path request to the neighboring side, and keep the state unchanged, and end the process;
步骤 634: 将该侧的当前请求更改为所接收到的新请求, 该侧的逻
辑上进入短路径切换状态。 Step 634: Change the current request on the side to the new request received, and the logic on the side Enter the short path switching state.
第四种情况 640: 该侧接收到来自邻节点的长路径请求, 但第一个 从外环收到的长路径请求必须丟弃, 其处理过程如下: The fourth case 640: The side receives a long path request from a neighboring node, but the first long path request received from the outer ring must be discarded. The process is as follows:
步骤 641 : 若该侧当前请求的优先级高于 SD, 则不做处理, 并结束 流程, 否则, 执行步驟 642; Step 641: If the priority of the current request on the side is higher than SD, no processing is performed and the process ends, otherwise, step 642 is performed;
步骤 642:若所接收到的新请求的优先级高于该侧当前请求优先级, 则执行步骤 645 , 若所接收到的新请求的优先级等于该侧当前请求优先 级, 则执行步骤 643 , 若所接收到的新请求的优先级低于该侧当前请求 优先级, 则不做处理, 并结束流程; Step 642: If the priority of the received new request is higher than the current request priority of the side, step 645 is performed; if the priority of the received new request is equal to the current request priority of the side, step 643 is performed, If the priority of the received new request is lower than the current request priority of the side, no processing is performed, and the process ends;
步骤 643: 若接收到的新请求来自邻侧的邻节点, 则不做处理, 并 结束流程, 否则, 执行步驟 644; Step 643: If the received new request comes from a neighboring node on the neighboring side, no processing is performed, and the process ends, otherwise, step 644 is performed;
步骤 644: 若接收到的新请求来自外环, 则执行步骤 645 , 否则, 执行步骤 646; Step 644: If the received new request is from the outer ring, go to step 645, otherwise, go to step 646;
步骤 645: 将该侧物理上恢复为非切换状态, 将该侧的当前请求更 改为所接收到的新请求, 并将所接收到的新请求转发到邻侧 , 该侧逻辑 上进入穿过状态; ' Step 645: Physically restore the side to the non-switching state, change the current request on the side to the new request received, and forward the received new request to the neighboring side, and the side logically enters the through state ; '
步骤 646: 立即向邻侧发送一个长路径请求。 Step 646: Send a long path request to the neighboring side immediately.
第五种情况 650: 该侧接收到来自邻侧的长路径请求, 其处理过程 如下: Fifth case 650: The side receives a long path request from the neighboring side, and the processing process is as follows:
步骤 651 : 若所接收到的新请求是 WTR, 则执行步骤 652, 否则, 执行步骤 653; Step 651: If the received new request is WTR, go to step 652, otherwise, go to step 653;
步骤 652: 若挂起队列中没有 SD, 侧执行步驟 654, 否则, 执行步 骤 655; Step 652: If there is no SD in the pending queue, go to step 654, otherwise, go to step 655;
步骤 653: 将该侧的当前倚求更改为所接收到的新请求, 保持状态 不变, 并结束流程;
步骤 654: 则将该侧的当前请求更改为新请求, 将该新请求转发给 相邻节点, 该侧逻辑上进入邻侧等待恢复状态; Step 653: Change the current reliance on the side to the new request received, keep the state unchanged, and end the process; Step 654: The current request on the side is changed to a new request, the new request is forwarded to an adjacent node, and the side logically enters a state of waiting for recovery on the adjacent side;
步骤 655: 将挂起队列中的 SD取出, 将该侧的当前请求更改为所 接收到的新请求, 该侧的逻辑上进入本侧切换状态。 Step 655: Remove the SD in the pending queue, change the current request on the side to the new request received, and logically enter the switching state on the side.
第六种情况 660: 该侧接收到邻侧转发的长路径请求, 其处理过程 如下: The sixth case 660: The side receives the long path request forwarded by the neighboring side, and the processing process is as follows:
步骤 661 : 将该侧的当前请求更改为所接收到的新请求, 该侧物理 上恢复为非切换状态, 将所接收到的新请求向邻节点转发, 该侧逻辑上 进入穿过状态。 Step 661: The current request on the side is changed to a received new request, the side is physically restored to a non-switched state, the received new request is forwarded to a neighboring node, and the side logically enters a through state.
第五种处理方案如图 7所示: 当环网上节点的一侧, 逻辑上处于穿 过状态, 物理上处于非切换状态时, 该侧不发送任何请求, 当该侧收到 长路径请求后, 向下一节点转发该请求, 该侧接收本侧和来自邻侧以及 邻节点的请求, 并进行处理。 该处理过程有以下五种不同情况: The fifth processing scheme is shown in FIG. 7: When one side of a node on a ring network is logically in a through state and physically in a non-switching state, the side does not send any requests. When the side receives a long path request, The request is forwarded to the next node, and the side receives the request from the local side and from the neighboring side and the neighboring node, and processes the request. There are five different situations in this process:
第一种情况 710: 该侧接收到本侧请求清除, 其处理过程为: 步骤 711 : 检查'此请求是否在挂起队列中, 若在挂起队列中, 则执 行步骤 712, 否则, 不做处理, 并结束流程; The first case 710: The side receives the request for clearing from the side, and the process is as follows: Step 711: Check 'This request is in the pending queue. If it is in the pending queue, go to step 712, otherwise, do not do Process and end the process;
步驟 712: 删除此桂起请求, 保持状态不变。 Step 712: Delete this request, and keep the status unchanged.
第二种情况 720: 该侧接收到本侧故障请求, 其处理过程如下: 步驟 721: 若接收到的新请求的优先级高于 SD, 侧执行步骤 723, 否则执行步骤 722; The second case 720: The side receives the fault request from the side, and the processing process is as follows: Step 721: If the priority of the received new request is higher than SD, the side performs step 723, otherwise proceeds to step 722;
步驟 722: 若新请求的优先级小于或等于 SD, 侧执行步骤 724, 否 则, 执行步骤 723; Step 722: If the priority of the new request is less than or equal to SD, perform step 724 on the side, otherwise, perform step 723;
步骤 723: 该侧物理上进入切换状态, 并将当前请求更改为所接收 到的新请求, 该侧逻辑上进入本侧切换状态, 结束流程; Step 723: The side physically enters a handover state, and changes the current request to a received new request. The side logically enters the handover state of the side, and ends the process.
步骤 724: 将所接收到的新请求放入挂起队列。
第三种情况 730: 该侧接收到来自邻节点的短路径请求, 其处理过 程如下: Step 724: Put the received new request into the pending queue. Third case 730: The side receives a short path request from a neighboring node, and the process is as follows:
步骤 731 : 若接收到的新请求为空请求, 则执行步骤 732, 否则, 执行步骤 733; Step 731: If the received new request is an empty request, go to step 732, otherwise, go to step 733;
步驟 732: 将当前请求更改为空请求, 该侧逻辑上进入空闲状态, 结束流程; Step 732: Change the current request to an empty request, the side logically enters the idle state, and the process ends;
步骤 733: 该侧物理上进入切换状态, 并将当前请求更改为所接收 到的新请求, 该侧逻辑上进入短路径切换状态。 Step 733: The side physically enters a switching state, and changes the current request to a received new request, and the side logically enters a short path switching state.
第四种情况 740: 该侧接收到来自邻节点的长路径请求, 其处理过 程如下: Fourth case 740: The side receives a long path request from a neighboring node, and the process is as follows:
步骤 741 : 若接收到的新请求为 WTR请求,则执行步骤 742,否则, 执行步骤 744; Step 741: If the received new request is a WTR request, go to step 742, otherwise, go to step 744;
步骤 742: 若挂起队列中有 SD, 则执行步骤 743 , 否则, 执行步骤 Step 742: If there is SD in the pending queue, go to step 743; otherwise, go to step
744; 744;
步骤 743 : 该侧物理上进入切换状态, 将当前请求更改为 SD, 该侧 逻辑上进入本侧切换状态, 结束流程; Step 743: The side physically enters the switching state, changes the current request to SD, the side logically enters the switching state of the local side, and ends the process;
步骤 744: 将当前请求更改为所接收到的新请求, 并将所接收到的 新请求向下一节点转发, 并保持状态不变。 Step 744: Change the current request to the received new request, and forward the received new request to the next node, and keep the state unchanged.
笫五种情况 750: 该侧接收到来自邻侧的长路径请求, 其处理过程 如下: 情况 Five cases 750: The side receives a long path request from the neighboring side, and the processing process is as follows:
步骤 751 : 该侧物理上进入切换状态, 并将当前请求更改为所接收 到的新请求; Step 751: The side physically enters a switching state, and changes the current request to a new request received;
步骤 752: 若该侧接收到的新请求为 WTR, 则该侧逻辑上进入邻侧 等待恢复状态; 否则, 该侧逻辑上进入邻侧切换状态。 Step 752: If the new request received by the side is WTR, the side logically enters the neighboring side waiting for recovery state; otherwise, the side logically enters the neighboring side switching state.
第六种情况 760: 该侧接收到除上述请求外的其他请求, 不做处理。
第六种处理方案如图 8所示: 当环网上节点的一侧, 逻辑上处于主 动等待恢复状态, 物理上处于切换状态时, 该侧定时向邻节点发送第五 请求, 向邻侧发送第六请求, 该侧接收来自本侧、 邻侧以及邻节点的请 求, 并进行处理。 该处理过程有七种不同情况: The sixth case 760: The side receives other requests other than the above requests and does not process them. The sixth processing scheme is shown in FIG. 8: When one side of a node on a ring network is logically in an active waiting state for recovery and is physically in a switching state, the side periodically sends a fifth request to a neighboring node, and sends a first request to the neighboring side. Six requests, the side receives requests from the local side, neighboring sides, and neighboring nodes and processes them. There are seven different situations in this process:
第一种情况 810: 该侧接收到本侧故障请求, 其处理过程为: 步骤 811 : 将当前请求更改为所接收到的新请求, 如果挂起队列中 有 WTR, 则删除该 WTR, 本侧逻辑上进入本侧切换状态。 The first case 810: The side receives a fault request from the local side, and the process is as follows: Step 811: Change the current request to a new request received. If there is a WTR in the pending queue, delete the WTR. The local side Logically enter the local switching state.
第二种情况 820: 该侧接收到来自邻节点的短路径请求, 其处理过 程如下: The second case 820: The side receives a short path request from a neighboring node, and the process is as follows:
步驟 821 : 若所接收到的新请求为 [WTR, W, S] , 则执行步驟 822, 否则, 执行步骤 823; Step 821: If the received new request is [WTR, W, S], go to step 822, otherwise, go to step 823;
步骤 822: 将所接收到的新请求放入挂起队列中, 保持状态不变, 结束流程; Step 822: Put the received new request into a pending queue, keep the state unchanged, and end the process;
步骤 823: 若该侧接收到的新请求为 [IDLE, W, S] , 则执行步骤 824, 否则执行步骤 825; Step 823: If the new request received by the side is [IDLE, W, S], go to step 824, otherwise go to step 825;
步骤 824: 将挂起队列中的 WTR请求删除, 结束流程; Step 824: Delete the WTR request in the pending queue, and end the process.
步骤 825: 若该侧接收到的新请求为空请求, 则不故处理, 否则, 执行步骤 826; Step 825: If the new request received by the side is an empty request, it is not processed, otherwise, step 826 is performed;
步骤 826: 将当前请求更改为所接收到的新请求, 如果挂起队列中 有 WTR请求, 则删除该请求, 该侧逻辑上进入短路径切换状态。 Step 826: Change the current request to the received new request. If there is a WTR request in the pending queue, delete the request, and the side logically enters the short path switching state.
第三种情况 830: 该侧接收到来自邻节点的长路径请求, 其处理过 程为: Third case 830: The side receives a long path request from a neighboring node, and the process is as follows:
步骤 831 : 若所接收到的新请求为 WTR, 则不做处理, 否则, 执行 步骤 832; Step 831: If the received new request is WTR, no processing is performed, otherwise, step 832 is performed;
步骤 832: 该侧物理状态进入切换状态, 并将当前请求更改为所接
收到的新请求, 然后将所接收到的新请求转发到邻侧, 同时删除挂起队 列中的 WTR请求, 该侧逻辑上进入穿过状态。 Step 832: The physical state on the side enters the switching state, and changes the current request to the connected state. The new request received is then forwarded to the neighboring side, and the WTR request in the pending queue is deleted at the same time, and the side logically enters the through state.
第四种情况 840: 该侧接收到来自邻侧的长路径请求, 其处理过程 为: The fourth case 840: The side receives the long path request from the neighboring side, and the process is as follows:
步骤 841 : 若所接收到的新请求为 WTR, 则不做处理, 否则, 执行 步骤 842; Step 841: If the received new request is WTR, no processing is performed, otherwise, step 842 is performed;
步驟 842: 将当前请求更改为所接收到的新请求, 如果挂起队列中 存在 WTR请求, 则删除该请求, 该侧逻辑上进入邻侧切换状态。 Step 842: Change the current request to the received new request. If there is a WTR request in the pending queue, delete the request, and the side logically enters the neighboring-side switching state.
第五种情况 850: 该侧接收到来自邻侧的短路径请求, 其处理过程 为: Fifth case 850: The side receives a short path request from the neighboring side, and the process is as follows:
步骤 851 : 立即向邻侧发送一个邻侧长路径请求, 并保持状态不变。 第六种情况 860: 该侧接收到邻侧转发的长路径请求, 其处理过程 为: Step 851: Immediately send a neighboring long path request to the neighboring side, and keep the state unchanged. The sixth case 860: The side receives the long path request forwarded by the neighboring side, and the process is as follows:
步驟 861 : 该侧物理状态进入非切换状态, 并将当前请求更改为所 接收到的新请求, 将所接收到的新请求向邻节点转发, 如果挂起队列中 存在 WTR请求, 则删除该请求, 同时向下一节点转发新请求, 该侧逻 辑上进入穿过状态。 Step 861: The physical state of the side enters a non-switching state, changes the current request to a received new request, forwards the received new request to a neighboring node, and deletes the request if there is a WTR request in the pending queue. At the same time, a new request is forwarded to the next node, and the side logically enters the through state.
第七种情况 870: 当 WTR定时器超时后, 其处理过程如下: 步骤 871 : 检查挂起队列中是否有 WTR, 如果有, 则执行步骤 872, 否则, 执行步骤 873; The seventh case 870: When the WTR timer expires, the processing is as follows: Step 871: Check whether there is a WTR in the pending queue, and if so, go to step 872, otherwise, go to step 873;
步骤 872: 从挂起队列中取出 WTR, 将当前请求改为挂起请求, 该 侧逻辑上进入短路径等待恢复状态, 否则进行步骤 873; Step 872: Remove the WTR from the pending queue, change the current request to a pending request, and the side logically enters the short path waiting for recovery state, otherwise proceed to step 873;
步骤 873: 该侧物理上进入非切换状态 , 并将当前请求更改为空请 求, 该侧逻辑上进入空闲状态。 Step 873: The side physically enters a non-switching state, and changes the current request to an empty request, and the side logically enters an idle state.
第七种处理方案如图 9所示: 当环网上节点的一侧, 逻辑上处于短
路径等待恢复状态, 物理上处于切换状态时, 该侧定时向邻节点发送第 七请求, 向邻侧发送第六请求, 该侧接收来自本侧、 邻侧以及部节点的 请求, 并进行处理。 该处理方法有五种不同情况: The seventh processing scheme is shown in Figure 9. When one side of a node on the ring network is logically short, When the path is waiting for recovery, when it is physically in the switching state, the side periodically sends a seventh request to the neighboring node and a sixth request to the neighboring side. The side receives requests from the local side, the neighboring side, and the node and processes them. There are five different cases of this processing method:
第一种情况 910: 该侧接收到本侧故障请求, 其处理过程为: 步骤 911 : 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 本侧切换状态。 The first case 910: The side receives the fault request from the local side, and the processing process is as follows: Step 911: The current request is changed to the received new request, and the side logically enters the local side switching state.
第二种情况 920: 该侧接收到来自邻节点的短路径请求, 其处理过 程如下: Second case 920: The side receives a short path request from a neighboring node, and the process is as follows:
步骤 921 : 若接收到的新请求为空请求, 则执行步骤 922, 否则, 执行步骤 923; Step 921: If the received new request is an empty request, go to step 922, otherwise, go to step 923;
步骤 922: 该侧物理状态进入非切换状态 , 并将当前请求更改为空 请求, 该侧逻辑上进入空闲状态, 结束流程; Step 922: The physical state of the side enters a non-switching state, and the current request is changed to an empty request. The side logically enters an idle state and ends the process.
步骤 923: 若该侧接收到的新请求为 WTR, 则不做处理, 否则, 执 行步骤 924; Step 923: If the new request received by the side is WTR, no processing is performed, otherwise, step 924 is performed;
步骤 924: 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 短路径切换状态。 Step 924: The current request is changed to the received new request, and the side logically enters a short path switching state.
第三种情况 930: 该侧接收到来自邻节点的长路径请求, 其处理过 程为: Third case 930: The side receives a long path request from a neighboring node, and the process is as follows:
步骤 931 : 该侧物理状态进入非切换状态, 并将当前请求更改为所 接收到的新请求, 然后将所接收到的新请求转发到邻侧, 该侧逻辑上进 入穿过状态。 Step 931: The physical state of the side enters a non-switching state, changes the current request to a received new request, and then forwards the received new request to the neighboring side, and the side logically enters the through state.
第四种情况 940: 该侧接收到来自邻侧的长路径请求, 其处理过程 为: Fourth case 940: The side receives a long path request from the neighboring side, and the processing process is as follows:
步骤 941 : 若所接收到的新请求为 WTR, 则不做处理, 否则, 执行 步骤 942;
步骤 942: 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 邻侧切换状态。 Step 941: If the received new request is WTR, no processing is performed, otherwise, step 942 is performed; Step 942: The current request is changed to the received new request, and the side logically enters a neighboring-side switching state.
第五种情况 950: 该侧接收到来自邻侧的短路径请求, 其处理过程 为: Fifth case 950: The side receives a short path request from the neighboring side, and the process is as follows:
步驟 951: 立即向邻侧发送一个邻侧长路径请求, 并保持状态不变。 第六种情况 960: 该侧接收到邻侧转发的长路径请求, 其处理过程 为: Step 951: Immediately send a neighbor long path request to the neighbor, and keep the state unchanged. The sixth case 960: The side receives the long path request forwarded by the neighboring side, and the processing process is as follows:
步骤 961: 该侧物理状态进入非切换状态, 并将当前请求更改为所 接收到的新请求, 然后将所接收到的新请求向邻节点转发, 该侧逻辑上 进入穿过状态。 Step 961: The physical state of the side enters a non-switching state, and changes the current request to a received new request, and then forwards the received new request to a neighboring node, and the side logically enters a through state.
第八种处理方案如图 10所示: 当环网上节点的一侧, 逻辑上处于 邻侧等待恢复状态, 物理上处于切换状态时, 该侧定时向邻节点发送第 六请求, 该侧接收来自本侧、 邻侧以及邻节点的请求, 并进行处理。 该 处理过程有六种不同情况: The eighth processing scheme is shown in FIG. 10: When one side of a node on a ring network is logically in a state of waiting for recovery and is physically in a switching state, the side periodically sends a sixth request to the neighboring node. Requests from the local side, neighboring sides, and neighboring nodes are processed. There are six different situations in this process:
笫一种情况 1010: 该侧接收到本侧故障请求, 其处理过程为: 步骤 1011: 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 本侧切换状态。 . 笫 A case 1010: The side receives the fault request from the side, and the processing process is as follows: Step 1011: The current request is changed to the new request received, and the side logically enters the state of the side switching. .
第二种情况 1020: 该侧接收到来自邻节点的短路径请求, 其处理过 程如下: The second case 1020: The side receives a short path request from a neighboring node, and the process is as follows:
步骤 1021 : 若所接收到的新请求为 IDLE请求, 则不做处理, 否则, 执行步骤 1022; Step 1021: If the received new request is an IDLE request, no processing is performed, otherwise, step 1022 is performed;
步骤 1022: 若所接收到的新请求为空请求, 则执行步骤 1023 , 否 则, 执行步驟 1024; Step 1022: If the received new request is an empty request, go to step 1023, otherwise, go to step 1024;
步骤 1023: 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 短路径等待恢复状态, 结束流程;
步骤 1024: 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 短路径切换状态。 Step 1023: Change the current request to the received new request, and the side logically enters the short path waiting for recovery state, and ends the process; Step 1024: The current request is changed to the received new request, and the side logically enters a short path switching state.
第三种情况 1030: 该侧接收到来自邻节点的长路径请求, 其处理过 程为: Third case 1030: The side receives a long path request from a neighboring node, and the process is as follows:
步骤 1031 : 若所接收到的新请求为 WTR, 则不做处理, 否则, 执 行步骤 1032; Step 1031: If the received new request is WTR, no processing is performed, otherwise, step 1032 is performed;
步骤 1032: 该侧物理状态进入非切换状态, 并将当前请求更改为所 接收到的新请求, 然后将所接收到的新请求转发到邻侧, 该侧逻辑上进 入穿过状态。 Step 1032: The physical state of the side enters a non-switching state, changes the current request to a new request received, and then forwards the received new request to the neighboring side, and the side logically enters the through state.
第四种情况 1040: 该侧接收到来自邻侧的长路径请求, 其处理过程 为: Case 440: The side receives the long path request from the neighboring side, and the processing process is as follows:
步骤 1041 : 若所接收到的新请求为 WTR, 则不做处理, 否则, 执 行步驟 1042; Step 1041: If the received new request is WTR, no processing is performed, otherwise, step 1042 is performed;
步骤 1042: 将当前请求更改为所接收到的新请求, 该侧逻辑上进入 邻侧切换状态。 Step 1042: The current request is changed to the received new request, and the side logically enters a neighboring-side switching state.
第五种情况 1050: 该侧接收到来自邻侧的短路径请求, 其处理过程 为: Fifth case 1050: The side receives a short path request from the neighboring side, and the processing process is as follows:
步骤 1051 : 该侧物理状态进入非切换状态, 将当前请求更改为空请 求, 该侧逻辑上进入空闲状态。 Step 1051: The physical state of the side enters a non-switching state, changes the current request to an empty request, and the side logically enters the idle state.
第六种情况 1060: 该侧接收到邻侧转发的长路径请求, 其处理过程 为: Case 660: The side receives the long path request forwarded by the neighboring side, and the processing process is as follows:
步骤 1061 : 该侧物理状态进入非切换状态, 并将当前请求更改为所 接收到的新请求, 然后将所接收到的新请求向下一节点转发, 该侧逻辑 上进入穿过状态。 Step 1061: The physical state of the side enters a non-switching state, changes the current request to a received new request, and then forwards the received new request to the next node, and the side logically enters the through state.
以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围
并不局限于此, 任何熟悉该技术的人在本发明所揭露的技术范围内, 可 轻易想到的变化或替换, 都应涵盖在本发明的保护范围之内。
The above are only the preferred embodiments of the present invention, but the protection scope of the present invention It is not limited to this, any changes or replacements that can be easily conceived by anyone familiar with the technology within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.