CN117395172A - Method, device, equipment and storage medium for detecting Ethernet two-layer link - Google Patents

Method, device, equipment and storage medium for detecting Ethernet two-layer link Download PDF

Info

Publication number
CN117395172A
CN117395172A CN202311381969.3A CN202311381969A CN117395172A CN 117395172 A CN117395172 A CN 117395172A CN 202311381969 A CN202311381969 A CN 202311381969A CN 117395172 A CN117395172 A CN 117395172A
Authority
CN
China
Prior art keywords
link
detection
ethernet
multicast
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311381969.3A
Other languages
Chinese (zh)
Inventor
侯宇鑫
白玉艳
王永勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Tongze Kangwei Technology Co ltd
Original Assignee
Guangzhou Tongze Kangwei Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Tongze Kangwei Technology Co ltd filed Critical Guangzhou Tongze Kangwei Technology Co ltd
Priority to CN202311381969.3A priority Critical patent/CN117395172A/en
Publication of CN117395172A publication Critical patent/CN117395172A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for detecting an Ethernet two-layer link, wherein the method comprises the steps of adding multicast and monitoring multicast UDP, setting a multicast address and a port of CPE equipment, enabling network equipment to add multicast and monitor the multicast UDP, and setting the multicast address and the port; configuring a link detection protocol, and sending a link detection session establishment request to a multicast address based on the link detection protocol so that network equipment receives the link detection session establishment request and constructs a link detection session; and based on the link detection session, performing Ethernet interactive link message detection on the network equipment to obtain a link detection result. The embodiment realizes the Ethernet two-layer link detection under the scene without I P and improves the universality and practicability of the connectivity detection.

Description

Method, device, equipment and storage medium for detecting Ethernet two-layer link
Technical Field
The present invention relates to the field of ethernet link detection, and in particular, to a method, an apparatus, a device, and a storage medium for detecting an ethernet two-layer link.
Background
With the continuous development of the 5G+ industrial Internet industry in recent years, the 5G network technology is iterated continuously, the R17 standard is formally frozen, the R16 standard is comprehensively landed, and the characteristics of low delay and high bandwidth of the 5G network are gradually applied to various industrial scenes. More and more scenes are that a 5G wireless communication network is used for carrying out link backup on a wired two-layer network, but in the process of falling to the ground, CPE equipment is used as a loop of a two-layer wired network link, and under the condition that the original network architecture is not modified, the CPE equipment is only used as transparent transmission of the two-layer wired link, and cannot hold a three-layer network IP, but the two-layer wired network needs to be detected to determine whether to switch to the 5G wireless backup network.
Because the original wire link is not provided with the IP of 5G CPE equipment, the CPE equipment cannot have three layers of IP on the wire link, so that the traditional PING cannot be used as a link detection means, in addition, the two-layer-based 802.1ag MAC Ping method cannot support the link equipment, the BFD is used as a common link detection means, the BFD is a seven-layer network protocol based on UDP, and the traditional use method cannot be directly applied. The proposal provides a method for solving the key technical problem by using BFD in a multicast mode. Connectivity failure is one of the most common types of network failures. As is well known, ping and trace commands are common network connectivity detection commands, but such commands can only test whether the opposite end is reachable through an Ipv4 address or an Ipv6 address, and cannot realize connectivity detection on a data link layer. There is also a protocol for connectivity detection at the data link layer, e.g., the protocol is based on the MAC Ping of 802.1ag, but the protocol configuration is complex and not supported by common devices.
In the prior art, the link connectivity detection is generally realized by the following three methods, namely, the ping link detection based on an IP layer is adopted to judge the on-off condition of the link, but the ping-based link detection needs to use an IP layer protocol, and equipment which needs to initiate detection has the IP address of the Ethernet three layers. The second type is that the MAC Ping realized based on 802.1ag can be used for detecting the on-off of the Ethernet two-layer link, but based on the MAC Ping function realized by 802.1ag, when one or more intermediate devices exist in the intermediate links of the two parties, the function is required to be supported by the devices on the link, few devices supporting the protocol are required, and the protocol universality is poor. Thirdly, based on the data link layer Ethernet MAC address, the connectivity detection is realized, and a method for customizing the protocol type of the data link layer is provided, and the detection through the data link layer is realized through customizing the protocol type of the Ethernet. However, since the protocol is a custom non-standard protocol, both the sending party and the receiving party need to customize and develop to support the protocol, and the support of the method is not realized when the network link is built. The method can not realize the detection of the Ethernet two-layer link under the scene without IP, because the original network link is not provided with the newly added equipment IP, when the link needs to be added with equipment and the connectivity of the link needs to be detected, the link can not be detected by more than three layers of ping of the traditional Ethernet, and the universality is low.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for detecting an Ethernet two-layer link, which realize the detection of the Ethernet two-layer link under the IP-free scene and improve the universality and the practicability of connectivity detection.
In order to solve the above technical problems, an embodiment of the present invention provides a method for detecting an ethernet two-layer link, including:
the detection method of the Ethernet two-layer link is executed on CPE equipment; the CPE equipment is connected with the network equipment through an Ethernet two-layer link, the CPE equipment is connected with the multicast, and the network equipment is connected with the multicast;
the method for detecting the Ethernet two-layer link comprises the following steps:
adding multicast and monitoring multicast UDP, setting multicast address and port of CPE equipment to make network equipment add multicast and monitor multicast UDP, and setting multicast address and port;
configuring a link detection protocol, and sending a link detection session establishment request to a multicast address based on the link detection protocol so that network equipment receives the link detection session establishment request and constructs a link detection session;
and based on the link detection session, performing Ethernet interactive link message detection on the network equipment to obtain a link detection result.
By implementing the embodiment of the invention, multicast is added and the multicast UDP is monitored, and the multicast address and port of the CPE equipment are set, so that the network equipment is added to the multicast and monitors the multicast UDP, and the multicast address and port are set; configuring a link detection protocol, and sending a link detection session establishment request to a multicast address based on the link detection protocol so that network equipment receives the link detection session establishment request and constructs a link detection session; and based on the link detection session, performing Ethernet interactive link message detection on the network equipment to obtain a link detection result. The method of UDP multicasting is utilized, and a link detection protocol (such as BFD protocol, DNS protocol and NTP protocol) is combined, so that the detection of the link connection state of the data link layer can be realized without holding Ethernet three-layer IP at the transmitting end and the receiving end, the detection of the equipment without Ethernet three-layer IP is realized when the Ethernet two-layer link is detected, the detection of the Ethernet two-layer link under the IP-free scene is realized, the established network link is not required to be modified, the protocol configuration is simpler, common equipment can be supported, and the universality and the practicability of the connectivity detection of the Ethernet two-layer link are improved.
As a preferred solution, a link detection protocol is configured, specifically:
configuring a first home terminal identifier and a first opposite terminal identifier corresponding to a link detection protocol, and enabling network equipment to configure a second home terminal identifier and a second opposite terminal identifier corresponding to the link detection protocol according to the first home terminal identifier and the first opposite terminal identifier;
the link detection protocol comprises one of a BFD protocol, a DNS protocol and an NTP protocol.
As a preferred solution, based on a link detection protocol, a link detection session establishment request is sent to a multicast address, so that the network device receives the link detection session establishment request, and a link detection session is constructed, specifically:
based on a link detection protocol, sending a link detection session establishment request to a multicast address, enabling the multicast forwarding link detection session establishment request to be sent to network equipment, enabling the network equipment to receive the link detection session establishment request through a port, analyzing the link detection session establishment request, matching a first opposite terminal identifier and a second local terminal identifier in the link detection protocol to be consistent, sending a link detection session establishment reply to the multicast address, and enabling the multicast forwarding link detection session establishment reply to CPE equipment;
receiving a link detection session establishment reply through the port, analyzing the link detection session establishment reply, and matching the second opposite terminal identifier and the first home terminal identifier in the link detection session establishment reply to be consistent, so as to construct a link detection session.
As a preferred scheme, based on a link detection session, performing ethernet interactive link message detection on a network device to obtain a link detection result, which specifically includes:
according to the transmission interval negotiated when the link detection session is established, forming a periodic detection message, transmitting a periodic detection message request to the multicast address based on the periodic detection message and the link detection message format, enabling the multicast to forward the periodic detection message request to the network equipment, enabling the network equipment to receive the periodic detection message request from the multicast address, updating the periodic detection message based on the link detection message format, transmitting the updated periodic detection message to the multicast address, further enabling the multicast to forward the updated periodic detection message to the CPE equipment, and obtaining a link detection result according to the updated periodic detection message.
As a preferred solution, the network device receives a periodic detection message request from the multicast address, updates the periodic detection message based on the link detection message format, and sends the updated periodic detection message to the multicast address, specifically:
the network equipment receives a periodic detection message request from the multicast address, unpacks the periodic detection message according to the link detection message format, obtains the current opposite terminal identifier of the CPE equipment as the current local terminal identifier of the network equipment, updates the link detection connection state and the latest link detection protocol receiving time, obtains an updated periodic detection message, and sends the updated periodic detection message to the multicast address according to the negotiated sending interval.
Preferably, the Ethernet two-layer link includes a backup link layer and an Ethernet data link layer.
Preferably, the backup link layer includes one of a 5G backup link, a 4G backup link, a WIFI backup link, and a Lora backup link.
In order to solve the same technical problem, the embodiment of the present invention further provides a device for detecting an ethernet two-layer link, including: CPE equipment, multicast, network equipment and Ethernet two-layer links; the CPE equipment executes a detection method of an Ethernet two-layer link;
wherein, the connection of detection device is as follows: CPE equipment is connected with network equipment through an Ethernet two-layer link, CPE equipment is connected with multicast, and network equipment is connected with multicast.
In order to solve the same technical problem, the embodiment of the invention also provides a computer device, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program is executed by the processor to realize the detection method of the Ethernet two-layer link.
To solve the same technical problem, the embodiment of the invention further provides a computer readable storage medium storing a computer program, which when executed by a processor, implements a method for detecting an ethernet two-layer link.
Drawings
Fig. 1: the invention provides a flow diagram of one embodiment of a method for detecting an Ethernet two-layer link;
fig. 2: the invention provides a timing diagram of link detection of one embodiment of a detection method of an Ethernet two-layer link;
fig. 3: the invention provides a networking topology diagram of one embodiment of a detection method of an Ethernet two-layer link;
fig. 4: the BFD message format diagram of one embodiment of the method for detecting the Ethernet two-layer link is provided by the invention;
fig. 5: the invention provides a structure schematic diagram of an embodiment of a detection device of an Ethernet two-layer link.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, a flow chart of a method for detecting an ethernet two-layer link according to an embodiment of the present invention is shown. According to the embodiment, the Ethernet interactive link message detection is carried out by combining the UDP multicast method and the link detection protocol, so that the Ethernet two-layer link detection under the IP-free scene is realized, and the universality and the practicability of the connectivity detection are improved. The detection method of the Ethernet two-layer link is executed on CPE equipment; the CPE equipment is connected with the network equipment through an Ethernet two-layer link, the CPE equipment is connected with the multicast, and the network equipment is connected with the multicast. The method for detecting the Ethernet two-layer link comprises steps 101 to 104, wherein the steps are as follows:
step 101: and joining the multicast and monitoring the multicast UDP, setting the multicast address and the port of the CPE equipment, enabling the network equipment to join the multicast and monitoring the multicast UDP, and setting the multicast address and the port.
In this embodiment, taking the link detection protocol as the BFD protocol as an example for illustration, the timing chart of the link detection is shown in fig. 2, where the CPE device joins the multicast group and listens to the multicast UDP, the multicast address is 224.0.0.184, the port is 3784, the network device a joins the multicast group and listens to the multicast UDP, the multicast address is 224.0.0.184, and the port is 3784.
UDP multicast is based on IP multicast technology, and uses a specific range among IP address ranges, which is called a multicast address. The sender sends the data to the multicast address and all receivers joining the multicast can receive this data. The multicast address is a special IP address that identifies a group of recipients. Usually 224.0.0.184 multicast addresses are used, BFD (link detection protocol) usually uses 3784 as the receiving port for UDP. The invention is exemplified using a multicast address 224.0.0.184, as well as other multicast addresses.
The invention relates to a method for detecting an Ethernet two-layer link under an IP-free scene, wherein an original network link is not provided with an additional device IP, when the link needs to be additionally provided with the additional device, the device needs to detect the connectivity of the link, and at the moment, the link cannot be carried out by PING with more than three layers of the traditional Ethernet. The invention provides a method for utilizing UDP multicast, which combines a link detection protocol (such as BFD protocol, DNS protocol and NTP protocol) to realize the method for detecting the link connection state of a data link layer without holding three layers of IP of Ethernet at a transmitting end and a receiving end.
It should be noted that, CPE device client terminal device, english is all called: customer Premise Equipment customer terminal equipment Chang Bu is placed at the customer end of FTTX home customer service for providing services such as cable broadband, IPTV, VOIP, etc. for home customers. A client terminal device is a device that inputs a program and data to a computer or receives a computer output processing result via a communication facility. The terminal equipment is usually installed in a convenient place where it can be connected to a remote computer by means of a communication facility, and is mainly composed of a communication interface control device and a dedicated or selected input-output device. A system in which a plurality of dispersed terminal apparatuses are coupled to a computer via a communication facility is called an online system. When a small amount of frequent information needs to be input and output to a computer or a computer information base needs to be searched, a keyboard display terminal device with flexible operation is often used.
Optionally, the ethernet two-layer link includes a backup link layer and an ethernet data link layer. The backup link layer comprises one of a 5G backup link, a 4G backup link, a WIFI backup link and a Lora backup link.
In this embodiment, as shown in fig. 3, the two layers of the wired ethernet link and the 5G VxLAN backup link are used as examples in the network topology diagram in the detection of the ethernet two-layer link, and meanwhile, the network topology diagram is also applicable to detection scenes of other ethernet data link layers, and the wired link can be other ethernet data links, so that the network topology diagram is applicable to not only the 5G VxLAN but also other three-layer network links, including three-layer network technologies such as 4G, WIFI, lora as backup links. Taking the 5G link as a backup link as an example, since the 5G link belongs to a three-layer network, two-layer link backup is realized by using a VXLAN technology through the 5G link, and a 5G VXLAN backup link is obtained. At this time, the CPE device needs to detect the connectivity status of the wired link, and because the original wired link is not configured with three-layer IP of the CPE device, the connectivity status of the wired link is detected by using a UDP multicast technology and using a BFD protocol.
Step 102: and configuring a link detection protocol, and sending a link detection session establishment request to the multicast address based on the link detection protocol so that the network equipment receives the link detection session establishment request and constructs a link detection session.
Optionally, a link detection protocol is configured, specifically:
configuring a first home terminal identifier and a first opposite terminal identifier corresponding to a link detection protocol, and enabling network equipment to configure a second home terminal identifier and a second opposite terminal identifier corresponding to the link detection protocol according to the first home terminal identifier and the first opposite terminal identifier;
the link detection protocol comprises one of a BFD protocol, a DNS protocol and an NTP protocol.
In this embodiment, taking the link detection protocol as the BFD protocol as an example, the BFD home identifier of the CPE device is configured to be 1, that is, the first home identifier, and the home identifier of the link detection protocol of the CPE device. The BFD peer identifier of the CPE device is configured to be 2, i.e., the first peer identifier, the peer identifier of the link detection protocol of the CPE device.
The BFD home terminal identifier of the network equipment A is configured to be 2, namely a second home terminal identifier, and the home terminal identifier of the link detection protocol of the network equipment A is matched with the opposite terminal identifier (a first opposite terminal identifier) of the link detection protocol of the CPE equipment in the process of establishing the session. Configuring the opposite end identifier of the network equipment A as 1, namely a second opposite end identifier, wherein the value of the second opposite end identifier is the local end identifier (first local end identifier) of the link detection protocol of the CPE equipment in the session establishment process.
It should be noted that, when the link detection protocol is one of BFD protocol, DNS protocol and NTP protocol, BFD based on UDP multicast usage scenario implements data link layer ethernet connectivity detection, and BFD (Bidirectional Forwarding Detection ) is a set of international standard protocols for implementing fast detection, providing a light-load, duration period detection. However, since BFD is a seven-layer application layer protocol based on UDP, in general, both the transmitting end and the receiving end need to possess IP and a communication port, a method for multicast by using UDP is provided, which implements a method for detecting a link connection state of a data link layer without having to possess three layers of IP of ethernet. The invention is not only applicable to BFD as a link detection protocol, but also applicable to other protocols for link detection by UDP, including but not limited to DNS, NTP and the like; the DNS and NTP protocols are realized by using UDP protocols, and interaction can be performed by using a multicast technology, wherein 4 layers of UDP communication processes are consistent, and only 7 layers of application layer encapsulation and analysis processes need to be processed according to specific application layer protocol specifications.
Optionally, based on the link detection protocol, a link detection session establishment request is sent to the multicast address, so that the network device receives the link detection session establishment request, and the link detection session is constructed specifically including steps 1021 to 1025, where each step specifically includes:
step 1021: based on the link detection protocol, a link detection session establishment request is sent to the multicast address.
In this embodiment, taking the link detection protocol as the BFD protocol as an example, the CPE device sends a BFD session establishment request (BFD Control Packet) to the multicast address, where the BFD session establishment request is a link detection session establishment request.
Step 1022: the multicast forwarding link detects a session establishment request to the network device.
In this embodiment, the multicast forwards the BFD session establishment request to network device a.
Step 1023: the network equipment receives the link detection session establishment request through the port, analyzes the link detection session establishment request, matches the first opposite terminal identifier and the second home terminal identifier in the link detection protocol to be consistent, and sends a link detection session establishment reply to the multicast address.
In this embodiment, the network device a receives the session establishment request of BFD, and parses the session establishment request, where the peer identifier 2 (the first peer identifier) in the matching protocol is consistent with the home identifier 2 (the second home identifier). The network device a replies to the multicast address with a session establishment request, i.e. sends a link detection session establishment reply to the multicast address.
Step 1024: the multicast forwarding link detects that the session establishment is replied to the CPE device.
In this embodiment, the multicast forwards the BFD session setup reply (link detection session setup reply) to the CPE device.
Step 1025: receiving a link detection session establishment reply through the port, analyzing the link detection session establishment reply, and matching the second opposite terminal identifier and the first home terminal identifier in the link detection session establishment reply to be consistent, so as to construct a link detection session.
In this embodiment, the CPE device receives the session establishment reply of the BFD, parses and matches the opposite end identifier (second opposite end identifier) in the reply to be 1, and is consistent with the local end identifier (first local end identifier) 1, so that the BFD completes session establishment, builds a complete link detection session, and both parties can interact with the link detection message.
Step 103: and based on the link detection session, performing Ethernet interactive link message detection on the network equipment to obtain a link detection result.
Optionally, step 103 specifically includes steps 1031 to 1034, where each step specifically includes:
step 1031: and forming a periodic detection message according to the transmission interval negotiated when the link detection session is established, and transmitting a periodic detection message request to the multicast address based on the periodic detection message and the link detection message format.
In this embodiment, the CPE device composes a BFD periodic detection message according to a transmission interval negotiated by session establishment, the message core needs to set a home terminal identifier (My identifier) to 1, and the peer terminal identifier (Your Discriminator) to 2, and sends a packet according to the negotiated Desired Min TX Interval and Required Min RX Interval periodic intervals, and sends a BFD periodic detection message request to the multicast address. As an example, the BFD message format is shown in fig. 4.
Step 1032: multicast forwarding periodically detects a message request to a network device.
In this embodiment, the multicast forwarding BFD periodically detects a message request to network device a.
Step 1033: the network device receives a periodic detection message request from the multicast address, updates the periodic detection message based on the link detection message format, and sends the updated periodic detection message to the multicast address.
Optionally, step 1033 specifically includes: the network equipment receives a periodic detection message request from the multicast address, unpacks the periodic detection message according to the link detection message format, obtains the current opposite terminal identifier of the CPE equipment as the current local terminal identifier of the network equipment, updates the link detection connection state and the latest link detection protocol receiving time, obtains an updated periodic detection message, and sends the updated periodic detection message to the multicast address according to the negotiated sending interval.
In this embodiment, the network device a receives the BFD periodic detection packet from the multicast address, unpacks the protocol according to the BFD packet format (link detection packet format), obtains the peer identifier (Your Discriminator) as the local identifier, and if the network device a recognizes that the peer identifier is not the local ID, directly discards the packet, and updates the connection state of the BFD to UP and the latest BFD receiving time. Like the CPE device, the network device a may send a BFD periodic test message to the multicast address according to the transmission interval negotiated by the session.
Step 1034: and multicasting and forwarding the updated periodic detection message to the CPE equipment, and obtaining a link detection result according to the updated periodic detection message.
In this embodiment, the BFD of the multicast forwarding network device a periodically detects a packet to the CPE device, and by using a UDP multicast technology and combining with a BFD universal detection protocol, an effect of detecting link connectivity without IP in the data link layer is achieved.
By implementing the embodiment of the invention, multicast is added and the multicast UDP is monitored, and the multicast address and port of the CPE equipment are set, so that the network equipment is added to the multicast and monitors the multicast UDP, and the multicast address and port are set; configuring a link detection protocol, and sending a link detection session establishment request to a multicast address based on the link detection protocol so that network equipment receives the link detection session establishment request and constructs a link detection session; and based on the link detection session, performing Ethernet interactive link message detection on the network equipment to obtain a link detection result. The method of UDP multicasting is utilized, and a link detection protocol (such as BFD protocol, DNS protocol and NTP protocol) is combined, so that the detection of the link connection state of the data link layer can be realized without holding Ethernet three-layer IP at the transmitting end and the receiving end, the detection of the equipment without Ethernet three-layer IP is realized when the Ethernet two-layer link is detected, the detection of the Ethernet two-layer link under the IP-free scene is realized, the established network link is not required to be modified, the protocol configuration is simpler, common equipment can be supported, and the universality and the practicability of the connectivity detection of the Ethernet two-layer link are improved.
Example two
Accordingly, referring to fig. 5, fig. 5 is a schematic structural diagram of a second embodiment of a device for detecting an ethernet two-layer link according to the present invention. As shown in fig. 5, the detection device of the ethernet two-layer link includes CPE equipment, multicast, network equipment and the ethernet two-layer link; the CPE equipment executes a detection method of an Ethernet two-layer link;
wherein, the connection of detection device is as follows: CPE equipment is connected with network equipment through an Ethernet two-layer link, CPE equipment is connected with multicast, and network equipment is connected with multicast.
In addition, the embodiment of the application further provides a computer device, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program is executed by the processor to realize the steps in any of the method embodiments.
The present application further provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
The above-mentioned detection device for an ethernet two-layer link may implement the detection method for an ethernet two-layer link in the above-mentioned method embodiment. The options in the method embodiments described above are also applicable to this embodiment and will not be described in detail here. The rest of the embodiments of the present application may refer to the content of the method embodiments described above, and in this embodiment, no further description is given.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. The method for detecting the Ethernet two-layer link is characterized by comprising the following steps: the detection method of the Ethernet two-layer link is executed on CPE equipment; the CPE equipment is connected with the network equipment through an Ethernet two-layer link, the CPE equipment is connected with the multicast, and the network equipment is connected with the multicast;
the method for detecting the Ethernet two-layer link comprises the following steps:
joining the multicast and monitoring the multicast UDP, setting the multicast address and the port of the CPE equipment, enabling the network equipment to join the multicast and monitoring the multicast UDP, and setting the multicast address and the port;
configuring a link detection protocol, and sending a link detection session establishment request to the multicast address based on the link detection protocol so that the network equipment receives the link detection session establishment request and constructs a link detection session;
and based on the link detection session, performing Ethernet interactive link message detection on the network equipment to obtain a link detection result.
2. The method for detecting an ethernet two-layer link according to claim 1, wherein the configuration link detection protocol specifically comprises:
configuring a first home terminal identifier and a first opposite terminal identifier corresponding to the link detection protocol, and enabling the network equipment to configure a second home terminal identifier and a second opposite terminal identifier corresponding to the link detection protocol according to the first home terminal identifier and the first opposite terminal identifier;
wherein, the link detection protocol comprises one of BFD protocol, DNS protocol and NTP protocol.
3. The method for detecting an ethernet two-layer link according to claim 1, wherein said sending a link detection session establishment request to the multicast address based on the link detection protocol, so that the network device receives the link detection session establishment request, and constructs a link detection session, specifically:
based on the link detection protocol, sending the link detection session establishment request to the multicast address, so that the multicast forwards the link detection session establishment request to the network device, so that the network device receives the link detection session establishment request through the port, analyzes the link detection session establishment request, matches the first opposite terminal identifier and the second local terminal identifier in the link detection protocol, and sends a link detection session establishment reply to the multicast address, so that the multicast forwards the link detection session establishment reply to the CPE device;
and receiving the link detection session establishment reply through the port, analyzing the link detection session establishment reply, and matching the second opposite terminal identifier in the link detection session establishment reply with the first home terminal identifier to be consistent, so as to construct the link detection session.
4. The method for detecting an ethernet two-layer link according to claim 1, wherein the detecting an ethernet interactive link message is performed on the network device based on the link detection session to obtain a link detection result, specifically:
forming periodic detection messages according to transmission intervals negotiated when the link detection session is established, transmitting periodic detection message requests to the multicast address based on the periodic detection messages and a link detection message format, enabling the multicast to forward the periodic detection message requests to the network equipment, enabling the network equipment to receive the periodic detection message requests from the multicast address, updating the periodic detection messages based on the link detection message format, transmitting the updated periodic detection messages to the multicast address, enabling the multicast to forward the updated periodic detection messages to the CPE equipment, and obtaining the link detection result according to the updated periodic detection messages.
5. The method for detecting ethernet two-layer link according to claim 4, wherein said network device receives said periodic detection message request from said multicast address, updates said periodic detection message based on said link detection message format, and sends the updated periodic detection message to said multicast address, specifically:
the network equipment receives the periodic detection message request from the multicast address, unpacks the periodic detection message according to the link detection message format, obtains the current opposite terminal identifier of the CPE equipment as the current local terminal identifier of the network equipment, updates the link detection connection state and the latest link detection protocol receiving time, obtains the updated periodic detection message, and sends the updated periodic detection message to the multicast address according to the negotiated sending interval.
6. The method for detecting an ethernet two-layer link according to any of claims 1-5, wherein the ethernet two-layer link comprises a backup link layer and an ethernet data link layer.
7. The method for detecting an ethernet two-layer link according to claim 6, wherein said backup link layer comprises one of a 5G backup link, a 4G backup link, a WIFI backup link, and a Lora backup link.
8. A device for detecting an ethernet two-layer link, comprising: CPE equipment, multicast, network equipment and Ethernet two-layer links; wherein the CPE device performs the method for detecting an ethernet two-layer link according to any of claims 1 to 7;
wherein, the connection of the detection device is as follows: the CPE equipment is connected with the network equipment through an Ethernet two-layer link, the CPE equipment is connected with the multicast, and the network equipment is connected with the multicast.
9. A computer device comprising a processor and a memory for storing a computer program which, when executed by the processor, implements the method of detecting an ethernet two-layer link according to any of claims 1 to 7.
10. A computer readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the method of detection of an ethernet two-layer link according to any of claims 1 to 7.
CN202311381969.3A 2023-10-23 2023-10-23 Method, device, equipment and storage medium for detecting Ethernet two-layer link Pending CN117395172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311381969.3A CN117395172A (en) 2023-10-23 2023-10-23 Method, device, equipment and storage medium for detecting Ethernet two-layer link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311381969.3A CN117395172A (en) 2023-10-23 2023-10-23 Method, device, equipment and storage medium for detecting Ethernet two-layer link

Publications (1)

Publication Number Publication Date
CN117395172A true CN117395172A (en) 2024-01-12

Family

ID=89437003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311381969.3A Pending CN117395172A (en) 2023-10-23 2023-10-23 Method, device, equipment and storage medium for detecting Ethernet two-layer link

Country Status (1)

Country Link
CN (1) CN117395172A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030966A (en) * 2006-02-28 2007-09-05 华为技术有限公司 Method for establishing two-way transmitted inspecting session
CN103916275A (en) * 2014-03-31 2014-07-09 杭州华三通信技术有限公司 BFD detection device and method
US20230336462A1 (en) * 2022-04-13 2023-10-19 Huawei Technologies Co., Ltd. Route Detection Method and Apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030966A (en) * 2006-02-28 2007-09-05 华为技术有限公司 Method for establishing two-way transmitted inspecting session
CN103916275A (en) * 2014-03-31 2014-07-09 杭州华三通信技术有限公司 BFD detection device and method
US20230336462A1 (en) * 2022-04-13 2023-10-19 Huawei Technologies Co., Ltd. Route Detection Method and Apparatus

Similar Documents

Publication Publication Date Title
US10110714B2 (en) Methods for exchanging network management messages using UDP over HTTP protocol
US10021030B2 (en) Method and system for forwarding information in distributed network
US20130088977A1 (en) Test traffic interceptor
CN105610888A (en) Method of using socket to push message based on Android and system thereof
EP2951953A1 (en) Method of managing zigbee network in the internet of things
KR20080068808A (en) Applicaton-level multicasting architecture
WO2017114153A1 (en) Service function chaining (sfc) communication method and device
CN106961426B (en) Communication method and device of intelligent equipment
CN103873472A (en) Method for automatically having access to network
JP2016526863A (en) Data processing method and apparatus
US10594844B2 (en) Method and system for wireless network bilateral accelerated transmission
US20170230484A1 (en) Network System and Method for Establishing Data Link by Using Relay Node
WO2014139094A1 (en) Communication method, device and system
CN105450779A (en) Method for achieving connection between one household electric appliance and multiple servers
US20180288632A1 (en) Mobile device recording for troubleshooting assistance
CN111918306B (en) Method and system for realizing network element communication under IP unreachable scene
CN117395172A (en) Method, device, equipment and storage medium for detecting Ethernet two-layer link
CN103457794A (en) Method and system for confirming faults of IP bearer network
WO2010041020A1 (en) Multicast media system
CN102291413B (en) Based on the discovery protocol system of the Internet
CN115460134A (en) MEC data multicast forwarding method for power 5G service
CN106034078B (en) Method and system for reducing DR change of PIM protocol
CN110048913B (en) BFD-based method for realizing NAT traversal bidirectional detection processing
WO2014090194A1 (en) Dialing method of terminal device, and access device
KR101002811B1 (en) Method and apparatus for providing ip multicasting packet ternaling

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination