Ethernet physical layer line connection fault detection positioning method and system, storage medium and product
By introducing PHY chip status dual detection in Ethernet, combining clock frequency and status register methods, real-time, automated detection and positioning of physical layer disconnection on Ethernet is realized, solving the problems of insufficient real-time and limited topological forms in the prior art, and improving the stability and fault recovery efficiency of the network.
Patent Information
- Application Number
- CN202510561294.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-08
AI Technical Summary
The existing Ethernet physical layer fault detection methods have problems such as insufficient real-time, low degree of automation, and inaccurate fault location. They cannot detect and respond at the moment of failure, and the network topology is limited.
The real-time detection method of Ethernet frame sequential addressing bits combined with PHY chip clock frequency and status registers is adopted to support ring, linear and hybrid topology structures, and the automatic positioning and seamless switching of line breaking faults is achieved through the master and slave collaboration mechanism.
Real-time and automated detection of Ethernet physical layer disconnection is realized, detection reliability and response speed are improved, multiple topological structures are supported, and network communications are ensured to the stability and rapid recovery.
Smart Images

Figure CN120281639A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication network fault detection, and more specifically, relates to a method, system, storage medium and product for detecting and locating Ethernet physical layer line connection faults. Background Art
[0002] With the rapid development of industrial automation and intelligent manufacturing, Ethernet, as the main communication network, is widely used in fields such as industrial control and automotive electronics. In these applications, the reliability and real-time performance of the network are crucial. However, complex application environments (such as high temperature, high humidity, electromagnetic interference, etc.) may cause various faults in the Ethernet physical layer, such as line open circuit, short circuit, connector looseness, etc., thereby affecting the stable operation of the entire system.
[0003] Traditional detection methods for Ethernet physical layer faults mainly include interoperability testing and cable diagnosis. However, traditional detection methods have the following deficiencies: ① Lack of real-time performance: Unable to detect and respond instantly when a fault occurs, which may lead to a short communication interruption in the system; ② Low degree of automation: Manual intervention is required for fault diagnosis and handling, increasing the maintenance cost and time; ③ Inaccurate fault location: It is difficult to locate the fault point in a timely and accurate manner, affecting the fault repair efficiency.
[0004] Therefore, there is an urgent need for a method that can detect and locate Ethernet physical layer faults in real-time and automatically to improve the reliability and maintenance efficiency of the network system.
[0005] In existing research, the paper Experimental Evaluation of Failure-Detection Schemes in Real-time Communication Networks by Seungjae Han and Kang G. Shin mentions a method of detecting link faults based on neighbor "heartbeat" signals and end-to-end "heartbeat" signals. However, it performs fault detection based on the upper layer protocol, with a relatively high detection delay for faults, and there is also a detection blind spot for nodes that partially fail but still send heartbeat signals.
[0006] Patent CN112019416A discloses a redundant communication method based on EtherCAT. By utilizing the automatic loopback function of the EtherCAT slave control chip, a bidirectional loop structure is designed, and a redundant control layer is added to the EtherCAT master station to determine the link fault point. However, this method has the following deficiencies: First, this method is based on the EtherCAT protocol and cannot be applied to other real-time Ethernet networks; second, this method is based on the self-loopback function of the EtherCAT slave (ECS), which limits the device selection range; third, this method only supports ring topologies and does not support linear or hybrid topologies; fourth, this method uses the working counter WKC to judge open circuits and needs to set the WKC expected value for each slave station.
[0007] Patent CN105847050A mentions an industrial Ethernet disconnection fault detection and clock synchronization recovery method based on redundant connections between a master station and multiple slave stations. Its deficiencies are as follows: This method is relatively sensitive to the setting of timeout parameters. If the network environment is complex or there is a large interference, the return frame may be delayed or lost, resulting in inaccurate fault judgment; it is unable to perform real-time forwarding recovery for several data frames after the line connection is disconnected; in addition, in a large-scale network, the transmission delay fluctuations between slave stations may affect the synchronization accuracy.
[0008] Existing research mostly relies on timeout fault diagnosis, with insufficient real-time performance. If a short timeout time is set, the resistance to environmental disturbances is low. Some research is based on the ECS self-loopback function under the EtherCAT protocol, which is only compatible with the EtherCAT protocol, limiting the device selection range and the network topology form at the same time, making it difficult to expand. Summary of the Invention
[0009] In view of the above defects or improvement requirements of the prior art, the present invention provides an Ethernet physical layer line connection fault detection and location method, system, storage medium, and product, aiming to improve the reliability and response speed of Ethernet physical layer disconnection detection and expand the applicable range.
[0010] To achieve the above object, according to the first aspect of the present invention, an Ethernet physical layer line connection fault detection and location method is proposed, including the following steps:
[0011] The master station of the Ethernet sends an Ethernet frame containing sequential addressing bits, and each slave station processes the Ethernet frame in sequence according to the connection order, while incrementing the sequential addressing bits.
[0012] Each slave station detects the clock frequency and status register of the PHY chip of its network interface in real time; when any slave station detects that the clock frequency of the PHY chip of the network interface drops below a preset threshold or the status register is link-down, it is determined that a disconnection fault has occurred, and the Ethernet frame is returned from the corresponding slave station network interface to the master station, and the master station determines the disconnection position in real time according to the sequence addressing bit of the received Ethernet frame.
[0013] As a further preference, when the Ethernet is in a ring topology: after determining that a disconnection fault has occurred, automatically switch the port status and change the Ethernet communication mode from half-duplex communication to full-duplex communication.
[0014] As a further preference, when the Ethernet is in a ring topology: the master station and n slave stations each have two network interfaces, namely network interface 0 and network interface 1; network interface 0 of the master station is connected to network interface 0 of slave station 1, network interface 1 of slave station i is connected to network interface 0 of slave station i + 1, and network interface 1 of slave station n is connected to network interface 1 of the master station, where 1 ≤ i < n;
[0015] When operating normally, it is half-duplex communication: the master station's network interface 0 sends an Ethernet frame, each slave station processes the Ethernet frame received by its network interface 0 and sends it to the next slave station through network interface 1, and finally the master station's network interface 1 receives the final Ethernet frame;
[0016] When a disconnection fault occurs, it changes to full-duplex communication: the slave station i before the break point triggers a slave station disconnection detection alarm. At this time, the Ethernet frame sent by the master station's network interface 0 is transmitted to the network interface 0 of slave station i, and after being processed by slave station i, it is returned to the master station's network interface 0; after receiving the Ethernet frame, the master station's network interface 0 triggers a master station disconnection detection alarm and re-sends the received Ethernet frame from the master station's network interface 1 to the network interface 1 of slave station n. Slave station n does not perform any processing and directly sends it out from network interface 0 until the network interface 1 of slave station i + 1. At this time, slave station i + 1 triggers a slave station disconnection detection alarm, processes the Ethernet frame, and sends it out through network interface 1. The subsequent slave stations correctly process the Ethernet frame, and finally the master station's network interface 1 receives the final Ethernet frame.
[0017] As a further preference, when the Ethernet is in a linear topology: the master station has only one network interface, and n slave stations each have two network interfaces, namely network interface 0 and network interface 1; the master station's network interface is connected to network interface 0 of slave station 1, network interface 1 of slave station i is connected to network interface 0 of slave station i + 1, and network interface 1 of slave station n has no connection, where 1 ≤ i < n;
[0018] When operating normally: the Ethernet frame sent by the master station's network interface is processed and transmitted in sequence starting from slave station 1 and reaches slave station n, and then is returned from slave station n to the master station's network interface;
[0019] When a disconnection fault occurs: the slave station i in front of the break point triggers a slave station disconnection detection alarm, and slave station i directly returns the processed Ethernet frame to the master station's network interface, triggering a master station disconnection detection alarm.
[0020] As a further preference, when the Ethernet has a hybrid topology: the master station has multiple network interfaces, and each network interface of the master station is respectively connected to several slave stations to form a ring topology and a linear topology respectively, thereby obtaining a hybrid topology;
[0021] When a disconnection fault occurs, according to the method corresponding to the ring topology or the linear topology structure where the fault occurs, the master station is triggered to detect and alarm for disconnection.
[0022] As a further preference, when triggering the master station to detect and alarm for disconnection, the sequential addressing bit of the Ethernet frame received by the master station at this time is i, so as to determine in real time that a disconnection occurs between slave station i and slave station i + 1.
[0023] As a further preference, the preset threshold is 50 MHz.
[0024] According to the second aspect of the present invention, there is provided an Ethernet physical layer line connection fault detection and location system, including a processor, and the processor is used to execute the above-mentioned Ethernet physical layer line connection fault detection and location method.
[0025] According to the third aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Ethernet physical layer line connection fault detection and location method is realized.
[0026] According to the fourth aspect of the present invention, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned Ethernet physical layer line connection fault detection and location method is realized.
[0027] Generally speaking, compared with the prior art through the above technical solutions conceived by the present invention, the following technical advantages are mainly possessed:
[0028] 1. Based on real-time Ethernet, the present invention introduces dual detection of the PHY chip status, provides a diagnostic method for physical layer line connection faults with real-time response and automated detection, and improves the reliability and response speed of disconnection detection by combining PHY chip clock frequency monitoring and real-time judgment of interface connection status bits.
[0029] 2. The network communication protocol of the detection method of the present invention is not restricted. Compared with general redundant communication schemes, the range of device selection is wider. At the same time, the present invention does not limit the network topology method and supports various topology connections such as ring topology, linear topology, and hybrid topology.
[0030] 3. The present invention can automatically switch the port status after a line break, changing the communication mode of the ring network from half-duplex to full-duplex; through the cooperation mechanism of the master station triggering the retransmission of two-way messages and the slave station actively closing the broken line port, seamless switching from the ring network to the double-chain network is achieved. Furthermore, in the case of hybrid network topology communication, after a physical layer line break, line break detection can be triggered, the position of the broken line can be located, and the network topology structure can be re-formed. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a block diagram of the ring topology according to an embodiment of the present invention;
[0032] Figure 2 It is a schematic diagram of a line break in the case of the ring topology according to an embodiment of the present invention;
[0033] Figure 3 It is a block diagram of the linear topology according to an embodiment of the present invention;
[0034] Figure 4 It is a block diagram of the hybrid topology according to an embodiment of the present invention;
[0035] Figure 5 It is a block diagram of the slave station architecture and the message transmission direction according to an embodiment of the present invention;
[0036] Figure 6 It is a block diagram of the slave station data processing sequence according to an embodiment of the present invention;
[0037] Figure 7 It is a block diagram of data positioning and processing after triggering a line break according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0039] An Ethernet physical layer line connection fault detection and location method provided by an embodiment of the present invention includes the following steps:
[0040] The master station of the Ethernet sends an Ethernet frame containing sequential addressing bits, and each slave station processes the Ethernet frame in sequence according to the connection order, and increments the sequential addressing bits at the same time;
[0041] Each slave station detects the clock frequency and status register of the PHY chip of its network port in real time; when the physical layer line is normally connected, the PHY chip is at the working clock frequency and the status register is link-up, and when the physical layer line is broken, the working clock frequency of the PHY chip decreases abnormally and the status register is link-down;
[0042] Therefore, when it is detected that the PHY chip clock frequency of any slave station network port drops below a preset threshold (preferably 50 MHz) or the status register is link-down, it is determined that a disconnection fault occurs, and the Ethernet frame is transmitted back from the corresponding slave station network port to the master station. The master station determines the disconnection position in real time according to the sequence addressing bits of the received Ethernet frame.
[0043] Furthermore, the Ethernet can be a ring topology, a linear topology, or a hybrid topology, as follows:
[0044] (1) Ring topology
[0045] The real-time Ethernet master station is sequentially connected to n slave stations to form a loop. The master station and each slave station each have two network ports: network port 0 and network port 1; network port 0 of the master station is connected to network port 0 of slave station 1, network port 1 of slave station i (1 ≤ i < n) is connected to network port 0 of slave station i + 1, and network port 1 of slave station n is connected to network port 1 of the master station, forming a ring network topology, as Figure 1 shown. The slave station will process the Ethernet frame received by network port 0 and send it out through network port 1, while the Ethernet frame received by network port 1 will not be processed and will be directly sent out through network port 0.
[0046] During normal operation: The master station sends an Ethernet frame through network port 0. Each slave station receives the Ethernet frame through network port 0, processes it correctly, and sends it to the next slave station through network port 1. Finally, the master station receives the final Ethernet frame through network port 1. At this time, it is half-duplex communication in the ring topology, only using the forward data path and reserving the reverse data path.
[0047] During a disconnection fault: When the slave station detects that the PHY chip status register is link-down or the clock frequency is lower than 50 MHz, it triggers the slave station disconnection detection alarm. When receiving an Ethernet frame again, it will send out the processed data from the network port on the normal connection side. Specifically:
[0048] As Figure 2 shown, the slave station i before the breakpoint triggers the slave station disconnection detection alarm. At this time, the Ethernet frame sent by the master station through network port 0 will be transmitted to network port 0 of slave station i, and after being processed by slave station i, it will be transmitted back to network port 0 of the master station through network port 0;
[0049] After the master station receives the Ethernet frame through network port 0, it will trigger the master station disconnection detection alarm and re-send the received Ethernet frame through network port 1;
[0050] The Ethernet frame sent from the master station through Network Port 1 will be sent to Network Port 1 of Slave Station n. Slave Station n will not perform any processing and will directly send it out through Network Port 0 until it reaches Network Port 1 of Slave Station i + 1. At this time, Slave Station i + 1 triggers the slave station disconnection detection alarm, processes the Ethernet frame, and sends it out through Network Port 1. Subsequently, the subsequent slave stations will correctly process the Ethernet frame. At this time, full-duplex communication is used in the ring topology.
[0051] The Ethernet frame sent by the master station contains sequential addressing bits. Each slave station will increment the sequential addressing bits when processing the Ethernet frame. When the master station disconnection detection alarm is triggered, the master station reads the sequential addressing bits of the received Ethernet frame as i, that is, a disconnection occurs between Slave Station i and Slave Station i + 1.
[0052] (2) Linear Topology
[0053] Each slave station has two network ports: Network Port 0 and Network Port 1. The master station has only one network port, which is equivalent to disconnecting the connection between Slave Station n and the master station's Network Port 1 in the ring topology, thus forming a linear topology, as Figure 3 shown.
[0054] During normal operation: After the Ethernet frame sent from the master station's Network Port 0 reaches Slave Station n, it is relayed back to the master station's Network Port 0 by Slave Station n along the original path. During the relaying process, the slave station does not process the Ethernet frame. At this time, the sequential addressing number in the Ethernet frame received by the master station's Network Port 0 is n.
[0055] In case of disconnection failure: The slave station i in front of the breakpoint will trigger the slave station disconnection detection alarm and directly relay the processed Ethernet frame back to the master station; in the Ethernet frame received by the master station, the sequential addressing number is i, that is, a disconnection occurs between Slave Station i and i + 1, triggering the master station disconnection detection alarm.
[0056] (3) Hybrid Topology
[0057] The slave station has two network ports: Network Port 0 and Network Port 1. The master station has multiple network ports, forming a hybrid topology composed of a ring topology and a linear topology, as Figure 4 shown. In this embodiment, the master station's Network Port 0 is sequentially connected to Slave Stations 1 to n, and the Network Port 1 of Slave Station n is connected to the master station's Network Port 1, that is, a ring topology; the master station's Network Port 2 is sequentially connected to Slave Stations n + 1 to m, that is, a linear topology.
[0058] During normal operation: After the Ethernet frame sent from the master station's Network Port 0 reaches Slave Station n, it is received by the master station's Network Port 1 and continues to be forwarded to the master station's Network Port 2 and then passed to Slave Station m, and then relayed back to the master station's Network Port 2 by Slave Station m along the original path.
[0059] In case of disconnection failure:
[0060] If there is a break in the ring line, locate the break point and complete communication according to the method when a break fault occurs in the ring topology in (1), and continue to forward the Ethernet frame received by the master station network port 1 to the master station network port 2 to complete the linear line communication;
[0061] If there is a break in the linear line, trigger the master station break detection alarm and locate the break point according to the method when a break fault occurs in the linear topology in (2).
[0062] The following are specific embodiments:
[0063] This embodiment provides a method for detecting and locating physical layer line connection faults in the NCUC2.0 real-time Ethernet link layer, specifically including:
[0064] 1) Build the NCUC2.0 network topology. The network in this embodiment includes one NCUC2.0 master station and several N2CC slave stations. The system can support linear network topologies, ring network topologies, and hybrid network topologies.
[0065] When the system is a linear network topology, the master station has at least one Ethernet network port, and the slave station has at least two Ethernet network ports. The master station network port is connected to the network port 0 of slave station 1, and the network port 1 of slave station 1 is connected to the network port 0 of slave station 2, and so on, until the network port 0 of slave station n is connected to form a linear network topology.
[0066] When the system is a ring network topology, each node has at least two Ethernet network ports. The network port A of the master station is connected to the network port 0 of slave station 1 through a network cable. The network port 1 of slave station 1 is connected to the network port 0 of slave station 2, and all slave stations are connected in series in turn. Finally, the network port 1 of slave station n is connected to the network port B of the master station to form a ring network topology.
[0067] It can also be compatible with two connection structures to form a hybrid network topology.
[0068] 2) As Figure 5As shown in the figure, the system has a function of detecting disconnection and topological reconstruction. Each N2CC slave station has two Ethernet network interfaces, interface 0 and interface 1, and two physical layer connection chips, PHY0 and PHY1, which are respectively connected to the Ethernet network interfaces. Whether the message enters from interface 0 or interface 1, the PHY0 and PHY1 chips will send it to the MAC through RGMII, and use the PDU port management module to mark the message transmission direction as the positive direction 0 or the reverse direction 1, and then transmit the message to the RouteCtrl path management module of the slave station. When RouteCtrl determines that the message transmission direction is 0, that is, the message is transmitted from interface 0 through the PHY0 chip, it will transfer the message information into the slave station. After being processed by the slave station, the message will be sent to interface 1 through the PHY1 chip. When RouteCtrl determines that the message transmission direction is 1, that is, the message is transmitted from interface 1 through the PHY1 chip, it will not process this message and directly send the message to interface 0 through the PHY0 chip.
[0069] Each network interface can be manually set to the open or closed state. Their network interface states are controlled by the internal registers of the link layer chip. When interface 1 is set to the closed state or not connected, interface 0 will be automatically set to the open state. When the chip detects that a network interface does not exist, is not connected, or is manually set to the closed state, the network interface will automatically form a closed loop, and the data stream will flow to the next open network interface, as Figure 6 shown.
[0070] 3) After the system is powered on, the master station sends a message in both the forward and reverse directions to judge the connection status and the number of N2CC slave stations. When the system is working properly, the master station will send a message from interface 0, which will enter from interface 0 of all slave stations in turn and output from interface 1 until the message returns to the master station's interface 1. At this time, each N2CC slave station will increment the message count bit to achieve the purpose of the master station monitoring the number of slave stations.
[0071] 4) Each N2CC slave station in the system will continuously monitor the clock frequency of the PHY chip and the data of the RXD[7:0] bit of the RGMII interface. When an interruption occurs on one side connected to the PHY chip, the clock frequency of the PHY chip will automatically drop from 125 MHz to 25 MHz or directly lose the clock. After the N2CC slave station detects that the clock frequency of the PHY chip has decreased for more than a certain duration, it will judge that there is a break in the network connected to this side of the PHY chip; the 0th bit of the RGMII interface is the connection status bit, xxx1 represents normal connection, and xxx0 represents disconnection, so as to judge whether the interface is in the connected state or the disconnected state. When the RGMII interface is monitored and judged to be in the disconnected state, the N2CC slave station will read the status of the PHY chip to detect that there is a break in the network connected to this side of the PHY chip.
[0072] 5) As Figure 7As shown in the figure, after a disconnection occurs at a certain point in the ring network topology, the N2CC slave stations on both sides of the breakpoint will learn that one side of the network is disconnected according to the above method. For example, if slave station 2 and slave station 3 are disconnected, the N2CC_2 slave station in front of the breakpoint will detect that the network port 1 on the side connected to the PHY1 chip is disconnected. At this time, the PDU network port management module of the N2CC slave station will close network port 1 on the side of the PHY1 chip, and the ROUTECTRL path management module will change its own working state. When the PHY0 chip receives a message incoming from network port 0, the ROUTECTRL module will pass the message into the slave station for processing, and then re - send the processed message through the PHY0 chip to network port 0, and send the message back along the original path to slave station N2CC_1.
[0073] 6) Since the upstream slave station N2CC_1 receives the message through network port 1, it will not perform any processing on the message and directly send it to the master station network port A.
[0074] 7) After the master station network port A receives the returned message, it will determine that there is a disconnection in the ring network topology, trigger a disconnection detection warning, and re - send the message to be processed before the interruption from network port B to the last slave station N2CC_4.
[0075] 8) The slave station N2CC_1 behind the breakpoint will receive the message through network port 1 and pass it through network port 0 without processing to the first slave station N2CC_3 behind the breakpoint. At this time, the slave station N2CC_3 also detects that the network port 0 on the side connected to the PHY0 chip is disconnected according to the above method. The PDU port management module of the slave station N2CC_3 will close network port 0 on the side of the PHY0 chip, and the ROUTECTRL path management module will send the message received by the PHY1 chip from network port 1 to the slave station N2CC_3 for processing, and then re - send the processed message from the PHY1 chip to network port 1, and it will flow into the subsequent slave station N2CC_4 through network port 0, so that the subsequent slave stations can also process the message correctly. Further ensure that when a disconnection occurs, the system can restore the network connection in real - time and deliver the data safely.
[0076] 9) When the master station network port receives the message in step 7), it will read the message count bit. At this time, the count is 2, that is, a disconnection occurs between slave station N2CC_2 and slave station N2CC_3.
[0077] Through the above steps, after being processed by the N2CC slave stations on both sides of the breakpoint, the ring network topology will be automatically reconstructed into two - path chain network topologies. The master station is connected to the two - path chain structures through network port A and network port B respectively. All network cables in the line are changed from half - duplex communication to full - duplex communication, relying on the safety redundancy in the ring network topology to maintain operation in special cases, and can continue to work after a disconnection in the system, avoiding serious economic losses or safety accidents caused by the disconnection.
[0078] Those skilled in the art can easily understand that the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for detecting and locating faults in the physical layer line connection of Ethernet, characterized in that, It includes the following steps: The master station of Ethernet sends an Ethernet frame containing sequential addressing bits, and each slave station processes the Ethernet frame in sequence according to the connection order, while incrementing the sequential addressing bits; Each slave station real-time detects the PHY chip clock frequency and status register of its network interface; when any slave station detects that the PHY chip clock frequency of the network interface drops below a preset threshold or the status register is link-down, it determines that a disconnection fault has occurred, and the Ethernet frame is sent back to the master station from the corresponding slave station's network interface. The master station determines the disconnection location in real-time based on the sequential addressing bits of the received Ethernet frame.
2. The method for detecting and locating the connection fault of the Ethernet physical layer line according to claim 1, characterized in that When the Ethernet is in a ring topology: after determining that a disconnection fault has occurred, automatically switch the port status and change the Ethernet communication mode from half-duplex communication to full-duplex communication.
3. The method for detecting and locating the connection fault of the Ethernet physical layer line according to claim 2, wherein When the Ethernet is in a ring topology: the master station and n slave stations each have two network interfaces, namely network interface 0 and network interface 1; network interface 0 of the master station is connected to network interface 0 of slave station 1, network interface 1 of slave station i is connected to network interface 0 of slave station i + 1, and network interface 1 of slave station n is connected to network interface 1 of the master station, where 1 ≤ i < n; When operating normally, it is half-duplex communication: the master station's network interface 0 sends an Ethernet frame, and each slave station processes the Ethernet frame received by its network interface 0 and sends it to the next slave station through network interface 1. Finally, the master station's network interface 1 receives the final Ethernet frame; When a disconnection fault occurs, it changes to full-duplex communication: the slave station i before the break point triggers a slave station disconnection detection alarm. At this time, the Ethernet frame sent by the master station's network interface 0 is transmitted to network interface 0 of slave station i, and after being processed by slave station i, it is sent back to the master station's network interface 0; after receiving the Ethernet frame, the master station's network interface 0 triggers a master station disconnection detection alarm and re-sends the received Ethernet frame from the master station's network interface 1 to network interface 1 of slave station n. Slave station n does not perform any processing and directly sends it out from network interface 0 until network interface 1 of slave station i + 1. At this time, slave station i + 1 triggers a slave station disconnection detection alarm, processes the Ethernet frame, and sends it out through network interface 1. The subsequent slave stations correctly process the Ethernet frame, and finally the master station's network interface 1 receives the final Ethernet frame.
4. The method for detecting and locating the connection fault of the Ethernet physical layer line according to claim 3, wherein, When the Ethernet is in a linear topology: the master station has only one network interface, and n slave stations each have two network interfaces, namely network interface 0 and network interface 1; the master station's network interface is connected to network interface 0 of slave station 1, network interface 1 of slave station i is connected to network interface 0 of slave station i + 1, and network interface 1 of slave station n has no connection, where 1 ≤ i < n; When operating normally: the Ethernet frame sent by the master station's network interface is processed and transmitted in sequence starting from slave station 1 and reaches slave station n, and then is sent back to the master station's network interface by slave station n; When a disconnection fault occurs: the slave station i in front of the break point triggers a slave station disconnection detection alarm, and slave station i directly sends the processed Ethernet frame back to the master station's network interface, triggering a master station disconnection detection alarm.
5. The method for detecting and locating the connection fault of the Ethernet physical layer line according to claim 4, wherein, When the Ethernet is in a hybrid topology: the master station has multiple network interfaces, and each network interface of the master station is connected to several slave stations respectively, forming a ring topology and a linear topology respectively, thus obtaining a hybrid topology; When a disconnection fault occurs, trigger a master station disconnection detection alarm according to the method corresponding to the ring topology or linear topology where the fault occurs.
6. The method for detecting and locating the failure of the Ethernet physical layer line connection according to any one of claims 3-5, characterized in that When triggering the disconnection detection alarm of the master station, the sequence addressing bit of the Ethernet frame received by the master station at this time is i, so as to judge in real time that a disconnection occurs between slave station i and slave station i + 1.
7. The method for detecting and locating the connection fault of the Ethernet physical layer line according to any one of claims 1-5, characterized in that The preset threshold is 50 MHz.
8. An Ethernet physical layer line connection fault detection and location system, characterized in that, It includes a processor, and the processor is used to execute the Ethernet physical layer line connection fault detection and location method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it realizes the Ethernet physical layer line connection fault detection and location method according to any one of claims 1-7.
10. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by the processor, it realizes the Ethernet physical layer line connection fault detection and location method according to any one of claims 1-7.
Citation Information
Patent Citations
Method for detecting industrial Ethernet disconnection fault and recovering clock synchronization
CN105847050A
Cited By
Control system and method for rate monitoring and automatic switching of Ethernet port
CN121357059A