WO2007107066A1 - A method and a communication device of the loopbacked detection based on ethernet - Google Patents
A method and a communication device of the loopbacked detection based on ethernet Download PDFInfo
- Publication number
- WO2007107066A1 WO2007107066A1 PCT/CN2006/003795 CN2006003795W WO2007107066A1 WO 2007107066 A1 WO2007107066 A1 WO 2007107066A1 CN 2006003795 W CN2006003795 W CN 2006003795W WO 2007107066 A1 WO2007107066 A1 WO 2007107066A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- loopback
- timer
- message
- port
- sending
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Definitions
- the present invention relates to the field of communications technologies, and in particular to a loopback detection method based on an Ethernet link and a communication device employing the same. Background technique
- PPP Point-to-point links
- HDLC Advanced Data Link Control Protocol
- Gigabit Ethernet Gigabit Ethernet
- the PPP protocol is a data link layer protocol that provides for the delivery and encapsulation of network layer packets over a point-to-point link.
- PPP is mainly composed of two types of protocols: Link Control Protocols (LCP) and Network Control Protocols (NCP).
- LCP Link Control Protocol
- NCP Network Control Protocols
- the link control protocol is mainly used to establish, tear down and monitor PPP data links; the network layer control protocol family is mainly used to negotiate the format and type of data packets transmitted on the data link.
- PPP needs to negotiate through the session: LCP negotiation, authentication, network layer negotiation.
- Ethernet technology has obvious advantages in addressing the bandwidth and capacity requirements of the network.
- the connection of the backbone network is developing in the direction of ultra-high speed and super capacity.
- Ethernet technology has always been the most popular method, with a huge network foundation and long-term insurance knowledge.
- Ethernet has the advantages of simple implementation, cost performance, scalability and high reliability.
- High-speed links use a large number of Gigabit Ethernet interfaces for fiber-optic interfaces for point-to-point transmission.
- Loopback testing is commonly used to check and analyze port or line problems. In fact, due to some accidents in various aspects such as design and construction, the link cannot be transmitted normally. There are some ways to confirm which part of the link is out of order.
- the loopback detection method of the cartridge can often quickly locate complex practical problems.
- FIG. 1 is a schematic diagram of a prior art PPP for loopback detection.
- the PPP protocol message can have a Magic Number, and the almost randomly generated magic word is added to the protocol message.
- the sender and the receiver of one interface a need to be connected to the receiver and the sender of the other interface b, so that the packet with the magic word sent by the PPP is sent. Go out and go back to the receiving port.
- PPP finds that the magic word in the received message is equal to the magic word it sent last time, it will perceive that the loopback is being performed at this time, and the interface will automatically enter the loopback state.
- loopback detection is based on the PPP negotiation mechanism. Loopback detection cannot be implemented for other links (such as Ethernet). PPP needs to establish a session and continuously maintain the session to continuously compare the transmitted and received magic words. The implementation is relatively complicated; the configuration of the PPP on the magic word is embedded in the protocol message, and the number of configurable items is small, and the use is inflexible. Summary of the invention
- Embodiments of the present invention provide a method and a communication device based on loopback detection of an Ethernet link, which are used to increase link maintenance and fault diagnosis.
- An embodiment of the present invention provides a method for loopback detection based on an Ethernet link, including the steps of: establishing an Ethernet link of a loopback connection between a sending port and a receiving port of the communication device; sending a test packet from the sending port, and Receiving the 4 texts from the receiving port;
- the Ethernet link and the device status are determined according to the situation in which the receiving port receives the message.
- the embodiment of the invention provides a communication device, which has an Ethernet port as a sending port and a receiving port, and the communication device includes:
- a sending unit that sends a test message from the sending port
- the determining unit determines whether the received message is the test message, and when the judgment result is yes, determines that the link enters a loopback state.
- FIG. 1 is a schematic diagram of a prior art PPP for loopback detection
- FIG. 2 is a schematic structural diagram of an Ethernet link loopback detection system according to an embodiment of the present invention
- FIG. 3 is a flow chart of sending periodic loopback detection according to an embodiment of the present invention
- FIG. 5 is a flowchart of receiving periodic loopback detection according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of an interface state machine in an embodiment of the present invention. detailed description
- Ethernet technology has significant advantages in addressing the bandwidth and capacity requirements of the network.
- the connection of the backbone network is developing in the direction of ultra-high speed and large capacity.
- Ethernet technology has the advantages of simple implementation, cost performance, scalability, and high reliability.
- Gigabit Ethernet with a large number of fiber interfaces is used to achieve point-to-point high-speed transmission.
- a point-to-point link using Ethernet technology refers to a communication link established between communication devices through an Ethernet Digital Subscriber Line, which is an Ethernet link, called an Ethernet link.
- FIG. 2 is a schematic structural diagram of Ethernet link loopback detection between communication devices according to an embodiment of the present invention. As shown in Figure 2, an Ethernet link is used between the Ethernet optical ports of communication devices A and B.
- a specific test message is issued;
- the device enters the loopback state and notifies the NMS. It also displays the command line. If the loopback status is no longer successful, the loopback status is cancelled. The loopback status is cancelled. The NMS is notified and displayed on the command line.
- the configurable items can include a boot mode and a timer interval.
- A1 Periodic loopback detection. A specific test packet is periodically issued according to the timer setting to detect the loopback status.
- Receive timer ⁇ 2 The allowed interval between the periodic loopback detection packets and the received packets. The default is 1 millisecond.
- the default is 3 seconds.
- the frame header structure is defined as follows (taking Ethernet I I as an example):
- the destination MAC address of the packet sent by the loopback detection is the MAC address of the interface.
- the type of load message is discriminated based on the type field.
- the type number used for loopback detection packets is, for example, 8999.
- Loopback word A 4-byte random number greater than 0. After receiving the loopback detection packet, the interface compares the received loopback word with the loopback word sent last time.
- the interface When the interface receives the loopback detection packet, it compares the received loopback word with the loopback word sent last time. If they are the same, the interface is considered to be in loopback state. The network management software is notified. The interface status is loopbacked on the command line. If no loopback detection packet is received, or the loopback word of the received detection packet is different from the one sent last time, the interface remains in its original state.
- the interface After the interface enters the loopback state, if the packet with the same loopback word is not received within the timer T2 after the loopback detection packet is sent, the loopback state is revoked, the original state is entered, and the network management software is notified. Displayed under the command line.
- the entire flow of loopback detection in the embodiment of the present invention includes three parts as shown in Figs. 3, 4 and 5.
- FIG. 3 is a flow chart of sending periodic loopback detection, and the specific steps are as follows: In step 310, the sending timer T1 is started, and the timer ⁇ 2 is received.
- step 320 it is judged whether T1 is up. If no, the decision is continued. If yes, go to step 330.
- Step 330 constructing a loopback word, recording.
- Step 340 Send a loopback detection packet.
- Step 350 clearing the timer T1, and returning to the beginning of the process.
- FIG. 4 shows the transmission process of manual loopback detection. The specific steps are as follows:
- Step 410 Manually input a loopback detection command.
- a loopback word is constructed, recorded.
- a loopback detection message is sent.
- FIG. 5 is a flow chart of receiving periodic loopback detection. The specific steps are as follows:
- Step 510 The interface receives an Ethernet packet.
- Step 570 The timer starts counting from the sending loop report, and determines whether the receiving timer T2 times out? If it times out, the process goes to step 580, the timer T2 is cleared, and then in step 590, the original state is entered.
- step 600 If it has not timed out, the process proceeds to step 600, and the timer T2 is cleared.
- step 610 the interface enters a loopback state.
- Step 620 Determine whether to manually loopback detection? If no, go to step 630 and the interface will maintain the loopback status.
- step 640 determines if the deactivation timer ⁇ 3 has expired. Otherwise continue the decision step.
- step 650 If yes, proceed to step 650 to clear the timer ⁇ 3. Then, the process proceeds to step 660, where the original state is entered and the network management is reported.
- Figure 6 is a schematic diagram of an interface state machine. If the detection packet receives timeout, it is judged as non- Loopback status. If the detection packet reception does not time out, it is determined to be in the loopback state.
- the method provided by the present invention can perform loopback detection based on the Ethernet link without adding additional complicated mechanisms, thereby greatly improving the efficiency and flexibility of network maintenance and troubleshooting.
- the present invention is applicable to Ethernet link loopback detection of optical communication equipment.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
A method and a communication device of the loopbacked detection based on Ethernet. The method includes: establishing an Ethernet link of the loopbacked connection between the transmitting port and the receiving port of the communication device; sending the test message from the transmitting port and receiving the message from the receiving port; judging the Ethernet link and the device state according to the case of the message received by the receiving port. Without increasing the additional complicated mechanism, the loopbacked detection based on Ethernet can greatly improve the efficiency and flexibility of the network maintenance and the fault elimination.
Description
一种基于以太链路的环回检测方法和通信设备 本申请要求于 2006 年 03 月 18 日提交中国专利局、 申请号为 200610034601.X、发明名称为 "通信设备链路环回检测方法和通信设备" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 Loopback detection method and communication device based on Ethernet link. The application is submitted to the Chinese Patent Office on March 18, 2006, and the application number is 200610034601.X. The invention name is "Communication device link loopback detection method and communication. The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference. Technical field
本发明涉及通信技术领域, 具体地说, 涉及基于以太链路的环 回检测方法和采用该方法的通信设备。 背景技术 The present invention relates to the field of communications technologies, and in particular to a loopback detection method based on an Ethernet link and a communication device employing the same. Background technique
随着人们对网络需求的不断扩大以及网络技术的不断发展, 越来越 多的通信设备被投入使用。 人们利用种种形式的链路来连接这些通信设 备。 As people's demand for the network continues to expand and network technology continues to evolve, more and more communication devices are put into use. People use a variety of forms of links to connect these communication devices.
高速通信设备常采用的点到点链路形式有点到点协议( PPP , The Point-to-Point Protocol )和高级数据链路控制协议 ( HDLC, High Level Data Link Control )等, 另外千兆以太网 ( Gigabit Ethernet )也是一种常 见而重要的点到点链路。 High-speed communication equipment commonly used in the form of point-to-point links (PPP, The Point-to-Point Protocol) and Advanced Data Link Control Protocol (HDLC), and other Gigabit Ethernet (Gigabit Ethernet) is also a common and important point-to-point link.
PPP协议是提供在点到点链路上传递、 封装网络层数据包的一种数 据链路层协议。 PPP主要由两类协议组成: 链路控制协议族 (LCP, Link Control Protocols)和网络层控制协议族(NCP, Network Control Protocols)。 链路控制协议主要用于建立, 拆除和监控 PPP数据链路; 网 络层控制协议族主要用于协商在该数据链路上所传输的数据包的格式与 类型。 PPP需要通过会话进行以下协商: LCP协商, 验证, 网络层协商。 The PPP protocol is a data link layer protocol that provides for the delivery and encapsulation of network layer packets over a point-to-point link. PPP is mainly composed of two types of protocols: Link Control Protocols (LCP) and Network Control Protocols (NCP). The link control protocol is mainly used to establish, tear down and monitor PPP data links; the network layer control protocol family is mainly used to negotiate the format and type of data packets transmitted on the data link. PPP needs to negotiate through the session: LCP negotiation, authentication, network layer negotiation.
以太网技术在解决网络的带宽与容量需求方面有明显的优势。 骨干 网的连接正向超高速和超大容量的方向发展。 以太网技术一直是最流行 的方法,拥有巨大的网络基础和长期的经险知识。 以太网拥有实现简单, 性价比、 可扩展性和可靠性高等优点, 高速链路大量釆用光纤接口的千 兆以太网用来实现点到点传输。 Ethernet technology has obvious advantages in addressing the bandwidth and capacity requirements of the network. The connection of the backbone network is developing in the direction of ultra-high speed and super capacity. Ethernet technology has always been the most popular method, with a huge network foundation and long-term insurance knowledge. Ethernet has the advantages of simple implementation, cost performance, scalability and high reliability. High-speed links use a large number of Gigabit Ethernet interfaces for fiber-optic interfaces for point-to-point transmission.
环回测试是, 通常用于检查和分析端口或线路问题。 事实上, 由于 设计、 施工等各个环节有时会出现一些意外, 造成链路不能正常传输,
需要通过一些方法来确认链路的哪段出了问题, 用筒单的环回检测的方 法往往可以快速定位复杂的实际问题。 Loopback testing is commonly used to check and analyze port or line problems. In fact, due to some accidents in various aspects such as design and construction, the link cannot be transmitted normally. There are some ways to confirm which part of the link is out of order. The loopback detection method of the cartridge can often quickly locate complex practical problems.
图 1是一种现有技术的 PPP进行环回检测的示意图。 PPP的协议报 文可以带有魔术字(Magic Number ),这种几乎随机产生的魔术字被加在 协议报文中。 当需要进行环回检测时, 需要将一个接口 a的发送端、 接 收端分别与另一接口 b的接收端、 发送端进行连接, 这样, PPP发送的 带有魔术字的报文就会从发送口出去, 回到接收口。 当 PPP发现收到协 艮文中的魔术字同自己上一次发送的魔术字相等时, 就会感知到此时 正在进行环回, 接口会自动进入环回状态。 FIG. 1 is a schematic diagram of a prior art PPP for loopback detection. The PPP protocol message can have a Magic Number, and the almost randomly generated magic word is added to the protocol message. When loopback detection is required, the sender and the receiver of one interface a need to be connected to the receiver and the sender of the other interface b, so that the packet with the magic word sent by the PPP is sent. Go out and go back to the receiving port. When PPP finds that the magic word in the received message is equal to the magic word it sent last time, it will perceive that the loopback is being performed at this time, and the interface will automatically enter the loopback state.
然而, 这种环回检测的方法建立在 PPP的协商机制之上, 对于其他 链路(例如以太网)无法实现环回检测; PPP需要建立会话并不断维持 会话才能不断比较发送和接收的魔术字, 实现相对复杂; PPP关于魔术 字的配置嵌于协议报文中, 可配置项少, 使用不灵活。 发明内容 However, this method of loopback detection is based on the PPP negotiation mechanism. Loopback detection cannot be implemented for other links (such as Ethernet). PPP needs to establish a session and continuously maintain the session to continuously compare the transmitted and received magic words. The implementation is relatively complicated; the configuration of the PPP on the magic word is embedded in the protocol message, and the number of configurable items is small, and the use is inflexible. Summary of the invention
本发明实施例提供一种基于以太链路的环回检测的方法及通信设 备, 增加链路的维护与故障诊断的手段。 Embodiments of the present invention provide a method and a communication device based on loopback detection of an Ethernet link, which are used to increase link maintenance and fault diagnosis.
本发明实施例提供一种基于以太链路的环回检测的方法,包括步骤: 在通信设备的发送口和接收口之间建立环回连接的以太链路; 从发送口发出测试报文, 并从接收口接收所述4艮文; An embodiment of the present invention provides a method for loopback detection based on an Ethernet link, including the steps of: establishing an Ethernet link of a loopback connection between a sending port and a receiving port of the communication device; sending a test packet from the sending port, and Receiving the 4 texts from the receiving port;
根据接收口接收所述报文的情况, 判定所述以太链路及设备状态。 本发明实施例提供一种通信设备, 具有作为发送口、 接收口的以太 网端口, 该通信设备包括: The Ethernet link and the device status are determined according to the situation in which the receiving port receives the message. The embodiment of the invention provides a communication device, which has an Ethernet port as a sending port and a receiving port, and the communication device includes:
产生测试报文的单元; a unit that generates a test message;
从发送口发出测试报文的发送单元; a sending unit that sends a test message from the sending port;
从接收口接收报文的单元; a unit that receives a message from a receiving port;
判断单元, 判断接收的报文是否所述测试报文, 当判断结果为是的 时候, 判定所述链路进入环回状态。 The determining unit determines whether the received message is the test message, and when the judgment result is yes, determines that the link enters a loopback state.
本发明实施例中, 对于以太网协议, 无需增加类似 PPP的会话协商 机制, 可以自动检测环回或在必要的时候直接进行环回检测, 在保证协
议本身简单性的同时提供可选可配的环回检测机制。 附图说明 In the embodiment of the present invention, for the Ethernet protocol, it is not necessary to add a PPP-like session negotiation mechanism, and the loopback can be automatically detected or loopback detection can be directly performed when necessary. The optional simplicity of the loopback detection mechanism is provided. DRAWINGS
下面将通过举例参照附图对本发明进行更详细的说明, 其中: 图 1是一种现有技术的 PPP进行环回检测的示意图; The present invention will be described in more detail below by way of example with reference to the accompanying drawings in which: FIG. 1 is a schematic diagram of a prior art PPP for loopback detection;
图 2是本发明实施例中以太链路环回检测系统的结构示意图; 图 3是本发明实施例中周期性环回检测的发送流程图; 2 is a schematic structural diagram of an Ethernet link loopback detection system according to an embodiment of the present invention; FIG. 3 is a flow chart of sending periodic loopback detection according to an embodiment of the present invention;
图 4是本发明实施例中手动环回检测的发送流程; 4 is a transmission flow of manual loopback detection in an embodiment of the present invention;
图 5是本发明实施例中周期性环回检测的接收流程图; FIG. 5 is a flowchart of receiving periodic loopback detection according to an embodiment of the present invention; FIG.
图 6是本发明实施例中的接口状态机的示意图。 具体实施方式 6 is a schematic diagram of an interface state machine in an embodiment of the present invention. detailed description
以太网( Ethernet )技术在解决网络的带宽与容量需求方面有明显的 优势。 骨干网的连接正向超高速和超大容量的方向发展。 以太网技术拥 有实现简单, 性价比、 可扩展性和可靠性高等优点, 大量采用光纤接口 的千兆以太网用来实现点到点高速传输。 采用以太网技术的点到点链路 是指通过以太数字用户线( Based Ethernet Digital Subscriber Line )在通 信设备之间建立的以以太为通信介质的通信链路, 称为以太链路。 Ethernet technology has significant advantages in addressing the bandwidth and capacity requirements of the network. The connection of the backbone network is developing in the direction of ultra-high speed and large capacity. Ethernet technology has the advantages of simple implementation, cost performance, scalability, and high reliability. Gigabit Ethernet with a large number of fiber interfaces is used to achieve point-to-point high-speed transmission. A point-to-point link using Ethernet technology refers to a communication link established between communication devices through an Ethernet Digital Subscriber Line, which is an Ethernet link, called an Ethernet link.
为使本发明原理、 特性和优点更加清楚, 下面结合以太链路的环回 检测实例进行描述。 In order to make the principles, features, and advantages of the present invention clearer, the following is described in conjunction with an example of loopback detection of an Ethernet link.
图 2 是本发明实施例的通信设备间以太链路环回检测的结构示意 图。 如图 2所示, 通信设备 A和 B的以太网光口之间采用以太链路。 2 is a schematic structural diagram of Ethernet link loopback detection between communication devices according to an embodiment of the present invention. As shown in Figure 2, an Ethernet link is used between the Ethernet optical ports of communication devices A and B.
假设通信设备 A与 B之间链路 (以太网, 光口)不通, 需要确定链 路靠近接口端是否有问题。 本发明的实施例中, 可以用如下方法确认。 Assume that the link between the communication device A and B (the Ethernet port and the optical port) is unreachable. You need to determine whether there is a problem with the link near the interface. In the embodiment of the present invention, it can be confirmed by the following method.
采用线缆连接 c、 d两点(靠近 A设备发送口和接收口的光跳线口), 进行以太链路环回检测。 如果接口进入环回状态, 说明 A设备的接口和 近端线路没有故障。 同样确认 B设备端的情况。 如果也没有问题, 而正 常连接下链路又不通的话, 就可以确认是 c-e段或者 d-f段(两端设备跳 线架之间) 的线路有故障。 Use the cable connection c, d two points (close to the optical jumper of the A device send port and the receive port) to perform Ethernet link loopback detection. If the interface enters the loopback state, the interface of the A device and the near-end line are not faulty. Also confirm the situation on the B device side. If there is no problem, and the normal link is not connected, it can be confirmed that the line of the c-e segment or the d-f segment (between the jumpers of the devices at both ends) is faulty.
为了实现上述过程, 需要如下几个步骤: In order to achieve the above process, the following steps are required:
通过网管或手工配置的方式调整接口相关配置项;
当进行外部线路环回时, 发出特定测试报文; Adjust interface-related configuration items through the NMS or manual configuration. When an external line loopback is performed, a specific test message is issued;
如果接收成功, 进入环回状态, 通知网管, 同时在命令行中显示; 如果环回状态时不再成功接受检测报文,撤销环回状态,通知网管, 同时在命令行中显示。 If the receiving is successful, the device enters the loopback state and notifies the NMS. It also displays the command line. If the loopback status is no longer successful, the loopback status is cancelled. The loopback status is cancelled. The NMS is notified and displayed on the command line.
接下来, 对本发明的环回检测进行详细描述。 Next, the loopback detection of the present invention will be described in detail.
1、 通过网管或手工配置的方式调整接口相关配置项。 1. Adjust the related configuration items of the interface through the NMS or manual configuration.
可配置项可以包括启动方式和定时器间隔。 The configurable items can include a boot mode and a timer interval.
启动方式: Startup method:
A1 )周期性环回检测。根据定时器设定周期性发出特定测试报文检 测环回状态。 A1) Periodic loopback detection. A specific test packet is periodically issued according to the timer setting to detect the loopback status.
如果采用周期性环回检查使能, 则周期性发出特定测试报文检测环 回状态; If periodic loopback check is enabled, a specific test packet is periodically sent to detect the loopback status.
否则不定期发出特定测试报文检测环回状态。 Otherwise, a specific test packet is sent periodically to detect the loopback status.
B1 )手动环回检测。 在该启动方式下, 通过命令行方式指定发出特 定测试报文检测环回状态。 B1) Manual loopback detection. In this startup mode, you can specify the test packet to be sent out by the command line.
缺省为周期性环回检测使能。 By default, periodic loopback detection is enabled.
定时器间隔: Timer interval:
A2 )发送定时器 Tl。 周期性环回检测时发出特定测试报文检测状 态的时间间隔; 缺省为 3秒。 A2) Send timer Tl. Interval at which the test status of a specific test packet is sent during periodic loopback detection. The default is 3 seconds.
Β2 )接收定时器 Τ2。 周期性环回检测报文发送到接收到这个报文 之间的允许时间间隔; 缺省为 1毫秒。 Β 2) Receive timer Τ2. The allowed interval between the periodic loopback detection packets and the received packets. The default is 1 millisecond.
C2 )手工环回检测状态撤销时间 Τ3。 手工环回检测成功后进入环 回状态, 经过多长时间后自动撤销环回状态。 C2) Manual loopback detection state revocation time Τ3. After the manual loopback detection succeeds, it enters the loopback state. After how long, the loopback state is automatically revoked.
缺省为 3秒。 The default is 3 seconds.
1、 当进行外部线路环回时, 发出特定测试报文。 1. When performing external line loopback, a specific test message is sent.
对于以太网, 帧头结构定义如下 (以 Ethernet I I为例 ): For Ethernet, the frame header structure is defined as follows (taking Ethernet I I as an example):
) 前序 1 目的地址 I 源地址 I 类型 I 数据 1 帧校验和 1 I 8 byte | 6 byte | 6 byte | 2 byte | 46-1500 byte | 4 byte |
环回检测发出的报文目的 MAC地址(即, 媒体访问控制)是本接 口的 MAC地址。 Preamble 1 Destination Address I Source Address I Type I Data 1 Frame Checksum 1 I 8 byte | 6 byte | 6 byte | 2 byte | 46-1500 byte | 4 byte | The destination MAC address of the packet sent by the loopback detection (that is, the media access control) is the MAC address of the interface.
根据类型域来判别负载报文的种类。 The type of load message is discriminated based on the type field.
环回检测报文使用的类型号例如为 8999。 The type number used for loopback detection packets is, for example, 8999.
对于以太网封装之后的负载的环回检测报文, 可以遵守下面的格 式: For the loopback detection message of the load after Ethernet encapsulation, the following format can be observed:
. 0 1 2 3 45 6 7 8 9 0 1 2 3 45 6 78 9 0 1 2 3 4 5 6 7 8 9 0 1 . 0 1 2 3 45 6 7 8 9 0 1 2 3 45 6 78 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
I 类型 I 长度 I 环回字 I +一+一+一+一+一+— +—+—+—十一+一+一+一+一+一+― +—+—+_+—+—+——+—+— +—+—+— +—+—+—+_+I Type I Length I Loopback Word I + One + One + One + One + One + - + - + - + - Eleven + One + One + One + One + One + - + - + - + + - + —+——+—+— +—+—+— +—+—+—+_+
I 环回字 I I loopback word I
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
类型: 1 Type: 1
长度: 6 Length: 6
环回字: 4字节的大于 0的随机数。 当接口收到环回检测报文后, 将会比较收到的环回字和上一次发送的环回字。 Loopback word: A 4-byte random number greater than 0. After receiving the loopback detection packet, the interface compares the received loopback word with the loopback word sent last time.
3、 如果接收成功, 通知网管, 同时在命令行中显示, 进入环回状 态。 3. If the receiving is successful, notify the NMS and display it on the command line to enter the loopback state.
当接口收到环回检测报文后, 将会比较收到的环回字和上一次发送 的环回字。 如果相同, 则认为接口此时进入环回状态, 通知网管软件, 在命令行下显示接口状态为环回 (loopbacked)。 如果没有接收到环回检 测报文, 或接收到的检测报文环回字与上次发送的不相同, 则接口保持 原有状态。 When the interface receives the loopback detection packet, it compares the received loopback word with the loopback word sent last time. If they are the same, the interface is considered to be in loopback state. The network management software is notified. The interface status is loopbacked on the command line. If no loopback detection packet is received, or the loopback word of the received detection packet is different from the one sent last time, the interface remains in its original state.
4、 如果环回状态时不再成功接受检测报文, 撤销环回状态, 通知 网管, 同时在命令行中显示。 4. If the detection packet is no longer successfully received in the loopback state, the loopback status is revoked, the network management is notified, and the command line is displayed.
接口进入环回状态之后,如果在发送环回检测报文之后,定时器 T2 之内, 没有收到含有相同环回字的报文, 则撤销环回状态, 进入原有状 态, 通知网管软件, 在命令行下显示。 After the interface enters the loopback state, if the packet with the same loopback word is not received within the timer T2 after the loopback detection packet is sent, the loopback state is revoked, the original state is entered, and the network management software is notified. Displayed under the command line.
本发明实施例的环回检测的整个流程包括如图 3、 4和 5所示的三个 部分。 The entire flow of loopback detection in the embodiment of the present invention includes three parts as shown in Figs. 3, 4 and 5.
图 3是周期性环回检测的发送流程图, 具体步骤如下:
步骤 310, 启动发送定时器 Tl, 接收定时器 Τ2。 FIG. 3 is a flow chart of sending periodic loopback detection, and the specific steps are as follows: In step 310, the sending timer T1 is started, and the timer Τ2 is received.
步骤 320, 判断 T1是否到时。 若否, 则继续该判断。 若是, 则进入 步骤 330。 In step 320, it is judged whether T1 is up. If no, the decision is continued. If yes, go to step 330.
步骤 330, 构造环回字, 记录。 Step 330, constructing a loopback word, recording.
步骤 340, 发送环回检测报文。 Step 340: Send a loopback detection packet.
步驟 350, 清定时器 T1 , 并且返回流程开始部分。 Step 350, clearing the timer T1, and returning to the beginning of the process.
图 4是手动环回检测的发送流程, 具体步骤如下: Figure 4 shows the transmission process of manual loopback detection. The specific steps are as follows:
步骤 410, 手工输入环回检测命令。 在步骤 420, 构造环回字, 记 录。 在步骤 430, 发送环回检测报文。 Step 410: Manually input a loopback detection command. At step 420, a loopback word is constructed, recorded. At step 430, a loopback detection message is sent.
图 5是周期性环回检测的接收流程图, 具体步驟如下: Figure 5 is a flow chart of receiving periodic loopback detection. The specific steps are as follows:
步骤 510, 接口接收到以太网报文。 Step 510: The interface receives an Ethernet packet.
步骤 520,判断是否目的 MAC=接口 MAC? 若否,则进入步骤 530, 执行原有正常处理; 若是, 则进入步骤 540。 Step 520: Determine whether the destination MAC=interface MAC? If no, go to step 530 to perform the original normal processing; if yes, go to step 540.
步骤 540, 判断是否类型 =8999? 若否, 则进入步骤 530; 若是, 则 进入步骤 550。 Step 540, determining whether the type is = 8999? If not, proceeding to step 530; if yes, proceeding to step 550.
步骤 550, 判断是否收到的环回字=上次发送的环回字? 若是, 则进 入步骤 560, 丟弃报文; 若否, 则进入步驟 570。 Step 550, determining whether the loopback word received = the loopback word sent last time? If yes, go to step 560 to discard the message; if no, go to step 570.
步骤 570, 定时器从发送环回报文就开始计时, 判断接收定时器 T2 是否超时? 若超时, 则进入步骤 580, 清定时器 T2, 然后在步骤 590, 进入原有状态。 Step 570: The timer starts counting from the sending loop report, and determines whether the receiving timer T2 times out? If it times out, the process goes to step 580, the timer T2 is cleared, and then in step 590, the original state is entered.
若未超时, 在进入步骤 600, 清定时器 T2。 If it has not timed out, the process proceeds to step 600, and the timer T2 is cleared.
接着, 在步驟 610, 接口进入环回状态。 Next, in step 610, the interface enters a loopback state.
步骤 620, 判断是否手工环回检测? 若否, 进入步骤 630, 接口保 持环回状态。 Step 620: Determine whether to manually loopback detection? If no, go to step 630 and the interface will maintain the loopback status.
若是, 则进入步驟 640,判断撤销定时器 Τ3是否到时? 否则继续该 判断步骤。 If yes, proceed to step 640 to determine if the deactivation timer Τ3 has expired. Otherwise continue the decision step.
若是, 则进入步骤 650, 清撤销定时器 Τ3。 然后, 进入步骤 660, 进入原有状态, 上报网管。 If yes, proceed to step 650 to clear the timer Τ3. Then, the process proceeds to step 660, where the original state is entered and the network management is reported.
图 6是接口状态机的示意图。 若检测报文接收超时, 则判定为非
环回状态。 若检测报文接收未超时, 则判定为环回状态。 Figure 6 is a schematic diagram of an interface state machine. If the detection packet receives timeout, it is judged as non- Loopback status. If the detection packet reception does not time out, it is determined to be in the loopback state.
从上述本发明的具体实施例可以看出, 本发明提供的方法在不增 加额外复杂机制的前提下, 可基于以太链路进行环回检测, 大大提高 网络维护和故障排除的效率和灵活性。 It can be seen from the above specific embodiments of the present invention that the method provided by the present invention can perform loopback detection based on the Ethernet link without adding additional complicated mechanisms, thereby greatly improving the efficiency and flexibility of network maintenance and troubleshooting.
需要说明的是, 本发明适用于光通信设备的基于以太链路环回检 测。 It should be noted that the present invention is applicable to Ethernet link loopback detection of optical communication equipment.
可以理解, 在此描述的本发明可以有许多变化, 这种变化不能认 为偏离本发明的精神和范围。 因此, 所有对本领域技术人员显而易见 的改变和等同替换, 都包括在本发明的涵盖范围之内。
It is to be understood that the invention described herein may be susceptible to many modifications and variations may be made without departing from the spirit and scope of the invention. Therefore, all changes and equivalents that are obvious to those skilled in the art are included in the scope of the present invention.
Claims
1、 一种基于以太链路的环回检测的方法, 其特征在于, 包括步骤: 在通信设备的发送口和接收口之间建立环回连接的以太链路; 从发送口发出测试报文, 并从接收口接收所述报文; A method for loopback detection based on an Ethernet link, comprising the steps of: establishing an Ethernet link of a loopback connection between a sending port and a receiving port of the communication device; and sending a test packet from the sending port, And receiving the message from the receiving port;
根据接收口接收所述报文的情况, 判定所述以太链路及设备状态。 The Ethernet link and the device status are determined according to the situation in which the receiving port receives the message.
2、 如权利要求 1所述的方法, 其特征在于, 所述测试报文包括所述 接收口的地址和 /或环回字和 /或类型号, 其中所述环回字为随机数。 The method according to claim 1, wherein the test message includes an address of the receiving port and/or a loopback word and/or a type number, wherein the loopback word is a random number.
3、 如权利要求 1所述的方法, 其特征在于, 从发送口发出测试报文 的步骤包括周期性发送测试报文, 具体包括: The method of claim 1, wherein the step of sending a test packet from the sending port comprises: sending the test packet periodically, specifically:
设定第一定时器的步驟, 第一定时器确定周期性发出测试报文检测 状态的时间间隔; a step of setting a first timer, where the first timer determines a time interval during which the test message detection state is periodically issued;
设定第二定时器的步驟, 第二定时器确定所述测试报文发送到接收 到所述测试报文之间的允许时间间隔。 A step of setting a second timer, the second timer determining an allowable time interval between the sending of the test message and the receipt of the test message.
4、如权利要求 3所述的方法, 其特征在于, 所述从发送口发出测试 ^艮文以手工方式完成。 The method according to claim 3, wherein the issuing the test from the sending port is done manually.
5、 如权利要求 4所述的方法, 其特征在于, 进一步包括: 设定第三定时器, 利用该第三定时器确定当环回检测进入环回状态 后自动撤销环回状态的时间间隔。 The method according to claim 4, further comprising: setting a third timer, and determining, by using the third timer, a time interval for automatically revoking the loopback state after the loopback detection enters a loopback state.
6、一种通信设备, 具有作为发送口、接收口的以太网端口, 其特征 在于, 包括: A communication device having an Ethernet port as a transmitting port and a receiving port, comprising:
产生测试报文的单元; a unit that generates a test message;
从发送口发出测试报文的发送单元; a sending unit that sends a test message from the sending port;
从接收口接收报文的单元; a unit that receives a message from a receiving port;
判断单元, 判断接收的报文是否所述测试报文, 当判断结果为是的 时候, 判定所述链路进入环回状态。 The determining unit determines whether the received message is the test message, and when the judgment result is yes, determines that the link enters a loopback state.
7、 如权利要求 6所述的通信设备, 其特征在于, 所述产生测试报文 的装置采用随机数作为所述测试报文的环回字。 7. The communication device according to claim 6, wherein the means for generating a test message uses a random number as a loopback word of the test message.
8、 如权利要求 6所述的通信设备, 其特征在于, 包括第一定时器和 第二定时器, 才 据第一定时器确定的时间间隔所述产生装置和发送装置
周期性发送测试艮文, 第二定时器确定所述测试艮文发送到接收到所述 测试艮文之间的允许时间间隔。 8. The communication device according to claim 6, comprising: a first timer and a second timer, wherein the generating device and the transmitting device are separated according to a time interval determined by the first timer The test message is periodically sent, and the second timer determines an allowable time interval between the test message and the test message being received.
9、 如权利要求 6所述的通信设备, 其特征在于, 包括第三定时器, 间隔。
9. The communication device according to claim 6, comprising a third timer, an interval.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA200610034601XA CN1859411A (en) | 2006-03-18 | 2006-03-18 | Method for detecting communication device link ringback and communication device |
CN200610034601.X | 2006-03-18 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2007107066A1 true WO2007107066A1 (en) | 2007-09-27 |
Family
ID=37298273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2006/003795 WO2007107066A1 (en) | 2006-03-18 | 2006-12-31 | A method and a communication device of the loopbacked detection based on ethernet |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN1859411A (en) |
WO (1) | WO2007107066A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8995253B2 (en) | 2007-01-23 | 2015-03-31 | Huawei Technologies Co., Ltd. | Method, apparatus and system for ring protection |
CN113364641A (en) * | 2020-03-06 | 2021-09-07 | 烽火通信科技股份有限公司 | Loopback detection method and system for EOS (Ethernet over coax) service |
CN114389965A (en) * | 2022-01-26 | 2022-04-22 | 芯河半导体科技(无锡)有限公司 | Two-layer network loop detection positioning method |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101232428B (en) * | 2007-01-23 | 2012-05-23 | 华为技术有限公司 | Ethernet loop protection method and apparatus |
CN101056224B (en) * | 2007-05-31 | 2010-09-22 | 杭州华三通信技术有限公司 | A loop detection method and device for the network device |
CN101141212B (en) * | 2007-08-03 | 2011-03-02 | 中兴通讯股份有限公司 | Method of protecting virtual cascade/link capability automatic regulation mechanism |
CN102420710A (en) * | 2011-12-31 | 2012-04-18 | 曙光信息产业股份有限公司 | Method for positioning fault of server cluster system |
CN108696398B (en) * | 2017-04-05 | 2019-06-28 | 视联动力信息技术股份有限公司 | Communication loopback fault detection method and device in a kind of communication network |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1305287A (en) * | 1999-11-30 | 2001-07-25 | Lg电子株式会社 | Method of detecting trunk calling connection in user part of comprehensive business digital network |
WO2003073704A1 (en) * | 2002-02-22 | 2003-09-04 | Siemens Aktiengesellschaft | Local network, particularly ethernet network having redundancy properties, and redundancy manager for such a network |
CN1691609A (en) * | 2004-04-20 | 2005-11-02 | 北京润光泰力科技发展有限公司 | A method and apparatus for Ethernet converter line side loop back detection |
-
2006
- 2006-03-18 CN CNA200610034601XA patent/CN1859411A/en active Pending
- 2006-12-31 WO PCT/CN2006/003795 patent/WO2007107066A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1305287A (en) * | 1999-11-30 | 2001-07-25 | Lg电子株式会社 | Method of detecting trunk calling connection in user part of comprehensive business digital network |
WO2003073704A1 (en) * | 2002-02-22 | 2003-09-04 | Siemens Aktiengesellschaft | Local network, particularly ethernet network having redundancy properties, and redundancy manager for such a network |
CN1691609A (en) * | 2004-04-20 | 2005-11-02 | 北京润光泰力科技发展有限公司 | A method and apparatus for Ethernet converter line side loop back detection |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8995253B2 (en) | 2007-01-23 | 2015-03-31 | Huawei Technologies Co., Ltd. | Method, apparatus and system for ring protection |
CN113364641A (en) * | 2020-03-06 | 2021-09-07 | 烽火通信科技股份有限公司 | Loopback detection method and system for EOS (Ethernet over coax) service |
CN113364641B (en) * | 2020-03-06 | 2022-03-01 | 烽火通信科技股份有限公司 | Loopback detection method and system for EOS (Ethernet over coax) service |
CN114389965A (en) * | 2022-01-26 | 2022-04-22 | 芯河半导体科技(无锡)有限公司 | Two-layer network loop detection positioning method |
CN114389965B (en) * | 2022-01-26 | 2024-03-29 | 芯河半导体科技(无锡)有限公司 | Two-layer network loop detection positioning method |
Also Published As
Publication number | Publication date |
---|---|
CN1859411A (en) | 2006-11-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2007107066A1 (en) | A method and a communication device of the loopbacked detection based on ethernet | |
KR101419283B1 (en) | Dual transmission for communication networks | |
US8264951B2 (en) | Resilient PPP/ML-PPP services over multi-chassis APS protected routers | |
US20040165534A1 (en) | Operations, administration and maintenance (OAM) systems and methods for packet switched data networks | |
US20080259786A1 (en) | System and method for supporting sdh/sonet aps on ethernet | |
US20090232152A1 (en) | Method and apparatus for aggregating ports | |
WO2012088843A1 (en) | Method and system for bidirectional forwarding detection | |
JP3620010B2 (en) | Apparatus and program recording medium used in wireless communication system | |
WO2008116399A1 (en) | Dynamically adjusting method and apparatus for link state and bundled link state | |
US20030061390A1 (en) | Method of synchronizing parallel optical links between communications components | |
JP4351289B1 (en) | Subscriber premises communication equipment | |
US20040167978A1 (en) | Communication apparatus | |
US20090100193A1 (en) | Synchronization of state information to reduce APS switchover time | |
WO2014044190A1 (en) | Method and device for adjusting ethernet data transmission rate | |
US7746949B2 (en) | Communications apparatus, system and method of creating a sub-channel | |
US8179785B1 (en) | Deterministic switching protection over aggregated links | |
JP5388189B2 (en) | Network equipment | |
KR100932907B1 (en) | Apparatus and method for diagnosing change of configuration information of OAM module in EPON system | |
JP2009033557A (en) | Network access system and network access method | |
US20090296570A1 (en) | Automatic semi-cross cable and scrambler resolution mechanism for 1000base-t master/slave device | |
WO2007124640A1 (en) | METHOD AND APPARATUS FOR AVOIDING FALSE INITIATING OF xDSL TRANSCEIVER | |
KR100772191B1 (en) | System and method for connectivity verification of upper layers by the link management protocol | |
WO2011050665A1 (en) | Method and device for implementing fast rerouting of ports | |
JP3845392B2 (en) | BAND CONTROL DEVICE AND BAND CONTROL SYSTEM | |
JP3684528B2 (en) | Monitoring and control system and information transmission method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 06840825 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 06840825 Country of ref document: EP Kind code of ref document: A1 |