WO2013159450A1 - Ethernet port loopback detection method and apparatus - Google Patents

Ethernet port loopback detection method and apparatus Download PDF

Info

Publication number
WO2013159450A1
WO2013159450A1 PCT/CN2012/077839 CN2012077839W WO2013159450A1 WO 2013159450 A1 WO2013159450 A1 WO 2013159450A1 CN 2012077839 W CN2012077839 W CN 2012077839W WO 2013159450 A1 WO2013159450 A1 WO 2013159450A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
detection packet
detection
network device
packet
Prior art date
Application number
PCT/CN2012/077839
Other languages
French (fr)
Chinese (zh)
Inventor
郭红燕
朱柳辉
靳海燕
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to RU2014147780/08A priority Critical patent/RU2605494C2/en
Publication of WO2013159450A1 publication Critical patent/WO2013159450A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/18Loop-free operations

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for detecting loopback of an Ethernet port.
  • the network may have a loop in the networking. If a loop exists in the network, after a network device sends a packet, the packets may be sent. After being forwarded by other network devices, the device returns to the network device, and the network device forwards the packets that have been sent by the network device again, and cycles back and forth, eventually exhausting the network bandwidth, making the link impossible. Normal communication, if it is serious, the network will be paralyzed.
  • the present invention provides a method and apparatus for detecting loopback of an Ethernet port, so as to prevent the network from being looped and causing network congestion.
  • a method for detecting an Ethernet port loopback includes the following steps: The network device periodically sends a detection packet from each port; and determines whether the received detection packet is sent locally. If the packet is detected, the port number of the detection packet is parsed from the detection packet, and the port link is closed; otherwise, the detection packet is forwarded to the next network device.
  • the method further includes the following steps: setting a protocol type of the detection packet for the network device in advance; and generating, by the network device, the detection packet according to the foregoing setting.
  • the foregoing method further performs the following steps: setting a VLAN (Virtual Local Area Network) mode for detecting the packet for the network device.
  • the foregoing detection message includes an Ethernet type, a source MAC (Medium/Media Access Control) address, a port number, and a keyword information field.
  • the network device generates a loopback alarm and reports the link link.
  • the network device performs the following steps: opening the port link timer; determining whether the port link timer is up, if yes, enabling the port link and generating loopback recovery The alarm is reported and reported.
  • the above method disables the port link by disabling the MAC address learning function of the port; and enables the port link by enabling the MAC address learning function of the port.
  • the loopback alarm and the loopback recovery alarm include a network device number and a port number.
  • the detection message is a broadcast packet.
  • the network device determines, according to the source MAC address field in the received detection packet, whether the detection packet is a locally sent detection packet.
  • an Ethernet port loopback detection apparatus including a detection packet sending module and a detection packet receiving module. The detection packet sending module is configured to periodically generate a detection packet.
  • the detection packet receiving module is configured to determine whether the network device receives the detection packet is a locally sent detection packet, and the detection packet is sent locally by the detection packet. When the detection packet is not the local detection packet, the detection packet is forwarded to the next network. device.
  • the device further includes a port link timer and a setting module, where the port link timer is set to a time length of the timed port link; the setting module is configured to provide a user with a protocol type for setting the detection message, The VLAN mode, the sending period, and the interface duration of the port link timer described above, and save the user settings.
  • the detection packet receiving module is configured to generate a loopback alarm and report the same; and after the port link is closed, the port link timer is enabled, and after the port link timer expires, the port is opened. A link is generated and a loopback recovery alarm is generated and reported.
  • the invention detects the packet and determines whether the loopback occurs in the network device, and the operation is simple and easy to implement, thereby effectively solving the problem that the network is looped and the network is paralyzed.
  • FIG. 1 is a flowchart of a preferred embodiment of detecting a packet transmitting portion in an Ethernet port loopback detection method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an Ethernet port loopback detection method according to an embodiment of the present invention
  • a flowchart of a preferred embodiment of the packet receiving portion of the packet is detected.
  • FIG. 3 is a block diagram showing a preferred embodiment of the Ethernet port loopback detecting device according to the embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE EMBODIMENTS In order to make the technical problems, technical solutions and beneficial effects of the present invention more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • the method for detecting the loopback of the Ethernet port in the embodiment of the present invention is divided into two parts, one is a detecting message sending part, and the other is a detecting message receiving part. The following describes the embodiment of the present invention in detail with reference to specific embodiments.
  • Step S001 Setting a network device in advance Detects the protocol type of the packet and the VLAN mode.
  • the VLAN mode of the detection packet is optional, that is, the detection packet may be a VLAN-free or a continuous VLAN or a discrete VLAN. mode.
  • Step S002 The network device generates a detection packet according to the foregoing setting.
  • the detection packet includes a field such as an Ethernet type, a source MAC address, a port number, and a keyword information.
  • the source MAC address is a MAC address of the network device CPU, and the detection packet is a broadcast packet.
  • Step S003 After the loopback detection function is enabled, the network device sends the detection packet from each port when the sending period comes.
  • the sending period of the network device sending detection may be preset, and may be implemented by using a timer. For example, a timer with a timing of 2 seconds may be set as a period for the network device to send the detection packet.
  • 2 is a flowchart of a preferred embodiment of detecting a packet receiving part in an Ethernet port loopback detection method according to an embodiment of the present invention. As shown in FIG. 2, the embodiment specifically includes the following steps: Step S101: The network device receives the detection. Message.
  • Step S102 Determine whether the detection message is a locally sent detection message, and if yes, execute step S103; otherwise, execute step S107.
  • the source MAC address field in the packet is detected to determine whether the detection packet is sent locally.
  • the port number of the detection packet is parsed from the detection packet, the port link is closed, and a loopback alarm is generated and reported. The embodiment of the invention closes the port link by disabling the MAC address learning function of the port.
  • Step S104 Enable the port link timer.
  • the port link timer time can be preset, for example, it can be set to 30 seconds.
  • Step S105 Determine whether the timer expires, if yes, execute step S106; otherwise, continue to perform this step.
  • Step S106 The port link is enabled, and a loopback recovery alarm is generated and reported, and the process ends.
  • the port link is enabled by enabling the MAC address learning function of the port.
  • Step S107 Forwarding the detection packet to the next network device, and ending.
  • the loopback alarm and the loopback recovery alarm include the network device number and the port number, so that after the alarm is reported, the user can know which port of the device has loopback.
  • 3 is a schematic block diagram of a preferred embodiment of an Ethernet port loopback detection apparatus according to an embodiment of the present invention. As shown in FIG. 3, the Ethernet port loopback detection apparatus of the embodiment of the present invention includes: a setup module 01, a detection packet sending module.
  • the detection packet sending module 02 is configured to generate a detection packet according to the protocol type and the VLAN mode of the detection packet set in the setting module 01, and send the detection packet from each port of the network device when the sending period comes.
  • the detection packet receiving module 03 is configured to determine whether the detection packet received by the network device is a detection packet sent from the local device. When the detection packet is a local detection packet, the detection packet is parsed and sent from the detection packet.
  • the port number of the packet is detected, the port link is closed, a loopback alarm is generated and reported, and the port link timer 04 is enabled. After the port link timer expires, the port link is enabled. The loopback recovery alarm is generated and reported.
  • Port link timer 04 set to the shutdown time of the timing port link.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Small-Scale Networks (AREA)

Abstract

Disclosed are an Ethernet port loopback detection method and apparatus. The method comprises: a network device periodically sending a detection message from each port; judging whether the received detection message is a detection message which is sent locally, and if yes, resolving a port number for sending the detection message from the detection message and closing the port link; otherwise, forwarding the detection message to a next network device. The present invention is applied to effectively solve the problem of network paralysis caused by network looping.

Description

以太网端口环回检测方法及装置 技术领域 本发明涉及通信领域, 尤其涉及一种以太网端口环回检测方法及装置。 背景技术 在现有的各种组网中, 由于配置错误或者网络连接的问题, 会造成组网中存在环 路, 如果网络中存在环路, 一个网络设备在发出报文后, 这些报文可能会经其他网络 设备转发后, 又回到该网络设备, 而该网络设备还会将这些本身已经发送过的报文再 次转发出去, 并循环往复, 最终会把网络带宽耗尽, 使得链路无法正常通信, 严重时 会使网络瘫痪。 发明内容 本发明提供了一种以太网端口环回检测方法及装置, 以预防网络出现成环而导致 网络瘫痪的问题。 根据本发明的一个方面, 提供了一种以太网端口环回检测方法, 上述方法包括以 下步骤: 网络设备周期性从各端口发送检测报文; 并判断收到的检测报文是否是本地发出的检测报文, 若是, 则从上述检测报文中 解析出发送上述检测报文的端口号, 并关闭上述端口链路; 否则, 将上述检测报文转 发给下一个网络设备。 优选地, 上述方法还包括以下步骤: 预先为网络设备设置检测报文的协议类型; 网络设备根据上述设置, 生成检测报文。 优选地, 上述方法在为检测报文设置协议类型后, 还执行以下步骤: 为上述网络设备设置检测报文的 VLAN (Virtual Local Area Network,虚拟局域网) 模式。 优选地, 上述检测报文包括以太网类型、源 MAC (Medium/Media Access Control, 介质访问控制) 地址、 端口号以及关键字信息字段。 优选地, 上述网络设备在关闭端口链路的同时, 还生成环回告警并上报。 优选地, 上述网络设备在关闭端口链路后, 还同时执行以下步骤: 开启端口链路定时器; 判断端口链路定时器是否到时, 若是, 则开启上述端口链路, 同时生成环回恢复 告警并上报。 优选地, 上述方法通过禁用端口的 MAC地址学习功能来关闭端口链路; 通过启 用端口的 MAC地址学习功能来开启端口链路。 优选地, 上述环回告警及上述环回恢复告警中包括网络设备号及端口号。 优选地, 上述检测报文为广播包。 优选地, 上述网络设备根据收到的检测报文中的源 MAC地址字段来判断上述检 测报文是否是本地发出的检测报文。 根据本发明的另一个方面, 提供了一种以太网端口环回检测装置, 包括检测报文 发送模块以及检测报文接收模块; 其中, 上述检测报文发送模块, 设置为周期性生成检测报文, 并从网络设备的各端口发 送出去; 上述检测报文接收模块, 设置为判断网络设备收到检测报文是否是本地发出的检 测报文, 并在上述检测报文是本地发出的检测报文时, 从上述检测报文中解析出发送 上述检测报文的端口号, 并关闭上述端口链路; 在上述检测报文不是本地发出的检测 报文时, 将上述检测报文转发给下一个网络设备。 优选地, 上述装置还包括端口链路定时器以及设置模块, 上述端口链路定时器, 设置为计时端口链路的关闭时长; 上述设置模块, 设置为为用户提供设置检测报文的协议类型、 VLAN模式、 发送 周期以及上述端口链路定时器的定时时长的接口, 并保存用户设置。 优选地, 上述检测报文接收模块, 设置为生成环回告警并上报; 以及在关闭端口 链路后, 开启上述端口链路定时器, 并在上述端口链路定时器到时后, 开启上述端口 链路, 同时生成环回恢复告警并上报。 本发明通过检测报文, 判断网络设备是否发生环回, 操作简单, 且易实现, 从而 有效的解决了网络成环而导致网络瘫痪的问题。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本发明的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是本发明实施例的以太网端口环回检测方法中检测报文发送部分的优选实施 例的流程图; 图 2是本发明实施例的以太网端口环回检测方法中检测报文接收部分的优选实施 例的流程图; 图 3是本发明实施例的以太网端口环回检测装置优选实施例的原理框图。 具体实施方式 为了使本发明所要解决的技术问题、 技术方案及有益效果更加清楚、 明白, 以下 结合附图和实施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实 施例仅用以解释本发明, 并不用于限定本发明。 本发明实施例以太网端口环回检测方法分为两个部分,一个为检测报文发送部分、 一个为检测报文接收部分, 以下结合具体实施例, 对本发明实施例进行详细说明。 图 1是本发明实施例以太网端口环回检测方法中检测报文发送部分的优选实施例 的流程图, 如图 1所示, 本实施例具体包括以下步骤: 步骤 S001 : 预先为网络设备设置检测报文的协议类型以及 VLAN模式。 本发明实施例中, 检测报文的 VLAN模式为可选项, 也就是说, 检测报文可以是 无 VLAN的, 也可以是连续 VLAN或离散 VLAN的; 本发明实施例假设检测报文需 要设置 VLAN模式。 步骤 S002: 网路设备根据上述设置, 生成检测报文。 本发明实施例中, 检测报文包括以太网类型、 源 MAC地址、 端口号以及关键字 信息等字段; 其中, 源 MAC地址为网络设备 CPU的 MAC地址; 且检测报文为广播 包。 步骤 S003 : 环回检测功能开启后, 网路设备在发送周期到来时, 将检测报文从各 端口发送出去。 网络设备发送检测的发送周期可预先设置, 并可通过定时器实现, 比如, 可以是 设置一个定时时间为 2秒的定时器, 作为网络设备发送检测报文的周期。 图 2是本发明实施例以太网端口环回检测方法中检测报文接收部分的优选实施例 的流程图, 如图 2所示, 本实施例具体包括以下步骤: 步骤 S101 : 网络设备接收到检测报文。 步骤 S102: 判断上述检测报文是否是本地发出的检测报文, 若是, 则执行步骤 S103 ; 否则, 执行步骤 S107。 本步骤中, 可通过检测报文中的源 MAC地址字段判断检测报文是否是本地发出 的。 步骤 S103 :从检测报文中解析出发送上述检测报文的端口号,关闭上述端口链路, 同时生成环回告警并上报。 本发明实施例通过禁用端口的 MAC地址学习功能来关闭端口链路。 步骤 S104: 开启端口链路定时器。 端口链路定时器时间可预先设置, 比如可设置为 30秒等。 步骤 S105 : 判断定时器是否到时, 若是, 则执行步骤 S106; 否则, 继续执行本 步骤。 步骤 S106: 开启上述端口链路, 同时生成环回恢复告警并上报, 结束。 本发明实施例通过启用端口的 MAC地址学习功能来开启端口链路; 步骤 S107: 将上述检测报文转发给下一个网络设备, 结束。 本发明实施例中, 环回告警及上述环回恢复告警中均包括网络设备号及端口号, 这样, 告警上报后, 用户即可得知是哪个设备的哪个端口发生了环回。 图 3是本发明实施例以太网端口环回检测装置优选实施例的原理框图, 如图 3所 示, 本发明实施例的以太网端口环回检测装置包括: 设置模块 01、 检测报文发送模块 02、 检测报文接收模块 03以及端口链路定时器 04; 其中, 设置模块 01, 设置为为用户提供设置检测报文的协议类型、 VLAN模式、 发送周 期以及端口链路定时器 04的定时时长的接口并保存用户设置。 检测报文发送模块 02, 设置为根据设置模块 01 中设置的检测报文的协议类型、 VLAN模式, 生成检测报文; 并在发送周期到来时, 将检测报文从网络设备的各端口 发送出去。 检测报文接收模块 03, 设置为判断网络设备收到的检测报文是否是从本地发出的 检测报文; 在上述检测报文是本地发出的检测报文时, 从检测报文中解析出发送上述 检测报文的端口号, 关闭上述端口链路, 同时生成环回告警并上报, 以及开启端口链 路定时器 04, 并在端口链路定时器 04到时后, 开启上述端口链路, 同时生成环回恢 复告警并上报; 在上述检测报文不是本地发出的检测报文时, 将上述检测报文转发给 下一个网络设备。 端口链路定时器 04, 设置为计时端口链路的关闭时长。 上述说明示出并描述了本发明实施例的优选实施例, 但如前所述, 应当理解本发 明并非局限于本文所披露的形式, 不应看作是对其他实施例的排除, 而可用于各种其 他组合、 修改和环境, 并能够在本文所述发明构想范围内, 通过上述教导或相关领域 的技术或知识进行改动。 而本领域人员所进行的改动和变化不脱离本发明的精神和范 围, 则都应在本发明所附权利要求的保护范围内。 The present invention relates to the field of communications, and in particular, to a method and an apparatus for detecting loopback of an Ethernet port. In the existing networking, the network may have a loop in the networking. If a loop exists in the network, after a network device sends a packet, the packets may be sent. After being forwarded by other network devices, the device returns to the network device, and the network device forwards the packets that have been sent by the network device again, and cycles back and forth, eventually exhausting the network bandwidth, making the link impossible. Normal communication, if it is serious, the network will be paralyzed. SUMMARY OF THE INVENTION The present invention provides a method and apparatus for detecting loopback of an Ethernet port, so as to prevent the network from being looped and causing network congestion. According to an aspect of the present invention, a method for detecting an Ethernet port loopback is provided. The method includes the following steps: The network device periodically sends a detection packet from each port; and determines whether the received detection packet is sent locally. If the packet is detected, the port number of the detection packet is parsed from the detection packet, and the port link is closed; otherwise, the detection packet is forwarded to the next network device. Preferably, the method further includes the following steps: setting a protocol type of the detection packet for the network device in advance; and generating, by the network device, the detection packet according to the foregoing setting. Preferably, after setting the protocol type for the detection packet, the foregoing method further performs the following steps: setting a VLAN (Virtual Local Area Network) mode for detecting the packet for the network device. Preferably, the foregoing detection message includes an Ethernet type, a source MAC (Medium/Media Access Control) address, a port number, and a keyword information field. Preferably, the network device generates a loopback alarm and reports the link link. Preferably, after the network device is shut down, the network device performs the following steps: opening the port link timer; determining whether the port link timer is up, if yes, enabling the port link and generating loopback recovery The alarm is reported and reported. Preferably, the above method disables the port link by disabling the MAC address learning function of the port; and enables the port link by enabling the MAC address learning function of the port. Preferably, the loopback alarm and the loopback recovery alarm include a network device number and a port number. Preferably, the detection message is a broadcast packet. Preferably, the network device determines, according to the source MAC address field in the received detection packet, whether the detection packet is a locally sent detection packet. According to another aspect of the present invention, an Ethernet port loopback detection apparatus is provided, including a detection packet sending module and a detection packet receiving module. The detection packet sending module is configured to periodically generate a detection packet. And sending out from each port of the network device; the detection packet receiving module is configured to determine whether the network device receives the detection packet is a locally sent detection packet, and the detection packet is sent locally by the detection packet. When the detection packet is not the local detection packet, the detection packet is forwarded to the next network. device. Preferably, the device further includes a port link timer and a setting module, where the port link timer is set to a time length of the timed port link; the setting module is configured to provide a user with a protocol type for setting the detection message, The VLAN mode, the sending period, and the interface duration of the port link timer described above, and save the user settings. Preferably, the detection packet receiving module is configured to generate a loopback alarm and report the same; and after the port link is closed, the port link timer is enabled, and after the port link timer expires, the port is opened. A link is generated and a loopback recovery alarm is generated and reported. The invention detects the packet and determines whether the loopback occurs in the network device, and the operation is simple and easy to implement, thereby effectively solving the problem that the network is looped and the network is paralyzed. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 1 is a flowchart of a preferred embodiment of detecting a packet transmitting portion in an Ethernet port loopback detection method according to an embodiment of the present invention; FIG. 2 is a schematic diagram of an Ethernet port loopback detection method according to an embodiment of the present invention; A flowchart of a preferred embodiment of the packet receiving portion of the packet is detected. FIG. 3 is a block diagram showing a preferred embodiment of the Ethernet port loopback detecting device according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS In order to make the technical problems, technical solutions and beneficial effects of the present invention more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The method for detecting the loopback of the Ethernet port in the embodiment of the present invention is divided into two parts, one is a detecting message sending part, and the other is a detecting message receiving part. The following describes the embodiment of the present invention in detail with reference to specific embodiments. 1 is a flowchart of a preferred embodiment of detecting a packet sending part in an Ethernet port loopback detection method according to an embodiment of the present invention. As shown in FIG. 1, the embodiment specifically includes the following steps: Step S001: Setting a network device in advance Detects the protocol type of the packet and the VLAN mode. In the embodiment of the present invention, the VLAN mode of the detection packet is optional, that is, the detection packet may be a VLAN-free or a continuous VLAN or a discrete VLAN. mode. Step S002: The network device generates a detection packet according to the foregoing setting. In the embodiment of the present invention, the detection packet includes a field such as an Ethernet type, a source MAC address, a port number, and a keyword information. The source MAC address is a MAC address of the network device CPU, and the detection packet is a broadcast packet. Step S003: After the loopback detection function is enabled, the network device sends the detection packet from each port when the sending period comes. The sending period of the network device sending detection may be preset, and may be implemented by using a timer. For example, a timer with a timing of 2 seconds may be set as a period for the network device to send the detection packet. 2 is a flowchart of a preferred embodiment of detecting a packet receiving part in an Ethernet port loopback detection method according to an embodiment of the present invention. As shown in FIG. 2, the embodiment specifically includes the following steps: Step S101: The network device receives the detection. Message. Step S102: Determine whether the detection message is a locally sent detection message, and if yes, execute step S103; otherwise, execute step S107. In this step, the source MAC address field in the packet is detected to determine whether the detection packet is sent locally. In the step S103, the port number of the detection packet is parsed from the detection packet, the port link is closed, and a loopback alarm is generated and reported. The embodiment of the invention closes the port link by disabling the MAC address learning function of the port. Step S104: Enable the port link timer. The port link timer time can be preset, for example, it can be set to 30 seconds. Step S105: Determine whether the timer expires, if yes, execute step S106; otherwise, continue to perform this step. Step S106: The port link is enabled, and a loopback recovery alarm is generated and reported, and the process ends. In the embodiment of the present invention, the port link is enabled by enabling the MAC address learning function of the port. Step S107: Forwarding the detection packet to the next network device, and ending. In the embodiment of the present invention, the loopback alarm and the loopback recovery alarm include the network device number and the port number, so that after the alarm is reported, the user can know which port of the device has loopback. 3 is a schematic block diagram of a preferred embodiment of an Ethernet port loopback detection apparatus according to an embodiment of the present invention. As shown in FIG. 3, the Ethernet port loopback detection apparatus of the embodiment of the present invention includes: a setup module 01, a detection packet sending module. 02, the detection packet receiving module 03 and the port link timer 04; wherein, the setting module 01 is set to provide the user with the protocol type, the VLAN mode, the sending period, and the timing duration of the port link timer 04 for setting the detection packet. Interface and save user settings. The detection packet sending module 02 is configured to generate a detection packet according to the protocol type and the VLAN mode of the detection packet set in the setting module 01, and send the detection packet from each port of the network device when the sending period comes. . The detection packet receiving module 03 is configured to determine whether the detection packet received by the network device is a detection packet sent from the local device. When the detection packet is a local detection packet, the detection packet is parsed and sent from the detection packet. The port number of the packet is detected, the port link is closed, a loopback alarm is generated and reported, and the port link timer 04 is enabled. After the port link timer expires, the port link is enabled. The loopback recovery alarm is generated and reported. When the detection packet is not sent by the local device, the detection packet is forwarded to the next network device. Port link timer 04, set to the shutdown time of the timing port link. The above description shows and describes a preferred embodiment of the embodiments of the present invention, but as described above, it should be understood that the invention is not limited to the forms disclosed herein, and should not be construed as Various other combinations, modifications, and environments are possible and can be modified by the teachings of the above teachings or related art within the scope of the inventive concept described herein. All changes and modifications made by those skilled in the art are intended to be within the scope of the appended claims.

Claims

权 利 要 求 书 Claim
1. 一种以太网端口环回检测方法, 所述方法包括以下步骤: An Ethernet port loopback detection method, where the method includes the following steps:
网络设备周期性从各端口发送检测报文;  The network device periodically sends detection packets from each port.
并判断收到的检测报文是否是本地发出的检测报文, 若是, 则从所述检测 报文中解析出发送所述检测报文的端口号, 并关闭所述端口链路; 否则, 将所 述检测报文转发给下一个网络设备。  And determining whether the received detection packet is a locally sent detection packet, and if yes, parsing the port number of the detection packet from the detection packet, and closing the port link; otherwise, The detection message is forwarded to the next network device.
2. 根据权利要求 1所述的方法, 其中, 所述方法还包括以下步骤: 2. The method according to claim 1, wherein the method further comprises the following steps:
预先为网络设备设置检测报文的协议类型;  Set the protocol type of the detection packet for the network device in advance;
网络设备根据所述设置, 生成检测报文。  The network device generates a detection packet according to the setting.
3. 根据权利要求 2所述的方法, 其中, 所述方法在为检测报文设置协议类型后, 还执行以下步骤: The method according to claim 2, wherein after setting a protocol type for detecting a message, the method further performs the following steps:
为所述网络设备设置检测报文的虚拟局域网 VLAN模式。  Setting a virtual local area network VLAN mode for detecting the packet for the network device.
4. 根据权利要求 1所述的方法, 其中, 所述检测报文包括以太网类型、 源介质访 问控制 MAC地址、 端口号以及关键字信息字段。 The method according to claim 1, wherein the detection message comprises an Ethernet type, a source medium access control MAC address, a port number, and a keyword information field.
5. 根据权利要求 4所述的方法, 其中, 所述网络设备在关闭端口链路的同时, 还 生成环回告警并上报。 The method of claim 4, wherein the network device generates a loopback alarm and reports the link link.
6. 根据权利要求 1所述的方法, 其中, 所述网络设备在关闭端口链路后, 还同时 执行以下步骤: The method according to claim 1, wherein the network device performs the following steps simultaneously after the port link is closed:
开启端口链路定时器;  Enable the port link timer.
判断端口链路定时器是否到时, 若是, 则开启所述端口链路, 同时生成环 回恢复告警并上报。  If the port link timer expires, the port link is enabled and the loopback recovery alarm is generated and reported.
7. 根据权利要求 1或 6所述的方法, 其中, 所述方法通过禁用端口的 MAC地址 学习功能来关闭端口链路; 通过启用端口的 MAC地址学习功能来开启端口链 路。 7. The method according to claim 1 or 6, wherein the method closes the port link by disabling the MAC address learning function of the port; and opening the port link by enabling the MAC address learning function of the port.
8. 根据权利要求 5或 6所述的方法, 其中, 所述环回告警及所述环回恢复告警中 包括网络设备号及端口号。 The method according to claim 5 or 6, wherein the loopback alarm and the loopback recovery alarm include a network device number and a port number.
9. 根据权利要求 1所述的方法, 其中, 所述检测报文为广播包。 9. The method according to claim 1, wherein the detection message is a broadcast packet.
10. 根据权利要求 4所述的方法, 其中, 所述网络设备根据收到的检测报文中的源 MAC地址字段来判断所述检测报文是否是本地发出的检测报文。 The method according to claim 4, wherein the network device determines, according to the source MAC address field in the received detection packet, whether the detection packet is a locally sent detection packet.
11. 一种以太网端口环回检测装置, 所述装置包括检测报文发送模块以及检测报文 接收模块; 其中, An Ethernet port loopback detection device, where the device includes a detection packet sending module and a detection packet receiving module;
所述检测报文发送模块, 设置为周期性生成检测报文, 并从网络设备的各 端口发送出去;  The detecting message sending module is configured to periodically generate a detecting message and send it out from each port of the network device;
所述检测报文接收模块, 设置为判断网络设备收到检测报文是否是本地发 出的检测报文, 并在所述检测报文是本地发出的检测报文时, 从所述检测报文 中解析出发送所述检测报文的端口号, 并关闭所述端口链路; 在所述检测报文 不是本地发出的检测报文时, 将所述检测报文转发给下一个网络设备。  The detection packet receiving module is configured to determine whether the network device receives the detection packet as a local detection packet, and when the detection packet is a local detection packet, the detection packet is sent from the detection packet. The port number of the detection packet is sent out, and the port link is closed. When the detection packet is not a local detection packet, the detection packet is forwarded to the next network device.
12. 根据权利要求 11所述的装置,其中,所述装置还包括端口链路定时器以及设置 模块, 12. The apparatus of claim 11, wherein the apparatus further comprises a port link timer and a setting module,
所述端口链路定时器, 设置为计时端口链路的关闭时长;  The port link timer is set to a timeout period of the timing port link;
所述设置模块, 设置为为用户提供设置检测报文的协议类型、 虚拟局域网 VLAN模式、 发送周期以及所述端口链路定时器的定时时长的接口, 并保存用 户设置。  The setting module is configured to provide an interface for setting a protocol type of the detection packet, a virtual local area network VLAN mode, a sending period, and a timing duration of the port link timer, and saving the user setting.
13. 根据权利要求 12所述的装置, 其中, 所述检测报文接收模块, 设置为生成环回 告警并上报; 以及在关闭端口链路后, 开启所述端口链路定时器, 并在所述端 口链路定时器到时后, 开启所述端口链路, 同时生成环回恢复告警并上报。 The device according to claim 12, wherein the detection message receiving module is configured to generate a loopback alarm and report the same; and after the port link is closed, the port link timer is turned on, and After the port link timer expires, the port link is enabled and a loopback recovery alarm is generated and reported.
PCT/CN2012/077839 2012-04-27 2012-06-29 Ethernet port loopback detection method and apparatus WO2013159450A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2014147780/08A RU2605494C2 (en) 2012-04-27 2012-06-29 METHOD AND DEVICE FOR DETECTING Ethernet PORTS LOOPING

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2012101291062A CN103378998A (en) 2012-04-27 2012-04-27 Method and device for Ethernet port loopback detection
CN201210129106.2 2012-04-27

Publications (1)

Publication Number Publication Date
WO2013159450A1 true WO2013159450A1 (en) 2013-10-31

Family

ID=49463579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/077839 WO2013159450A1 (en) 2012-04-27 2012-06-29 Ethernet port loopback detection method and apparatus

Country Status (3)

Country Link
CN (1) CN103378998A (en)
RU (1) RU2605494C2 (en)
WO (1) WO2013159450A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072694A1 (en) * 2014-09-04 2016-03-10 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
CN107872370A (en) * 2017-12-27 2018-04-03 广州芯德通信科技股份有限公司 A kind of Ethernet interface loop quick determination method
CN107888443A (en) * 2016-09-30 2018-04-06 中国移动通信集团广东有限公司 A kind of method, transmitter and the trunking of network servicequality monitoring
CN110601919A (en) * 2019-09-12 2019-12-20 烽火通信科技股份有限公司 Loopback detection method and system
CN112134775A (en) * 2020-09-25 2020-12-25 苏州浪潮智能科技有限公司 Switch loop detection method and device
CN113364641A (en) * 2020-03-06 2021-09-07 烽火通信科技股份有限公司 Loopback detection method and system for EOS (Ethernet over coax) service

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI514821B (en) * 2014-02-26 2015-12-21 Accton Technology Corp Network devices and loopback detection methods
CN104852826B (en) * 2015-04-13 2018-09-11 北京华为数字技术有限公司 A kind of loop detecting method and device
CN107800581B (en) * 2016-09-01 2022-03-18 中兴通讯股份有限公司 Two-layer network and loopback detection method thereof
CN106789626A (en) * 2017-01-12 2017-05-31 深圳市万网博通科技有限公司 Loop self-inspection self-healing method and device
US10523506B2 (en) 2017-08-02 2019-12-31 Nanning Fugui Precision Industrial Co., Ltd. Network configuration method and network device
CN108989155B (en) * 2018-09-25 2022-03-04 苏州盛科通信股份有限公司 Loop detection method and system based on tolerance mechanism
CN114567572B (en) * 2022-04-29 2023-01-31 南京金阵微电子技术有限公司 Network loop monitoring method, system, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925434A (en) * 2005-08-29 2007-03-07 中兴通讯股份有限公司 Method for detecting user side loop in digital user line switch-in multiplexer system
US20070121518A1 (en) * 2005-11-25 2007-05-31 Cisco Technology, Inc. Method and system for PHY loop detection
JP2008199555A (en) * 2007-02-16 2008-08-28 Kddi Corp Loop topology detection and circumvention method, communication apparatuses, management unit and program
CN101316197A (en) * 2007-05-28 2008-12-03 中国电信股份有限公司 Detection method and apparatus for Ethernet port loop of MSTP equipment
CN101710856A (en) * 2009-11-13 2010-05-19 中兴通讯股份有限公司 Method and equipment for detection processing of loopback of aggregation link

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002516042A (en) * 1996-01-31 2002-05-28 イプシロン ネットワークス インコーポレイテッド Method and apparatus for dynamically shifting between packet routing and switching in a transmission network
US7525974B2 (en) * 2003-11-10 2009-04-28 Nortel Networks Limited Method and apparatus for capability based addressing in a communications network
US7881207B2 (en) * 2005-11-10 2011-02-01 Futurewei Technologies, Inc. Method and system for loop-back and continue in packet-based network
CN101582809A (en) * 2008-05-14 2009-11-18 襄樊博创伟业电子有限公司 Loop-back detecting and inhibiting method of Ethernet exchanger chip port
CN101820363B (en) * 2009-02-27 2014-12-03 中国电信股份有限公司 Ethernet port loopback detection method and multi-service transport platform
CN102223238B (en) * 2010-04-16 2013-11-06 鸿富锦精密工业(深圳)有限公司 Switching equipment and loopback detecting method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925434A (en) * 2005-08-29 2007-03-07 中兴通讯股份有限公司 Method for detecting user side loop in digital user line switch-in multiplexer system
US20070121518A1 (en) * 2005-11-25 2007-05-31 Cisco Technology, Inc. Method and system for PHY loop detection
JP2008199555A (en) * 2007-02-16 2008-08-28 Kddi Corp Loop topology detection and circumvention method, communication apparatuses, management unit and program
CN101316197A (en) * 2007-05-28 2008-12-03 中国电信股份有限公司 Detection method and apparatus for Ethernet port loop of MSTP equipment
CN101710856A (en) * 2009-11-13 2010-05-19 中兴通讯股份有限公司 Method and equipment for detection processing of loopback of aggregation link

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072694A1 (en) * 2014-09-04 2016-03-10 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
US9660896B2 (en) * 2014-09-04 2017-05-23 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
US10038620B2 (en) 2014-09-04 2018-07-31 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
US10419325B2 (en) 2014-09-04 2019-09-17 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
CN107888443A (en) * 2016-09-30 2018-04-06 中国移动通信集团广东有限公司 A kind of method, transmitter and the trunking of network servicequality monitoring
CN107872370A (en) * 2017-12-27 2018-04-03 广州芯德通信科技股份有限公司 A kind of Ethernet interface loop quick determination method
CN110601919A (en) * 2019-09-12 2019-12-20 烽火通信科技股份有限公司 Loopback detection method and system
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
CN112134775A (en) * 2020-09-25 2020-12-25 苏州浪潮智能科技有限公司 Switch loop detection method and device
CN112134775B (en) * 2020-09-25 2022-08-09 苏州浪潮智能科技有限公司 Switch loop detection method and device

Also Published As

Publication number Publication date
RU2605494C2 (en) 2016-12-20
RU2014147780A (en) 2016-06-20
CN103378998A (en) 2013-10-30

Similar Documents

Publication Publication Date Title
WO2013159450A1 (en) Ethernet port loopback detection method and apparatus
TWI419530B (en) System and method for enabling legacy medium access control to do energy efficient ethernet
WO2009030170A1 (en) System for link fault handling, method and device for link fault detecting, handling
WO2007016833A1 (en) An method for the triggering failure detection of bidirectional forwarding detection
CN101110848B (en) Method for detecting channel trouble
TWI514821B (en) Network devices and loopback detection methods
CN101247270A (en) System and method for implementing bidirectional forwarding detection
WO2017215291A1 (en) Ipran device-based method for detecting and processing ethernet loop
TW201240410A (en) The method and system for selecting multi-path of network communication
WO2012028012A1 (en) Method and device for link aggregation
WO2012155817A1 (en) Loopback testing method, device and system
WO2012088843A1 (en) Method and system for bidirectional forwarding detection
WO2015149353A1 (en) Oam packet processing method, network device and network system
WO2011026347A1 (en) Method for ethernet loop network protection and thransmission node
CN100466583C (en) Fast ring network method against attack based on RRPP, apparatus and system
WO2012000243A1 (en) Protection switching method for ethernet automatic protection switching (eaps) ring network and master node in eaps ring network
CN101217445B (en) A method of loop generation protection and Ethernet ring system
WO2015007140A1 (en) Control method, device and optical transceiver
WO2011006428A1 (en) Method, apparatus and sysytem for realizing failure dectection
Choudhury Prioritized treatment of specific OSPF version 2 packets and congestion avoidance
CN101237319A (en) Time synchronization method in Ethernet ring network and Ethernet ring system
CN112039798B (en) Auto-negotiation method and device based on priority flow control
JP5300099B2 (en) Network control device, communication speed changing method and program
CN102347859A (en) Link rapidly recovering method and device
TWI394402B (en) Network detecting device and method of network quality detecting thereof

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2014147780

Country of ref document: RU

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 12875662

Country of ref document: EP

Kind code of ref document: A1