WO2009138011A1 - Method, apparatus, access device and system for port error detection - Google Patents

Method, apparatus, access device and system for port error detection Download PDF

Info

Publication number
WO2009138011A1
WO2009138011A1 PCT/CN2009/071593 CN2009071593W WO2009138011A1 WO 2009138011 A1 WO2009138011 A1 WO 2009138011A1 CN 2009071593 W CN2009071593 W CN 2009071593W WO 2009138011 A1 WO2009138011 A1 WO 2009138011A1
Authority
WO
WIPO (PCT)
Prior art keywords
access device
port
duplex
error
growth number
Prior art date
Application number
PCT/CN2009/071593
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 华为技术有限公司
Publication of WO2009138011A1 publication Critical patent/WO2009138011A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/4013Management of data rate on the bus
    • H04L12/40136Nodes adapting their rate to the physical link properties

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a port fault detection method and apparatus, and an access device and system.
  • Ethernet access devices are now 100BASE-TX or 1000BASE-TX ports.
  • auto-negotiation is enabled (that is, it can negotiate with other network devices to determine the most suitable working mode and rate).
  • the line accesses the user home gateway (HG, Home Gateway) or the computer, as shown in Figure 1.
  • 100BASE-TX is a 100Mbps carrier sense multiple access/collision detection (CSMA/CD, Carrier Sense Multiple Access/Collision Detected) LAN transmission through two pairs of five types of unshielded twisted pair or shielded twisted pair.
  • CSMA/CD carrier sense multiple access/collision detection
  • 802.3 Physical Layer Specification 1000BASE-TX is the IEEE 802.3 physical layer specification for 1000Mbps CSMA/CD LANs transmitted over four to five balanced copper cables. Since the user of the peer device may incorrectly modify the port mode of the network card or HG, the port mode mismatch problem often occurs.
  • the access device enables the auto-negotiation mode, and the peer device port works in the In the forced 100MFULL mode, the access device sends a fast link pulse (FLP, Fast Link Pulse) during negotiation, and the peer device only sends the IDLE signal, so that the access device can know the peer device according to the pattern.
  • FLP Fast Link Pulse
  • the transmission speed is 100M, but the duplex mode of the peer device port is not known, although the link can enter the connection state, and the access device port will eventually work in the 100MHALF (100 mega-duplex) mode, and the peer device works.
  • the 100MFULL mode is mismatched, and a large number of messages are lost.
  • the embodiment of the invention provides a method for detecting a port fault, which includes: reading a register of a physical layer PHY chip of a port of the access device, determining whether the working mode of the access device port is half duplex; if the access device port works The mode is half-duplex, and the error count of the access device port is read, and the half-duplex error indicator increase number is calculated according to the error count; if the half-duplex error indicator increase exceeds the preset error threshold, the work of the access device port is determined. There is a mismatch in the way.
  • the embodiment of the invention further provides a device for detecting a port fault, comprising: a determining unit, a calculating unit and a detecting unit; a determining unit, configured to read a register of a physical layer PHY chip of the port of the access device, and determine a port of the access device Whether the working mode is half-duplex; the calculating unit is configured to read the error count of the access device port according to the working mode of the access device port, and calculate the error value of the half-duplex error indicator according to the error technology; The number of half-duplex error indicators calculated according to the calculation unit exceeds a preset error threshold, and it is determined that the access device port works in a mismatched manner.
  • an embodiment of the present invention further provides an access device, including the foregoing device for detecting a port failure.
  • the embodiment of the present invention provides a method, a device, and an access device for detecting a port fault.
  • the access device works in a half-duplex mode
  • the port is detected by the monitoring port, and the Ethernet port specific error is detected.
  • the collision of the late Collisions error, the abnormal interrupt Aborts error, the receiving cyclic redundancy check CRC error, the receiving abnormal interrupt Aborts error, and the increase in the count can determine that the duplex mode of the access device and the peer device port do not match. Therefore, the technical solution of the embodiment of the present invention can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, thereby quickly finding the problem.
  • FIG. 1 is a common usage scenario diagram of an Ethernet access device in the prior art
  • FIG. 2 is a flowchart of a method for detecting a port failure of an Ethernet access device according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a process for detecting and processing a half-duplex working mode mismatch of an Ethernet access device according to Embodiment 2 of the present invention
  • FIG. 4 is a structural diagram of a device for detecting a port failure of an Ethernet access device according to Embodiment 3 of the present invention
  • FIG. 5 is a structural diagram of a system for detecting a port failure of an Ethernet access device according to Embodiment 4 of the present invention.
  • the embodiment of the invention provides a method and a device for detecting a port fault, and an access device and a system, which can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, and quickly find the problem.
  • a flowchart of a method for detecting a port fault of an Ethernet access device according to Embodiment 1 of the present invention includes the following processes:
  • Step 201 Read a register of a physical layer PHY chip of the port of the access device, and determine whether the working mode of the access device port is half duplex.
  • Step 202 If the working mode of the access device port is half-duplex, read an error count of the media access control sub-layer MAC chip of the access device port, and calculate a half-duplex error indicator growth according to the error count.
  • the PHY and the MAC are two parts that are logically independent and whose physical form is not limited, that is, the PHY and the MAC may be separate chips, or may be integrated in one chip, such as SOC ( Two parts on the System On a Chip, on-chip system).
  • Step 203 If the growth rate of the half-duplex error indicator exceeds a preset error threshold, it may be determined that the working mode of the access device port is mismatched.
  • the reading the error count of the access device port may specifically include: sending a Collisions growth number, sending a Late Collisions growth number, sending an Aborts growth number, and receiving an Aborts growth number and a receiving CRC growth number.
  • the half-duplex error indicator growth number can be calculated according to the following formula:
  • the formula used to calculate the growth index of the half-duplex error index is not unique, and there may be multiple types, for example, when ⁇ , ⁇ , and ⁇ are respectively 1; ⁇ and ⁇ are 0 respectively.
  • the above formula is: send Collisions growth number + send Late Collisions growth number + send Aborts growth number) / 1 second; for example, when ⁇ is 1; ⁇ and ⁇ are 0; ⁇ , ⁇ are 1, 0, respectively
  • the above formula is: Send Collisions growth number + receive Aborts growth number) / 1 second; other situations are similar, and will not be repeated here.
  • Step 203 that is, if the error indicator growth number exceeds a preset error threshold, it may be determined that the operation mode of the access device port fails to match, and the error threshold may be determined according to a specific actual situation. Set it for the case, for example, set to 15.
  • the step of determining that the access device port has a mismatch failure may be specifically: When the number of consecutive monitoring periods exceeds the error threshold, it is determined that the current working mode of the access device port is mismatched.
  • the error threshold may be set according to a specific situation, for example, set to 15.
  • the plurality of monitoring periods may be set according to a specific situation, for example, set to 3. That is, when the number of consecutive monitoring periods in which the half-duplex error indicator increase exceeds the preset error threshold (eg, 15) exceeds a preset value (eg, 3), the current work of the access device port may be determined. There is a mismatch in the way. For example, if the calculated half-duplex error indicator growth exceeds the preset error threshold within 4 consecutive monitoring periods (beyond the preset value of 3), it is determined that the current working mode of the access device port does not appear. Match the fault.
  • step 203 that is, if the error indicator growth number exceeds a preset error threshold, and after determining that the current working mode of the access device port has a mismatch failure, the step of automatically processing the fault may also be included.
  • the fault automatic processing may be performed by switching the working mode of the port to full duplex; and/or sending an alarm; and/or recording a log; and/or notifying the network administrator by sending an EMAIL or the like. Realized.
  • step of reading the register of the physical layer chip of the port of the access device may further include:
  • the access device negotiates in half-duplex mode and the peer device works in full-duplex mode. Before the access device sends a frame of data, if the peer device is transmitting data, the access device will detect that the channel is occupied, and then wait for a period of time before sending data. This detects that the channel is occupied and delayed transmission. meeting
  • FIG. 3 it is a schematic diagram of a process for detecting and processing a half-duplex working mode mismatch of an Ethernet access device provided by Embodiment 2 of the present invention, including the following process:
  • Step 301 The access device port is 100BASE-TX, and the auto-negotiation is enabled. After the physical layer chip detects the carrier, the negotiation starts. After the negotiation succeeds, the link is connected.
  • Step 302 Another situation will also affect the working mode of the physical layer of the port. That is, the network administrator manually modifies the mode of the access device port. For example, if the working mode of the port is 100MHALF, auto-negotiation is not enabled. Will directly modify the working mode of the port physical layer chip;
  • Step 303 Read a register of the physical layer chip, determine whether the current working mode is half duplex, and if yes, continue the subsequent steps; otherwise, end the process;
  • Step 304 If it is half-duplex, periodically read the error count of the port, and calculate the half-duplex error indicator growth number, for example: the error indicator growth number is expressed by the formula: (send Collisions growth number + send Late Collisions growth number + send Aborts Growth number) / 1 second to calculate, assuming a certain number of seconds, Send Collisions growth number to 10, send Late Collisions growth number to 5, send Aborts growth number to 5, then the error indicator growth number is 20;
  • Step 305 Determine whether the calculated error indicator growth exceeds the error threshold. If not, the next cycle continues to be read. For example: if the error threshold is 15, then the error threshold is exceeded by 20 according to the growth number 20 in the previous example;
  • Step 306 In order to avoid misjudgment, the step may be added in the whole process, that is, the port mismatch fault is considered to occur after the error indicator grows more than the error threshold multiple times, for example: 3 consecutive periods.
  • the access device needs to notify the outside world of the fault. Then, the fault can be notified to the outside world by sending an alarm or logging.
  • the above process may further include:
  • Step 307 The working mode of the physical layer of the access device switching port is full duplex, so that the port types at both ends match.
  • the Ethernet access device does not support the half-duplex working mode (for example, 1000BASE-TX port, only 1000MFULL, 100MFULL, and 10MFULL are supported), and the peer device only supports half-duplex.
  • the working mode auto-negotiation is enabled on both ends. Although both ends can receive the FLP of the peer end, there is no working mode supported by the two ends. Therefore, the link cannot enter the connection state and cannot work normally.
  • the working mode of the port does not support half-duplex, you can record the negotiation time at the beginning of the auto-negotiation. If the negotiation fails for a long period of time, for example, the peer device port supports only half-duplex. The duplex mode of the port cannot be matched. In this case, you can send an alarm to the network administrator to notify the network administrator for subsequent processing.
  • a structural diagram of a device for detecting a port failure of an Ethernet access device includes: a determining unit 410, a calculating unit 420, and a detecting unit 430, where:
  • the determining unit 410 is configured to read a register of a physical layer PHY chip of the port of the access device, and determine whether the working mode of the access device port is half duplex.
  • the calculating unit 420 is configured to: according to the working mode of the access device port is half-duplex, read an error count of the access device port, and calculate a half-duplex error indicator growth number according to the error count;
  • the detecting unit 430 is configured to determine that the working mode of the access device port has a mismatch fault according to the half-duplex error indicator growth number calculated by the calculating unit 420 exceeds an error threshold.
  • the calculation unit 420 calculates the half-duplex error indicator growth number according to the following formula: ( ⁇ sends Collisions growth number + ⁇ sends Late Collisions growth number + ⁇ sends Aborts growth number + ⁇ receives Aborts growth number + ⁇ receives CRC growth Number) /1 second; where: ⁇ , ⁇ , ⁇ , ⁇ , ⁇ are weight coefficients, ⁇ , ⁇ , ⁇ , ⁇ are respectively greater than or equal to 0; and at least one of ⁇ , ⁇ , ⁇ is not 0.
  • the formula used to calculate the growth index of the half-duplex error index is not unique, and there may be multiple types.
  • the above formula is For: send Collisions growth number + send Late Collisions growth number + send Aborts growth number + receive Aborts growth number + receive CRC growth number) / 1 second; for example, when ⁇ is 0; ⁇ and ⁇ are both; ⁇ , ⁇ When 1, 0, respectively, the above formula is: (send Late Collisions growth + send Aborts growth + receive Aborts growth) / 1 second; other situations are similar, and will not be repeated here.
  • the error threshold may be set according to a specific situation, for example, set to 15.
  • the plurality of monitoring periods may be set according to a specific situation, for example, set to 3.
  • the detecting unit 430 of the detecting device of the Ethernet access device port failure specifically includes: a monitoring unit 440 and a determining unit 450;
  • the monitoring unit 440 is configured to monitor whether the half-duplex error indicator growth number is continuous for a plurality of monitoring periods exceeding the preset error threshold;
  • the determining unit 450 is configured to determine, according to the half-duplex error indicator growth number, that the plurality of monitoring periods exceed the preset error threshold, and determine that the working mode of the access device port is mismatched.
  • the detecting device for the fault of the Ethernet access device port may further include: a processing unit 460, configured to switch the working mode of the access device port to full duplex, and/or send an alarm, and/or Logging, and/or notifying the network administrator to automatically handle the failure.
  • the access device 400 is provided with a port fault detecting device, and the device includes: a determining unit 410, a calculating unit 420, and a detecting unit 430, where:
  • the determining unit 410 is configured to read a register of a physical layer PHY chip of the port of the access device 400, and determine whether the working mode of the port of the access device 400 is half duplex.
  • the calculating unit 420 is configured to: according to the working mode of the access device port, half-duplex, read an error count of the port of the access device 400, and calculate a half-duplex error indicator growth number according to the error count. ;
  • the detecting device for the fault of the Ethernet access device port may further include: a processing unit 460, configured to switch the working mode of the access device port to full duplex, and/or send an alarm, and/or Logging, and/or notifying the network administrator to automatically handle the failure.
  • a processing unit 460 configured to switch the working mode of the access device port to full duplex, and/or send an alarm, and/or Logging, and/or notifying the network administrator to automatically handle the failure.
  • the invention provides a method and a device for detecting a port fault, and an access device and a system.
  • the access device works in a half-duplex working mode, it detects a specific error of the Ethernet port by monitoring the working index of the port (sending a Collisions error, Sending a late Collisions error, sending an Aborts error, receiving a CRC error, receiving an Aborts error, the count is incremented, determining that the duplex mode of the access device and the peer device port does not match, automatically switching the working mode, and sending an alarm log.
  • the technical solution of the embodiment of the present invention can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, and quickly find the problem; and can automatically recover after detecting the port fault. Or notify the network administrator to handle, thus reducing the administrative burden.

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

A method for port error detection is provided, the method involves: reading a register of a port physical layer (PHY) chip of an access device, judging whether the work mode of the port of the access device is half duplex; reading the error counting of the port of the access device, if the work mode of the port of the access device is half duplex and calculating an index increasing number of the half duplex error according to the error counting; determining the work mode of the port of the access device has a non-matching error, if the index increasing number of the half duplex error exceeds a preset error threshold value. An apparatus, access device and system for port error detection are also provided.

Description

一种端口故障的检测方法、 装置及接入设备和***  Port fault detection method, device and access device and system
本申请要求于 2008 年 5 月 14 日提交中国专利局、 申请号为 200810094733.0、 发明名称为"一种端口故障的检测方法、 装置及接入设备"的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。  This application claims priority to Chinese Patent Application No. 200810094733.0, entitled "Detection Method, Device and Access Device for Port Failure", which was submitted to the Chinese Patent Office on May 14, 2008. The citations are incorporated herein by reference.
技术领域 Technical field
本发明涉及通信技术领域, 尤其涉及一种端口故障的检测方法、装置及接 入设备和***。  The present invention relates to the field of communications technologies, and in particular, to a port fault detection method and apparatus, and an access device and system.
背景技术 Background technique
现在大部份以太网接入设备都是 100BASE-TX或者 1000BASE-TX类型的 端口, 默认使能自协商(即可以与其他网络设备协商确定最合适的工作方式和 速率), 通过五类双铰线接入用户家庭网关 (HG, Home Gateway )或者计算 机, 如图 1所示。 其中, 100BASE-TX是通过两对五类非屏蔽双绞线或者屏蔽 双绞线进行传输的 100Mbps载波侦听多路访问 /冲突检测 (CSMA/CD, Carrier Sense Multiple Access/Collision Detected )局域网的 IEEE 802.3物理层规格; 1000BASE-TX是通过四对五类平衡铜质电缆进行传输的 1000Mbps CSMA/CD 局域网的 IEEE 802.3物理层规格。 由于对端设备的用户可能会错误修改网卡或 者 HG的端口模式, 所以经常会发生端口模式不匹配的问题。  Most Ethernet access devices are now 100BASE-TX or 1000BASE-TX ports. By default, auto-negotiation is enabled (that is, it can negotiate with other network devices to determine the most suitable working mode and rate). The line accesses the user home gateway (HG, Home Gateway) or the computer, as shown in Figure 1. Among them, 100BASE-TX is a 100Mbps carrier sense multiple access/collision detection (CSMA/CD, Carrier Sense Multiple Access/Collision Detected) LAN transmission through two pairs of five types of unshielded twisted pair or shielded twisted pair. 802.3 Physical Layer Specification; 1000BASE-TX is the IEEE 802.3 physical layer specification for 1000Mbps CSMA/CD LANs transmitted over four to five balanced copper cables. Since the user of the peer device may incorrectly modify the port mode of the network card or HG, the port mode mismatch problem often occurs.
在实现本发明的过程中,发明人经过研究发现现有技术中以太端口模式不 匹配可能会导致用户无法正常使用业务, 例如, 接入设备使能了自协商模式, 而对端设备端口工作在强制 100MFULL ( 100兆全双工) 方式下, 协商时接入 设备发出快速连接脉冲 (FLP, Fast Link Pulse ), 对端设备只发送 IDLE信号, 这样接入设备根据码型可以知道对端设备的传输速度是 100M, 但是不知道对 端设备端口工作的双工方式, 虽然链路可以进入连接状态, 而接入设备端口最 终会工作的 100MHALF ( 100兆半双工) 方式, 和对端设备工作的 100MFULL 方式是不匹配的, 此时就会大量丟失报文。  In the process of implementing the present invention, the inventors have found through research that the Ethernet port mode mismatch in the prior art may cause the user to be unable to use the service normally. For example, the access device enables the auto-negotiation mode, and the peer device port works in the In the forced 100MFULL mode, the access device sends a fast link pulse (FLP, Fast Link Pulse) during negotiation, and the peer device only sends the IDLE signal, so that the access device can know the peer device according to the pattern. The transmission speed is 100M, but the duplex mode of the peer device port is not known, although the link can enter the connection state, and the access device port will eventually work in the 100MHALF (100 mega-duplex) mode, and the peer device works. The 100MFULL mode is mismatched, and a large number of messages are lost.
发明内容 Summary of the invention
本发明实施例提供一种端口故障的检测方法、装置及接入设备和***, 能 够对以太网接入设备和对端设备产生的端口工作方式不匹配的故障进行自动 检测, 快速发现问题。 本发明实施例提供以下技术方案: The embodiment of the invention provides a method and a device for detecting a port fault, and an access device and a system, which can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, and quickly find the problem. The embodiments of the present invention provide the following technical solutions:
本发明实施例提供一种端口故障的检测方法, 包括: 读取接入设备的端口 物理层 PHY芯片的寄存器, 判断接入设备端口的工作方式是否为半双工; 如 果接入设备端口的工作方式为半双工,读取接入设备端口的错误计数,根据错 误计数计算半双工错误指标增长数;如果半双工错误指标增长数超过预设的错 误门限, 确定接入设备端口的工作方式出现不匹配故障。  The embodiment of the invention provides a method for detecting a port fault, which includes: reading a register of a physical layer PHY chip of a port of the access device, determining whether the working mode of the access device port is half duplex; if the access device port works The mode is half-duplex, and the error count of the access device port is read, and the half-duplex error indicator increase number is calculated according to the error count; if the half-duplex error indicator increase exceeds the preset error threshold, the work of the access device port is determined. There is a mismatch in the way.
本发明实施例还提供一种端口故障的检测装置, 包括: 判断单元、 计算单 元和检测单元; 判断单元, 用于读取接入设备的端口物理层 PHY芯片的寄存 器, 判断接入设备端口的工作方式是否为半双工; 计算单元, 用于根据接入设 备端口的工作方式为半双工,读取接入设备端口的错误计数,根据错误技术计 算半双工错误指标增长数; 检测单元, 用于根据计算单元计算的半双工错误指 标增长数超过预设的错误门限, 确定接入设备端口的工作方式出现不匹配故 障。  The embodiment of the invention further provides a device for detecting a port fault, comprising: a determining unit, a calculating unit and a detecting unit; a determining unit, configured to read a register of a physical layer PHY chip of the port of the access device, and determine a port of the access device Whether the working mode is half-duplex; the calculating unit is configured to read the error count of the access device port according to the working mode of the access device port, and calculate the error value of the half-duplex error indicator according to the error technology; The number of half-duplex error indicators calculated according to the calculation unit exceeds a preset error threshold, and it is determined that the access device port works in a mismatched manner.
此外,本发明实施例还提供一种接入设备,包括上述端口故障的检测装置。 本发明实施例提供端口故障的检测方法、装置及接入设备, 当接入设备工 作在半双工工作方式时,通过监控端口的工作指标,检测以太端口特定错误(发 送冲突 Collisions错误、发送延时冲突 late Collisions错误、发送异常中断 Aborts 错误、接收循环冗余校验 CRC错误、接收异常中断 Aborts错误 )计数的增长, 能够判断出接入设备和对端设备端口的双工方式不匹配。 因此,通过本发明实 施例的技术方案,能够对以太网接入设备和对端设备产生的端口工作方式不匹 配的故障进行自动检测, 进而快速发现问题。  In addition, an embodiment of the present invention further provides an access device, including the foregoing device for detecting a port failure. The embodiment of the present invention provides a method, a device, and an access device for detecting a port fault. When the access device works in a half-duplex mode, the port is detected by the monitoring port, and the Ethernet port specific error is detected. The collision of the late Collisions error, the abnormal interrupt Aborts error, the receiving cyclic redundancy check CRC error, the receiving abnormal interrupt Aborts error, and the increase in the count can determine that the duplex mode of the access device and the peer device port do not match. Therefore, the technical solution of the embodiment of the present invention can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, thereby quickly finding the problem.
附图说明 DRAWINGS
图 1是现有技术中以太网接入设备的常见使用场景图;  1 is a common usage scenario diagram of an Ethernet access device in the prior art;
图 2是本发明实施例一以太网接入设备端口故障的检测方法流程图; 图 3 是本发明实施例二以太网接入设备半双工时工作方式不匹配的检测 和处理过程示意图;  2 is a flowchart of a method for detecting a port failure of an Ethernet access device according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a process for detecting and processing a half-duplex working mode mismatch of an Ethernet access device according to Embodiment 2 of the present invention;
图 4是本发明实施例三以太网接入设备端口故障的检测装置结构图; 图 5是本发明实施例四以太网接入设备端口故障的检测***结构图。 具体实施方式 4 is a structural diagram of a device for detecting a port failure of an Ethernet access device according to Embodiment 3 of the present invention; and FIG. 5 is a structural diagram of a system for detecting a port failure of an Ethernet access device according to Embodiment 4 of the present invention. detailed description
本发明实施例提供一种端口故障的检测方法、装置及接入设备和***, 能 够对以太网接入设备和对端设备产生的端口工作方式不匹配的故障进行自动 检测, 快速发现问题。 为使本发明的目的、 技术方案及优点更加清楚明白, 下 面参照附图并举实施例, 对本发明进一步详细说明。  The embodiment of the invention provides a method and a device for detecting a port fault, and an access device and a system, which can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, and quickly find the problem. The present invention will be further described in detail below with reference to the accompanying drawings.
如图 2所示,为本发明实施例一提供的以太网接入设备端口故障的检测方 法流程图, 包括以下过程:  As shown in FIG. 2, a flowchart of a method for detecting a port fault of an Ethernet access device according to Embodiment 1 of the present invention includes the following processes:
步骤 201、 读取接入设备的端口物理层 PHY芯片的寄存器, 判断所述接 入设备端口的工作方式是否为半双工;  Step 201: Read a register of a physical layer PHY chip of the port of the access device, and determine whether the working mode of the access device port is half duplex.
步骤 202、 如果所述接入设备端口的工作方式为半双工, 则读取所述接入 设备端口媒体访问控制子层 MAC芯片的错误计数, 根据所述错误计数计算半 双工错误指标增长数; 需要说明的是, 所述 PHY和 MAC是逻辑上独立而物 理形态不局限的两个部分, 即所述 PHY和 MAC可以是分别独立的芯片, 也 可以是集成在一个芯片, 如 SOC ( System On a Chip, 片上***)上的两个部 分。  Step 202: If the working mode of the access device port is half-duplex, read an error count of the media access control sub-layer MAC chip of the access device port, and calculate a half-duplex error indicator growth according to the error count. It should be noted that the PHY and the MAC are two parts that are logically independent and whose physical form is not limited, that is, the PHY and the MAC may be separate chips, or may be integrated in one chip, such as SOC ( Two parts on the System On a Chip, on-chip system).
步骤 203、 如果所述半双工错误指标增长数超过预设的错误门限, 即可确 定所述接入设备端口的工作方式出现不匹配故障。  Step 203: If the growth rate of the half-duplex error indicator exceeds a preset error threshold, it may be determined that the working mode of the access device port is mismatched.
其中, 所述的步骤 202中,读取所述接入设备端口的错误计数具体可以包 括: 发送 Collisions增长数、 发送 Late Collisions增长数、 发送 Aborts增长数、 以及接收 Aborts增长数和接收 CRC增长数。  In the step 202, the reading the error count of the access device port may specifically include: sending a Collisions growth number, sending a Late Collisions growth number, sending an Aborts growth number, and receiving an Aborts growth number and a receiving CRC growth number. .
半双工错误指标增长数则可以根据如下公式进行计算:  The half-duplex error indicator growth number can be calculated according to the following formula:
( α发送 Collisions增长数 + β发送 Late Collisions增长数 + γ发送 aborts 增长数 + δ接收 Aborts增长数 + μ接收 CRC增长数) /1秒; 其中: α、 β、 γ、 δ、 μ为权重系数, α、 β、 γ、 δ、 μ分别大于等于 0; 且 α、 β、 γ中至少有一个 不为 0。  (α sends Collisions growth number + β sends Late Collisions growth number + γ sends aborts growth number + δ receives Aborts growth number + μ receives CRC growth number) /1 second; where: α, β, γ, δ, μ are weight coefficients , α, β, γ, δ, μ are respectively greater than or equal to 0; and at least one of α, β, γ is not 0.
从上述公式可以看出, 用于计算半双工错误指标增长数的公式并不唯一, 可以有^^多种, 例如, 当 α、 β、 γ分别为 1 ; δ、 μ分别为 0时, 上述公式即为: 发送 Collisions增长数 +发送 Late Collisions增长数 +发送 Aborts增长数) /1 秒; 再如, 当 α为 1 ; β和 γ均为 0; δ、 μ分别为 1、 0时, 上述公式即为: (发 送 Collisions增长数 +接收 Aborts增长数 ) /1秒; 其他的情况与之类似, 在此 就不再赘述。 It can be seen from the above formula that the formula used to calculate the growth index of the half-duplex error index is not unique, and there may be multiple types, for example, when α, β, and γ are respectively 1; δ and μ are 0 respectively. The above formula is: send Collisions growth number + send Late Collisions growth number + send Aborts growth number) / 1 second; for example, when α is 1; β and γ are 0; δ, μ are 1, 0, respectively The above formula is: Send Collisions growth number + receive Aborts growth number) / 1 second; other situations are similar, and will not be repeated here.
所述的步骤 203 , 即如果所述错误指标增长数超过预设的错误门限, 即可 确定所述接入设备端口的工作方式出现不匹配故障的步骤中,所述的错误门限 可以依照具体实际情况而设定, 例如设定为 15。  Step 203, that is, if the error indicator growth number exceeds a preset error threshold, it may be determined that the operation mode of the access device port fails to match, and the error threshold may be determined according to a specific actual situation. Set it for the case, for example, set to 15.
此外, 为了避免误判, 在实际应用中, 如果所述错误指标增长数超过预设 的错误门限, 即可确定所述接入设备端口出现不匹配故障的步骤可以具体为: 当所述错误指标增长数连续多个监控周期都超过错误门限时 ,即可确定所 述接入设备端口当前的工作方式出现不匹配故障。 其中, 所述的错误门限可以 依照具体实际情况而设定, 例如设定为 15。 所述多个监控周期可以依照具体 实际情况而设定, 例如设定为 3。 即当所述半双工错误指标增长数超过所述预 设的错误门限(如 15 )的连续监控周期数超过预设值(如 3 )时, 即可确定所 述接入设备端口当前的工作方式出现不匹配故障。 例如连续 4 个监控周期内 (超过了预设值 3 ), 计算出的半双工错误指标增长数均超过预设的错误门限 值, 则确定该接入设备端口当前的工作方式出现了不匹配故障。  In addition, in order to avoid misjudgment, in an actual application, if the error indicator growth number exceeds a preset error threshold, the step of determining that the access device port has a mismatch failure may be specifically: When the number of consecutive monitoring periods exceeds the error threshold, it is determined that the current working mode of the access device port is mismatched. The error threshold may be set according to a specific situation, for example, set to 15. The plurality of monitoring periods may be set according to a specific situation, for example, set to 3. That is, when the number of consecutive monitoring periods in which the half-duplex error indicator increase exceeds the preset error threshold (eg, 15) exceeds a preset value (eg, 3), the current work of the access device port may be determined. There is a mismatch in the way. For example, if the calculated half-duplex error indicator growth exceeds the preset error threshold within 4 consecutive monitoring periods (beyond the preset value of 3), it is determined that the current working mode of the access device port does not appear. Match the fault.
此外, 在所述的步骤 203 , 即如果所述错误指标增长数超过预设的错误门 限,确定所述接入设备端口当前的工作方式出现不匹配故障后,还可以包括故 障自动处理的步骤,其中所述的故障自动处理可以通过切换端口的工作方式为 全双工; 和 /或发送告警; 和 /或记录日志; 和 /或通过发送 EMAIL通知网络管 理员等方式中的一种或几种予以实现。  In addition, in step 203, that is, if the error indicator growth number exceeds a preset error threshold, and after determining that the current working mode of the access device port has a mismatch failure, the step of automatically processing the fault may also be included. The fault automatic processing may be performed by switching the working mode of the port to full duplex; and/or sending an alarm; and/or recording a log; and/or notifying the network administrator by sending an EMAIL or the like. Realized.
另外,所述读取接入设备的端口物理层芯片的寄存器的步骤之前还可以包 括:  In addition, the step of reading the register of the physical layer chip of the port of the access device may further include:
接入设备端口自协商使能, 物理层芯片检测到载波后开始协商, 当协商成 功后链路连接起来, 继续后续步骤; 当在预定的时间内无法协商成功时, 确定 所述接入设备端口当前的工作方式与对端设备端口所支持的工作方式不匹配。 优选的, 当在预定的时间内无法协商成功时, 还包括通过发送告警; 和 /或记 录日志;和 /或通过发送 EMAIL通知网络管理员等自动处理故障方式中的一种 或几种予以实现。  After the auto-negotiation of the access device is enabled, the physical layer chip starts to negotiate after detecting the carrier. After the negotiation succeeds, the link is connected, and the subsequent steps are continued. When the negotiation fails successfully within the predetermined time, the access device port is determined. The current working mode does not match the working mode supported by the peer device port. Preferably, when the negotiation cannot be successful within a predetermined time, the method further includes: sending an alarm; and/or recording a log; and/or by sending an EMAIL to notify the network administrator or the like to automatically handle one or more of the failure modes. .
下面, 通过一个具体的应用实例对本发明上述实施例作进一步说明。 接入设备协商为半双工方式,对端设备工作在全双工方式。接入设备在发 送一帧数据前,如果对端设备正在发送数据, 此时接入设备会检测到信道被占 用, 则会等待一段时间再发送数据, 这种检测到信道被占用推迟发送的情况会Hereinafter, the above embodiment of the present invention will be further described by a specific application example. The access device negotiates in half-duplex mode and the peer device works in full-duplex mode. Before the access device sends a frame of data, if the peer device is transmitting data, the access device will detect that the channel is occupied, and then wait for a period of time before sending data. This detects that the channel is occupied and delayed transmission. meeting
■i己录一次 Deferred错误。 ■i has recorded a Deferred error.
当接入设备和对端设备同时都发送一帧数据时,接入设备由于工作在半双 工方式, CSMA/CD算法会检测到对端设备发出的载波信号, 会认为发生了冲 突, 于是停止自己发送的帧, Deferred错误计数也会增加一次, 等待一段时间 后重新发送数据。 如果接入设备发送帧的前 64字节还没有进入线路, 会记录 一次发送 Collisions错误,如果发送帧的前 64字节已经进入线路,会记录一次 发送 Late Collisions错误。 此时对端设备发送过来的帧数据会被丟弃, 然后记 录一次接收 Aborts错误。 这种情况下, 对端设备接收到的帧数据是不完整的, CRC校验会出错, 所以会纪录一次接收 CRC错误。  When both the access device and the peer device send one frame of data at the same time, the access device operates in the half-duplex mode, and the CSMA/CD algorithm detects the carrier signal sent by the peer device, and considers that a collision has occurred. The frame sent by itself, the Deferred error count will also be incremented once, and the data will be resent after waiting for a while. If the first 64 bytes of the frame sent by the access device have not entered the line, a Collisions error will be logged. If the first 64 bytes of the transmitted frame have entered the line, a Late Collisions error will be logged. At this time, the frame data sent by the peer device will be discarded, and then the Aborts error will be recorded once. In this case, the frame data received by the peer device is incomplete, and the CRC check will be in error, so a CRC error will be recorded.
如果同一个帧数据连续 15次发生 Deferred错误,则该帧数据将会被丟弃, 会记录一次发送 Aborts错误。  If a Deferred error occurs for the same frame data 15 times in a row, the frame data will be discarded and an Aborts error will be logged.
接入设备针对上述错误进行监控并结合工作方式的读取就可以检测出该 种工作方式不匹配的故障, 并做出相应的处理。 具体如图 3所示, 其为本发明 实施例二提供的以太网接入设备半双工时工作方式不匹配的检测和处理过程 示意图, 包括如下过程:  The access device monitors the above errors and combines the reading of the working mode to detect the fault that does not match the working mode, and performs corresponding processing. Specifically, as shown in FIG. 3, it is a schematic diagram of a process for detecting and processing a half-duplex working mode mismatch of an Ethernet access device provided by Embodiment 2 of the present invention, including the following process:
步骤 301、 接入设备端口为 100BASE-TX, 自协商使能, 物理层芯片检测 到载波后开始协商, 协商成功后链路连接起来;  Step 301: The access device port is 100BASE-TX, and the auto-negotiation is enabled. After the physical layer chip detects the carrier, the negotiation starts. After the negotiation succeeds, the link is connected.
步骤 302、 还有一种情况也会开始影响端口物理层的工作方式, 就是网络 管理员手工修改接入设备端口的模式, 例如修改端口工作方式为 100MHALF, 并不使能自协商, 这种情况就会直接修改端口物理层芯片的工作方式;  Step 302: Another situation will also affect the working mode of the physical layer of the port. That is, the network administrator manually modifies the mode of the access device port. For example, if the working mode of the port is 100MHALF, auto-negotiation is not enabled. Will directly modify the working mode of the port physical layer chip;
需要说明的是, 在实际应用中, 上述步骤 301和步骤 302为二选一。  It should be noted that, in practical applications, the foregoing steps 301 and 302 are two-choice.
步骤 303、读取物理层芯片的寄存器,判断当前的工作方式是否是半双工 , 如果是, 则继续后续步骤; 否则结束此流程;  Step 303: Read a register of the physical layer chip, determine whether the current working mode is half duplex, and if yes, continue the subsequent steps; otherwise, end the process;
步骤 304、 如果是半双工, 就定时读取端口的错误计数, 计算半双工错误 指标增长数, 例如: 错误指标增长数通过公式: (发送 Collisions增长数 +发送 Late Collisions增长数 +发送 Aborts增长数) /1秒进行计算,假设某一秒种内, 发送 Collisions增长数为 10, 发送 Late Collisions增长数为 5 , 发送 Aborts增 长数为 5, 则错误指标增长数即为 20; Step 304: If it is half-duplex, periodically read the error count of the port, and calculate the half-duplex error indicator growth number, for example: the error indicator growth number is expressed by the formula: (send Collisions growth number + send Late Collisions growth number + send Aborts Growth number) / 1 second to calculate, assuming a certain number of seconds, Send Collisions growth number to 10, send Late Collisions growth number to 5, send Aborts growth number to 5, then the error indicator growth number is 20;
步骤 305、 判断计算出来的错误指标增长数是否超过错误门限, 如果没有 超过, 则下一个周期就继续读取。 例如: 错误门限为 15, 则按照前面例子中 的增长数 20就超过了该错误门限 15;  Step 305: Determine whether the calculated error indicator growth exceeds the error threshold. If not, the next cycle continues to be read. For example: if the error threshold is 15, then the error threshold is exceeded by 20 according to the growth number 20 in the previous example;
步骤 306、 为了避免误判, 还可以在整个流程中增加此步骤, 即在错误指 标增长数多次超过错误门限后才认为出现了端口不匹配故障, 例如: 连续 3 个周期。 检测到该种故障后, 接入设备需要向外界通知该故障, 则可以釆用发 送告警、 记录日志等方法向外界通知该故障。  Step 306. In order to avoid misjudgment, the step may be added in the whole process, that is, the port mismatch fault is considered to occur after the error indicator grows more than the error threshold multiple times, for example: 3 consecutive periods. After the fault is detected, the access device needs to notify the outside world of the fault. Then, the fault can be notified to the outside world by sending an alarm or logging.
此外, 上述流程还可以包括:  In addition, the above process may further include:
步骤 307、 接入设备切换端口物理层的工作方式为全双工, 使两端端口类 型匹配。  Step 307: The working mode of the physical layer of the access device switching port is full duplex, so that the port types at both ends match.
还有另一种故障情况, 即接入设备是 1000BASE-TX类型的端口, 使能了 自协商, 而对端设备只支持 100MHALF和 10MHALF方式, 使能了自协商。  There is another fault condition, that is, the access device is a 1000BASE-TX type port, and auto-negotiation is enabled. The peer device only supports 100MHALF and 10MHALF modes, and auto-negotiation is enabled.
还有另一种故障情况, 即以太接入设备不支持半双工工作方式时 (例如 1000BASE-TX端口, 只支持 1000MFULL、 100MFULL和 10MFULL三种工 作方式), 而对端设备只支持半双工工作方式, 两端都使能了自协商, 虽然两 端都可以接收到对端的 FLP, 但是两端没有共同支持的工作方式, 因此链路无 法进入连接状态, 无法正常工作。 如果端口工作方式不支持半双工, 则可以在 开始自协商时就记录协商时间, 如果长时间无法协商成功, 例如超过 5秒, 则 认为对端设备端口只支持半双工, 导致两端设备端口的双工方式无法匹配, 这 时可以向网络管理员发送告警 , 通知网络管理员进行后续处理。  There is another fault condition, that is, when the Ethernet access device does not support the half-duplex working mode (for example, 1000BASE-TX port, only 1000MFULL, 100MFULL, and 10MFULL are supported), and the peer device only supports half-duplex. In the working mode, auto-negotiation is enabled on both ends. Although both ends can receive the FLP of the peer end, there is no working mode supported by the two ends. Therefore, the link cannot enter the connection state and cannot work normally. If the working mode of the port does not support half-duplex, you can record the negotiation time at the beginning of the auto-negotiation. If the negotiation fails for a long period of time, for example, the peer device port supports only half-duplex. The duplex mode of the port cannot be matched. In this case, you can send an alarm to the network administrator to notify the network administrator for subsequent processing.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于一计算机可 读取的存储介质中, 所述的存储介质, 如: ROM/RAM、 磁碟、 光盘等。  A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by a program instructing related hardware, and the program may be stored in a computer readable storage medium. Storage media, such as: ROM/RAM, disk, CD, etc.
如图 4所示,为本发明实施例三提供的以太网接入设备端口故障的检测装 置结构图, 包括: 判断单元 410、 计算单元 420、 检测单元 430, 其中:  As shown in FIG. 4, a structural diagram of a device for detecting a port failure of an Ethernet access device according to Embodiment 3 of the present invention includes: a determining unit 410, a calculating unit 420, and a detecting unit 430, where:
所述的判断单元 410, 用于读取接入设备的端口物理层 PHY芯片的寄存 器, 判断所述接入设备端口的工作方式是否为半双工; 所述的计算单元 420 , 用于根据所述接入设备端口的工作方式为半双工, 读取所述接入设备端口的错误计数,根据所述错误计数计算半双工错误指标增 长数; The determining unit 410 is configured to read a register of a physical layer PHY chip of the port of the access device, and determine whether the working mode of the access device port is half duplex. The calculating unit 420 is configured to: according to the working mode of the access device port is half-duplex, read an error count of the access device port, and calculate a half-duplex error indicator growth number according to the error count;
所述的检测单元 430 , 用于根据所述计算单元 420计算的半双工错误指标 增长数超过错误门限, 确定所述接入设备端口的工作方式出现不匹配故障。  The detecting unit 430 is configured to determine that the working mode of the access device port has a mismatch fault according to the half-duplex error indicator growth number calculated by the calculating unit 420 exceeds an error threshold.
其中, 所述的计算单元 420根据如下公式计算半双工错误指标增长数: ( α发送 Collisions增长数 + β发送 Late Collisions增长数 + γ发送 Aborts 增长数 + δ接收 Aborts增长数 + μ接收 CRC增长数) /1秒; 其中: α、 β、 γ、 δ、 μ为权重系数, α、 β、 γ、 δ、 μ分别大于等于 0; 且 α、 β、 γ中至少有一个 不为 0。  The calculation unit 420 calculates the half-duplex error indicator growth number according to the following formula: (α sends Collisions growth number + β sends Late Collisions growth number + γ sends Aborts growth number + δ receives Aborts growth number + μ receives CRC growth Number) /1 second; where: α, β, γ, δ, μ are weight coefficients, α, β, γ, δ, μ are respectively greater than or equal to 0; and at least one of α, β, γ is not 0.
从上述公式可以看出, 用于计算半双工错误指标增长数的公式并不唯一, 可以有^^多种, 例如, 当 α、 β、 γ、 δ、 μ分别为 1 时, 上述公式即为: 发送 Collisions增长数 +发送 Late Collisions增长数 +发送 Aborts增长数 +接收 Aborts增长数 +接收 CRC增长数) /1秒; 再如, 当 α为 0; β和 γ均为 1 ; δ、 μ分别为 1、 0时, 上述公式即为: (发送 Late Collisions增长数 +发送 Aborts 增长数 +接收 Aborts增长数) /1秒; 其他的情况与之类似, 在此就不再赘述。  It can be seen from the above formula that the formula used to calculate the growth index of the half-duplex error index is not unique, and there may be multiple types. For example, when α, β, γ, δ, and μ are respectively 1, the above formula is For: send Collisions growth number + send Late Collisions growth number + send Aborts growth number + receive Aborts growth number + receive CRC growth number) / 1 second; for example, when α is 0; β and γ are both; δ, μ When 1, 0, respectively, the above formula is: (send Late Collisions growth + send Aborts growth + receive Aborts growth) / 1 second; other situations are similar, and will not be repeated here.
当所述的检测单元 430检测到所述错误指标增长数超过预设的错误门限 时,确定所述接入设备端口当前的工作方式出现不匹配故障; 或者当所述检测 单元 430检测到所述错误指标增长数连续多个监控周期都超过预设的错误门 限时, 确定所述接入设备端口当前的工作方式出现不匹配故障。 其中, 所述的 错误门限可以依照具体实际情况而设定, 例如设定为 15。 所述多个监控周期 可以依照具体实际情况而设定, 例如设定为 3。  When the detecting unit 430 detects that the error indicator growth number exceeds a preset error threshold, determining that the current working mode of the access device port has a mismatch failure; or when the detecting unit 430 detects the When the error indicator growth number exceeds the preset error threshold for a plurality of consecutive monitoring periods, it is determined that the current working mode of the access device port is mismatched. The error threshold may be set according to a specific situation, for example, set to 15. The plurality of monitoring periods may be set according to a specific situation, for example, set to 3.
另外, 所述以太网接入设备端口故障的检测装置的检测单元 430 具体包 括: 监控单元 440和确定单元 450; 其中,  In addition, the detecting unit 430 of the detecting device of the Ethernet access device port failure specifically includes: a monitoring unit 440 and a determining unit 450;
所述的监控单元 440 , 用于监控所述半双工错误指标增长数是否连续多个 监控周期超过所述预设的错误门限;  The monitoring unit 440 is configured to monitor whether the half-duplex error indicator growth number is continuous for a plurality of monitoring periods exceeding the preset error threshold;
所述的确定单元 450 , 用于根据所述半双工错误指标增长数连续多个监控 周期超过所述预设的错误门限,确定所述接入设备端口的工作方式出现不匹配 故障。 此外, 所述以太网接入设备端口故障的检测装置还可以进一步包括: 处理单元 460 , 用于将所述接入设备端口的工作方式切换为全双工、 和 / 或发送告警、 和 /或记录日志、 和 /或通知网络管理员方式自动处理故障。 The determining unit 450 is configured to determine, according to the half-duplex error indicator growth number, that the plurality of monitoring periods exceed the preset error threshold, and determine that the working mode of the access device port is mismatched. In addition, the detecting device for the fault of the Ethernet access device port may further include: a processing unit 460, configured to switch the working mode of the access device port to full duplex, and/or send an alarm, and/or Logging, and/or notifying the network administrator to automatically handle the failure.
如图 5所示,为本发明实施例四提供的以太网接入设备端口故障的检测系 统结构图, 包括接入设备 400和对端设备 500, 其中:  As shown in FIG. 5, it is a structural diagram of a detection system for a port failure of an Ethernet access device according to Embodiment 4 of the present invention, which includes an access device 400 and a peer device 500, where:
所述接入设备 400设置有端口故障的检测装置, 所述装置包括: 判断单元 410、 计算单元 420、 检测单元 430, 其中:  The access device 400 is provided with a port fault detecting device, and the device includes: a determining unit 410, a calculating unit 420, and a detecting unit 430, where:
所述的判断单元 410, 用于读取接入设备 400的端口物理层 PHY芯片的 寄存器, 判断所述接入设备 400端口的工作方式是否为半双工;  The determining unit 410 is configured to read a register of a physical layer PHY chip of the port of the access device 400, and determine whether the working mode of the port of the access device 400 is half duplex.
所述的计算单元 420 , 用于根据所述接入设备端口的工作方式为半双工, 读取所述接入设备 400端口的错误计数,根据所述错误计数计算半双工错误指 标增长数;  The calculating unit 420 is configured to: according to the working mode of the access device port, half-duplex, read an error count of the port of the access device 400, and calculate a half-duplex error indicator growth number according to the error count. ;
所述的检测单元 430 , 用于根据所述计算单元 420计算的半双工错误指标 增长数超过错误门限,确定所述接入设备 400端口的工作方式与所述对端设备 500端口所支持的工作方式出现不匹配故障。  The detecting unit 430 is configured to determine, according to the calculation that the half-duplex error indicator growth number calculated by the calculating unit 420 exceeds an error threshold, the working mode of the port of the access device 400 and the port supported by the peer device 500 There is a mismatch in the way of working.
其中, 所述的计算单元 420根据如下公式计算半双工错误指标增长数: ( α发送 Collisions增长数 + β发送 Late Collisions增长数 + γ发送 Aborts 增长数 + δ接收 Aborts增长数 + μ接收 CRC增长数) /1秒; 其中: α、 β、 γ、 δ、 μ为权重系数, α、 β、 γ、 δ、 μ分别大于等于 0; 且 α、 β、 γ中至少有一个 不为 0。  The calculation unit 420 calculates the half-duplex error indicator growth number according to the following formula: (α sends Collisions growth number + β sends Late Collisions growth number + γ sends Aborts growth number + δ receives Aborts growth number + μ receives CRC growth Number) /1 second; where: α, β, γ, δ, μ are weight coefficients, α, β, γ, δ, μ are respectively greater than or equal to 0; and at least one of α, β, γ is not 0.
当所述的检测单元 430检测到所述错误指标增长数超过预设的错误门限 时,确定所述接入设备 400端口当前的工作方式出现不匹配故障; 或者当所述 检测单元 430检测到所述错误指标增长数连续多个监控周期都超过预设的错 误门限时,确定所述接入设备 400端口当前的工作方式出现不匹配故障。其中, 所述的错误门限可以依照具体实际情况而设定, 例如设定为 15。 所述多个监 控周期可以依照具体实际情况而设定, 例如设定为 3。  When the detecting unit 430 detects that the error indicator growth number exceeds a preset error threshold, determining that the current working mode of the port of the access device 400 is mismatched; or when the detecting unit 430 detects the When the error indicator growth number exceeds the preset error threshold, the current working mode of the port of the access device 400 is determined to be mismatched. The error threshold may be set according to a specific situation, for example, set to 15. The plurality of monitoring periods may be set according to specific conditions, for example, set to 3.
另外, 所述以太网接入设备端口故障的检测装置的检测单元 430 具体包 括: 监控单元 440和确定单元 450; 其中,  In addition, the detecting unit 430 of the detecting device of the Ethernet access device port failure specifically includes: a monitoring unit 440 and a determining unit 450;
所述的监控单元 440 , 用于监控所述半双工错误指标增长数是否连续多个 监控周期超过所述预设的错误门限; The monitoring unit 440 is configured to monitor whether the growth rate of the half-duplex error indicator is continuous The monitoring period exceeds the preset error threshold;
所述的确定单元 450 , 用于根据所述半双工错误指标增长数连续多个监控 周期超过所述预设的错误门限,确定所述接入设备端口的工作方式出现不匹配 故障。  The determining unit 450 is configured to determine, according to the half-duplex error indicator growth number, that the plurality of monitoring periods exceed the preset error threshold, and determine that the working mode of the access device port fails to match.
此外, 所述以太网接入设备端口故障的检测装置还可以进一步包括: 处理单元 460 , 用于将所述接入设备端口的工作方式切换为全双工、 和 / 或发送告警、 和 /或记录日志、 和 /或通知网络管理员方式自动处理故障。  In addition, the detecting device for the fault of the Ethernet access device port may further include: a processing unit 460, configured to switch the working mode of the access device port to full duplex, and/or send an alarm, and/or Logging, and/or notifying the network administrator to automatically handle the failure.
本发明提供了一种端口故障的检测方法、装置及接入设备和***, 当接入 设备工作在半双工工作方式时, 通过监控端口的工作指标,检测以太端口特定 错误(发送 Collisions错误、 发送 late Collisions错误、 发送 Aborts错误、 接收 CRC错误、 接收 Aborts错误)计数的增长, 判断接入设备和对端设备端口的 双工方式不匹配, 自动切换工作方式, 并发送告警记录日志。 因此, 通过本发 明实施例的技术方案,能够对以太网接入设备和对端设备产生的端口工作方式 不匹配的故障进行自动检测, 快速发现问题; 并且在检测到端口故障后能够进 行自动恢复或者通知网络管理员处理 , 从而降低了管理负担。  The invention provides a method and a device for detecting a port fault, and an access device and a system. When the access device works in a half-duplex working mode, it detects a specific error of the Ethernet port by monitoring the working index of the port (sending a Collisions error, Sending a late Collisions error, sending an Aborts error, receiving a CRC error, receiving an Aborts error, the count is incremented, determining that the duplex mode of the access device and the peer device port does not match, automatically switching the working mode, and sending an alarm log. Therefore, the technical solution of the embodiment of the present invention can automatically detect a fault that does not match the working mode of the port generated by the Ethernet access device and the peer device, and quickly find the problem; and can automatically recover after detecting the port fault. Or notify the network administrator to handle, thus reducing the administrative burden.
以上对本发明所提供的端口故障的检测方法、装置及接入设备进行了详细 施例的说明只是用于帮助理解本发明的方案; 同时,对于本领域的一般技术人 员, 依据本发明的思想, 在具体实施方式及应用范围上均会有改变之处, 综上 所述, 本说明书内容不应理解为对本发明的限制。  The foregoing detailed description of the method, apparatus, and access device for detecting port faults provided by the present invention is only for helping to understand the solution of the present invention. Meanwhile, for those skilled in the art, according to the idea of the present invention, The details of the present invention and the scope of the application are subject to change. The contents of the present specification are not to be construed as limiting the invention.

Claims

权 利 要 求 Rights request
1、 一种端口故障的检测方法, 其特征在于, 包括:  A method for detecting a port fault, which is characterized by comprising:
读取接入设备的端口物理层 PHY芯片的寄存器, 判断所述接入设备端口 的工作方式是否为半双工;  Reading a register of the physical layer PHY chip of the access device, and determining whether the working mode of the access device port is half duplex;
如果所述接入设备端口的工作方式为半双工,读取所述接入设备端口的错 误计数, 根据所述错误计数计算半双工错误指标增长数;  If the working mode of the access device port is half-duplex, the error count of the access device port is read, and the half-duplex error indicator growth number is calculated according to the error count;
如果所述半双工错误指标增长数超过预设的错误门限,确定所述接入设备 端口的工作方式出现不匹配故障。  If the half-duplex error indicator growth exceeds a preset error threshold, it is determined that the access device port operates in a mismatch fault.
2、 根据权利要求 1所述的端口故障的检测方法, 其特征在于, 所述错误 计数包括:  2. The method of detecting a port fault according to claim 1, wherein the error count comprises:
发送冲突 Collisions增长数、 发送延时冲突 Late Collisions增长数、 发送 异常中断 aborts增长数、接收异常中断 Aborts增长数和接收循环冗余校验 CRC 增长数中的一种或多种组合。  Send Collision Collisions Growth Number, Send Delay Collision Late Collisions Growth Number, Send Abnormal Interrupt aborts Growth Number, Receive Abnormal Interrupt Aborts Growth Number and Receive Cyclic Redundancy Check CRC Growth Number One or more combinations.
3、 根据权利要求 2所述的端口故障的检测方法, 其特征在于, 所述如果 所述半双工错误指标增长数超过预设的错误门限,确定所述接入设备端口的工 作方式出现不匹配故障, 具体为:  The method for detecting a port fault according to claim 2, wherein if the half-duplex error indicator increase exceeds a preset error threshold, it is determined that the working mode of the access device port does not occur. Matching faults, specifically:
当所述半双工错误指标增长数连续预设值个监控周期都超过预设的错误 门限时, 确定所述接入设备端口的工作方式出现不匹配故障。  When the half-duplex error indicator growth number exceeds the preset error threshold, the working mode of the access device port is determined to be mismatched.
4、 根据权利要求 2或 3所述的端口故障的检测方法, 其特征在于, 在所 述确定所述接入设备端口的工作方式出现不匹配故障之后, 还包括:  The method for detecting a port fault according to claim 2 or 3, further comprising: after determining that the working mode of the access device port is mismatched, further comprising:
将所述接入设备端口的工作方式切换为全双工、发送告警、记录日志和通 知网络管理员中的一种或多种组合。  Switching the working mode of the access device port to one or more combinations of full duplex, sending alarms, logging, and notifying the network administrator.
5、 一种端口故障的检测装置, 其特征在于, 包括:  A device for detecting a port failure, comprising:
判断单元, 用于读取接入设备的端口物理层 PHY芯片的寄存器, 判断所 述接入设备端口的工作方式是否为半双工;  a determining unit, configured to read a register of a physical layer PHY chip of the port of the access device, and determine whether the working mode of the access device port is half duplex;
计算单元,用于根据所述判断单元确定接入设备端口的工作方式为半双工 的结果,读取所述接入设备端口的错误计数,根据所述错误计数计算半双工错 误指标增长数;  a calculating unit, configured to determine, according to the determining unit, a working mode of the access device port as a half-duplex, read an error count of the access device port, and calculate a half-duplex error indicator growth number according to the error count ;
检测单元,用于根据所述计算单元计算的半双工错误指标增长数超过预设 的错误门限的结果, 确定所述接入设备端口的工作方式出现不匹配故障。 a detecting unit, configured to calculate, according to the calculating unit, a half-duplex error indicator growth number exceeding a preset As a result of the error threshold, it is determined that the access device port operates in a mismatched fault.
6、 根据权利要求 5所述的端口故障的检测装置, 其特征在于, 所述错误 计数包括:  6. The port fault detecting apparatus according to claim 5, wherein the error count comprises:
发送冲突 Collisions增长数、 发送延时冲突 Late Collisions增长数、 发送 异常中断 aborts增长数、接收异常中断 Aborts增长数和接收循环冗余校验 CRC 增长数中的一种或多种组合。  Send Collision Collisions Growth Number, Send Delay Collision Late Collisions Growth Number, Send Abnormal Interrupt aborts Growth Number, Receive Abnormal Interrupt Aborts Growth Number and Receive Cyclic Redundancy Check CRC Growth Number One or more combinations.
7、 根据权利要求 6所述的端口故障的检测装置, 其特征在于, 所述检测 单元具体包括:  The device for detecting a port fault according to claim 6, wherein the detecting unit specifically includes:
监控单元,用于监控所述半双工错误指标增长数是否连续预设值个监控周 期都超过所述预设的错误门限;  a monitoring unit, configured to monitor whether the half-duplex error indicator growth number is continuously preset, and the monitoring period exceeds the preset error threshold;
确定单元,用于根据所述监控单元输出的所述半双工错误指标增长数超过 所述预设错误门限的连续监控周期数超过预设值的结果,确定所述接入设备端 口的工作方式出现不匹配故障。  a determining unit, configured to determine, according to a result that the number of consecutive monitoring periods in which the half-duplex error indicator growth number of the monitoring unit exceeds the preset error threshold exceeds a preset value, determining how the access device port works A mismatch failure has occurred.
8、 根据权利要求 7所述的端口故障的检测装置, 其特征在于, 还包括: 处理单元,用于根据所述检测单元确定的所述接入设备端口的工作方式出 现不匹配故障的结果, 将所述接入设备端口的工作方式切换为全双工、 和 /或 发送告警、 和 /或记录日志、 和 /或通知网络管理员。  The device for detecting a port fault according to claim 7, further comprising: a processing unit, configured to: according to the working mode of the access device port determined by the detecting unit, a result of a mismatch failure occurs, Switching the working mode of the access device port to full duplex, and/or sending an alert, and/or logging, and/or notifying the network administrator.
9、 一种接入设备, 其特征在于, 包括如权利要求 5至 8所述的端口故障 的检测装置。  An access device, comprising the port failure detecting device according to any one of claims 5 to 8.
10、 一种通信***, 其特征在于, 包括接入设备和与该接入设备通信的对 端设备, 其中, 所述接入设备为如权利要求 9所述的接入设备。  A communication system, comprising: an access device and a peer device in communication with the access device, wherein the access device is the access device according to claim 9.
PCT/CN2009/071593 2008-05-14 2009-04-30 Method, apparatus, access device and system for port error detection WO2009138011A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810094733.0 2008-05-14
CN2008100947330A CN101286900B (en) 2008-05-14 2008-05-14 Port fault detecting method, device, and access device

Publications (1)

Publication Number Publication Date
WO2009138011A1 true WO2009138011A1 (en) 2009-11-19

Family

ID=40058880

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/071593 WO2009138011A1 (en) 2008-05-14 2009-04-30 Method, apparatus, access device and system for port error detection

Country Status (2)

Country Link
CN (1) CN101286900B (en)
WO (1) WO2009138011A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441818A (en) * 2013-08-27 2013-12-11 大唐移动通信设备有限公司 Method and device for detecting errors of data transmission

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286900B (en) * 2008-05-14 2010-07-28 华为技术有限公司 Port fault detecting method, device, and access device
CN102201943A (en) * 2010-03-26 2011-09-28 上海傲蓝通信技术有限公司 Method for detecting mismatching of duplex modes two ends of Ethernet link and Ethernet interface
CN106301854B (en) * 2015-06-05 2020-02-14 中兴通讯股份有限公司 Automatic switching method and device for external network port connection types and sub-rack management board
CN106484574A (en) * 2016-09-23 2017-03-08 北京无线电测量研究所 A kind of abnormal detection method of PCI-Express Link State and system
CN111093124B (en) * 2019-12-13 2022-02-18 苏州浪潮智能科技有限公司 Abnormity positioning method and device, backbone network switch and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003324463A (en) * 2002-04-26 2003-11-14 Mitsubishi Electric Corp Communication path switching apparatus
CN1324850C (en) * 2003-12-04 2007-07-04 中兴通讯股份有限公司 Testing method for nucleus plate of digital user inserting into module
CN101155086A (en) * 2006-09-26 2008-04-02 中兴通讯股份有限公司 Network flux statistical method for broad band and narrow band integrated access equipment
CN101286900A (en) * 2008-05-14 2008-10-15 华为技术有限公司 Port fault detecting method, device, and access device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1149794C (en) * 1999-07-27 2004-05-12 ***武汉邮电科学研究院 Interfacing apparatus and method for adapting ethernet directly to physical channel

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003324463A (en) * 2002-04-26 2003-11-14 Mitsubishi Electric Corp Communication path switching apparatus
CN1324850C (en) * 2003-12-04 2007-07-04 中兴通讯股份有限公司 Testing method for nucleus plate of digital user inserting into module
CN101155086A (en) * 2006-09-26 2008-04-02 中兴通讯股份有限公司 Network flux statistical method for broad band and narrow band integrated access equipment
CN101286900A (en) * 2008-05-14 2008-10-15 华为技术有限公司 Port fault detecting method, device, and access device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441818A (en) * 2013-08-27 2013-12-11 大唐移动通信设备有限公司 Method and device for detecting errors of data transmission
CN103441818B (en) * 2013-08-27 2016-07-20 大唐移动通信设备有限公司 The detection method of a kind of data transmission fault and device

Also Published As

Publication number Publication date
CN101286900B (en) 2010-07-28
CN101286900A (en) 2008-10-15

Similar Documents

Publication Publication Date Title
US5905870A (en) Arrangement for initiating and maintaining flow control in shared-medium, full-duplex, and switched networks
US5784559A (en) Full duplex flow control for ethernet networks
US5432775A (en) Auto negotiation system for a communications network
US6580697B1 (en) Advanced ethernet auto negotiation
WO2009138011A1 (en) Method, apparatus, access device and system for port error detection
US8195989B1 (en) Detection of ethernet link failure
US20080267081A1 (en) Link layer loop detection method and apparatus
TW200536715A (en) System, method and device for autonegotiation
WO2007125080A1 (en) Methods and arrangements to detect a failure in a communication network including bundled adapters
JP5862445B2 (en) Communication device
US6778551B1 (en) Collision control systems and methods utilizing an inter-frame gap code counter
US20080089249A1 (en) Automated correction of duplex mismatches
US7420938B2 (en) Finding duplex mismatches in copper based networks
WO2014044190A1 (en) Method and device for adjusting ethernet data transmission rate
JP2004007142A (en) Lan interface apparatus and setting control program used for the same
US20080013565A1 (en) Reverse Polling Algorithm For Shared Resources To Reduce Collisions In A Network
JP2003258939A (en) Duplex monitoring method
Cisco Troubleshooting Token Ring
Cisco Solving Ethernet Problems
JP3796401B2 (en) Node monitoring method, node monitoring system, and recording medium
JP4612614B2 (en) Communication apparatus and duplex setting method thereof
WO2002078242A1 (en) Mechanism to strip larq header and regenerate fcs to support sleep mode wake up
TW411676B (en) Arrangement in a network repeater for monitoring link integrity and automatically down shifting link speed
JP3570509B2 (en) Ethernet interface
JP2003218977A (en) Communication apparatus, communication control method thereof, and program

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

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

Country of ref document: EP

Kind code of ref document: A1