[go: up one dir, main page]

CN101184013B - Method for preventing generation of loop, host node and system - Google Patents

Method for preventing generation of loop, host node and system Download PDF

Info

Publication number
CN101184013B
CN101184013B CN2007101794484A CN200710179448A CN101184013B CN 101184013 B CN101184013 B CN 101184013B CN 2007101794484 A CN2007101794484 A CN 2007101794484A CN 200710179448 A CN200710179448 A CN 200710179448A CN 101184013 B CN101184013 B CN 101184013B
Authority
CN
China
Prior art keywords
port
health detection
secondary port
detection message
host node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2007101794484A
Other languages
Chinese (zh)
Other versions
CN101184013A (en
Inventor
王明辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2007101794484A priority Critical patent/CN101184013B/en
Publication of CN101184013A publication Critical patent/CN101184013A/en
Application granted granted Critical
Publication of CN101184013B publication Critical patent/CN101184013B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

本发明公开了一种避免产生环路的方法,该方法包括:以太环网上的主节点在主端口和副端口上发送健康检测报文,如果仅在主端口和副端口中的一个上接收到健康检测报文,则主节点使副端口处于阻塞状态。本发明同时还公开了一种主节点以及一种避免产生环路的系统。本发明避免了在以太环网出现单通故障时产生环路的缺点。

Figure 200710179448

The invention discloses a method for avoiding loops. The method includes: a master node on an Ethernet ring network sends a health detection message on a master port and a slave port, and if only one of the master port and the slave port receives a health detection message, the master node makes the secondary port in a blocked state. The invention also discloses a master node and a system for avoiding loops. The invention avoids the shortcoming of a loop when a single-pass failure occurs in the Ethernet ring network.

Figure 200710179448

Description

一种避免产生环路的方法、主节点和系统 A method, master node and system for avoiding loops

技术领域technical field

本发明涉及以太环网技术,特别是涉及一种避免产生环路的方法、主节点和系统。 The invention relates to the Ethernet ring network technology, in particular to a method, a master node and a system for avoiding loops. the

背景技术Background technique

图1是单个以太环网的结构示意图。参见图1,在单个以太环网中,包括一个主节点和多个传输节点,主节点与各个传输节点在以太环网上传输业务数据,完成各种业务功能。 FIG. 1 is a schematic structural diagram of a single Ethernet ring network. Referring to Fig. 1, a single Ethernet ring network includes a master node and multiple transmission nodes, and the master node and each transmission node transmit service data on the Ethernet ring network to complete various service functions. the

参见图1,由于以太环网是一个环状网络结构,因此,需要防止产生环路,从而避免未知单播和广播在环路上循环传输所导致的广播风暴。为了避免以太环网产生环路,在正常状态下,主节点只打开自身一侧的主端口,并阻塞自身另一侧的副端口。这样,在传输业务数据时,以太环网则是一个链状,而不会产生环路。 Referring to FIG. 1 , since the Ethernet ring network is a ring network structure, it is necessary to prevent loops, thereby avoiding broadcast storms caused by unknown unicasts and broadcasts being circulated on the ring. In order to avoid loops in the Ethernet ring network, under normal conditions, the master node only opens the primary port on one side of itself, and blocks the secondary port on the other side of itself. In this way, when transmitting service data, the Ethernet ring network is a chain without loops. the

主节点需要负责对以太环网上各个传输节点和链路的状态进行监控,以保证以太环网正常工作。目前,保证以太环网正常工作的过程包括:主节点通过主端口周期性地发送健康检测报文,通常称为HELLO报文,如果主节点在连续三个周期内能够从自身的副端口上接收到该HELLO报文,那么,主节点确定当前以太环网上所有的传输节点和链路均正常,因此,无需进行故障处理,即主节点保持主端口打开且副端口阻塞;在环网出现故障时,感知到该故障的传输节点会向主节点上报故障通知报文,主节点接收到故障通知报文后,判定当前以太环网上的一个传输节点或链路不可用,因此,需要进行故障处理,即主节点打开副端口。 The master node needs to be responsible for monitoring the status of each transmission node and link on the Ethernet ring network to ensure the normal operation of the Ethernet ring network. At present, the process of ensuring the normal operation of the Ethernet ring network includes: the master node periodically sends health detection messages through the main port, usually called HELLO messages. If the master node can receive When the HELLO message is received, the master node determines that all the transmission nodes and links on the current Ethernet ring network are normal, so there is no need to troubleshoot, that is, the master node keeps the main port open and the secondary port is blocked; when the ring network fails , the transit node that senses the fault will report a fault notification message to the master node. After receiving the fault notification message, the master node determines that a transit node or link on the current Ethernet ring network is unavailable. Therefore, fault handling is required. That is, the primary node opens the secondary port. the

在实际的业务实现中,有的环网故障不是由于链路状态变化造成的,这时各节点的端口状态没有变化,所以无法直接感知故障发生。此时,主节点从主端口周期性发送HELLO报文后,就无法在指定的连续三个周期内从副端口接收到HELLO报文,来感知环网故障。造成此种情况的原因可能是以太环网中两个节点之间的光纤链路单通故障,也可能使某节点内部的交换芯片故障。这两种情况都有可能会出现单通故障。单通故障是指在两个节点之间的双向链路中,一个方向的链路正常,另一个方向的链路故障。比如,参见图2,在传输节点2与传输节点3之间的双向链路中,正向链路1出现故障,而反向链路2正常(为便于描述,在本文中,正向是指从主节点的主端口沿环网到达副端口的方向,反向是指从主节点的副端口沿环网到达主端口的方向),此时,则出现了以太环网正向断路而反向通路的单通故障,当主节点从主端口发送HELLO报文时,则无法从副端口接收到。In actual service implementation, some ring network failures are not caused by link status changes. At this time, the port status of each node does not change, so the failure cannot be directly perceived. At this time, after the master node periodically sends the HELLO message from the primary port, it cannot receive the HELLO message from the secondary port within the specified three consecutive periods to sense the ring network fault. The cause of this situation may be the single-pass failure of the optical fiber link between two nodes in the Ethernet ring network, or the failure of the switching chip inside a certain node. In both cases there is a possibility of a single-pass failure. A unidirectional failure refers to a bidirectional link between two nodes in which the link in one direction is normal and the link in the other direction is faulty. For example, referring to Figure 2, in the bidirectional link between transit node 2 and transit node 3, forward link 1 fails, while reverse link 2 is normal (for the convenience of description, in this article, forward refers to The direction from the main port of the master node to the secondary port along the ring network, the reverse direction refers to the direction from the secondary port of the master node to the main port along the ring network), at this time, there is a forward disconnection of the Ethernet ring network and a reverse For single-pass failure of the path, when the master node sends a HELLO packet from the primary port, it cannot receive it from the secondary port.

由于在现有技术中,只要主节点没有接收到自身发送的健康检测报文即HELLO报文,就会同时打开主端口和副端口,因此,当发生单通故障时,则会使得以太环网产生一个方向的环路,从而会出现未知单播和广播在该环路上循环传输所导致的广播风暴。 Because in the prior art, as long as the master node does not receive the health detection message sent by itself, that is, the HELLO message, the primary port and the secondary port will be opened at the same time. Therefore, when a single-way failure occurs, the Ethernet ring network A loop in one direction is generated, and a broadcast storm caused by unknown unicast and broadcast transmission on the loop occurs. the

发明内容Contents of the invention

本发明的目的在于提供一种避免产生环路的方法、一种主节点、以及一种避免产生环路的系统,以便于避免以太环网产生环路。 The object of the present invention is to provide a method for avoiding loops, a master node, and a system for avoiding loops, so as to avoid loops in the Ethernet ring network. the

为了达到上述目的,本发明的技术方案是这样实现的: In order to achieve the above object, technical scheme of the present invention is achieved in that:

一种避免产生环路的方法,应用于具有环状网络结构的以太环网,该以太网环中包括主节点以及多于一个的传输节点,主节点与各个传输节点在以太环网上传输业务数据,完成各种业务功能,并且,主节点负责对以太环网上各个传输节点和链路的状态进行监控,该方法包括: A method for avoiding loops, applied to an Ethernet ring network with a ring network structure, the Ethernet ring includes a master node and more than one transmission node, and the master node and each transmission node transmit business data on the Ethernet ring network , to complete various business functions, and the master node is responsible for monitoring the status of each transmission node and link on the Ethernet ring network, the method includes:

以太环网上的主节点在主端口和副端口上发送健康检测报文,如果仅在主端口和副端口中的一个上接收到健康检测报文,而在另一个上未接收到健康检测报文,则主节点使副端口处于阻塞状态; The master node on the Ethernet ring network sends health detection packets on the primary port and the secondary port. , the master node keeps the secondary port in a blocked state;

其中,所述主节点在主端口和副端口上发送健康检测报文的步骤包括:所述主节点处于完整状态,副端口阻塞,主节点在主端口上周期性发送健康检测报文,如果在副端口上未接收到来自主端口的健康检测报文,则在副端口上发送健康检测报文; Wherein, the step of the primary node sending the health detection message on the primary port and the secondary port includes: the primary node is in a complete state, the secondary port is blocked, and the primary node periodically sends the health detection message on the primary port. If the health detection message from the main port is not received on the secondary port, the health detection message is sent on the secondary port;

所述仅在主端口和副端口中的一个上接收到健康检测报文为:在副端口上未接收到来自主端口的健康检测报文,在主端口上接收到来自副端口的健康检测报文; The health detection message received on only one of the main port and the secondary port is: the health detection message from the main port is not received on the secondary port, and the health detection message from the secondary port is received on the primary port ;

所述主节点使副端口处于阻塞状态包括:主节点保持副端口的阻塞状态。 The master node making the secondary port in the blocked state includes: the master node keeps the secondary port in the blocked state. the

一种主节点,位于具有环状网络结构的以太环网中,该以太网环中包括主节点以及多于一个的传输节点,主节点与各个传输节点在以太环网上传输业务数据,完成各种业务功能,并且,主节点负责对以太环网上各个传输节点和链路的状态进行监控,包括: A master node is located in an Ethernet ring network with a ring network structure. The Ethernet ring includes a master node and more than one transmission node. The master node and each transmission node transmit business data on the Ethernet ring network to complete various Business functions, and the master node is responsible for monitoring the status of each transmission node and link on the Ethernet ring network, including:

环路检测单元,用于在切换到完整状态时,通知副端口控制单元阻塞副端口,并在主端口上周期性发送健康检测报文,如果在副端口上未接收到来自主端口的健康检测报文,则在副端口上发送健康检测报文,如果在主端口上接收到来自副端口的健康检测报文,则确定所述的检测到仅在主端口和副端口中的一个上接收到健康检测报文,并执行所述的向副端口控制单元发送阻塞通知的处理; The loop detection unit is used to notify the secondary port control unit to block the secondary port when switching to the complete state, and periodically send health detection packets on the primary port. If the secondary port does not receive the health detection packet from the primary port If the health detection message is sent on the secondary port, if the health detection message from the secondary port is received on the primary port, it is determined that the health detection message is only received on one of the primary port and the secondary port. Detect the message, and perform the processing of sending the blocking notification to the secondary port control unit;

副端口控制单元,用于在接收到阻塞通知后,使副端口处于阻塞状态。 The secondary port control unit is configured to make the secondary port in a blocking state after receiving the blocking notification. the

一种避免产生环路的系统,该系统包括多个传输节点以及本发明提出的主节点。 A system for avoiding loops, the system includes multiple transmission nodes and the master node proposed by the present invention. the

由此可见,在本发明中,主节点在主端口和副端口两个端口上发送健康检测报文,这样,如果仅在一个端口上接收到来自另一个端口的健康检测报文,那么则可以确定以太环网出现单通故障,并且,主端口阻塞副端口。这样则避免了现有技术中在以太环网出现单通故障时产生环路的缺点,从而避免了未知单播和广播在环路上循环传输所导致的广播风暴。 It can be seen that, in the present invention, the master node sends the health detection message on the two ports of the primary port and the secondary port, so if only one port receives the health detection message from another port, then it can be It is determined that a single-pass fault occurs on the Ethernet ring network, and the primary port blocks the secondary port. In this way, the disadvantage of a loop in the prior art when a single-way fault occurs in the Ethernet ring network is avoided, thereby avoiding a broadcast storm caused by unknown unicasts and broadcasts being transmitted cyclically on the loop. the

另外,在本发明中,由于利用了设备所支持的现有协议的健康检测报文来检测以太环网是否出现单通故障,因此,无需对设备进行复杂的升级过程,便于业务的实现和推广。 In addition, in the present invention, since the health detection message of the existing protocol supported by the device is used to detect whether there is a single-pass failure in the Ethernet ring network, there is no need to perform a complicated upgrade process on the device, which facilitates the realization and promotion of services . the

附图说明Description of drawings

图1是单个以太环网的结构示意图。 FIG. 1 is a schematic structural diagram of a single Ethernet ring network. the

图2是以太环网出现单通故障的示意图。 FIG. 2 is a schematic diagram of a single-pass fault occurring in an Ethernet ring network. the

图3是在本发明一个实施例中避免产生环路的流程图。 Fig. 3 is a flow chart of avoiding loops in one embodiment of the present invention. the

图4是在本发明一个实施例中以太环网上的主节点的结构示意图。 Fig. 4 is a schematic structural diagram of a master node on an Ethernet ring network in an embodiment of the present invention. the

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面结合附图及具体实施例对本发明作进一步地详细描述。 In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. the

本发明提出了一种避免产生环路的方法。在该方法中,以太环网上的主节点在主端口和副端口上发送健康检测报文,如果仅在主端口和副端口中的一个上接收到健康检测报文,则主节点阻塞副端口。 The present invention proposes a method for avoiding loops. In this method, the master node on the Ethernet ring network sends a health detection message on the primary port and the secondary port, and if only one of the primary port and the secondary port receives the health detection message, the primary node blocks the secondary port. the

图3是在本发明一个实施例中避免产生环路的流程图。参见图3,在本发明一个实施例中,避免产生环路的过程具体包括以下步骤: Fig. 3 is a flow chart of avoiding loops in one embodiment of the present invention. Referring to Fig. 3, in one embodiment of the present invention, the process of avoiding a loop specifically includes the following steps:

步骤301:在主节点处于完整状态(COMPLETE STATE)时,主节点阻塞副端口并周期性地从主端口发送健康检测报文。 Step 301: When the master node is in a complete state (COMPLETE STATE), the master node blocks the secondary port and periodically sends a health detection message from the master port. the

在现有技术中,已经为主节点定义了完整状态,本步骤的处理与现有技术的相应过程相同。 In the prior art, the complete state of the master node has been defined, and the processing of this step is the same as the corresponding process in the prior art. the

需要说明的是,与现有技术中相同,在本流程中,在以太环网初始正常工作,即主节点处于完整状态时,各个传输节点会监测以太环网链路的状态,如果一个传输节点监测到一条相邻链路故障即以太环网出现断点后,则会向主节点发送故障通知,处于完整状态的主节点接收到故障通知后,可以确定以太环网出现了断路,则会切换到现有技术中已经定义的链路故障状态,在 切换到该状态时,主节点打开副端口,并仍从主端口周期性地发送健康检测报文。 It should be noted that, as in the prior art, in this process, when the Ethernet ring network initially works normally, that is, when the master node is in a complete state, each transmission node will monitor the status of the Ethernet ring network link. If a transmission node After monitoring an adjacent link failure, that is, a breakpoint in the Ethernet ring network, it will send a failure notification to the master node. After receiving the fault notification, the master node in the complete state can determine that the Ethernet ring network has a disconnection, and it will switch To the link failure state already defined in the prior art, when switching to this state, the master node opens the secondary port, and still periodically sends health detection messages from the master port. the

步骤302:在处于完整状态时,主节点判断是否能够从副端口上接收到来自主端口的健康检测报文,如果是,则返回步骤301,否则,执行步骤303。 Step 302: When in the complete state, the master node judges whether the health detection message from the master port can be received from the slave port, if yes, return to step 301, otherwise, execute step 303. the

主节点判断是否能够从副端口上接收到来自主端口的健康检测报文的方式为:判断在连续多个周期如3个周期内,是否能够从副端口上接收到来自主端口的健康检测报文。 The way for the master node to judge whether it can receive the health detection message from the main port from the secondary port is to judge whether it can receive the health detection message from the main port from the secondary port in multiple consecutive cycles such as 3 cycles. the

本步骤中,主节点通过判断是否能够从副端口上接收到来自主端口的健康检测报文,可以确定出以太环网正向链路的状态。当不能接收到时,可以确定以太环网正向断路,按照现有技术的处理方式,由于主节点处于完整状态,其副端口被阻塞,因此为了保证后续业务数据的传输,主节点应该打开副端口。然而此种情况下,由于仅仅确定出了以太环网正向链路断路,还没有确定以太环网反向链路的状态,因此,还需要执行后续步骤的处理(即刻反向发送一次健康检测报文),以便于根据确定的以太环网反向链路的状态,来决定是否打开副端口。 In this step, the master node can determine the state of the forward link of the Ethernet ring network by judging whether the health detection message from the master port can be received from the slave port. When it cannot be received, it can be determined that the Ethernet ring network is disconnected in the forward direction. According to the processing method of the prior art, because the master node is in a complete state, its secondary port is blocked. Therefore, in order to ensure the transmission of subsequent business data, the master node should open the secondary port. port. However, in this case, since only the disconnection of the forward link of the Ethernet ring network has been determined, and the status of the reverse link of the Ethernet ring network has not been determined, it is necessary to perform subsequent steps (immediately send a health check in the reverse direction) message), so as to decide whether to open the secondary port according to the determined state of the reverse link of the Ethernet ring network. the

当可以接收到时,可以确定以太环网正向通路,由于当前主节点处于完整状态,其副端口被阻塞,以太环网不会产生环路,因此,可以返回步骤301继续执行检测以太环网正向链路状态的过程。 When it can be received, the forward path of the Ethernet ring network can be determined. Since the current master node is in a complete state, its secondary port is blocked, and the Ethernet ring network will not generate a loop. Therefore, you can return to step 301 and continue to detect the Ethernet ring network. Forward link state process. the

步骤303:主节点从副端口发送健康检测报文,判断是否能够从主端口上接收到来自副端口的健康检测报文,如果是,则执行步骤304,否则,执行步骤307。 Step 303: The master node sends a health detection message from the secondary port, and judges whether the health detection message from the secondary port can be received from the primary port. If yes, perform step 304; otherwise, perform step 307. the

判断是否能够从主端口上接收到来自副端口的健康检测报文的方式可以为:判断在1个周期内,是否从主端口上接收到来自副端口的健康检测报文。此处,仅判断在1个周期内是否收到来自副端口的健康检测报文,是为了最大程度地减少检测的次数,提高处理速度,从而在发生单通故障时,能够快速反应。 The manner of judging whether the health detection message from the secondary port can be received from the primary port may be: judging whether the health detection message from the secondary port is received from the primary port within one cycle. Here, only judging whether a health detection message from the secondary port is received within one cycle is to minimize the number of detections and improve the processing speed, so that when a single-pass failure occurs, it can respond quickly. the

本步骤中,主节点通过判断是否能够从主端口上接收到来自副端口的健 康检测报文,可以确定出以太环网反向链路的状态。由于执行本步骤时,已经确定出以太环网正向链路断路,因此,如果在主端口上不能接收到来自副端口的健康检测报文,即以太环网反向断路,那么,则可以确定以太环网出现断点,为了保证后续业务数据的传输,需要执行后续步骤307中主节点打开副端口的处理;如果在主端口上可以接收到来自副端口的健康检测报文,即以太环网反向通路,那么,则可以确定以太环网出现单通故障,不能执行现有技术中打开副端口的处理,否则,会导致以太环网反向链路产生环路,因此,继续执行步骤304。 In this step, the master node can determine the state of the reverse link of the Ethernet ring network by judging whether it can receive the health detection message from the secondary port from the master port. Since the forward link of the Ethernet ring network has been determined to be disconnected when this step is performed, if the health detection message from the secondary port cannot be received on the primary port, that is, the reverse circuit of the Ethernet ring network is disconnected, then it can be determined There is a breakpoint in the Ethernet ring network. In order to ensure the transmission of subsequent business data, it is necessary to perform the processing of the master node opening the secondary port in the subsequent step 307; if the health detection message from the secondary port can be received on the primary port, that is, the Ethernet ring network Reverse path, then, it can be determined that a single-pass failure occurs in the Ethernet ring network, and the processing of opening the secondary port in the prior art cannot be performed, otherwise, a loop will be caused on the reverse link of the Ethernet ring network, so continue to execute step 304 . the

步骤304:主节点切换到预先定义的链路单通状态(SINGLE-PASSSTATE)。 Step 304: The master node switches to a pre-defined link single-pass state (SINGLE-PASSSTATE). the

在现有技术中,只为主节点定义了上述的完整状态和链路故障状态。并且,通过上述步骤301至步骤303的处理,可以在主节点处于完整状态时,检测出以太环网是否发生单通故障。较佳地,为了保证主节点在其他情况下也能够检测出以太环网是否发生单通故障,本实施例中,为主节点定义了本步骤中的链路单通状态以及下述步骤307中的轮询错误状态。 In the prior art, only the above complete state and link failure state are defined for the master node. Moreover, through the processing of the above steps 301 to 303, it is possible to detect whether a single-way failure occurs in the Ethernet ring network when the master node is in a complete state. Preferably, in order to ensure that the master node can also detect whether a single-pass failure occurs in the Ethernet ring network under other circumstances, in this embodiment, the master node defines the link single-pass state in this step and the following step 307 The polling error status of . the

步骤305:在处于链路单通状态时,主节点阻塞副端口,并在主端口和副端口上分别周期性发送健康检测报文。 Step 305: When the link is in the single-pass state, the master node blocks the secondary port, and periodically sends health detection messages on the primary port and the secondary port respectively. the

步骤306:在处于链路单通状态时,主节点判断是否能够分别从主端口和副端口上接收到健康检测报文,如果在主端口和副端口上均可接收到健康检测报文,则切换到所述完整状态,返回步骤301,如果在主端口和副端口上均未接收到健康检测报文,则执行步骤307,如果仅在主端口和副端口的一个上接收到健康检测报文,则返回步骤305。 Step 306: When the link is in the single-pass state, the master node judges whether the health detection message can be received from the primary port and the secondary port respectively. If the health detection message can be received on both the primary port and the secondary port, then Switch to the complete state, return to step 301, if no health detection message is received on the primary port and the secondary port, then perform step 307, if only one of the primary port and the secondary port receives the health detection message , return to step 305. the

在上述步骤305和步骤306中,当主节点处于链路单通状态时,主节点需要阻塞副端口,以避免以太环网产生环路。较佳地,当主节点处于链路单通状态时,主节点还在主端口和副端口上分别周期性发送健康检测报文,是为了在以太环网的正向链路或反向链路发生变化时,能够及时对主节点的状态和副端口是否阻塞进行调整。 In the above step 305 and step 306, when the master node is in the link unidirectional state, the master node needs to block the secondary port to avoid loops in the Ethernet ring network. Preferably, when the master node is in the link single-pass state, the master node also periodically sends health detection messages on the primary port and the secondary port respectively, in order to generate When changes, the status of the primary node and whether the secondary port is blocked can be adjusted in time. the

如果在主端口和副端口上均可接收到健康检测报文,那么则说明以太环网正向链路和反向链路均为通路,以太环网已经恢复到正常工作,因此,需要切换到完整状态。如果在主端口和副端口上均未接收到健康检测报文,那么,则说明以太环网出现断点,为了保证后续业务数据的传输,主节点应该执行后续步骤中主节点打开副端口的处理。如果仅在主端口和副端口的一个上接收到健康检测报文,则说明以太环网仍然存在单通故障,也就是说,主节点当前的状态仍然为链路单通状态,因此,应返回步骤305继续执行链路单通状态时的处理。 If the health detection message can be received on both the primary port and the secondary port, it means that the forward link and the reverse link of the Ethernet ring network are all paths, and the Ethernet ring network has returned to normal operation. Therefore, it is necessary to switch to complete state. If no health detection message is received on the primary port and the secondary port, it means that there is a breakpoint in the Ethernet ring network. In order to ensure the transmission of subsequent business data, the master node should perform the processing of the master node opening the secondary port in the subsequent steps. . If only one of the primary port and the secondary port receives the health detection message, it means that there is still a unidirectional fault in the Ethernet ring network, that is to say, the current state of the master node is still the link unidirectional state, so it should return Step 305 continues to execute the processing when the link is in the single-pass state. the

步骤307:主节点切换到预先定义的轮询错误状态。 Step 307: The master node switches to a predefined polling error state. the

步骤308:在处于轮询错误状态时,主节点打开副端口,并在主端口和副端口上分别周期性发送健康检测报文。 Step 308: When in the polling error state, the master node opens the secondary port, and periodically sends health detection messages on the primary port and the secondary port respectively. the

步骤309:在处于轮询错误状态时,主节点判断是否能够分别从主端口和副端口上接收到健康检测报文,如果在主端口和副端口上均可接收到健康检测报文,则切换到所述完整状态,返回步骤301,如果仅在主端口和副端口中的一个上接收到健康检测报文,则返回步骤304,如果在主端口和副端口上均未接收到健康检测报文,则返回步骤308。 Step 309: When in the polling error state, the master node judges whether the health detection message can be received from the primary port and the secondary port respectively, and if the health detection message can be received on both the primary port and the secondary port, switch To the complete state, return to step 301, if a health detection message is only received on one of the primary port and the secondary port, then return to step 304, if no health detection message is received on the primary port and the secondary port , return to step 308. the

在上述步骤307至步骤309中,当主节点处于轮询错误状态时,以太环网两个方向均断路,主节点需要打开副端口,以保证业务数据的传输。较佳地,当主节点处于轮询错误状态时,主节点还在主端口和副端口上分别周期性发送健康检测报文,是为了在以太环网的正向链路或反向链路发生变化后,能够及时对主节点的状态和副端口是否阻塞进行调整。 In the above step 307 to step 309, when the master node is in the polling error state, both directions of the Ethernet ring network are disconnected, and the master node needs to open the secondary port to ensure the transmission of business data. Preferably, when the master node is in the polling error state, the master node also periodically sends health detection messages on the primary port and the secondary port respectively, in order to change the forward link or reverse link of the Ethernet ring network. After that, the state of the primary node and whether the secondary port is blocked can be adjusted in time. the

如果在主端口和副端口上均可接收到健康检测报文,那么则说明以太环网正向链路和反向链路均为通路,以太环网已经恢复到正常工作,因此,需要切换到完整状态。如果仅在主端口和副端口的一个上接收到健康检测报文,那么,则说明以太环网出现单通故障,需要转向执行步骤304中避免以太环网产生环路的处理。如果在主端口和副端口上均未接收到健康检测报文,则说明以太环网仍然存在轮询错误,也就是说,主节点当前的状态仍然 为轮询错误状态,因此,应返回步骤308继续执行轮询错误状态时的处理。 If the health detection message can be received on both the primary port and the secondary port, it means that the forward link and the reverse link of the Ethernet ring network are all paths, and the Ethernet ring network has returned to normal operation. Therefore, it is necessary to switch to complete state. If the health detection message is received on only one of the primary port and the secondary port, then it indicates that a single-pass fault occurs in the Ethernet ring network, and it is necessary to turn to the process of avoiding loops in the Ethernet ring network in step 304 . If the health detection message is not received on the primary port and the secondary port, it means that there is still a polling error in the Ethernet ring network, that is to say, the current state of the master node is still in the polling error state, so it should return to step 308 Processing continues when polling for error status. the

需要说明的是,上述图3所示流程只是本发明一个较佳的实施例。本领域技术人员可以理解,在主节点能够正常工作的情况下,主节点可以不必局限于上述图3中主节点状态和以太环网链路状态的考虑,可以随时执行在主端口和副端口上发送健康检测报文、判断是否仅在一个端口上接收到健康检测报文的处理,来确定以太环网的单通故障,从而使副端口处于阻塞状态,避免以太环网产生环路的处理。比如,在主节点检测到在副端口上未接收到来自主端口的健康检测报文并打开副端口后,主节点分别周期性地在主端口和副端口上发送健康检测报文;如果仅在任意一个端口上接收到健康检测报文,那么,主节点执行阻塞副端口的处理。 It should be noted that the process shown in FIG. 3 above is only a preferred embodiment of the present invention. Those skilled in the art can understand that, in the case that the master node can work normally, the master node does not need to be limited to the consideration of the master node state and the Ethernet ring network link state in the above-mentioned Figure 3, and can execute on the master port and the slave port at any time. The process of sending health detection messages and judging whether the health detection messages are received on only one port to determine the single-pass failure of the Ethernet ring network, so that the secondary port is in a blocked state, and the processing of avoiding loops in the Ethernet ring network. For example, after the master node detects that the health detection message from the main port is not received on the secondary port and opens the secondary port, the master node periodically sends the health detection message on the primary port and the secondary port respectively; When a health detection message is received on a port, the master node performs the processing of blocking the secondary port. the

可以理解的是,虽然上述实施例中,为便于理解,对方法的步骤采用了顺序性描述,但是应当指出的是,对于上述步骤的顺序并不做严格的限制。 It can be understood that, although in the above embodiments, the steps of the method are described sequentially for ease of understanding, it should be noted that there is no strict limitation on the sequence of the above steps. the

本领域普通技术人员还可以理解,上述实施例中的全部或部分步骤可以通过程序来指令相关的硬件来实现,所述的程序可以存储于一计算机可读取存储介质中,所述的存储介质,可以是ROM/RAM、磁碟、光盘等。 Those of ordinary skill in the art can also understand that all or part of the steps in the above embodiments can be implemented by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium , can be ROM/RAM, disk, CD, etc. the

相应地,本发明还提出了一种主节点。图4是在本发明一个实施例中以太环网上的主节点的结构示意图。参见图4,该主节点包括: Correspondingly, the present invention also proposes a master node. Fig. 4 is a schematic structural diagram of a master node on an Ethernet ring network in an embodiment of the present invention. See Figure 4, the master node includes:

环路检测单元,用于通过主端口和副端口发送健康检测报文,如果检测到仅在主端口和副端口中的一个上接收到健康检测报文,则向副端口控制单元发送阻塞通知; The loop detection unit is used to send a health detection message through the primary port and the secondary port, and if it is detected that the health detection message is only received on one of the primary port and the secondary port, a blocking notification is sent to the secondary port control unit;

副端口控制单元,用于在接收到阻塞通知后,阻塞副端口。 The secondary port control unit is configured to block the secondary port after receiving the blocking notification. the

较佳地,所述环路检测单元的上述处理具体可以是:在切换到完整状态时,通知副端口控制单元阻塞副端口,并在主端口上周期性发送健康检测报文,如果在副端口上未接收到来自主端口的健康检测报文,则在副端口上发送健康检测报文,在主端口上接收到来自副端口的健康检测报文后,执行所述的向副端口控制单元发送阻塞通知的处理。 Preferably, the above-mentioned processing of the loop detection unit may specifically be: when switching to the complete state, notify the secondary port control unit to block the secondary port, and periodically send health detection messages on the primary port, if the secondary port If the health detection message from the primary port is not received on the main port, the health detection message is sent on the secondary port. Handling of notifications. the

较佳地,所述环路检测单元,进一步用于在处于完整状态时,如果在副 端口上未接收到来自主端口的健康检测报文,在主端口上接收到来自副端口的健康检测报文,则切换到链路单通状态,在切换到链路单通状态后,执行所述的向副端口控制单元发送阻塞通知的处理,并进一步在处于链路单通状态时,在主端口和副端口上分别周期性发送健康检测报文,如果在主端口和副端口上均接收到健康检测报文,则切换到所述完整状态。 Preferably, the loop detection unit is further configured to receive a health detection message from the secondary port on the primary port if the secondary port does not receive a health detection message from the primary port when it is in a complete state , then switch to the link single-pass state, after switching to the link single-pass state, perform the processing of sending the blocking notification to the secondary port control unit, and further when in the link single-pass state, between the main port and the The secondary port periodically sends the health detection message, and if the primary port and the secondary port both receive the health detection message, then switch to the complete state. the

较佳地,所述环路检测单元,进一步用于在处于完整状态时,如果在主端口和副端口上均未接收到健康检测报文,则切换到轮询错误状态,在切换到轮询错误状态后,向副端口控制单元发送打开通知,并在主端口和副端口上分别周期性发送健康检测报文,如果在主端口和副端口上均接收到健康检测报文,则切换到所述完整状态,如果仅在主端口和副端口中的一个上接收到健康检测报文,则切换到所述链路单通状态; Preferably, the loop detection unit is further configured to switch to the polling error state if no health detection message is received on the primary port and the secondary port when it is in the complete state, and then switch to the polling error state. After the error state, send an open notification to the secondary port control unit, and periodically send health detection packets on the primary port and the secondary port respectively, if the health detection packets are received on both the primary port and the secondary port, switch to the The above complete state, if only one of the primary port and the secondary port receives a health detection message, then switch to the link single-pass state;

所述副端口控制单元,进一步用于在接收到打开通知后,打开副端口。 The secondary port control unit is further configured to open the secondary port after receiving the opening notification. the

较佳地,所述环路检测单元,进一步用于在处于链路单通状态时,如果在主端口和副端口上均未接收到健康检测报文,则切换到所述轮询错误状态。 Preferably, the loop detection unit is further configured to switch to the polling error state if neither the primary port nor the secondary port receives a health detection message when the link is in the one-way state. the

较佳地,所述环路检测单元,用于在检测到在副端口上未接收到来自主端口的健康检测报文并打开副端口后,分别周期性地在主端口和副端口上发送健康检测报文。 Preferably, the loop detection unit is configured to periodically send a health check on the primary port and the secondary port after detecting that the secondary port has not received a health detection message from the primary port and opening the secondary port. message. the

可以理解的是,附图中或实施例中所示仅仅是示意性的,表示逻辑结构,其中所述作为分离部件显示的单元可能是或者可能不是物理上分开的,作为单元显示的部件可能是或者可能不是物理单元,即可以位于一个地方,或者分布到几个网络单元上。 It can be understood that what is shown in the drawings or the embodiments is only schematic and represents a logical structure, wherein the units shown as separate components may or may not be physically separated, and the components shown as units may be Or it may not be a physical unit, ie it may be located in one place, or distributed over several network elements. the

另外,本发明还提出了一种避免产生环路的系统。该系统中包括多个传输节点以及主节点,其中,传输节点可以采用现有技术中的传输节点来实现,主节点可以采用本发明上述实施例中提出的任意一种主节点来实现。 In addition, the invention also proposes a system for avoiding loops. The system includes a plurality of transmission nodes and master nodes, wherein the transmission nodes can be realized by using the transmission nodes in the prior art, and the master nodes can be realized by any one of the master nodes proposed in the above-mentioned embodiments of the present invention. the

总之,以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改 进等,均应包含在本发明的保护范围之内。 In a word, the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. All within the spirit and principles of the present invention, any modifications, equivalent replacements, improvements, etc., should be included within the protection scope of the present invention. the

Claims (9)

1. method of avoiding producing loop, it is characterized in that, this method is applied to have the ethernet ring network of loop network structure, comprise host node in this Ethernet ring and more than one transmission node, host node and each transmission node service data transmission on ethernet ring network are finished the miscellaneous service function, and, host node is responsible for the state of each transmission node and link on the ethernet ring network is monitored, and comprising:
Host node on the ethernet ring network sends health detection message on Primary port and secondary port, if only receive health detection message in Primary port and secondary port, and on another, do not receive health detection message, then host node makes secondary port be in blocked state;
Wherein, described host node sends health detection message on Primary port and secondary port step comprises: described host node is in good working condition, secondary port block, host node periodically sends health detection message on master port, if on secondary port, do not receive health detection message, then on secondary port, send health detection message from master port;
Receiving health detection message on described only in Primary port and secondary port is: do not receive the health detection message from master port on secondary port, receive the health detection message from secondary port on master port;
Described host node makes secondary port be in blocked state to comprise: host node keeps the blocked state of secondary port.
2. method according to claim 1, it is characterized in that, only receive after the health detection message in Primary port and secondary port, further comprise: described host node switches to predefined link single-pass state, host node periodically sends health detection message respectively on Primary port and secondary port, if on Primary port and secondary port, all receive health detection message, then switch to described good working condition.
3. method according to claim 2, it is characterized in that, this method further comprises: all do not receive health detection message if be in the described host node of good working condition on Primary port and secondary port, then described host node switches to predefined plooing fault state, the open auxiliary port, and on Primary port and secondary port, periodically send health detection message respectively, if on Primary port and secondary port, all receive health detection message, then switch to described good working condition, if only receive health detection message in Primary port and secondary port, then switch to described link single-pass state, and carry out the processing of blocking secondary port.
4. method according to claim 3, it is characterized in that, when described host node is in link single-pass state, further comprise:, then switch to described plooing fault state if described host node does not all receive health detection message on Primary port and secondary port.
5. host node, it is characterized in that, be arranged in ethernet ring network with loop network structure, comprise host node in this Ethernet ring and more than one transmission node, host node and each transmission node service data transmission on ethernet ring network are finished the miscellaneous service function, and, host node is responsible for the state of each transmission node and link on the ethernet ring network is monitored, and comprising:
The loop detection unit, be used for when switching to good working condition, notify secondary port controlling unit to block secondary port, and periodicity sends health detection message on master port, if on secondary port, do not receive health detection message from master port, then on secondary port, send health detection message, if on master port, receive health detection message from secondary port, only then determine to detect and receive health detection message in Primary port and secondary port, and carry out the processing that sends congestion notification to secondary port controlling unit;
Secondary port controlling unit is used for after receiving congestion notification, makes secondary port be in blocked state.
6. host node according to claim 5, it is characterized in that, described loop detection unit, be further used for when being in good working condition, if on secondary port, do not receive health detection message from master port, on master port, receive health detection message from secondary port, then switch to link single-pass state, after switching to link single-pass state, carry out describedly sending the processing of congestion notification, and further when being in link single-pass state, on Primary port and secondary port, periodically send health detection message respectively to secondary port controlling unit, if on Primary port and secondary port, all receive health detection message, then switch to described good working condition.
7. host node according to claim 6, it is characterized in that, described loop detection unit, be further used for when being in good working condition, if on Primary port and secondary port, all do not receive health detection message, then switch to the plooing fault state, after switching to the plooing fault state, notice is opened in transmission to secondary port controlling unit, and on Primary port and secondary port, periodically send health detection message respectively, if on Primary port and secondary port, all receive health detection message, then switch to described good working condition, if only receive health detection message in Primary port and secondary port, then switch to described link single-pass state;
Described secondary port controlling unit, be further used for receive open notice after, the open auxiliary port.
8. host node according to claim 7 is characterized in that, described loop detection unit is further used for when being in link single-pass state, if all do not receive health detection message on Primary port and secondary port, then switches to described plooing fault state.
9. a system that avoids producing loop is characterized in that, this system comprises a plurality of transmission nodes and as any described host node in the claim 5 to 8.
CN2007101794484A 2007-12-13 2007-12-13 Method for preventing generation of loop, host node and system Expired - Fee Related CN101184013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101794484A CN101184013B (en) 2007-12-13 2007-12-13 Method for preventing generation of loop, host node and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101794484A CN101184013B (en) 2007-12-13 2007-12-13 Method for preventing generation of loop, host node and system

Publications (2)

Publication Number Publication Date
CN101184013A CN101184013A (en) 2008-05-21
CN101184013B true CN101184013B (en) 2011-04-13

Family

ID=39449107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101794484A Expired - Fee Related CN101184013B (en) 2007-12-13 2007-12-13 Method for preventing generation of loop, host node and system

Country Status (1)

Country Link
CN (1) CN101184013B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651596B (en) * 2009-09-27 2011-06-29 迈普通信技术股份有限公司 Method for accelerating switching during Ethernet automatic protection switching failure
CN101820376B (en) * 2010-02-04 2013-07-17 深圳市金宏威技术股份有限公司 Method and system for realizing rapid convergence in ring network
CN101873244B (en) * 2010-06-09 2012-10-10 神州数码网络(北京)有限公司 Automatic multi-loop protection method
CN102263658B (en) * 2011-06-21 2014-04-16 华为技术有限公司 Access network ring network monitoring method, access equipment and network system
CN105429892B (en) * 2015-10-29 2018-10-12 北京星网锐捷网络技术有限公司 A kind of method and apparatus of the anti-loops of Rail traffic network
CN105577484A (en) * 2016-03-01 2016-05-11 上海斐讯数据通信技术有限公司 EAPS failure detection method and system, and EAPS network
CN110912815B (en) * 2018-09-14 2022-07-05 中兴通讯股份有限公司 Network element ring formation preventing method, device, equipment and readable storage medium
CN120165996A (en) * 2025-05-20 2025-06-17 上海采日能源科技有限公司 Ethernet networking method, network module, program product, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785226B1 (en) * 1999-09-01 2004-08-31 Carriercomm, Inc. System and method for data routing over a network
CN1964307A (en) * 2005-11-07 2007-05-16 株式会社日立制作所 Transfer path system and frame transfer device in same system, transfer path handover method and system
CN101001192A (en) * 2007-01-17 2007-07-18 华为技术有限公司 Method, system and equipment for protecting ring network link

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785226B1 (en) * 1999-09-01 2004-08-31 Carriercomm, Inc. System and method for data routing over a network
CN1964307A (en) * 2005-11-07 2007-05-16 株式会社日立制作所 Transfer path system and frame transfer device in same system, transfer path handover method and system
CN101001192A (en) * 2007-01-17 2007-07-18 华为技术有限公司 Method, system and equipment for protecting ring network link

Also Published As

Publication number Publication date
CN101184013A (en) 2008-05-21

Similar Documents

Publication Publication Date Title
KR101204130B1 (en) Fault processing method, system and exchanging device based on industry ethernet network
JP5073812B2 (en) Distributed Ethernet system and method for detecting faults based on the system
CN101184013B (en) Method for preventing generation of loop, host node and system
CN101212366B (en) Failure detection method, system, and main node in Ethernet loop network
US9237092B2 (en) Method, apparatus, and system for updating ring network topology information
EP2243255B1 (en) Method and system for dynamic link failover management
CN101652963B (en) Method for reconfiguring a communications network
JP5471240B2 (en) Switch device, ring network system, communication control method, and device program
CN101958831B (en) Ethernet ring network failure recovery method, Ethernet ring network and switching equipment
JP2009206891A (en) Layer 2 ring network system and management method therefor
CN103684835A (en) Link fault reporting method and processing method, and transmission node and primary node
CN102158383B (en) Data transmission method, device and system for E1 bidirectional ring network
CN101436975B (en) A method, device and system for realizing rapid convergence in a ring network
CN101141366A (en) A Method to Avoid Data Loops in Ring Ethernet
CN101340346A (en) Ring control method and apparatus of Ethernet looped network system
CN107431655B (en) Method and apparatus for fault propagation in segmentation protection
CN102238067B (en) Switching method and device on Rapid Ring Protection Protocol (RRPP) ring
JP4544415B2 (en) Relay network system, node device, and failure notification method
JP4824773B2 (en) Ring network
JP4628945B2 (en) Layer 2 network
JP5004758B2 (en) Layer 2 network and network connection device
CN101641915B (en) Method for reconfiguring a communication network
JP2008544678A (en) Communication network system
US10033573B2 (en) Protection switching method, network, and system
CN103404091B (en) Service protecting method, equipment and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110413