[go: up one dir, main page]

CN109412851B - Link layer path detection method, device and system - Google Patents

Link layer path detection method, device and system Download PDF

Info

Publication number
CN109412851B
CN109412851B CN201811265761.4A CN201811265761A CN109412851B CN 109412851 B CN109412851 B CN 109412851B CN 201811265761 A CN201811265761 A CN 201811265761A CN 109412851 B CN109412851 B CN 109412851B
Authority
CN
China
Prior art keywords
detection
target
message
equipment
request message
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.)
Active
Application number
CN201811265761.4A
Other languages
Chinese (zh)
Other versions
CN109412851A (en
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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201811265761.4A priority Critical patent/CN109412851B/en
Publication of CN109412851A publication Critical patent/CN109412851A/en
Application granted granted Critical
Publication of CN109412851B publication Critical patent/CN109412851B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results

Landscapes

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

Abstract

The embodiment of the application provides a link layer path detection method and a link layer path detection system, and relates to the technical field of communication. The method comprises the following steps: the detection initiating equipment generates a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection initiating equipment sends a detection request message; the detection request message is used for indicating a target detection device receiving the detection request message, and sending a detection response message to the detection initiating device when the self device is determined to be a non-detection terminating device and the number of message hops in the detection request message minus 1 is equal to 0. Therefore, after the detection initiating device forwards the detection request message according to the intermediate node device to obtain the detection response message, whether the target detection device fails or not can be known according to the detection response message, so that whether the target detection device fails or not in the two-layer network can be automatically detected, and the failure determination efficiency in the two-layer network is greatly improved.

Description

Link layer path detection method, device and system
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for detecting a link layer path.
Background
Because the two-layer network has the characteristics of simple deployment, high bandwidth utilization rate, low requirement on network management personnel and the like, the two-layer network is widely applied to internal office networks, campus intranets and the like of enterprise and public institution organizations.
However, with the breakthrough development of technologies such as big data and cloud computing, the application of a two-layer network in a high-speed switching network of a large data center is more and more extensive, but this also leads to an increasingly large number of devices in the two-layer network.
Disclosure of Invention
The present application provides a method, an apparatus, and a system for detecting a link layer path, so as to effectively solve the technical problem in the prior art that it is difficult to locate a fault in a two-layer network.
The embodiment of the application is realized by the following steps:
in a first aspect, an embodiment of the present application provides a method for detecting a link layer path, where the method includes:
the detection initiating equipment generates a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection termination equipment is link layer exit equipment when the detection initiating equipment reaches a target MAC address to be detected; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
the detection initiating equipment sends the detection request message; the detection request message is used for indicating the target detection equipment receiving the detection request message, and sending a detection response message to the detection initiating equipment when the self equipment is determined not to be the detection terminating equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0; the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message; the detection response message carries the information of the target detection device and the link layer path information of the target detection device reaching the detection termination device.
With reference to the first aspect, in some possible implementation manners, before the detection initiating device generates the detection request packet, the method further includes:
and the detection initiating device acquires the MAC address of the target to be detected, and acquires the information of the detection terminating device, the MAC address of the next hop from the detection initiating device to the detection terminating device and the total hop number of the link layer path from the detection initiating device to the target MAC address according to the MAC address of the target to be detected.
With reference to the first aspect, in some possible implementation manners, the indicating, by the packet hop count, the hop count of the detection initiating device to reach the target detecting device includes:
when the number of the message hops is 1, indicating the target detection equipment as the next hop for the detection initiating equipment to reach the detection terminating equipment;
when the message hop count is the total hop count of the link layer path, indicating the target detection equipment as the detection termination equipment;
and when the message hop count is a value between 1 and the total hop count of the link layer path, indicating the target detection equipment as intermediate node equipment between the next hop from the detection initiating equipment to the detection terminating equipment and the detection terminating equipment.
With reference to the first aspect, in some possible implementations, the method further includes:
when the detection initiating device receives the detection response message within the preset time, the detection initiating device determines that the path between the detection initiating device and the target detection device is normal, otherwise, the detection initiating device determines that the path between the detection initiating device and the target detection device is in failure.
With reference to the first aspect, in some possible implementation manners, an intermediate node device is further included between the detection initiating device and the target detecting device, and the determining a path fault between the detection initiating device and the target detecting device includes:
and when the detection initiating device determines that the path between the detection initiating device and the intermediate node device is normal, determining the path fault between the intermediate node device and the target detection device.
With reference to the first aspect, in some possible implementation manners, the detection request packet and the detection response packet adopt a TRILL data packet format.
In a second aspect, an embodiment of the present application provides a link layer path detection method, where the method includes:
receiving a detection request message sent by detection initiating equipment; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
when determining that the self equipment is not the detection termination equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0, sending a detection response message to the detection initiation equipment; when determining that the self equipment is not the detection termination equipment and the number of the message hops in the detection request message minus 1 is not equal to 0, forwarding the detection request message; the detection response message includes the information of the device itself and the path information of the device itself to the detection termination device.
In a third aspect, an embodiment of the present application provides a method for detecting a link layer path, where the method includes:
receiving a detection request message sent by detection initiating equipment; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
when determining that the self equipment is the detection termination equipment, sending a detection response message to the detection initiation equipment; the detection response message includes the information of the device itself and the path information of the device itself to the target MAC address.
In a fourth aspect, an embodiment of the present application provides a link layer path detection apparatus, which is applied to detecting an initiating device, and includes:
the message generating module is used for generating a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection termination equipment is link layer exit equipment when the detection initiating equipment reaches a target MAC address to be detected; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
The message sending module is used for sending the detection request message; the detection request message is used for indicating the target detection equipment receiving the detection request message, and sending a detection response message to the detection initiating equipment when the self equipment is determined not to be the detection terminating equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0; the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message; the detection response message carries the information of the target detection device and the link layer path information of the target detection device reaching the detection termination device.
In some optional implementations, in combination with the fourth aspect, the apparatus further includes an information obtaining module,
the information obtaining module is configured to obtain the target MAC address to be detected, and obtain, according to the target MAC address to be detected, information of the detection terminating device, an MAC address of a next hop from the detection initiating device to the detection terminating device, and a total hop count of a link layer path from the detection initiating device to the target MAC address.
With reference to the fourth aspect, in some optional implementations, the apparatus further includes a message receiving module and a result obtaining module,
the message receiving module is used for receiving the detection response message;
the result obtaining module is configured to determine, by the detection initiating device, that a path between the detection initiating device and the target detecting device is normal when the message receiving module receives the detection response message within a predetermined time, and otherwise determine that a path between the detection initiating device and the target detecting device is faulty.
With reference to the fourth aspect, in some optional implementation manners, the detection request packet and the detection response packet adopt a TRILL data packet format.
In a fifth aspect, an embodiment of the present application provides a link layer path detection apparatus, which is applied to detect an intermediate node device between an initiating device and a terminating device, where the apparatus includes:
a message receiving module, configured to receive a detection request message sent by the detection initiating device; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
A message sending module, configured to send a detection response message to the detection initiating device when it is determined that the self device is not the detection terminating device and the hop count of the message in the detection request message is less than 1 and equal to 0; the detection response message includes the information of the device itself and the path information of the device itself to the detection termination device.
A message forwarding module, configured to forward the detection request message when it is determined that the self device is not the detection termination device and when the number of message hops in the detection request message minus 1 is not equal to 0; the detection response message includes the information of the device itself and the path information of the device itself to the detection termination device.
In a sixth aspect, an embodiment of the present application provides a link layer path detection apparatus, which is applied to detect a terminating device, where the terminating device is a link layer egress device that detects that an initiating device reaches a target MAC address to be detected, and the apparatus includes:
a message receiving module, configured to receive a detection request message sent by the detection initiating device; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
A message sending module, configured to send a detection response message to the detection initiating device when the message receiving module receives a detection request message sent by the detection initiating device; the detection response message includes the information of the device itself and the exit port from which the device itself reaches the target MAC address.
In a seventh aspect, an embodiment of the present application provides a link layer path detection system, including a detection initiating device and a detection terminating device, where at least one intermediate node device is included between the detection initiating device and the detection terminating device;
the detection initiating device includes the fourth aspect and the link layer path detecting apparatus according to any implementation manner of the fourth aspect;
the intermediate node device comprises the link layer path detection apparatus of the fifth aspect;
the link layer path detecting device according to the sixth aspect of the detection terminating device.
The beneficial effects of the embodiment of the application are that:
the detection initiating device generates a detection request message containing the MAC address of the target to be detected, the information of the detection terminating device and the message hop number and sends the detection request message to the target detection device, so that the target detection device confirms that the detection request message is not sent to the target detection device, and when the number of hops of the message is determined to be less than 1 and equal to 0, the target detection equipment can send a detection response message carrying the information of the target detection equipment and the link layer path information of the target detection equipment reaching the detection termination equipment to the detection initiating equipment, so that after the detection initiating equipment obtains the detection response message by forwarding the detection request message according to the intermediate node equipment, it is possible to know whether there is a failure at the target detection apparatus from the detection response message, therefore, whether the target detection equipment in the two-layer network fails or not can be automatically detected, and the failure determination efficiency in the two-layer network is greatly improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a link layer path detection method according to a second embodiment of the present application;
fig. 2 is a schematic diagram illustrating a structure of a detection request packet in a link layer path detection method according to a second embodiment of the present application;
fig. 3 shows a first block diagram of a link layer path detection apparatus according to a third embodiment of the present application;
fig. 4 is a second block diagram of a link layer path detection apparatus according to a third embodiment of the present application;
fig. 5 shows a third structural block diagram of a link layer path detection apparatus according to a third embodiment of the present application.
Detailed Description
With the increasing volume of devices in a two-layer network, the devices in the two-layer network are often deployed across regions. For example, a two-tier network may have 100 devices, with 50 devices in the machine room in the a region and 50 devices in the machine room in the B region, and the distance between the a region and the B region may reach several tens of kilometers.
However, the inventor has found that the two-layer network is applied to about 10 devices in an office when the two-layer network is small in scale. In this case, if an abnormality occurs in the two-layer network, such as aging of forwarding table entries of devices in the network, link switching, and port change, service interruption in the two-layer network may be caused. Although the user adopts a mode of manually logging in each device to check and determine the faulty devices one by one, the mode can also determine the faulty devices quickly due to less devices. However, as the number of devices in the two-layer network of the data center is larger and larger at present, and even the devices are across regions, the efficiency is too low in a mode of manually logging in each device to perform one-by-one troubleshooting and determining the failed device, and the failure cannot be determined within hours or days.
The above prior art solutions have drawbacks that are the results of practical and careful study of the inventor, and therefore, the discovery process of the above problems and the solutions proposed by the following embodiments of the present application for the above problems should be the contributions of the inventor to the present application in the process of the present application.
Based on the above research, the embodiments of the present application provide a method, an apparatus, and a system for detecting a link layer path. The detection initiating device sends a detection response message to the detection initiating device by generating and sending a detection request message comprising a target MAC address to be detected, information of the detection terminating device and message hop count, and the node device receives the detection request message when determining that the node device is not the detection terminating device and the message hop count in the detection request message is less than 1 and is equal to 0, and forwards the detection request message when determining that the message hop count in the detection request message is less than 1 and is not equal to 0, so that the detection initiating device can know whether a path between the detection initiating device and the detection terminating device is in fault according to the receiving condition of the detection response message, thereby realizing the automatic detection of whether the path in a two-layer network is in fault, and greatly improving the fault determining efficiency in the two-layer network.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
First embodiment
The embodiment of the application provides a two-layer network, namely a link layer network. The two-layer network includes: a plurality of node devices.
Each node device of the plurality of node devices may be a switch or bridge or the like. Each of the plurality of node devices is connected to an adjacent node device through a link to form the two-layer network, where the two-layer network may be an ethernet network formed by the plurality of node devices based on a TRILL protocol (Transparent Interconnection of Lots of Links), or another network equivalent to the ethernet network. Based on the TRILL protocol, a plurality of node devices in the two-layer network form a corresponding TRILL network domain.
At least part of the node devices in the plurality of node devices may be further connected to the terminal device, so that the terminal device may perform data communication with other terminal devices through a link formed by the plurality of node devices, that is, the terminal device connected to the TRILL network domain may perform data communication with other terminal devices connected to the TRILL network domain based on the TRILL network domain.
In this embodiment, any node device of the multiple node devices may generate a corresponding detection request packet based on an agreed rule in the TRILL protocol, so that detection of a path in the two-layer network is implemented by sending the detection request packet to a corresponding node device of the multiple node devices.
In addition, in this embodiment, the two-layer network may also be constructed such that the plurality of node devices are based on another link layer control protocol that satisfies the two-layer network, and after construction, every two node devices in the plurality of node devices interact with each other based on the other link layer control protocol. For example, the two-Layer network may be constructed by the multiple node devices based on a spanning tree Protocol, an LLDP Protocol (Link Layer Discovery Protocol), an NDSP Protocol (Neighbor Search Protocol ), an EAPS Protocol (Ethernet Automatic Protection Switching), or the like, and any one of the multiple node devices may generate a corresponding detection request packet based on an agreed rule in the spanning tree Protocol, the LLDP Protocol, the NDSP Protocol, or the EAPS Protocol, and detect a path in the two-Layer network by sending the detection request packet to the corresponding node device in the multiple node devices.
It can be understood that, in the embodiment, the plurality of node devices construct a corresponding two-layer network by using a TRILL-based protocol, and each two node devices in the plurality of node devices perform data communication based on the TRILL protocol, which is only one implementation manner of the embodiment, so that after the scheme of the embodiment is elaborated based on the implementation manner, those skilled in the art can clearly understand the scheme, and the scheme is not limited to the embodiment. Certainly, the manner in which the multiple node devices construct the two-layer network and interact based on the other link layer control protocols that satisfy the two-layer network is similar to the manner in which the TRILL protocol is adopted, and the implementation process of the multiple node devices may refer to the implementation process in which the TRILL protocol is adopted.
Second embodiment
Referring to fig. 1, an embodiment of the present application provides a link layer path detection method applied to a two-layer network. The link layer path detection method comprises the following steps: step S100 and step S200.
The node device in the two-layer network may detect whether a link layer path where the node device is located fails. Assuming that the node device a is connected to the node device B and the node device C in turn, the accessing of the link layer path of the terminal device T1 connected to the node device a to the terminal device T2 connected to the node device C includes: node device a, node device B, and node device C, then when node device a initiates detection of a link layer path to the MAC address of terminal device T2, node device a may determine whether the link layer path as a whole fails by detecting whether the path where the link layer path is connected to each node device fails, that is, node device a needs to detect the path connected to node device B and the path connected to node device C in sequence. At this time, node device a is a detection initiating device, node device C is a detection terminating device, and node device B is an intermediate node device between the detection initiating device and the detection terminating device, and is also a next hop when the detection initiating device reaches the detection terminating device.
In this embodiment, a link layer path detection method provided in this embodiment is first described in the context of a detection initiating device performing link detection on any intermediate node device in a link layer path, but this is not limited to this embodiment.
Before step S100, the detection initiating device may interact with the user through its own interaction interface, for example, through a key, a key cooperating with a display screen or a touch screen. The detection initiating device can receive a detection control instruction sent by the user through interactive operation, and the detection initiating device can execute detection on a link layer path from the detection initiating device to a certain target MAC address to be detected based on the detection control instruction, wherein the detection control instruction comprises the target MAC address to be detected, and the detection terminating device is a link layer exit device from the detection initiating device to the target MAC address to be detected.
In addition, the generation mode of the detection control command may be: the method comprises the steps that target terminal equipment connected through a two-layer network is displayed on detection initiating equipment, a user clicks corresponding target terminal equipment in each detection initiating equipment, and the detection initiating equipment can respond and generate a control instruction containing an MAC address (serving as a target MAC address to be detected) of the target terminal equipment based on clicking operation of the user; it may also be that the user enters the detection target MAC address at the detection initiating device.
Optionally, an entry for interacting with other detection initiating devices based on a TRILL protocol is preset in the detection initiating device, where the entry may be a FIB (Forwarding Information base) table, and the table may further include two types of tables, which are a MAC address table and a TRILL Forwarding table, respectively. The MAC address table stores MAC addresses, VLANs, and egress ports, and also stores link layer identification information of a link layer egress device corresponding to each MAC address (i.e., from which node device the MAC address is learned), and the link layer identification information may be an identifier defined based on a TRILL protocol; the TRILL forwarding table stores all forwarding links in the TRILL domain in the two-layer network, including link layer identification information of the link layer egress device, the MAC address corresponding to the next hop, the egress port, the total hop count of the link layer path to the destination MAC address, and the like.
After the detection initiating device receives the detection control instruction, the detection initiating device finds the link layer path reaching the target MAC address to be detected from the FIB table entry based on the target MAC address to be detected of the detection initiating device.
In detail, the detection initiating device may detect the target MAC address to be detected in the control instruction. Based on the target MAC address to be detected, the detection initiating device may find out, in the MAC address table, an identifier of the detection terminating device corresponding to the target MAC address to be detected, where the identifier of the detection terminating device may be an Nickname of the detection terminating device in a TRILL protocol. The detection initiating device can find a link layer path from the detection initiating device to the detection terminating device in the TRILL forwarding table based on the Nickname of the detection terminating device, and obtain the MAC address of the next hop on the link layer path at least including the detection initiating device reaching the detection terminating device and the total hop count of the link layer path from the detection initiating device reaching the target MAC address.
The message based on the TRILL protocol is forwarded Hop by Hop, and the total Hop count (Hop count) can be used to limit the forwarding range of the message in the link layer, so that the detection initiating device can determine the Hop count of the message detected each time based on the total Hop count, and the Hop count of the message detected each time can indicate the Hop count of the message which needs to reach the target detection device at this time by the detection initiating device. That is, the number of hops of the message is related to the number of hops detected by the detection initiating device, for example, if the detection initiating device a starts to detect the target detecting device B, the number of hops of the message is 1, and if the detection initiating device a finishes detecting the target detecting device B and needs to start detecting the target detecting device C, the number of hops of the message is adjusted to 2 by the detection initiating device a.
It can be understood that, the target detection devices corresponding to different message hop counts are also different, and when the message hop count is 1, the target detection device may be indicated as the next hop from the detection initiating device to the detection terminating device. When the hop count of the packet is the total hop count of the link layer path, the target detection device may be indicated as the detection termination device. And when the hop count of the packet is a value between 1 and the total hop count of the link layer path, the target detection device may be indicated as an intermediate node device between the detection initiation device and the next-hop detection termination device of the detection termination device.
Furthermore, the detection initiating device may also find the MAC address of the next hop, in the link layer path, where the detection initiating device reaches the detection terminating device, based on the link layer path.
Thus, the detection initiating device obtains the MAC address of the target to be detected, the information of the detection terminating device, the MAC address of the next hop and the hop count of the message.
It should be noted that there may be more than one link layer path found by the detection initiating device, but since the detection manner of each link layer path by the detection initiating device is the same, this embodiment is described with respect to any one of the link layer paths as an example, but not as a limitation to this embodiment.
In addition, if the MAC address of the target to be detected in the detection control instruction is the detection initiating device, the detection initiating device may perform an error prompt.
In this embodiment, the detection initiating device may use each intermediate node device, which is not the detection initiating device but includes the detection terminating device, in the link layer path as each target detection device based on the obtained target MAC address to be detected, the information of the detection terminating device, the MAC address of the next hop, and the total hop count of the link layer path, and sequentially detect each target detection device according to the recorded obtained information according to the connection relationship of each target detection device in the link layer path.
Continuing with the assumption, in the link layer path, the detection initiating device a is connected to the node device B, and the node device B is connected to the node device C, so that when the detection initiating device a receives the MAC address of the target to be detected as the MAC address of the terminal device connected to the node device C, the detection initiating device a may first detect whether the path at the target detection device B on the link layer path is faulty, and then detect whether the path at the target detection device C on the link layer path is faulty.
The detection initiating device may also generate a detection request message based on the TRILL protocol to start detecting whether the paths at all the target detection devices in the link layer path are faulty in sequence based on the obtained target MAC address to be detected, the information of the detection terminating device, the MAC address of the next hop, and the total hop count of the link layer path, that is, the electronic device may execute step S100 multiple times.
Step S100: the detection initiating equipment generates a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection termination equipment is link layer exit equipment when the detection initiating equipment reaches a target MAC address to be detected; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
Based on the obtained target MAC address to be detected, the information of the detection terminating device, and the message hop count, the detection initiating device may generate a detection request message carrying the target MAC address to be detected, the information of the detection terminating device, and the message hop count, and satisfying a TRILL protocol.
In this embodiment, the first detection request packet and the first detection response packet may be in a format of a TRILL protocol data packet. As shown in fig. 2, the packet satisfying the TRILL protocol includes three headers, which are an Outer Ethernet Header (Outer Ethernet Header), a TRILL Header (TRILL Header), and an inner Ethernet Header (Native Ethernet Frame).
In this embodiment, the detection initiating device may encapsulate the MAC address of the target to be detected, the information of the detection terminating device, the MAC address of the next hop, and the hop count of the packet into the generated detection request message. The identification (Ingress nickname) of the detection initiating device and the identification (Egress nickname) of the detection terminating device are encapsulated in the TRILL header of the detection request message, and the destination identification may be information of the detection terminating device in the detection request message. And the source MAC address of the outer Ethernet head of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the outer Ethernet head of the detection request message encapsulates the MAC address of the next hop leading to the detection terminating device. And detecting that the source MAC address of the inner layer Ethernet header of the request message is the MAC address of the detection initiating equipment, and detecting that the destination MAC address of the inner layer Ethernet header of the request message encapsulates the MAC address 01:80: C2:00:00: 00:42 of the TRILL protocol. And Ingress Nickname in the TRILL head is the Nickname of the detection initiating device, and Egress Nickname is the Nickname of the detection terminating device; the detection initiating device also encapsulates the message hop count into the message hop count field of the detection request message.
In this embodiment, in order to identify the detection request packet as a packet for detecting a path and enable the target detection device to return path information through a detection response packet, the detection initiator device may further encapsulate corresponding data (path detection identification information) in an optional field (Options) in the TRILL header of the detection request packet. Optionally, the corresponding data includes: the MAC address to be detected of the target and the link layer path information from the target detection device to the detection termination device are null.
Based on the encapsulation process, the detection initiating device generates the detection request message.
In addition, before generating the detection request message, the detection initiating device determines whether the detection of the path of the target detection device in the link layer path is required, and determines when the detection of the paths of all the target detection devices in the link layer path has been completed. Therefore, the detection initiating device can determine whether the detection of the paths of all the target detection devices in the link layer path is finished by judging whether the message hop count of the detection initiating device is greater than the total hop count of the link layer path reaching the detection terminating device.
When the number of hops of the packet is not greater than the total number of hops of the link layer path, the detection initiating device determines that the detection is not finished, and needs to continue detecting paths reaching other node devices in the path of the detection terminating device, so the detection initiating device can continue to execute step S200.
And when the message hop count is judged to be larger than the total hop count of the link layer path, the detection initiating device determines that the detection is finished, so that the terminal device terminates the execution of the subsequent flow and outputs a corresponding result.
Step S200: the detection initiating equipment sends the detection request message; the detection request message is used for indicating the target detection equipment receiving the detection request message, and sending a detection response message to the detection initiating equipment when the self equipment is determined not to be the detection terminating equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0; the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message; the detection response message carries the information of the target detection device and the link layer path information of the target detection device reaching the detection termination device. After determining that the detection request message can be sent, the detection initiating device may send the detection request message to a link layer path in a two-layer network. Correspondingly, the detection request message is used for indicating the target detection equipment receiving the detection request message, and when the self equipment is determined to be non-detection termination equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0, the detection request message sends a detection response message to the detection initiating equipment; and the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message.
In this way, the intermediate node device located in the link layer path can receive the detection request message. When the intermediate node device determines that the self device is not the detection termination device according to the detection request message and the number of message hops in the detection request message is reduced by 1 and is equal to 0, the intermediate node device confirms that the intermediate node device is the target detection device and sends a detection response message comprising the information of the self device and the path information of the self device reaching the detection termination device to the detection initiation device. The path information of the self device reaching the detection termination device includes information of an exit port and a next hop of the intermediate node device reaching the detection termination device.
And when the intermediate node equipment determines that the equipment of the detection request message is not the detection termination equipment and the hop count of the message in the detection request message minus 1 is not equal to 0, the intermediate node equipment does not continue to forward the detection request message for the target detection equipment.
And when the intermediate node device determines that the self device is the detection termination device according to the detection request message, the intermediate node device may send a detection response message including information of the self device and path information of the self device reaching the target MAC address to be detected to the detection initiation device for the detection termination device.
In this embodiment, the target detection device or the detection termination device returns a corresponding detection response message, and the detection initiation device may determine that the path between the detection initiation device and the target detection device is normal according to the reception of the detection response message within the predetermined time; otherwise, the path fault between the detection initiating device and the target detection device can be determined. It should be noted that, in some cases, although the detection initiating device receives the detection response message within the predetermined time, the returned path information does not match the planned path, and an error prompt is also performed
However, if the detection initiator further includes an intermediate node device between the detection initiator and the target detection device, and the detection initiator determines that the path between the detection initiator and the intermediate node device is normal, the detection initiator may determine that the path between the intermediate node device and the target detection device has a fault according to that the detection response packet is not received within the predetermined time.
The foregoing is illustrative of the principles of the present application and the following is a detailed description of the process flow of the present application through a completion flow.
When starting detection, the detection initiating device obtains the next hop reaching the detection terminating device in the FIB table through the target MAC address to be detected, and at this time, the next hop is used as the first target detection device (hereinafter referred to as the first target detection device). And based on the obtained MAC address of the first target detection device, the information of the detection termination device and the hop count of the first message being 1, the detection initiation device may generate a first detection request message based on the TRILL protocol, where the first detection request message is a message satisfying the TRILL protocol.
When the first target detection device obtains the first detection request message, because the outer ethernet header of the first detection request message is the MAC address of the next hop, the first target detection device finds that the first detection request message is sent to itself, and the hop count of the first message in the first detection request message is reduced by 1 and then determined to be 0, so the first target detection device can decapsulate the first detection request message. Thus, the first target detection device can obtain the address meeting the TRILL protocol in the first detection request message, that is, the identifier of the detection initiating device, the destination identifier of the detection terminating device, and the hop count of the first message are 1. At this time, the first target detection device sends a first detection response message to the detection initiating device; the first detection response message includes information of the first target node device and link layer path information of the first target detection device reaching the detection termination device.
Normally, the optional field of the normal first detection request message is without data, so the first target detection device under normal conditions can determine that the first detection request message is a normal message based on the optional field being without data, and deliver the first detection request message to the TRILL OAM of the normal processing logic for processing.
However, in this embodiment, the data in the optional field of the first detection request message is: the MAC address of the target to be detected and the link layer path information from the target detection device to the detection termination device are null, so that the first target detection device can determine that the first detection request packet indicates that the packet is a path detection packet based on data detection at the optional field: the detection initiating device needs to obtain information that the first target detection device reaches the next-hop device of the detection terminating device and an output port that the first target detection device reaches the detection terminating device. Therefore, the first target detection device may generate the first detection response message. Optional fields in the first detection response message include: information of the first target detection device, and information of an exit port and a next hop of the first target node device reaching the detection termination device.
In this embodiment, after generating the first detection response message, the first target detection device returns the first detection response message to the detection initiating device through the forwarding link layer path.
Continuing the assumption, the detection initiating device a sends a first detection request message with a message hop count of 1 to the target detection device B. When the target detection device B itself is not the detection termination device and the hop count of the first packet in the first detection request message minus 1 is equal to 0, a first detection response packet including the link layer path information (Nickname) of the first target detection device B, the information of the detection termination device (Nickname of the device C), the information of the port reaching the detection termination device C, and the information of the next hop (Nickname of the device C) may be generated based on the data at the optional field of the first detection request message. At this time, the target detection device B sends the first detection response message to the detection initiating device a.
And the detection initiating equipment determines whether a path between the detection initiating equipment and the first target detection equipment is in fault according to the condition of receiving the first detection response message. Optionally, the detection initiating device may correspondingly determine whether the path between the detection initiating device and the first target detecting device is faulty by determining whether the first detection response packet sent by the first target detecting device is received within a predetermined time.
When the first detection response message sent by the first target detection device is not received within the preset time, the detection initiating device may determine that the path between the detection initiating device and the first target detection device is faulty, so as to generate and display corresponding fault information.
When a first detection response message sent by a first target detection device is received within a preset time, a detection initiating device obtains information of the first target detection device by decapsulating the first detection response message, and then the detection initiating device can determine that the first detection response message is sent by the first target detection device, thereby determining that a path between the detection initiating device and the first target detection device is fault-free.
After the detection initiating device completes processing of the received first detection response packet, that is, after the detection initiating device determines that the path between the detection initiating device and the first target detection device is failure-free, the detection device may determine whether the detection of all intermediate node devices on the first forwarding link is completed.
Optionally, the detection initiating device may determine whether the detection on all the intermediate node devices on the first forwarding link has been completed by determining whether the hop count of the first packet plus 1 is less than or equal to a total hop count of a link layer path obtained in advance.
And when the number of hops of the first message plus 1 is judged to be larger than the total number of hops, the detection initiating device determines that the first target detection device is the detection terminating device, and determines that the detection is finished, thereby terminating the execution of the subsequent flow.
When the number of hops of the first message plus 1 is judged to be less than or equal to the total number of hops, the detection initiating device determines that the first target detecting device is not a detection terminating device, and also needs to detect a second target detecting device behind the first target detecting device, and needs to determine whether the second target detecting device is a detection terminating device, wherein the second target detecting device is also a next-hop device when the first target detecting device reaches the detection terminating device. Then, the detection initiating device generates a second message hop count based on the MAC address of the target to be detected, the information of the detection terminating device, and the MAC address of the next hop which is the first target detection device, and based on adding 1 to the first message hop count, and the detection initiating device can generate a second detection request message.
It is understood that the detailed implementation manner of generating the second detection request message may refer to the foregoing description of generating the first detection request message, and will not be described again.
Continuing with the above assumption, the detection initiating device a is connected to the node device B, the node device B is connected to the node device C, and the node device C is also the first target detection device as the detection terminating device. After receiving the first detection response message, the detection initiating device continues to perform path detection, and when judging that the hop count of the first message plus 1 is less than or equal to the total hop count of the link layer path, adds 1 to the hop count of the first message to generate a second message hop count, and the detection initiating device generates a second detection request message; the second detection request message comprises information of first target node equipment (a destination MAC address filled in an outer layer Ethernet header), information of detection termination equipment (filled in an Egress Nickname) and a second message hop count; and filling the option field with the MAC address of the target to be detected. And the detection initiating equipment sends the second detection request message to the first target node equipment.
After generating the second detection request message, the detection initiating device sends the second detection request message to the first target detection device, so that the second detection request message is forwarded to the second target detection device through the first target detection device.
After receiving the second detection request packet, the first target detection device determines that the first target detection device is not the detection termination device itself and that the hop count minus 1 of the second packet in the second detection request packet is not equal to 0, and forwards the second detection request packet to a second target node device (a source MAC of an outer ethernet header needs to be replaced, which belongs to the common knowledge of those skilled in the art and is not described again), where the second target node device is the next hop when the first target node device reaches the detection termination device.
After receiving the second detection request message, the second target node device sends a second detection response message to the detection initiating device when determining that the second target node device is the detection terminating device according to the Egress Nickname in the second detection request message; the detection response message includes information of the second target node device and an output port from which the second target node device reaches the target MAC address. Since the second target detection device is the detection termination device in the link layer path, the optional field in the second detection response message includes: the information of the second object detection device and the information that the second object detection device reaches the next-hop device of the detection termination device are null.
In this way, the second target detection device can send the generated second detection response message to the detection initiating device through the first target detection device.
The detection initiating device may also determine whether a path between the detection initiating device and the second target detection device is faulty according to a condition of receiving the second detection response packet. Optionally, the detection initiating device may also correspondingly determine whether the path between the detection initiating device and the second target detecting device is faulty by determining whether a second detection response message sent by the second target detecting device is received within a predetermined time.
When the second detection response message sent by the second target detection device is not received within the preset time, the detection initiating device may determine that the path between the first target detection device and the second target detection device is faulty based on determining that the path between the detection initiating device and the first target detection device is normal, so as to generate and display corresponding fault information.
When receiving a second detection response message sent by a second target detection device within a preset time, the detection initiating device obtains information of the second target detection device by decapsulating the second detection response message, and then the detection initiating device can determine that the second detection response message is sent by the second target detection device, thereby determining that a path between the detection initiating device and the second target detection device is normal. Furthermore, the detection initiating device may determine that the detection is finished by determining that the hop count of the second packet plus 1 is equal to the total hop count of the link layer path.
It is also possible that the detection initiating device a is connected to the node device B, the node device B is connected to the node device C, the node device C is connected to the node device D, and the node device D is a detection terminating device. At this time, the node device C serving as a second target node device receives the second detection request message, and sends a second detection response message to the detection initiating device when determining that the node device C is not the detection terminating device and that the hop count of the second message in the second detection request message is less than 1 and equal to 0; the second detection response packet includes information of the second target node device and information (information of node device D) of an output port and a next hop, where the second target node device reaches the detection termination device.
Continuing the assumption, the detection initiating device a sends a second detection request message, which takes the target detecting device C as the detection terminating device and has a message hop count of 2, to the target detecting device B. The target detection device B first determines that the new second detection request message is not sent to itself, and the target detection device B determines that the second detection request message is a normal message to be forwarded according to the fact that the hop count of the message is reduced by 1 to 1, thereby sending the first detection request message to the target detection device C. After the target detection device C obtains the second detection request message, the target detection device C may first determine that the new second detection request message is sent to itself, and then the target detection device C may generate a second detection response message including that the path at the target detection device C is empty, the detection termination device is the detection initiation device a, and the number of message hops is 2, based on the data at the optional field of the second detection request message, based on the analysis of the second detection request message. At this time, the target detection device C sends the second detection response message to the detection initiating device B. The target detection device B first determines that the second detection response message is not sent to itself, and then determines that the second detection response message is a normal message to be forwarded according to the fact that the hop count of the message is reduced by 1 to 1, so that the second detection response message is sent to the detection initiating device a. And the detection initiating device A can complete the detection of the target detection device C based on the obtained second detection response message. And finally, the detection initiating device A determines that the detection is finished because the hop count of the message at the moment is 2 and is equal to the hop count of the path 2.
In addition, the above example describes that there are 3 nodes in a link and two hops are performed. For the purposes of this embodiment, the number of nodes in a link should not be limited to 3. In fact, the present embodiment implements detection in the case of multiple nodes in a link, for example, specifically 5, 7, or 10 nodes, and the detection method is also the same as the above-mentioned exemplary method. To avoid a cumbrous description, a detailed description is not given here.
Third embodiment
Referring to fig. 3, an embodiment of the present application provides a link layer path detection apparatus 100, where the link layer path detection apparatus 100 is applied to detect an initiator, and the link layer path detection apparatus 100 includes:
an information obtaining module 110, configured to obtain the target MAC address to be detected, and obtain, according to the target MAC address to be detected, information of the detection terminating device, an MAC address of a next hop from the detection initiating device to the detection terminating device, and a total hop count of a link layer path from the detection initiating device to the target MAC address.
A message generating module 120, configured to generate a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection termination equipment is link layer exit equipment when the detection initiating equipment reaches a target MAC address to be detected; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
A message sending module 130, configured to send the detection request message; the detection request message is used for indicating the target detection equipment receiving the detection request message, and sending a detection response message to the detection initiating equipment when the self equipment is determined not to be the detection terminating equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0; the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message; the detection response message carries the information of the target detection device and the link layer path information of the target detection device reaching the detection termination device.
Optionally, the link layer path detecting apparatus 100 further includes:
the message receiving module 140 is configured to receive the detection response message.
The result obtaining module 150 is configured to determine that a path between the detection initiating device and the target detecting device is normal when the message receiving module receives the detection response message within a predetermined time, and otherwise determine that a path between the detection initiating device and the target detecting device is faulty.
Optionally, the detection request packet and the detection response packet adopt a TRILL data packet format.
Referring to fig. 4, an embodiment of the present application provides a link layer path detection apparatus 200, where the link layer path detection apparatus 200 is applied to detect an intermediate node device between an initiating device and a terminating device, and the link layer path detection apparatus 200 includes:
a message receiving module 210, configured to receive a detection request message sent by the detection initiating device; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
A message sending module 220, configured to send a detection response message to the detection initiating device when it is determined that the device itself is not the detection terminating device and when the hop count of the message in the detection request message is less than 1 and equal to 0; the detection response message includes the information of the device itself and the path information of the device itself to the detection termination device.
A message forwarding module 230, configured to forward the detection request message when it is determined that the self device is not the detection termination device and when the hop count of the message in the detection request message minus 1 is not equal to 0; the detection response message includes the information of the device itself and the path information of the device itself to the detection termination device.
Referring to fig. 5, an embodiment of the present application provides a link layer path detecting apparatus 300, where the link layer path detecting apparatus 300 is applied to detect a terminating device, where the terminating device is a link layer egress device that detects that an initiating device reaches a target MAC address to be detected, and the link layer path detecting apparatus 300 includes:
a message receiving module 310, configured to receive a detection request message sent by the detection initiating device; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address of the detection initiating device reaching the detection terminating device.
A message sending module 320, configured to send a detection response message to the detection initiating device when the message receiving module receives a detection request message sent by the detection initiating device; the detection response message includes the information of the device itself and the exit port from which the device itself reaches the target MAC address.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
To sum up, the embodiment of the present application provides a method, an apparatus, and a system for detecting a link layer path, where the method includes: the detection initiating equipment generates a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection initiating equipment sends a detection request message; the detection request message is used for indicating a target detection device receiving the detection request message, and sending a detection response message to the detection initiating device when the self device is determined to be a non-detection terminating device and the number of message hops in the detection request message minus 1 is equal to 0. Therefore, after the detection initiating device forwards the detection request message according to the intermediate node device to obtain the detection response message, whether the target detection device fails or not can be known according to the detection response message, so that whether the target detection device fails or not in the two-layer network can be automatically detected, and the failure determination efficiency in the two-layer network is greatly improved.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A method for link layer path detection, the method comprising:
the detection initiating equipment generates a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection termination equipment is link layer exit equipment when the detection initiating equipment reaches a target MAC address to be detected; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
the detection initiating equipment sends the detection request message; the detection request message is used for indicating the target detection equipment receiving the detection request message, and sending a detection response message to the detection initiating equipment when the self equipment is determined not to be the detection terminating equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0; the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message; the detection response message carries information of the target detection device and link layer path information of the target detection device reaching the detection termination device, so as to determine whether a link layer path is faulty or not based on the information of the target detection device carried in the detection response message and the link layer path information of the target detection device reaching the detection termination device.
2. The method according to claim 1, wherein before the detection initiating device generates the detection request packet, the method further comprises:
and the detection initiating device acquires the MAC address of the target to be detected, and acquires the information of the detection terminating device, the MAC address of the next hop from the detection initiating device to the detection terminating device and the total hop number of the link layer path from the detection initiating device to the target MAC address according to the MAC address of the target to be detected.
3. The method according to claim 2, wherein the packet hop count indicating the hop count of the detection initiating device reaching the target detecting device comprises:
when the number of the message hops is 1, indicating the target detection equipment as the next hop for the detection initiating equipment to reach the detection terminating equipment;
when the message hop count is the total hop count of the link layer path, indicating the target detection equipment as the detection termination equipment;
and when the message hop count is a value between 1 and the total hop count of the link layer path, indicating the target detection equipment as intermediate node equipment between the next hop from the detection initiating equipment to the detection terminating equipment and the detection terminating equipment.
4. The link layer path detection method according to any of claims 1-3, wherein the method further comprises:
when the detection initiating device receives the detection response message within the preset time, the detection initiating device determines that the path between the detection initiating device and the target detection device is normal, otherwise, the detection initiating device determines that the path between the detection initiating device and the target detection device is in failure.
5. The link layer path detecting method according to claim 4, wherein an intermediate node device is further included between the detection initiating device and the target detecting device, and the determining of the path failure between the detection initiating device and the target detecting device includes:
and when the detection initiating device determines that the path between the detection initiating device and the intermediate node device is normal, determining the path fault between the intermediate node device and the target detection device.
6. The link layer path detection method according to any one of claims 1 to 3, wherein the detection request packet and the detection response packet are in a TRILL data packet format.
7. A method for link layer path detection, the method comprising:
receiving a detection request message sent by detection initiating equipment; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
when determining that the self equipment is not the detection termination equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0, sending a detection response message to the detection initiation equipment; when determining that the self equipment is not the detection termination equipment and the number of the message hops in the detection request message minus 1 is not equal to 0, forwarding the detection request message; the detection response message comprises the information of the self equipment and the path information of the self equipment reaching the detection termination equipment; the information of the target detection device and the link layer path information of the target detection device reaching the detection termination device, which are carried in the detection response message, are used for determining whether the link layer path fails.
8. A method for link layer path detection, the method comprising:
receiving a detection request message sent by detection initiating equipment; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
when determining that the self equipment is the detection termination equipment, sending a detection response message to the detection initiation equipment; the detection response message comprises the information of the self equipment and the path information of the self equipment reaching the target MAC address; the detection response message carried in the detection response message includes the information of the device and the path information of the device reaching the target MAC address, and is used for determining whether a link layer path fails.
9. A link layer path detection device applied to detecting an initiating device includes:
the message generating module is used for generating a detection request message; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the detection termination equipment is link layer exit equipment when the detection initiating equipment reaches a target MAC address to be detected; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
the message sending module is used for sending the detection request message; the detection request message is used for indicating the target detection equipment receiving the detection request message, and sending a detection response message to the detection initiating equipment when the self equipment is determined not to be the detection terminating equipment and the number of message hops in the detection request message is reduced by 1 and is equal to 0; the detection request message is used for indicating the intermediate node equipment between the detection initiating equipment and the target detection equipment which receive the detection request message to forward the detection request message; the detection response message carries information of the target detection device and link layer path information of the target detection device reaching the detection termination device, so as to determine whether a link layer path is faulty or not based on the information of the target detection device carried in the detection response message and the link layer path information of the target detection device reaching the detection termination device.
10. The link layer path detection apparatus of claim 9, wherein the apparatus further comprises an information acquisition module,
the information obtaining module is configured to obtain the target MAC address to be detected, and obtain, according to the target MAC address to be detected, information of the detection terminating device, an MAC address of a next hop from the detection initiating device to the detection terminating device, and a total hop count of a link layer path from the detection initiating device to the target MAC address.
11. The link layer path detection apparatus according to claim 10, further comprising a message receiving module and a result obtaining module,
the message receiving module is used for receiving the detection response message;
the result obtaining module is configured to determine, by the detection initiating device, that a path between the detection initiating device and the target detecting device is normal when the message receiving module receives the detection response message within a predetermined time, and otherwise determine that a path between the detection initiating device and the target detecting device is faulty.
12. The link layer path detection device according to any of claims 9-11, wherein the detection request packet and the detection response packet are in a TRILL data packet format.
13. A link layer path detection device, applied to detect an intermediate node device between an initiating device and a terminating device, includes:
a message receiving module, configured to receive a detection request message sent by the detection initiating device; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
a message sending module, configured to send a detection response message to the detection initiating device when it is determined that the self device is not the detection terminating device and when the number of message hops in the detection request message minus 1 is equal to 0; the detection response message comprises the information of the self equipment and the path information of the self equipment reaching the detection termination equipment;
a message forwarding module, configured to forward the detection request message when it is determined that the self device is not the detection termination device and when the number of message hops in the detection request message minus 1 is not equal to 0; the detection response message comprises the information of the self equipment and the path information of the self equipment reaching the detection termination equipment; the information of the target detection device and the link layer path information of the target detection device reaching the detection termination device, which are carried in the detection response message, are used for determining whether the link layer path fails.
14. A link layer path detection device is applied to a detection termination device, wherein the detection termination device is a link layer exit device for detecting that an initiating device reaches a target MAC address to be detected, and the device comprises:
a message receiving module, configured to receive a detection request message sent by the detection initiating device; the detection request message comprises a target MAC address to be detected, information of detection termination equipment and message hop count; the message hop count indicates the hop count of the detection initiating device reaching the target detection device; the source MAC address of the detection request message is the MAC address of the detection initiating device, and the destination MAC address of the detection request message is the next-hop MAC address from the detection initiating device to the detection terminating device;
a message sending module, configured to send a detection response message to the detection initiating device when the message receiving module receives a detection request message sent by the detection initiating device; the detection response message comprises the information of the self equipment and an output port of the target MAC address reached by the self equipment; the detection response message carried in the detection response message includes the information of the device and the path information of the device reaching the target MAC address, and is used for determining whether a link layer path fails.
15. The link layer path detection system is characterized by comprising a detection initiating device and a detection terminating device, wherein at least one intermediate node device is arranged between the detection initiating device and the detection terminating device;
the detection initiating device comprises a link layer path detection apparatus according to any one of claims 9-12;
the intermediate node apparatus comprising the link layer path detection device of claim 13;
the detection termination device comprises a link layer path detection apparatus according to claim 14.
CN201811265761.4A 2018-10-26 2018-10-26 Link layer path detection method, device and system Active CN109412851B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811265761.4A CN109412851B (en) 2018-10-26 2018-10-26 Link layer path detection method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811265761.4A CN109412851B (en) 2018-10-26 2018-10-26 Link layer path detection method, device and system

Publications (2)

Publication Number Publication Date
CN109412851A CN109412851A (en) 2019-03-01
CN109412851B true CN109412851B (en) 2022-05-17

Family

ID=65470285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811265761.4A Active CN109412851B (en) 2018-10-26 2018-10-26 Link layer path detection method, device and system

Country Status (1)

Country Link
CN (1) CN109412851B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737883B (en) * 2020-12-28 2022-07-29 咪咕音乐有限公司 A layer 2 network data packet transmission method, device and network equipment
CN115134271B (en) * 2021-03-22 2023-07-25 湖南智领通信科技有限公司 Fault detection method and device for IP transparent transmission ad hoc network and computer equipment
CN115460664A (en) * 2022-08-30 2022-12-09 中国船舶集团有限公司第七一六研究所 Terminal self-adaptive communication switching method of multiple communication systems

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316225A (en) * 2007-05-30 2008-12-03 华为技术有限公司 A fault detection method, communication system and label switching router
CN107171882A (en) * 2016-03-08 2017-09-15 华为技术有限公司 Detect the method, apparatus and system of equal cost multipath routing function
CN107248941A (en) * 2017-06-30 2017-10-13 华为技术有限公司 A kind of method and apparatus in detection path

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10027508B2 (en) * 2010-08-31 2018-07-17 Siklu Communication ltd. Extended ring-like communication architecture

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316225A (en) * 2007-05-30 2008-12-03 华为技术有限公司 A fault detection method, communication system and label switching router
CN107171882A (en) * 2016-03-08 2017-09-15 华为技术有限公司 Detect the method, apparatus and system of equal cost multipath routing function
CN107248941A (en) * 2017-06-30 2017-10-13 华为技术有限公司 A kind of method and apparatus in detection path

Also Published As

Publication number Publication date
CN109412851A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN106878166B (en) Route notification method and device
US10484206B2 (en) Path detection method in VxLAN, controller, and network device
KR100733020B1 (en) Customer MAC Frame Forwarding Method, Edge Bridge, And Storage Medium Registering Program
US7995483B1 (en) Simultaneously testing connectivity to multiple remote maintenance endpoints of the same maintenance association
CN105991334B (en) A kind of network topology self-discovery method and device
EP2555476A1 (en) Method, system and device for protecting multicast in communication network
RU2493677C2 (en) Method and router for implementing mirroring
JP7416919B2 (en) Data processing methods and devices and computer storage media
CN107171883B (en) Method, device and device for detecting forwarding table
US9001644B2 (en) Ethernet virtual private network system for providing fast protection for access rings
US9276769B2 (en) Circuit bundle for resiliency/protection of circuits
US20050053006A1 (en) Obtaining path information related to a bridged network
US6944130B1 (en) Method and apparatus for determining a layer 2 path in a switched network
CN101573913A (en) Method and apparatus for improved multicast routing
CN109474495B (en) Tunnel detection method and device
US9942138B2 (en) Method and device for policy based routing
CN111614505B (en) Message processing method and gateway equipment
CN102368726B (en) Forwarding method and device applied to L2VPN (layer 2 virtual private network)
CN109412851B (en) Link layer path detection method, device and system
CN112291116A (en) Link fault detection method and device and network equipment
US8964749B2 (en) Method, device and system for establishing a pseudo wire
CA3104756A1 (en) Loop avoidance communications method, device, and system
CN105634935A (en) Device and method for detecting service layer signal failure
JP2017121056A (en) Method, apparatus and system for implementing packet loss detection
CN112202634B (en) Network link fault detection and transmission method and system

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
GR01 Patent grant
GR01 Patent grant