CN106817264A - A kind of methods, devices and systems of link failure detection - Google Patents

A kind of methods, devices and systems of link failure detection Download PDF

Info

Publication number
CN106817264A
CN106817264A CN201510844330.3A CN201510844330A CN106817264A CN 106817264 A CN106817264 A CN 106817264A CN 201510844330 A CN201510844330 A CN 201510844330A CN 106817264 A CN106817264 A CN 106817264A
Authority
CN
China
Prior art keywords
equipment
message
link detecting
lan
transmitting terminal
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.)
Granted
Application number
CN201510844330.3A
Other languages
Chinese (zh)
Other versions
CN106817264B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510844330.3A priority Critical patent/CN106817264B/en
Publication of CN106817264A publication Critical patent/CN106817264A/en
Application granted granted Critical
Publication of CN106817264B publication Critical patent/CN106817264B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Landscapes

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

Abstract

The invention discloses a kind of methods, devices and systems of link failure detection, belong to Internet technical field.Methods described includes:First equipment, according to default detection cycle, detects the link detecting message sent by multicast mode as the second equipment of link detecting transmitting terminal in the state of as link detecting receiving terminal;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, determine link failure occur between first equipment and second equipment.Using the present invention, the efficiency of link failure detection can be improved.

Description

A kind of methods, devices and systems of link failure detection
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method of link failure detection, device and System.
Background technology
In existing network organizing model, packet can get to connect by multiple equipment in network link Receiving end, if any one place's equipment in network link or circuit break down, can all cause the packet can not Receiving terminal is reached, thus, detection link failure becomes particularly important.
At present, detection link failure method be often using ping orders, it is necessary to be input into ping orders and IP (Internet Protocol, procotol) address of opposite equip., and then, can detect local device with The state of the link between opposite equip..
Realize it is of the invention during, inventor find prior art at least there is problems with:
When the state of network link is detected by ping orders, local device and opposite equip. may only be obtained Between Link State, it is necessary to ping orders are used for multiple times during to the state for detecting a plurality of network link, So as to cause the less efficient of link failure detection.
The content of the invention
In order to solve problem of the prior art, the embodiment of the invention provides a kind of method of link failure detection, Device and system.The technical scheme is as follows:
First aspect, there is provided a kind of method of link failure detection, methods described includes:
First equipment in the state of as link detecting receiving terminal, according to default detection cycle, make by detection For the link detecting message that the second equipment of link detecting transmitting terminal is sent by multicast mode;
When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, first equipment is true It is fixed link failure occur between first equipment and second equipment.
With reference in a first aspect, in the first possible implementation of the first aspect, first equipment exists In the state of as link detecting receiving terminal, according to default detection cycle, detection sends as link detecting Before the link detecting message that second equipment at end is sent by multicast mode, also include:
First equipment sends initial message by multicast mode in the LAN, and receives described The initial message that miscellaneous equipment is sent by multicast mode in LAN, carries in the initial message The device identification of corresponding equipment;
With the device identification of the other equipment be compared for its device identification by first equipment;
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment to any appliance send detection notice message, first equipment by itself It is set to link detecting receiving terminal;Or, other in first equipment receives the LAN set During the detection notice message that preparation is sent, first equipment itself will be set to link detecting transmitting terminal.
After thering is multiple equipment to open link detecting function in LAN, can be by multicast mode in LAN Initial message is sent, other equipment is sent by multicast mode the equipment can receive LAN simultaneously in Initial message, wherein, the device identification of corresponding equipment is carried in initial message.Equipment is received After the link detecting message that other equipment sends in LAN, it can be parsed, acquisition is wherein taken The device identification of band, and the device identification of itself is compared with the device identification of other equipment.For example, When device identification is MAC Address, the connector colon in MAC Address can be removed, and be converted into The decimal system is compared.The transmitting terminal for choosing link detecting transmitting terminal can be prestored in equipment to choose Condition, in initialization, can select according to default transmitting terminal selection condition and disappear for transmission link detection The link detecting transmitting terminal of breath.Equipment is compared to the device identification of itself and the device identification of other equipment Afterwards, can be according to comparative result, whether other equipment meets default transmitting terminal selection bar in judging LAN Part, when any appliance that equipment is determined in other equipment meets default transmitting terminal chooses condition, Ke Yixiang The equipment for meeting condition sends detection notice message, and itself will be set to link detecting receiving terminal, receives The equipment of detection notice message itself can will be set to link detecting transmitting terminal, when equipment receives LAN In miscellaneous equipment send detection notice message when, equipment itself can will be set to link detecting transmitting terminal.
So, when there is two equipment startups in LAN, so that it may carry out link detecting.
With reference to the first possible implementation of first aspect, second in the first aspect may realization side Logic of the corresponding equipment according to default link detecting function is also carried in formula, in the initial message The available logic port mark that port selection rule is chosen;
First equipment itself will be set to after link detecting receiving terminal, is also included:
Under as the initiation of the second equipment of link detecting transmitting terminal, first equipment sets with described second The standby logic port selection rule according to the link detecting function, consults to choose common available logic port Mark, and the common available logic port mark is set to the logic port mark of link detecting function.
So, when link detecting message is for TCP bags, common available port-mark is chosen, to carry out chain Detect on road.
With reference to the first possible implementation of first aspect, the third in the first aspect may the side of realization In formula, first equipment sends initial message by multicast mode in the LAN, including:
First equipment sends initial by multicast mode according to default initialization cycle in the LAN Change message;
Methods described also includes:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment terminates sending initial message.
Any appliance in miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses condition When, i.e., when equipment is link detecting receiving terminal, can terminate sending initial message.When equipment receives it During the detection notice message that his equipment sends, i.e., when equipment is link detecting transmitting terminal, after port negotiation, if It is standby to continue through multicast mode transmission initial message according to default initialization cycle, wherein, initially Common available logic port mark can be carried in change message, so that the follow-up equipment selection for adding is available Logic port mark.
So, the current corresponding port-mark of link detecting function can be known in order to the follow-up equipment for adding, And then, it may be determined that the port-mark carried in initial message.
With reference to the first possible implementation of first aspect, the 4th kind in the first aspect may realization side In formula, methods described also includes:
First equipment in the state of as link detecting receiving terminal, in receiving and newly add the LAN During the initial message that the 3rd equipment is sent by multicast mode, described is carried in the initial message The device identification of three equipment, using the device identification of second equipment as link detecting transmitting terminal with it is described The device identification of the 3rd equipment is compared;
When determining that the 3rd equipment meets default transmitting terminal and chooses condition based on comparative result, described the One equipment sends detection notice message to the 3rd equipment.
First network in the state of as link detecting receiving terminal, when receive it is new add LAN in the 3rd During the initial message that equipment is sent by multicast mode, it can be parsed, acquisition wherein carries the The device identification of three equipment, and the device identification of the 3rd equipment is set with as the second of link detecting transmitting terminal Standby device identification is compared.First equipment ought determine that the 3rd equipment meets default hair based on comparative result When sending end chooses condition, the first equipment can send detection notice message to the 3rd equipment, when based on comparing knot When fruit determines that the second equipment meets default transmitting terminal selection condition, the first equipment can not be changed.
With reference to the first possible implementation of first aspect, the 5th kind in the first aspect may realization side In formula, first equipment sends initial message by multicast mode in the LAN, and receives institute The initial message that miscellaneous equipment in LAN is sent by multicast mode is stated, is carried in the initial message There is the device identification of corresponding equipment, including:
First equipment is sent out with multicast mode by the network interface card of corresponding each network plane in the LAN respectively Send initial message, and in receiving the LAN miscellaneous equipment respectively by the net of each network plane of correspondence Block the initial message sent with multicast mode, the equipment that corresponding equipment is carried in the initial message The network plane of mark and corresponding network plane is identified;
Any appliance determined based on comparative result in the miscellaneous equipment of working as meets default transmitting terminal choosing When taking condition, first equipment sends detection notice message to any appliance, including:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, first equipment sends detection notice message to any appliance, The network plane mark of any network plane is carried in the detection notice message;
The detection notice message that the miscellaneous equipment in first equipment receives the LAN sends When, first equipment itself will be set to link detecting transmitting terminal, including:
It is flat that what the miscellaneous equipment in first equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, first equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
In this manner it is ensured that the different equipment of the link detecting transmitting terminal correspondence of heterogeneous networks plane, and then, Each equipment can receive the link detecting message of link detecting transmitting terminal transmission, and then, it can be determined that Whether link breaks down.
It is described when detecting chain with reference in a first aspect, in the 6th kind of possible implementation of the first aspect When the packet loss quantity of road detection message reaches the first predetermined threshold value, determine that first equipment sets with described second There is link failure between standby, including:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
A kind of second aspect, there is provided method of link failure detection, it is characterised in that methods described includes:
Second equipment in the state of as link detecting transmitting terminal, according to default detection cycle, by group Broadcast mode transmission link detection message in LAN.
Can be provided for sending in advance in a device or receives link detects message (i.e. for link detecting) Detection cycle.After application program launching (it is considered that after equipment starts, the application program can start), Second equipment can send mesh in the state of as link detecting transmitting terminal according to default detection cycle Address for multicast address link detecting message.
With reference to second aspect, in the first possible implementation of the second aspect, second equipment exists In the state of as link detecting transmitting terminal, according to default detection cycle, by multicast mode in LAN Before interior transmission link detection message, also include:
Second equipment sends initial message by multicast mode in the LAN, and receives described The initial message that miscellaneous equipment is sent by multicast mode in LAN, carries in the initial message The device identification of corresponding equipment;
With the device identification of the other equipment be compared for its device identification by second equipment;
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, second equipment to any appliance send detection notice message, second equipment by itself It is set to link detecting receiving terminal;Or, other in second equipment receives the LAN set During the detection notice message that preparation is sent, second equipment itself will be set to link detecting transmitting terminal.
So, when there is two equipment startups in LAN, so that it may carry out link detecting.
In with reference to the first possible implementation of second aspect, second in the second aspect may realization In mode, corresponding equipment patrolling according to default link detecting function is also carried in the initial message Collect the available logic port mark that port selection rule is chosen;
Second equipment itself will be set to after link detecting transmitting terminal, is also included:
Second equipment judges what is carried in the initial message that the other equipment and the second equipment send Logic port is identified whether unanimously, if unanimously, the consistent logic port mark is set into link The logic port mark of function is detected, if inconsistent, second equipment is with the other equipment according to institute The logic port selection rule of link detecting function is stated, consults to choose common available logic port mark, and The common available logic port mark is set to the logic port mark of link detecting function.
After second equipment itself will be set to link detecting transmitting terminal, can also be with all of network in LAN Set and consult the corresponding common available logic port mark of link detecting function, specifically, the second equipment can To judge that the logic port carried in the initial message that itself and other equipment send is identified whether unanimously (the logic port selection rule based on default link detecting function, logic port mark can unanimously be illustrated It is available that the logic port is identified for each equipment), if unanimously, consistent can be patrolled Volume port-mark is set to the logic port mark of link detecting function, if inconsistent, the second equipment can be with Logic port selection rule according to link detecting function, a certain patrolling is chosen from all of logic port mark Port-mark is collected, and judges whether itself can use, if available, can consulted by multicast mode sending port Logic port mark is carried in message, wherein port negotiation message, if unavailable, can be examined according to link The logic port selection rule of brake, chooses itself available logic port mark, it is possible to by multicast The logic port selection rule of mode sending port negotiation message, such as link detecting function is above-mentioned to increase successively Plus during predetermined threshold value, port negotiation message can carry the logic port mark of maximum.Connect as link detecting The equipment of receiving end, can receive the port negotiation message of the second equipment transmission, and it can be parsed, and obtain The logic port mark for wherein carrying is taken, and judges that the logic port identifies whether can use, if available, can be with The logic port mark of link detecting function is set to, if unavailable, can be again according to link detecting The logic port selection rule of function, chooses itself available logic port mark, and to as link detecting The second unavailable notification message of equipment sending port of transmitting terminal, wherein, taken in the unavailable notification message in port Identified with itself available logic port, the port that the second equipment receives other equipment transmission unavailable disappears During breath, it can be parsed, the logic port mark that acquisition is wherein carried, and judge that whether itself may be used With can be processed according to the process of above-mentioned sending port negotiation message.If in the second equipment preset duration Be not received by the unavailable message in port, then it is considered that the logic port carried in port negotiation message is identified, All it is available for other equipment.Can be processed as procedure described above, until select jointly may be used Logic port is identified.That is the second equipment can be with other equipment according to the logic port of link detecting function Selection rule, consults to choose common available logic port mark, and will common available logic port mark It is set to the logic port mark of link detecting function.
So, when link detecting message is for TCP bags, common available port-mark is chosen, to carry out chain Detect on road.
With reference to the first possible implementation of second aspect, the third in the second aspect may the side of realization In formula, second equipment sends initial message by multicast mode in the LAN, including:
Second equipment sends initial by multicast mode according to default initialization cycle in the LAN Change message;
Methods described also includes:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, second equipment terminates sending initial message.
With reference to the third possible implementation of second aspect, the 4th kind in the second aspect may realization side In formula, methods described also includes:
Second equipment in the state of as link detecting transmitting terminal, in receiving and newly add the LAN During the initial message that the 3rd equipment is sent by multicast mode, described is carried in the initial message The device identification of three equipment, the device identification of second equipment is entered with the device identification of the 3rd equipment Row compares;
When determining that the 3rd equipment meets default transmitting terminal and chooses condition based on comparative result, described the Two equipment send detection notice message to the 3rd equipment, and itself will be set to link detecting receiving terminal.
Second equipment is in the state of as link detecting transmitting terminal, and the second equipment is according to default initialization Cycle is sent in the state of initial message, and the second equipment receives new 3rd equipment in adding LAN and passes through During the initial message that multicast mode sends, it can be parsed, the 3rd equipment that acquisition is wherein carried Device identification, and the device identification of the second equipment is compared with the device identification of the 3rd equipment.Work as base When comparative result determines that the 3rd equipment meets default transmitting terminal selection condition, the second equipment can be to the 3rd Equipment sends detection notice message, and itself will be set to link detecting receiving terminal.
So, can be when new equipment be added so that meet transmitting terminal selection condition is chosen for link inspection Survey transmitting terminal.
With reference to the first possible implementation of second aspect, the 5th kind in the second aspect may realization side In formula, second equipment sends initial message by multicast mode in the LAN, and receives institute The initial message that miscellaneous equipment in LAN is sent by multicast mode is stated, is carried in the initial message There is the device identification of corresponding equipment, including:
Second equipment is sent out with multicast mode by the network interface card of corresponding each network plane in the LAN respectively Send initial message, and in receiving the LAN miscellaneous equipment respectively by the net of each network plane of correspondence Block the initial message sent with multicast mode, the equipment that corresponding equipment is carried in the initial message The network plane of mark and corresponding network plane is identified;
Any appliance determined based on comparative result in the miscellaneous equipment of working as meets default transmitting terminal choosing When taking condition, second equipment sends detection notice message to any appliance, including:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, second equipment sends detection notice message to any appliance, The network plane mark of any network plane is carried in the detection notice message;
The detection notice message that the miscellaneous equipment in second equipment receives the LAN sends When, second equipment itself will be set to link detecting transmitting terminal, including:
It is flat that what the miscellaneous equipment in second equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, second equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
A kind of third aspect, there is provided device of link failure detection, it is characterised in that described device includes Receiver, processor, wherein:
Processor, in the state of as link detecting receiving terminal, according to default detection cycle, inspection Survey the link sent by multicast mode as the second equipment of link detecting transmitting terminal that the receiver is received Detection message;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, it is determined that described There is link failure between first equipment and second equipment.
With reference to the third aspect, in the first possible implementation of the third aspect, described device also includes:
Transmitter, for sending initial message in the LAN by multicast mode;
The receiver, is additionally operable to:
Receive the initial message that miscellaneous equipment in the LAN is sent by multicast mode, the initialization The device identification of corresponding equipment is carried in message;
The processor, is additionally operable to:
Its device identification is compared with the device identification of the other equipment;
The transmitter, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processor, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
With reference to the first possible implementation of the third aspect, second in the third aspect may realization side Logic of the corresponding equipment according to default link detecting function is also carried in formula, in the initial message The available logic port mark that port selection rule is chosen;
The processor, is additionally operable to:
Under as the initiation of the second equipment of link detecting transmitting terminal, with second equipment according to the chain The logic port selection rule of function is detected on road, consults to choose common available logic port mark, and by institute State the logic port mark that common available logic port mark is set to link detecting function.
With reference to the first possible implementation of the third aspect, the third in the third aspect may the side of realization In formula, the transmitter is used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processor, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment terminates sending initial message.
With reference to the first possible implementation of the third aspect, the 4th kind in the third aspect may realization side In formula, the processor is additionally operable to:
In the state of as link detecting receiving terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, using the device identification of second equipment as link detecting transmitting terminal and the 3rd equipment Device identification be compared;
The transmitter, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message.
With reference to the first possible implementation of the third aspect, the 5th kind in the third aspect may realization side In formula, the transmitter is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The transmitter, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processor, is used for:
It is flat that what the miscellaneous equipment in first equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, first equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
With reference to the third aspect, in the 6th kind of possible implementation of the third aspect, the processor is used In:
When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value or wrong bag quantity reaches second When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
A kind of fourth aspect, there is provided device of link failure detection, it is characterised in that described device includes Transmitter, wherein:
The transmitter, in the state of as link detecting transmitting terminal, according to default detection cycle, By multicast mode, transmission link detects message in LAN.
With reference to fourth aspect, in the first possible implementation of the fourth aspect, the transmitter, also For:
Initial message is sent in the LAN by multicast mode,
Described device also includes:Receiver, multicast mode is passed through for receiving miscellaneous equipment in the LAN The initial message of transmission, carries the device identification of corresponding equipment in the initial message;
Described device also includes:Processor, for by the device identification of its device identification and the other equipment It is compared;
The transmitter, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processor, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
With reference to the first possible implementation of fourth aspect, second in the fourth aspect may realization side Logic of the corresponding equipment according to default link detecting function is also carried in formula, in the initial message The available logic port mark that port selection rule is chosen;
The processor, is additionally operable to:
Judge the logic port mark carried in the initial message that the other equipment and the second equipment send It is whether consistent, if unanimously, the consistent logic port mark is set into patrolling for link detecting function Port-mark is collected, if inconsistent, second equipment is with the other equipment according to the link detecting work( The logic port selection rule of energy, consults to choose common available logic port mark, and jointly may be used described Logic port mark is set to the logic port mark of link detecting function.
With reference to the first possible implementation of fourth aspect, the third in the fourth aspect may the side of realization In formula, the transmitter is used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processor, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
With reference to the third possible implementation of fourth aspect, the 4th kind in the fourth aspect may realization side In formula, the processor is additionally operable to:
In the state of as link detecting transmitting terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, the device identification of second equipment is compared with the device identification of the 3rd equipment;
The transmitter, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message;
The processor, is additionally operable to:
And itself will be set to link detecting receiving terminal.
With reference to the first possible implementation of fourth aspect, the 5th kind in the fourth aspect may realization side In formula, the transmitter is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The transmitter, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processor, is used for:
The network plane for carrying objective network plane that miscellaneous equipment in the LAN is received sends During the detection notice message of mark, the link detecting transmitting terminal of the objective network plane itself will be set to.
A kind of 5th aspect, there is provided device of link failure detection, it is characterised in that described device includes Receiver module, processing module, wherein:
Processing module, in the state of as link detecting receiving terminal, according to default detection cycle, Detect that the second equipment as link detecting transmitting terminal that the receiver module is received is sent by multicast mode Link detecting message;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, it is determined that There is link failure between first equipment and second equipment.
With reference to the 5th aspect, in the first possible implementation of the 5th aspect, described device also includes:
Sending module, for sending initial message in the LAN by multicast mode;
The receiver module, is additionally operable to:
Receive the initial message that miscellaneous equipment in the LAN is sent by multicast mode, the initialization The device identification of corresponding equipment is carried in message;
The processing module, is additionally operable to:
Its device identification is compared with the device identification of the other equipment;
The sending module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processing module, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
With reference to the first possible implementation of the 5th aspect, second at the 5th aspect may realization side Logic of the corresponding equipment according to default link detecting function is also carried in formula, in the initial message The available logic port mark that port selection rule is chosen;
The processing module, is additionally operable to:
Under as the initiation of the second equipment of link detecting transmitting terminal, with second equipment according to the chain The logic port selection rule of function is detected on road, consults to choose common available logic port mark, and by institute State the logic port mark that common available logic port mark is set to link detecting function.
With reference to the first possible implementation of the 5th aspect, the third at the 5th aspect may the side of realization In formula, the sending module is used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processing module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
With reference to the first possible implementation of the 5th aspect, the 4th kind at the 5th aspect may realization side In formula, the processing module is additionally operable to:
In the state of as link detecting receiving terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, using the device identification of second equipment as link detecting transmitting terminal and the 3rd equipment Device identification be compared;
The sending module, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message.
With reference to the first possible implementation of the 5th aspect, the 5th kind at the 5th aspect may realization side In formula, the sending module is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver module, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The sending module, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processing module, is used for:
The network plane for carrying objective network plane that miscellaneous equipment in the LAN is received sends During the detection notice message of mark, the link detecting transmitting terminal of the objective network plane itself will be set to.
With reference to the 5th aspect, in the 6th kind of possible implementation of the 5th aspect, the processing module, For:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
A kind of 6th aspect, there is provided device of link failure detection, it is characterised in that described device includes Sending module and memory module, wherein:
The sending module, in the state of as link detecting transmitting terminal, according to default detection week Phase, by multicast mode, transmission link detects message in LAN.
With reference to the 6th aspect, in the first possible implementation of the 6th aspect, the sending module, It is additionally operable to:
Initial message is sent in the LAN by multicast mode,
Described device also includes:Receiver module, multicast side is passed through for receiving miscellaneous equipment in the LAN The initial message that formula sends, carries the device identification of corresponding equipment in the initial message;
Described device also includes:Processing module, for by the equipment mark of its device identification and the other equipment Knowledge is compared;
The sending module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processing module, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
With reference to the first possible mode of the 6th aspect, in second possible implementation of the 6th aspect, Corresponding equipment is also carried in the initial message to be selected according to the logic port of default link detecting function Take the available logic port mark of rule selection;
The processing module, is additionally operable to:
Judge the logic port mark carried in the initial message that the other equipment and the second equipment send It is whether consistent, if unanimously, the consistent logic port mark is set into patrolling for link detecting function Port-mark is collected, if inconsistent, second equipment is with the other equipment according to the link detecting work( The logic port selection rule of energy, consults to choose common available logic port mark, and jointly may be used described Logic port mark is set to the logic port mark of link detecting function.
With reference to the first possible mode of the 6th aspect, in the third possible implementation of the 6th aspect, The sending module, is used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processing module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
With reference to the third possible mode of the 6th aspect, in the 4th kind of possible implementation of the 6th aspect, The processing module, is additionally operable to:
In the state of as link detecting transmitting terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, the device identification of second equipment is compared with the device identification of the 3rd equipment;
The sending module, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message;
The processing module, is additionally operable to:
And itself will be set to link detecting receiving terminal.
With reference to the first possible mode of the 6th aspect, in the 5th kind of possible implementation of the 6th aspect, The sending module, is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver module, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The sending module, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processing module, is used for:
The network plane for carrying objective network plane that miscellaneous equipment in the LAN is received sends During the detection notice message of mark, the link detecting transmitting terminal of the objective network plane itself will be set to.
7th aspect, there is provided a kind of system of link detecting, it is characterised in that the system includes first Equipment and the second equipment, wherein:
Second equipment, in the state of as link detecting transmitting terminal, according to default detection week Phase, by multicast mode, transmission link detects message in LAN;
First equipment, in the state of as link detecting receiving terminal, according to default detection week Phase, detection is disappeared as second equipment of link detecting transmitting terminal by the link detecting that multicast mode sends Breath;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, determine that described first sets It is standby link failure occur between second equipment.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
In the embodiment of the present invention, the second equipment in the state of as link detecting transmitting terminal, according to default Detection cycle, by multicast mode in LAN transmission link detect message, link detecting receiving terminal according to Default detection cycle, detects that the second equipment as link detecting transmitting terminal that the receiver is received passes through The link detecting message that multicast mode sends, when the packet loss quantity for detecting link detecting message, to reach first pre- If during threshold value, determining link failure occur between first equipment and second equipment.So, right When multilink carries out link failure detection, link detecting transmitting terminal is detected by multicast mode transmission link and disappeared Breath, the other equipment in same LAN can receive link detecting message, without repeatedly sending ping Order, it is thus possible to improve the efficiency of link failure detection.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, institute in being described to embodiment below The accompanying drawing for needing to use is briefly described, it should be apparent that, drawings in the following description are only the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of system schematic of link detecting provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of equipment provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of equipment provided in an embodiment of the present invention;
Fig. 4 is a kind of method flow diagram of link failure detection provided in an embodiment of the present invention;
Fig. 5 is a kind of mode flow chart for choosing link detecting transmitting terminal provided in an embodiment of the present invention;
Fig. 6 is the processing method of link detecting receiving terminal when a kind of equipment provided in an embodiment of the present invention is newly added Flow chart;
Fig. 7 is the processing method of link detecting transmitting terminal when a kind of equipment provided in an embodiment of the present invention is newly added Flow chart;
Fig. 8 is the method that a kind of Multi net voting plane provided in an embodiment of the present invention chooses link detecting transmitting terminal Flow chart;
Fig. 9 is a kind of apparatus structure schematic diagram of link failure detection provided in an embodiment of the present invention;
Figure 10 is a kind of apparatus structure schematic diagram of link failure detection provided in an embodiment of the present invention;
Figure 11 is a kind of apparatus structure schematic diagram of link failure detection provided in an embodiment of the present invention;
Figure 12 is a kind of apparatus structure schematic diagram of link failure detection provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention Implementation method is described in further detail.
The embodiment of the invention provides a kind of method of link failure detection, the method can by the first equipment and Second equipment realizes jointly, wherein, the first equipment and the second equipment can be the arbitrary equipments in LAN, Such as PC (Personal Computer, PC), the first equipment and the second equipment belong to same LAN (the also VLAN including that can be communicated between equipment), can be communicated each other.
Link detecting transmitting terminal and link inspection can be set in the equipment that can be communicated each other in advance Receiving terminal is surveyed, wherein it is possible to the second equipment is set into link detecting transmitting terminal, then other set in LAN Standby is link detecting receiving terminal, you can be referred to as the first equipment with by one of equipment.After equipment starts Or after the triggering of link detecting function, link detecting transmitting terminal can be according to default detection cycle, by group Broadcast mode transmission link detects message, and the other equipment of startup can detect chain according to default detection cycle The link detecting message that road detection transmitting terminal sends, and count the quantity of packet loss within a certain period of time and wrong bag Quantity, if the quantity of the quantity of packet loss or wrong bag reaches predetermined threshold value, it may be determined that network link occurs Failure, as shown in figure 1, wherein, described can also be performed when the first equipment is as link detecting transmitting terminal Treatment performed by two equipment, can also perform described first and set when the second equipment is as link detecting receiving terminal Standby performed treatment, i.e. arbitrary equipment in LAN all includes as link detecting transmitting terminal and link Corresponding treatment during detection receiving terminal.Alternatively, it is also possible to choose condition according to default transmitting terminal, all Chosen in the in running order equipment that can be communicated each other and meet default transmitting terminal selection bar , used as link detecting transmitting terminal, remaining equipment is then as link detecting receiving terminal for the equipment of part.
First equipment can include receiver 210, processor 220, transmitter 230, receiver 210 and hair Emitter 230 can be connected with processor 220 respectively, as shown in Figure 2.Receiver 210 can be used for receiving Message or data are the link detecting message that can be sent with receives link detection transmitting terminal, and receiver 210 can be with Including but not limited at least one amplifier, tuner, one or more oscillators, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplexer etc., transmitter 230 can be used for sending message or Data can send initial message.Processor 220 can be the control centre of terminal device, using each Plant the various pieces of interface and the whole terminal device of connection, such as receiver 210 and transmitter 230. In the present invention, processor 220 is determined for the treatment whether network link breaks down, optionally, Processor 220 can include one or more processing units;Preferably, processor 220 can be at integrated application Reason device and modem processor, wherein, application processor mainly processes operating system, modulation /demodulation treatment Device mainly processes radio communication.Processor 220 can also be digital signal processor, application specific integrated circuit, Field programmable gate array or other PLDs etc..
Second equipment can include transmitter 310, processor 320 and receiver 330, transmitter 310 and connect Receiving device 330 can be connected with processor 320 respectively, as shown in Figure 3.Transmitter 310 can be used for sending Message or data, in the present invention, transmitter 310 can be used for transmission link detection message, transmitter 310 At least one amplifier, tuner, one or more oscillators, coupler, LNA can be included but is not limited to (Low Noise Amplifier, low-noise amplifier), duplexer etc., receiver 330 can be used for receiving Data or message.Processor 320 can include one or more processing units;Processor 320 can be logical With processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), special collection Into circuit (ASIC), field programmable gate array (FPGA) or other PLDs etc..Tool Body ground, program can include program code, and program code includes computer-managed instruction.
Below in conjunction with specific embodiment, the handling process shown in Fig. 4 is described in detail, content Can be as follows:
Step 401, the second equipment in the state of as link detecting transmitting terminal, according to default detection cycle, By multicast mode, transmission link detects message in LAN.
Wherein, the second equipment is any one equipment for being configured with same multicast address in LAN, such as PC (personal computer, PC), server etc., wherein, any net equipment in LAN It can be IP bags, or ethernet frame that communication link detection message can be carried out.
In force, for ensure can be with normal transmission business number between the equipment that can be in communication with each other in LAN According to bag, can be detected with the state of the network link in local area network, can be in LAN any set It is standby that the application program for realizing link detecting function is installed, it is possible to which that any one pre-set in LAN sets Standby is link detecting transmitting terminal (the corresponding equipment of link detecting transmitting terminal can be referred to as into the second equipment), other Equipment be link detecting receiving terminal.Can be provided for sending or receives link inspection in a device in advance Survey the detection cycle of message (i.e. for link detecting).(it is considered that equipment starts after application program launching Afterwards, the application program can start), the second equipment, can be by the state of as link detecting transmitting terminal According to default detection cycle, sending destination location is the link detecting message of multicast address, wherein, multicast ground Location can be that (IP address is, for sending out the address of multicast packet, to give tacit consent to each and set in IP agreement to 224.0.0.1 Standby network interface card is equipped with the IP address, all link detecting message for being sent to the address, in same LAN All equipment for being configured with the acquiescence multicast address can all receive), or, multicast address can also be office Equipment in the net of domain is voluntarily configured, and multicast address can also be the mac addresses of correspondence multicast address, i.e., and the By multicast mode, the transmission link in LAN detects message to two equipment.Additionally, every default detection week Phase, sequence number can be carried in the link detecting message that the second equipment sends, wherein, the sequence number of carrying can be with It is to be counted from 1 since first time transmission link detection message.
Step 402, the first equipment in the state of as link detecting receiving terminal, according to default detection cycle, The link detecting message that detection is sent as the second equipment of link detecting transmitting terminal by multicast mode.
In force, the first equipment can be referred to as using one of them as the equipment of link detecting receiving terminal.With As a example by first equipment, the treatment to link detecting receiving terminal is described in detail.
Second equipment in the state of as link detecting transmitting terminal, according to default detection cycle, by group After transmission link detection message in LAN, all devices in same LAN can all be received broadcast mode The link detecting message of the second equipment transmission can be received to the link detecting message, i.e. the first equipment.Local All devices in net are both provided with detection cycle, and thus, the first equipment is as link detecting receiving terminal Under state, link detecting message can be detected according to default detection cycle.
Step 403, the first equipment reaches the first predetermined threshold value when the packet loss quantity for detecting link detecting message When, determine link failure occur between the first equipment and the second equipment.
In force, the threshold for judging the packet loss quantity whether network link breaks down can be pre-set Value (i.e. the first predetermined threshold value).When default detection cycle is reached, (propagated due to existing in preset duration Time delay, thus set duration), the first equipment be also not detected by should detection cycle sequence number link detecting During message, it may be determined that a packet loss event occurs, such as, it is N's that the second equipment sent sequence number at T seconds Link detecting message, preset duration is m seconds, when being not detected by serial number N within T to T+m seconds time Link detecting message when, the first equipment can determine occur a packet loss.When packet loss quantity reaches default threshold During value, the first equipment can determine link failure occur between the first equipment and the second equipment.
Optionally, the first equipment can also determine whether network link breaks down according to the quantity of wrong bag, phase Answer, the processing procedure of step 403 can be as follows:When the packet loss quantity for detecting link detecting message reaches First predetermined threshold value, wrong bag quantity reach the second predetermined threshold value or when network delay reaches three predetermined threshold values, Determine link failure occur between the first equipment and the second equipment.
In force, check information and inspection can be included in the link detecting message that link detecting transmitting terminal sends Measurement information, wherein, check information can be CRC (Cyclic Redundancy Check, CRC Code) check information, when the first equipment receives the link detecting message of the second equipment transmission, can be to wherein Detection information verified, obtain check information, and compare the check information that obtains and link detecting message Comprising check information it is whether consistent, if inconsistent, it is believed that wrong bag event occurs, when wrong bag quantity reaches During to the second predetermined threshold value, it may be determined that link failure occur between the first equipment and the second equipment.In addition, The transmission time can also be carried in link detecting message, link detecting receiving terminal (i.e. the first equipment) is received During to link detecting message, can be received according to the transmission time and the first equipment that are carried in link detecting message Reception time and first time to link detecting message receive the duration of link detecting message, judge whether There is network delay and delay duration, such as, the second equipment first time transmission link detects the transmission of message Time is 1 second, and reception time of the first equipment is 2 seconds, receive time and the time of transmission when a length of 1 second, The transmission time of the second equipment message of transmission link detection next time is 5 seconds, and the reception time of the first equipment is 7 Second, then generation network delay event is may determine that, and network delay is 1 second.When the quantity of network delay reaches During to three predetermined threshold values, it may be determined that link failure occur between the first equipment and the second equipment.
Optionally, the equipment in same LAN can also be pre-set for choosing link detecting transmitting terminal Transmitting terminal chooses condition, that is, pre-set initialization mechanism, wherein, all devices in same LAN, Open link detecting function after, can sending destination location for multicast address initial message.In link Before detection transmitting terminal transmission link detection message, condition can be chosen according to transmitting terminal first and be chosen at local Selected between all devices in net and meet the equipment that transmitting terminal chooses condition, as link detecting transmitting terminal, And then, all devices in LAN can carry out link detecting according to the method described in step 401-403.
Signified equipment can be that the first equipment described in step 401-403, or second set in Fig. 5 It is standby.
Below in conjunction with specific embodiment, the handling process shown in Fig. 5 is described in detail, content Can be as follows:
Step 501, equipment sends initial message by multicast mode in LAN, and receives LAN The initial message that miscellaneous equipment is sent by multicast mode, carries corresponding equipment in initial message Device identification.
Wherein, equipment can be the first equipment, or the second equipment, and device identification can be equipment Mark, can be MAC Address with uniqueness.
In force, after thering is multiple equipment to open link detecting function in LAN, can be by multicast mode Initial message is sent in LAN, other equipment passes through group the equipment can receive LAN simultaneously in The initial message that broadcast mode sends, wherein, the device identification of corresponding equipment is carried in initial message.
With the device identification of other equipment be compared for its device identification by step 502, equipment.
In force, after equipment receives the link detecting message of other equipment transmission in LAN, can be right It is parsed, the device identification that wherein carries of acquisition, and setting the device identification of itself and other equipment Standby mark is compared.For example, when device identification is MAC Address, can be by the company in MAC Address Connect symbol colon to remove, and be converted into the decimal system and be compared.
Step 503, any appliance in miscellaneous equipment is determined based on comparative result meets default transmitting terminal choosing When taking condition, equipment sends detection notice message to any appliance, and equipment connects link detecting itself is set to Receiving end;Or, when the detection notice message that the miscellaneous equipment that equipment is received in LAN sends, equipment Itself will be set to link detecting transmitting terminal.
In force, the transmitting terminal for choosing link detecting transmitting terminal can be prestored in equipment and chooses bar Part, in initialization, can choose condition and select for transmission link detection message according to default transmitting terminal Link detecting transmitting terminal.After equipment is compared to the device identification of itself and the device identification of other equipment, Can be according to comparative result, whether other equipment meets default transmitting terminal selection condition in judging LAN, When any appliance that equipment is determined in other equipment meets default transmitting terminal chooses condition, can be to satisfaction The equipment of condition sends detection notice message, and itself will be set to link detecting receiving terminal, wherein, detection Notification message can be used for notifying the equipment for meeting condition, itself be link detecting receiving terminal, now may be used To perform the treatment performed by above-mentioned first equipment, the equipment for receiving detection notice message can set itself Link detecting transmitting terminal is set to, the detection notice message that the miscellaneous equipment in equipment receives LAN sends When, equipment itself can will be set to link detecting transmitting terminal, at this point it is possible to perform above-mentioned second equipment institute The treatment of execution.For example, it can be that the maximum equipment of device identification is link detecting hair that transmitting terminal chooses condition Sending end, you can be that the maximum equipment of MAC Address is link detecting transmitting terminal.
Optionally, when link detecting message is that (Transmission Control Protocol pass transport control protocol to TCP View) bag or UDP (User Datagram Protocol, User Data Protocol) wrap when, choose link inspection After surveying transmitting terminal and link detecting receiving terminal, in addition it is also necessary to determine the logic port mark of link detecting function binding, Accordingly, corresponding equipment can also be carried in the initial message according to default link detecting function Logic port selection rule choose available logic port mark.
In force, the logic port selection rule of link detecting function, the link of equipment can be pre-set After detection function is opened, itself can be chosen according to the logic port selection rule of default link detecting function Available logic port mark, can carry available logic port mark in the initial message of transmission, Specifically, pre-setting the logic port mark of link detecting function acquiescence, the link detecting function of equipment is opened Qi Hou, can first determine whether that the logic port of acquiescence identifies whether to be bound i.e. by the other functions of equipment Judge that the logic port of acquiescence identifies whether can use, if available, the logic can be carried in initial message Port-mark, if unavailable, can will determine that corresponding logical end after logic port mark plus predetermined threshold value Mouth identifies whether can use, until choosing available logical end mark, for example, default logic port-mark is 16666, predetermined threshold value is 10, and equipment can first determine whether whether 16666 can use, if available, initialization disappears 16666 can be carried in breath, if unavailable, it can be determined that whether 16676 can use, until choosing available patrolling Collect port-mark.
Accordingly, when equipment itself will be set to link detecting transmitting terminal or equipment for above-mentioned second equipment, After second equipment itself will be set to link detecting transmitting terminal, can also be handled as follows:Second equipment is sentenced The logic port of carrying is identified whether unanimously in the initial message that disconnected other equipment and the second equipment send, If consistent, consistent logic port mark is set to the logic port mark of link detecting function, such as Really inconsistent, the second equipment, according to the logic port selection rule of link detecting function, is consulted with other equipment Common available logic port mark is chosen, and common available logic port mark is set to link detecting The logic port mark of function.
In force, after the second equipment itself will be set to link detecting transmitting terminal, can also with LAN in All of network settings consult the corresponding common available logic port mark of link detecting function, specifically, Second equipment may determine that the logic port mark carried in the initial message that itself and other equipment send Whether unanimously (the logic port selection rule based on default link detecting function, logic port mark is consistent Can illustrate that logic port mark for each equipment is available), if unanimously, can be by Consistent logic port mark is set to the logic port mark of link detecting function, if inconsistent, second Equipment can be selected according to the logic port selection rule of link detecting function from all of logic port mark A certain logic port mark is taken, and judges whether itself can use, if available, can sent by multicast mode Logic port mark is carried in port negotiation message, wherein port negotiation message, if unavailable, can be by According to the logic port selection rule of link detecting function, itself available logic port mark is chosen, it is possible to By multicast mode sending port negotiation message, such as on the logic port selection rule of link detecting function is When stating increase predetermined threshold value successively, port negotiation message can carry the logic port mark of maximum.As chain The equipment that receiving terminal is detected on road, can receive the port negotiation message of the second equipment transmission, and it can be carried out Parsing, the logic port mark that acquisition is wherein carried, and judge that the logic port identifies whether can use, if can With, the logic port mark of link detecting function can be set to, if unavailable, can be again according to The logic port selection rule of link detecting function, chooses itself available logic port mark, and to conduct The second unavailable notification message of equipment sending port of link detecting transmitting terminal, wherein, the unavailable notice in port Itself available logic port mark is carried in message, the second equipment receives the port of other equipment transmission During unavailable message, it can be parsed, the logic port mark that acquisition is wherein carried, and judged certainly Whether body can use, and can be processed according to the process of above-mentioned sending port negotiation message.If the second equipment is pre- If being not received by the unavailable message in port in duration, then it is considered that the logic carried in port negotiation message Port-mark, is all available for other equipment.Can be processed as procedure described above, until Select common available logic port mark.That is the second equipment can be with other equipment according to link detecting function Logic port selection rule, consult to choose common available logic port mark, and available patrol common Collect the logic port mark that port-mark is set to link detecting function.
If equipment itself will be set to link detecting transmitting and receiving terminal or equipment for above-mentioned first equipment, the After one equipment itself will be set to link detecting receiving terminal, can also be handled as follows:Examined as link Under the initiation of the second equipment for surveying transmitting terminal, the logic of the first equipment and the second equipment according to link detecting function Port selection rule, consults to choose common available logic port mark, and will common available logic port Mark is set to the logic port mark of link detecting function.
In force, under as the initiation of the second equipment of link detecting transmitting terminal, the first equipment can be by Common available logic port mark is set to the logic port mark of link detecting function.Specifically, first At processing procedure when equipment can receive port negotiation message according to above-mentioned link detecting receiving terminal Reason, until choosing common available logic port mark, i.e. the first equipment can be with the second equipment according to link The logic port selection rule of function is detected, consults to choose common available logic port mark, and will be common Available logic port mark is set to the logic port mark of link detecting function.
Optionally, initial message can be received to ensure the equipment in LAN, equipment can be according to pre- If initialization cycle be transmitted initial message, corresponding processing procedure can be as follows:Equipment is according to pre- If initialization cycle, initial message is sent in LAN by multicast mode.
In force, the arbitrary equipment in LAN can pre-set the cycle for sending initial message, Wherein, initialization cycle can be identical with detection cycle.After link detecting function is opened, equipment can be according to Default initialization cycle, initial message is sent by multicast mode in LAN.
Accordingly, if equipment is link detecting receiving terminal, equipment can also be handled as follows:When being based on When comparative result determines that any appliance in miscellaneous equipment meets default transmitting terminal selection condition, equipment terminates Send initial message.
In force, any appliance in miscellaneous equipment is determined based on comparative result meets default transmitting terminal During selection condition, i.e., when equipment is link detecting receiving terminal, can terminate sending initial message.Work as equipment When receiving the detection notice message of other equipment transmission, i.e., when equipment is link detecting transmitting terminal, port association Shang Hou, equipment can continue through multicast mode and send initial message according to default initialization cycle, its In, common available logic port mark can be carried in initial message, so as to the follow-up equipment for adding Choose available logic port mark.
The a certain equipment that the embodiment of the present invention is additionally provided in LAN is choosing link detecting transmitting terminal In the case of open link detecting function when, the processing procedure of link detecting transmitting terminal and link detecting receiving terminal.
First equipment in the state of as link detecting receiving terminal, in receiving and newly add the LAN The processing procedure during initial message that the 3rd equipment is sent by multicast mode is as shown in Figure 6.
Below in conjunction with specific embodiment, the handling process shown in Fig. 6 is described in detail, content Can be as follows:
Step 601, the 3rd equipment is disappeared by the initialization that multicast mode sends in new addition LAN is received The device identification of the 3rd equipment is carried during breath, in initial message, using as the of link detecting transmitting terminal The device identification of two equipment is compared with the device identification of the 3rd equipment.
Wherein, the 3rd equipment can be the arbitrary equipment for newly adding LAN, and the second equipment can be link inspection Survey transmitting terminal.
In force, first network is in the state of as link detecting receiving terminal, when receiving new addition office During the initial message that the 3rd equipment is sent by multicast mode in the net of domain, it can be parsed, obtained The device identification of the 3rd equipment is wherein carried, and the device identification of the 3rd equipment is sent with as link detecting The device identification of second equipment at end is compared.Specific processing procedure may refer to the treatment of step 502 Process.
Step 602, when determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, the One equipment sends detection notice message to the 3rd equipment.
In force, the first equipment ought determine that the 3rd equipment meets default transmitting terminal and chooses based on comparative result During condition, the first equipment can send detection notice message to the 3rd equipment, when determining the based on comparative result When two equipment meet default transmitting terminal selection condition, the first equipment can not be changed.Specific treatment Process may refer to the processing procedure described in step 503.
When being identified for carrying logic port in initial message, if the first equipment does not receive port During negotiation message, then can not be changed, if the first equipment receives port negotiation message, first sets Related place is carried out for processing mode when can receive port negotiation message according to above-mentioned link detecting receiving terminal Reason.
The situation of initial message is sent according to default initialization cycle for equipment, the second equipment is in conduct In the state of link detecting transmitting terminal, the 3rd equipment is sent out by multicast mode in new addition LAN is received The processing procedure during initial message for sending is as shown in Figure 7.
Below in conjunction with specific embodiment, the handling process shown in Fig. 7 is described in detail, content Can be as follows:
Step 701, the 3rd equipment is disappeared by the initialization that multicast mode sends in new addition LAN is received The device identification of the 3rd equipment is carried during breath, in initial message, by the device identification of the second equipment and the The device identification of three equipment is compared.
In force, the second equipment is in the state of as link detecting transmitting terminal, and the second equipment is according to pre- If initialization cycle send initial message in the state of, the second equipment is received and new adds in LAN the During the initial message that three equipment are sent by multicast mode, it can be parsed, acquisition is wherein carried The 3rd equipment device identification, and the device identification of the second equipment is carried out with the device identification of the 3rd equipment Compare.Specific processing procedure may refer to the processing procedure described in step 502.
Step 702, when determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, the Two equipment send detection notice message to the 3rd equipment, and itself will be set to link detecting receiving terminal.
In force, when determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, Second equipment can send detection notice message to the 3rd equipment, and itself will be set to link detecting receiving terminal. Specific processing procedure may refer to the processing procedure described in step 503.
When being identified for carrying logic port in above-mentioned initial message, when the second equipment can be to the 3rd Equipment sends detection notice message, and after itself being set to link detecting receiving terminal, can terminate sending just Beginningization message.When the second equipment receives the detection notice message of the 3rd equipment transmission, can be according to above-mentioned The processing procedure of link detecting transmitting terminal sending port negotiation message is processed accordingly.
Optionally, equipment there may be multiple network interface cards, you can there is major network card and at least one for network interface card, Each network interface card one network plane of correspondence, when LAN is to that should have multiple network planes, initialization is chosen Processing procedure when link detecting transmitting terminal and link detecting receiving terminal can be with as shown in figure 8, wherein, each The concrete processing procedure of network plane may refer to the processing procedure described in step 501-503.
Equipment described below can be the first equipment, or the second equipment.
Below in conjunction with specific embodiment, the handling process shown in Fig. 8 is described in detail, content Can be as follows:
Step 801, equipment is sent out with multicast mode by the network interface card of corresponding each network plane in LAN respectively Initial message is sent, and receives miscellaneous equipment during domain is netted and pass through the network interface card of corresponding each network plane respectively with group The initial message that broadcast mode sends, carries device identification and the correspondence of corresponding equipment in initial message Network plane network plane mark.
Wherein, device identification can be the MAC Address of major network card and the MAC Address of standby network interface card.
In force, the initial message that equipment sends can respectively by the major network card in equipment and standby network interface card Send, wherein the different network plane of different network interface card correspondences, different network planes can be by interchanger Intercommunication is realized Deng forwarding unit, and receive miscellaneous equipment in LAN respectively by correspondence each network plane The initial message that network interface card is sent with multicast mode, i.e. equipment can receive other equipment point by major network clamping The initial message that the network interface card of each network plane is sent with multicast mode Tong Guo not be corresponded to, wherein, initialization The device identification of equipment and the network plane mark of corresponding network plane can be carried in message, specifically, Can with the MAC Address of major network card as corresponding device device identification, it is also possible to the MAC of standby network interface card Address as corresponding device device identification.
With the device identification of other equipment be compared for its device identification by step 802, equipment.
In force, after equipment receives the initial message of other equipment transmission, it can be parsed, The device identification that acquisition is wherein carried, and the device identification of itself is compared with the device identification of other equipment Compared with.
Step 803, any appliance in miscellaneous equipment is determined based on comparative result meets default any network When the corresponding transmitting terminal of plane chooses condition, equipment sends detection notice message, detection notice to any appliance The network plane mark of any network plane is carried in message.
In force, the corresponding transmitting terminal of each network plane can be pre-set and chooses condition, each network Plane can choose link detecting transmitting terminal and link that condition chooses the network plane according to corresponding transmitting terminal Detection receiving terminal, wherein it is possible to ensure the link detecting transmitting terminal of the corresponding network plane of major network card with it is standby On the premise of the link detecting transmitting terminal of the corresponding network plane of network interface card is not same equipment, each net is set The corresponding transmitting terminal of network plane chooses condition, such as, the transmitting terminal of the corresponding network plane of major network card chooses bar Part is that the maximum corresponding equipment of MAC Address is link detecting transmitting terminal, the corresponding network plane of standby network interface card It is that the minimum corresponding equipment of MAC Address is link detecting transmitting terminal that transmitting terminal chooses condition.When based on comparing Result determines that any appliance in miscellaneous equipment meets the corresponding transmitting terminal of default any network plane and chooses bar During part, equipment can send detection notice message to any appliance, and any net is carried in detection notice message The network plane mark of network plane.The process of implementing may refer to the method described in step 503.
Step 804, what the miscellaneous equipment in equipment receives LAN sent carries objective network plane During the detection notice message of network plane mark, equipment itself will be set to the link detecting of objective network plane Transmitting terminal.
In force, when the detection notice message that the other equipment that equipment is received in LAN sends, can So that to parsing, the network plane of the objective network plane that acquisition is wherein carried is identified, wherein, target network Network plane can be any network plane, and equipment can be set itself according to the network plane mark for obtaining It is the link detecting transmitting terminal of objective network plane.
In the embodiment of the present invention, the second equipment in the state of as link detecting transmitting terminal, according to default Detection cycle, by multicast mode in LAN transmission link detect message, link detecting receiving terminal according to Default detection cycle, detects that the second equipment as link detecting transmitting terminal that the receiver is received passes through The link detecting message that multicast mode sends, when the packet loss quantity for detecting link detecting message, to reach first pre- If during threshold value, determining link failure occur between first equipment and second equipment.So, right When multilink carries out link failure detection, link detecting transmitting terminal is detected by multicast mode transmission link and disappeared Breath, the other equipment in same LAN can receive link detecting message, without repeatedly sending ping Order, it is thus possible to improve the efficiency of link failure detection.
Based on identical design, the present embodiment additionally provides a kind of device of link failure detection, such as Fig. 2 institutes Show, the present apparatus can implement above-mentioned steps 401-403,501-503,601-602, the flow shown in 701-702, Described device includes receiver 210, processor 220, wherein:
Processor 220, for the first equipment in the state of as link detecting receiving terminal, according to default inspection In the survey cycle, detect that the second equipment as link detecting transmitting terminal that the receiver 210 is received passes through multicast The link detecting message that mode sends;When the packet loss quantity for detecting link detecting message reaches the first default threshold During value, determine link failure occur between first equipment and second equipment.
Optionally, described device also includes:
Transmitter 230, for sending initial message in the LAN by multicast mode;
The receiver 210, is additionally operable to:
Receive the initial message that miscellaneous equipment in the LAN is sent by multicast mode, the initialization The device identification of corresponding equipment is carried in message;
The processor 220, is additionally operable to:
Its device identification is compared with the device identification of the other equipment;
The transmitter 230, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processor 220, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, when first equipment receives the LAN In miscellaneous equipment send detection notice message when, itself will be set to link detecting transmitting terminal.
In force, after having multiple equipment to open link detecting function in LAN, transmitter 230 can lead to Cross multicast mode and initial message is sent in LAN, receiver 210 can be received in LAN simultaneously The initial message that other equipment is sent by multicast mode, wherein, carried in initial message corresponding The device identification of equipment.After receiver 210 receives the link detecting message of other equipment transmission in LAN, Processor 220 can be parsed to it, the device identification that wherein carries of acquisition, and by the equipment mark of itself Knowledge is compared with the device identification of other equipment.Can be prestored in equipment for choosing link detecting hair The transmitting terminal of sending end chooses condition, and in initialization, processor 220 can be chosen according to default transmitting terminal Condition selects the link detecting transmitting terminal that message is detected for transmission link.Equipment of the processor 220 to itself After the device identification of mark and other equipment is compared, it can be judged in LAN according to comparative result Whether his equipment meets default transmitting terminal is chosen condition, and any appliance in equipment determines other equipment is expired When the default transmitting terminal of foot chooses condition, detection notice message can be sent to the equipment for meeting condition, and will Link detecting receiving terminal itself is set to, itself can be set to chain by the equipment for receiving detection notice message Transmitting terminal is detected on road, when the detection notice message that the miscellaneous equipment that equipment is received in LAN sends, if It is standby itself will to be set to link detecting transmitting terminal.
Optionally, corresponding equipment is also carried in the initial message according to default link detecting function Logic port selection rule choose available logic port mark;
The processor 220, is additionally operable to:
Under as the initiation of the second equipment of link detecting transmitting terminal, with second equipment according to the chain The logic port selection rule of function is detected on road, consults to choose common available logic port mark, and by institute State the logic port mark that common available logic port mark is set to link detecting function.
Optionally, the transmitter 230, is used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processor 220, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment terminates sending initial message.
In force, any appliance in miscellaneous equipment is determined based on comparative result meets default transmitting terminal During selection condition, i.e., when equipment is link detecting receiving terminal, can terminate sending initial message.Work as reception When device 210 receives the detection notice message of other equipment transmission, i.e., when equipment is link detecting transmitting terminal, After the port negotiation of processor 220, equipment can continue through multicast mode and send out according to default initialization cycle Initial message is sent, wherein, common available logic port mark can be carried in initial message, with Continue the equipment for adding after an action of the bowels and choose available logic port mark.
Optionally, the processor 220, is additionally operable to:
In the state of as link detecting receiving terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, using the device identification of second equipment as link detecting transmitting terminal and the 3rd equipment Device identification be compared;
The transmitter 230, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message.
In force, first network is in the state of as link detecting receiving terminal, when receiver 210 is received During the initial message that the 3rd equipment is sent by multicast mode in new addition LAN, processor 220 can Parsed with to it, obtain the device identification for wherein carrying the 3rd equipment, and by the equipment mark of the 3rd equipment Knowledge is compared with the device identification of the second equipment as link detecting transmitting terminal.When true based on comparative result When fixed 3rd equipment meets default transmitting terminal selection condition, transmitter 230 can send to the 3rd equipment and examine Notification message is surveyed, when determining that the second equipment meets default transmitting terminal selection condition based on comparative result, the One equipment can not be changed.
Optionally, the transmitter 230, is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver 210, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The transmitter 230, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processor 220, is used for:
It is flat that what the miscellaneous equipment in first equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, first equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
Optionally, the processor 220, is used for:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
Based on identical design, the present embodiment additionally provides a kind of device of link failure detection, such as Fig. 3 institutes Show, the present apparatus can realize above-mentioned steps 401-403,501-503,601-602, the flow shown in 701-702, Described device includes transmitter 310, wherein:
The transmitter 310, for the second equipment in the state of as link detecting transmitting terminal, according to default Detection cycle, by multicast mode in LAN transmission link detect message.
Optionally, the transmitter 310, is additionally operable to:
Initial message is sent in the LAN by multicast mode,
Described device also includes:Receiver 330, multicast side is passed through for receiving miscellaneous equipment in the LAN The initial message that formula sends, carries the device identification of corresponding equipment in the initial message;
Described device also includes:Processor 320, for by the equipment mark of its device identification and the other equipment Knowledge is compared;
The transmitter 310, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, second equipment sends detection notice message to any appliance,
The processor 320, is additionally operable to:
Second equipment itself will be set to link detecting receiving terminal;Or, when second equipment is received To in the LAN miscellaneous equipment send detection notice message when, second equipment sets itself It is link detecting transmitting terminal.
Optionally, corresponding equipment is also carried in the initial message according to default link detecting function Logic port selection rule choose available logic port mark;
The processor 320, is additionally operable to:
Judge the logic port mark carried in the initial message that the other equipment and the second equipment send It is whether consistent, if unanimously, the consistent logic port mark is set into patrolling for link detecting function Port-mark is collected, if inconsistent, second equipment is with the other equipment according to the link detecting work( The logic port selection rule of energy, consults to choose common available logic port mark, and jointly may be used described Logic port mark is set to the logic port mark of link detecting function.
In force, after processor 320 itself will be set to link detecting transmitting terminal, acceptable and LAN In all of network settings consult the corresponding common available logic port mark of link detecting function, specifically, Processor 320 may determine that the logic port mark carried in the initial message that itself and other equipment send Know whether unanimously (the logic port selection rule based on default link detecting function, logic port identifies one Cause can illustrate that logic port mark for each equipment is available), if unanimously, can be with Consistent logic port mark is set to the logic port mark of link detecting function, if inconsistent, the Two equipment can be according to the logic port selection rule of link detecting function, from all of logic port mark A certain logic port mark is chosen, and judges whether itself can use, if available, can sent out by multicast mode Sending end mouthful negotiation message, wherein carries logic port mark in port negotiation message, if unavailable, can be with According to the logic port selection rule of link detecting function, itself available logic port mark is chosen, and can It is with the logic port selection rule by multicast mode sending port negotiation message, such as link detecting function During the above-mentioned predetermined threshold value of increase successively, port negotiation message can carry the logic port mark of maximum.As The equipment of link detecting receiving terminal, can receive the port negotiation message of the second equipment transmission, and it can be entered Row parsing, the logic port mark that acquisition is wherein carried, and judge that the logic port identifies whether can use, if Can use, the logic port mark of link detecting function can be set to, if unavailable, can press again According to the logic port selection rule of link detecting function, itself available logic port mark is chosen, and to work It is the second unavailable notification message of equipment sending port of link detecting transmitting terminal, wherein, port is unavailable logical Know and carry in message itself available logic port mark, receiver 330 receives other equipment transmission During the unavailable message in port, processor 320 can be parsed to it, the logic port that acquisition is wherein carried Mark, and judge whether itself can use, can be processed according to the process of above-mentioned sending port negotiation message. If being not received by the unavailable message in port in the second equipment preset duration, it is considered that port negotiation message The logic port mark of middle carrying, is all available for other equipment.Can enter as procedure described above Row treatment, until selecting common available logic port mark.
Optionally, the transmitter 310, is used for:
Second equipment sends initial by multicast mode according to default initialization cycle in the LAN Change message;
The processor 320, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
Optionally, the processor 320, is additionally operable to:
Second equipment in the state of as link detecting transmitting terminal, in receiving and newly add the LAN During the initial message that the 3rd equipment is sent by multicast mode, described is carried in the initial message The device identification of three equipment, the device identification of second equipment is entered with the device identification of the 3rd equipment Row compares;
The transmitter 310, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message;
The processor 320, is additionally operable to:
And itself will be set to link detecting receiving terminal.
Second equipment is in the state of as link detecting transmitting terminal, and transmitter 310 is according to default initial The change cycle is sent in the state of initial message, and receiver 330 receives the 3rd equipment in new addition LAN During the initial message sent by multicast mode, processor 320 can be parsed to it, be obtained wherein The device identification of the 3rd equipment for carrying, and by the device identification of the device identification of the second equipment and the 3rd equipment It is compared.When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, transmitting Device 310 can send detection notice message to the 3rd equipment, and itself is set to link detecting by processor 320 Receiving terminal.
Optionally, the transmitter 320, is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver 330, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The transmitter 310, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processor 320, is used for:
It is flat that what the miscellaneous equipment in second equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, the link of the objective network plane itself will be set to Detection transmitting terminal.
In the embodiment of the present invention, the second equipment in the state of as link detecting transmitting terminal, according to default Detection cycle, by multicast mode in LAN transmission link detect message, link detecting receiving terminal according to Default detection cycle, detects that the second equipment as link detecting transmitting terminal that the receiver is received passes through The link detecting message that multicast mode sends, when the packet loss quantity for detecting link detecting message, to reach first pre- If during threshold value, determining link failure occur between first equipment and second equipment.So, right When multilink carries out link failure detection, link detecting transmitting terminal is detected by multicast mode transmission link and disappeared Breath, the other equipment in same LAN can receive link detecting message, without repeatedly sending ping Order, it is thus possible to improve the efficiency of link failure detection.
Based on identical design, the present embodiment additionally provides a kind of device of link failure detection, such as Fig. 9 institutes Show, the present apparatus can implement above-mentioned steps 401-403,501-503,601-602,701-702,801-804 Shown flow, described device includes receiver module 910, processing module 920, wherein:
Processing module 920, for the first equipment in the state of as link detecting receiving terminal, according to default Detection cycle, detects that the second equipment as link detecting transmitting terminal that the receiver module 910 is received passes through The link detecting message that multicast mode sends;When the packet loss quantity for detecting link detecting message, to reach first pre- If during threshold value, determining link failure occur between first equipment and second equipment.
Optionally, as shown in Figure 10, described device also includes:
Sending module 930, for sending initial message in the LAN by multicast mode;
The receiver module 910, is additionally operable to:
Receive the initial message that miscellaneous equipment in the LAN is sent by multicast mode, the initialization The device identification of corresponding equipment is carried in message;
The processing module 920, is additionally operable to:
Its device identification is compared with the device identification of the other equipment;
The sending module 930, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processing module 920, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, when first equipment receives the LAN In miscellaneous equipment send detection notice message when, itself will be set to link detecting transmitting terminal.
In force, after having multiple equipment to open link detecting function in LAN, sending module 930 can be with Initial message is sent in LAN by multicast mode, receiver module 910 can receive local simultaneously The initial message that other equipment is sent by multicast mode in net, wherein, it is right to be carried in initial message The device identification of the equipment answered.Receiver module 910 receives the link detecting of other equipment transmission in LAN After message, processing module 920 can be parsed to it, the device identification that wherein carries of acquisition, and will be from The device identification of body is compared with the device identification of other equipment.Can be prestored for choosing in equipment The transmitting terminal of link detecting transmitting terminal chooses condition, and in initialization, processing module 920 can be according to default Transmitting terminal choose condition select for transmission link detect message link detecting transmitting terminal.Processing module 920 After being compared to the device identification of itself and the device identification of other equipment, can be sentenced according to comparative result Whether other equipment meets default transmitting terminal selection condition in disconnected LAN, in equipment determines other equipment Any appliance when meeting default transmitting terminal and choosing condition, detection can be sent to the equipment for meeting condition logical Know message, and itself will be set to link detecting receiving terminal, the equipment for receiving detection notice message can be by Link detecting transmitting terminal itself is set to, the detection that the miscellaneous equipment in equipment receives LAN sends is led to When knowing message, equipment itself can will be set to link detecting transmitting terminal.
Optionally, corresponding equipment is also carried in the initial message according to default link detecting function Logic port selection rule choose available logic port mark;
The processing module 920, is additionally operable to:
Under as the initiation of the second equipment of link detecting transmitting terminal, with second equipment according to the chain The logic port selection rule of function is detected on road, consults to choose common available logic port mark, and by institute State the logic port mark that common available logic port mark is set to link detecting function.
Optionally, the sending module 930, is used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processing module 920, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment terminates sending initial message.
In force, any appliance in miscellaneous equipment is determined based on comparative result meets default transmitting terminal During selection condition, i.e., when equipment is link detecting receiving terminal, can terminate sending initial message.Work as reception When module 910 receives the detection notice message of other equipment transmission, i.e., when equipment is link detecting transmitting terminal, After the port negotiation of processing module 920, equipment can continue through multicast mode according to default initialization cycle Initial message is sent, wherein, common available logic port mark can be carried in initial message, So that the follow-up equipment for adding chooses available logic port mark.
Optionally, the processing module 920, is additionally operable to:
In the state of as link detecting receiving terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, using the device identification of second equipment as link detecting transmitting terminal and the 3rd equipment Device identification be compared;
The sending module 930, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message.
In force, first network is in the state of as link detecting receiving terminal, when receiver module 910 connects When receiving the new initial message for adding the 3rd equipment in LAN to be sent by multicast mode, processing module 920 It can be parsed, obtain the device identification for wherein carrying the 3rd equipment, and by the equipment of the 3rd equipment Mark is compared with the device identification of the second equipment as link detecting transmitting terminal.When based on comparative result When determining that the 3rd equipment meets default transmitting terminal selection condition, sending module 930 can be sent out to the 3rd equipment Notification message is surveyed in censorship, when determining that the second equipment meets default transmitting terminal selection condition based on comparative result, First equipment can not be changed.
Optionally, the sending module 930, is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver module 910, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The sending module 930, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processing module 920, is used for:
It is flat that what the miscellaneous equipment in first equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, first equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
Optionally, the processing module 920, is used for:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
Based on identical design, the present embodiment additionally provides a kind of device of link failure detection, such as Figure 11 institutes Show, the present apparatus can realize above-mentioned steps 401-403,501-503,601-602,701-702,801-804 Shown flow, described device includes sending module 1110, wherein:
The sending module 1110, for the second equipment in the state of as link detecting transmitting terminal, according to Default detection cycle, by multicast mode, transmission link detects message in LAN.
Optionally, the sending module 1110, is additionally operable to:
Initial message is sent in the LAN by multicast mode,
As shown in figure 12, described device also includes:Receiver module 1130, for receiving in the LAN it The initial message that its equipment is sent by multicast mode, carries corresponding equipment in the initial message Device identification;
Described device also includes:Processing module 1120, for setting its device identification and the other equipment Standby mark is compared;
The sending module 1110, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, second equipment sends detection notice message to any appliance,
The processing module 1120, is additionally operable to:
Second equipment itself will be set to link detecting receiving terminal;Or, when second equipment is received To in the LAN miscellaneous equipment send detection notice message when, second equipment sets itself It is link detecting transmitting terminal.
Optionally, corresponding equipment is also carried in the initial message according to default link detecting function Logic port selection rule choose available logic port mark;
The processing module 1120, is additionally operable to:
Judge the logic port mark carried in the initial message that the other equipment and the second equipment send It is whether consistent, if unanimously, the consistent logic port mark is set into patrolling for link detecting function Port-mark is collected, if inconsistent, second equipment is with the other equipment according to the link detecting work( The logic port selection rule of energy, consults to choose common available logic port mark, and jointly may be used described Logic port mark is set to the logic port mark of link detecting function.
In force, after processing module 1120 itself will be set to link detecting transmitting terminal, acceptable and local All of network settings consult the corresponding common available logic port mark of link detecting function in net, specifically , processing module 1120 may determine that the logic carried in the initial message that itself and other equipment send Port-mark whether consistent (the logic port selection rule based on default link detecting function, logic port Mark can unanimously illustrate that logic port mark is available for each equipment), if unanimously, Consistent logic port mark can be then set to the logic port mark of link detecting function, if differed Cause, the second equipment can be according to the logic port selection rule of link detecting function, from all of logic port A certain logic port mark is chosen in mark, and judges whether itself can use, if available, can be by multicast Logic port mark is carried in mode sending port negotiation message, wherein port negotiation message, if unavailable, Itself available logic port mark can be chosen according to the logic port selection rule of link detecting function, And rule can be chosen by multicast mode sending port negotiation message, such as the logic port of link detecting function When being then the above-mentioned predetermined threshold value of increase successively, port negotiation message can carry the logic port mark of maximum. As the equipment of link detecting receiving terminal, the port negotiation message of the second equipment transmission can be received, can be right It is parsed, the logic port mark that acquisition is wherein carried, and judges that the logic port identifies whether can use, If available, the logic port mark of link detecting function can be set to, if unavailable, can be again According to the logic port selection rule of link detecting function, choose itself available logic port and identify, and to As the second unavailable notification message of equipment sending port of link detecting transmitting terminal, wherein, port is unavailable Itself available logic port mark is carried in notification message, receiver module 1130 receives other equipment hair During the unavailable message in the port sent, processing module 1120 can be parsed to it, and what acquisition was wherein carried patrols Port-mark is collected, and judges whether itself can use, can entered according to the process of above-mentioned sending port negotiation message Row treatment.If being not received by the unavailable message in port in the second equipment preset duration, it is considered that port The logic port mark carried in negotiation message, is all available for other equipment.Can be according to upper The process of stating is processed, until selecting common available logic port mark.
Optionally, the sending module 1110, is used for:
Second equipment sends initial by multicast mode according to default initialization cycle in the LAN Change message;
The processing module 1120, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
Optionally, the processing module 1120, is additionally operable to:
Second equipment in the state of as link detecting transmitting terminal, in receiving and newly add the LAN During the initial message that the 3rd equipment is sent by multicast mode, described is carried in the initial message The device identification of three equipment, the device identification of second equipment is entered with the device identification of the 3rd equipment Row compares;
The sending module 1110, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message;
The processing module 1120, is additionally operable to:
And itself will be set to link detecting receiving terminal.
Second equipment is in the state of as link detecting transmitting terminal, and sending module 1110 is according to default first Cycle beginning is sent in the state of initial message, and receiver module 1130 receives new addition the 3rd in LAN During the initial message that equipment is sent by multicast mode, processing module 1120 can be parsed to it, be obtained Take the device identification of the 3rd equipment for wherein carrying, and setting the device identification of the second equipment and the 3rd equipment Standby mark is compared.When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, Sending module 1110 can send detection notice message to the 3rd equipment, and be set to for itself by processing module 1120 Link detecting receiving terminal.
Optionally, the sending module 1120, is used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver module 1130, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The sending module 1110, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processing module 1120, is used for:
It is flat that what the miscellaneous equipment in second equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, the link of the objective network plane itself will be set to Detection transmitting terminal.
In the embodiment of the present invention, the second equipment in the state of as link detecting transmitting terminal, according to default Detection cycle, by multicast mode in LAN transmission link detect message, link detecting receiving terminal according to Default detection cycle, detects that the second equipment as link detecting transmitting terminal that the receiver is received passes through The link detecting message that multicast mode sends, when the packet loss quantity for detecting link detecting message, to reach first pre- If during threshold value, determining link failure occur between first equipment and second equipment.So, right When multilink carries out link failure detection, link detecting transmitting terminal is detected by multicast mode transmission link and disappeared Breath, the other equipment in same LAN can receive link detecting message, without repeatedly sending ping Order, it is thus possible to improve the efficiency of link failure detection.
Based on identical design, the present embodiment additionally provides a kind of system of link detecting, it is characterised in that The system includes the first equipment and the second equipment, wherein:
Second equipment, in the state of as link detecting transmitting terminal, according to default detection week Phase, by multicast mode, transmission link detects message in LAN;
First equipment, in the state of as link detecting receiving terminal, according to default detection week Phase, detection is disappeared as second equipment of link detecting transmitting terminal by the link detecting that multicast mode sends Breath;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, determine that described first sets It is standby link failure occur between second equipment.
In the embodiment of the present invention, the second equipment in the state of as link detecting transmitting terminal, according to default Detection cycle, by multicast mode in LAN transmission link detect message, link detecting receiving terminal according to Default detection cycle, detects that the second equipment as link detecting transmitting terminal that the receiver is received passes through The link detecting message that multicast mode sends, when the packet loss quantity for detecting link detecting message, to reach first pre- If during threshold value, determining link failure occur between first equipment and second equipment.So, right When multilink carries out link failure detection, link detecting transmitting terminal is detected by multicast mode transmission link and disappeared Breath, the other equipment in same LAN can receive link detecting message, without repeatedly sending ping Order, it is thus possible to improve the efficiency of link failure detection.
One of ordinary skill in the art will appreciate that realize all or part of step of above-described embodiment can pass through Hardware is completed, it is also possible to instruct the hardware of correlation to complete by program, described program can be stored in In a kind of computer-readable recording medium, storage medium mentioned above can be read-only storage, disk or CD etc..
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all of the invention Within spirit and principle, any modification, equivalent substitution and improvements made etc. should be included in of the invention Within protection domain.

Claims (40)

1. a kind of method of link failure detection, it is characterised in that methods described includes:
First equipment in the state of as link detecting receiving terminal, according to default detection cycle, make by detection For the link detecting message that the second equipment of link detecting transmitting terminal is sent by multicast mode;
When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, first equipment is true It is fixed link failure occur between first equipment and second equipment.
2. method according to claim 1, it is characterised in that first equipment is examined as link Survey in the state of receiving terminal, according to default detection cycle, detection sets as the second of link detecting transmitting terminal Before the standby link detecting message by multicast mode transmission, also include:
First equipment sends initial message by multicast mode in the LAN, and receives described The initial message that miscellaneous equipment is sent by multicast mode in LAN, carries in the initial message The device identification of corresponding equipment;
With the device identification of the other equipment be compared for its device identification by first equipment;
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment to any appliance send detection notice message, first equipment by itself It is set to link detecting receiving terminal;Or, other in first equipment receives the LAN set During the detection notice message that preparation is sent, first equipment itself will be set to link detecting transmitting terminal.
3. method according to claim 2, it is characterised in that also carried in the initial message The available logical end that corresponding equipment is chosen according to the logic port selection rule of default link detecting function Mouth mark;
First equipment itself will be set to after link detecting receiving terminal, is also included:
Under as the initiation of the second equipment of link detecting transmitting terminal, first equipment sets with described second The standby logic port selection rule according to the link detecting function, consults to choose common available logic port Mark, and the common available logic port mark is set to the logic port mark of link detecting function.
4. method according to claim 2, it is characterised in that first equipment passes through multicast mode Initial message is sent in the LAN, including:
First equipment sends initial by multicast mode according to default initialization cycle in the LAN Change message;
Methods described also includes:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment terminates sending initial message.
5. method according to claim 2, it is characterised in that methods described also includes:
First equipment in the state of as link detecting receiving terminal, in receiving and newly add the LAN During the initial message that the 3rd equipment is sent by multicast mode, described is carried in the initial message The device identification of three equipment, using the device identification of second equipment as link detecting transmitting terminal with it is described The device identification of the 3rd equipment is compared;
When determining that the 3rd equipment meets default transmitting terminal and chooses condition based on comparative result, described the One equipment sends detection notice message to the 3rd equipment.
6. method according to claim 2, it is characterised in that first equipment passes through multicast mode Send initial message in the LAN, and miscellaneous equipment passes through multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment in the initial message, including:
First equipment is sent out with multicast mode by the network interface card of corresponding each network plane in the LAN respectively Send initial message, and in receiving the LAN miscellaneous equipment respectively by the net of each network plane of correspondence Block the initial message sent with multicast mode, the equipment that corresponding equipment is carried in the initial message The network plane of mark and corresponding network plane is identified;
Any appliance determined based on comparative result in the miscellaneous equipment of working as meets default transmitting terminal choosing When taking condition, first equipment sends detection notice message to any appliance, including:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, first equipment sends detection notice message to any appliance, The network plane mark of any network plane is carried in the detection notice message;
The detection notice message that the miscellaneous equipment in first equipment receives the LAN sends When, first equipment itself will be set to link detecting transmitting terminal, including:
It is flat that what the miscellaneous equipment in first equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, first equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
7. method according to claim 1, it is characterised in that described when detecting link detecting message Packet loss quantity when reaching the first predetermined threshold value, determine occur between first equipment and second equipment Link failure, including:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, determine first equipment with described There is link failure between two equipment.
8. a kind of method of link failure detection, it is characterised in that methods described includes:
Second equipment in the state of as link detecting transmitting terminal, according to default detection cycle, by group Broadcast mode transmission link detection message in LAN.
9. method according to claim 8, it is characterised in that second equipment is examined as link Survey transmitting terminal in the state of, according to default detection cycle, by multicast mode in LAN transmission link Before detection message, also include:
Second equipment sends initial message by multicast mode in the LAN, and receives described The initial message that miscellaneous equipment is sent by multicast mode in LAN, carries in the initial message The device identification of corresponding equipment;
With the device identification of the other equipment be compared for its device identification by second equipment;
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, second equipment to any appliance send detection notice message, second equipment by itself It is set to link detecting receiving terminal;Or, other in second equipment receives the LAN set During the detection notice message that preparation is sent, second equipment itself will be set to link detecting transmitting terminal.
10. method according to claim 9, it is characterised in that also carried in the initial message There is the available logic that corresponding equipment is chosen according to the logic port selection rule of default link detecting function Port-mark;
Second equipment itself will be set to after link detecting transmitting terminal, is also included:
Second equipment judges what is carried in the initial message that the other equipment and the second equipment send Logic port is identified whether unanimously, if unanimously, the consistent logic port mark is set into link The logic port mark of function is detected, if inconsistent, second equipment is with the other equipment according to institute The logic port selection rule of link detecting function is stated, consults to choose common available logic port mark, and The common available logic port mark is set to the logic port mark of link detecting function.
11. methods according to claim 9, it is characterised in that second equipment passes through multicast side Formula sends initial message in the LAN, including:
Second equipment is sent by multicast mode according to default initialization cycle in the LAN Initial message;
Methods described also includes:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, second equipment terminates sending initial message.
12. methods according to claim 11, it is characterised in that methods described also includes:
Second equipment newly add the local in the state of as link detecting transmitting terminal when receiving During the initial message that the 3rd equipment is sent by multicast mode in net, carried in the initial message The device identification of the 3rd equipment is stated, by the equipment mark of the device identification of second equipment and the 3rd equipment Knowledge is compared;
When determining that the 3rd equipment meets default transmitting terminal and chooses condition based on comparative result, described the Two equipment send detection notice message to the 3rd equipment, and itself will be set to link detecting receiving terminal.
13. methods according to claim 9, it is characterised in that second equipment passes through multicast side Formula sends initial message in the LAN, and miscellaneous equipment passes through multicast side in receiving the LAN The initial message that formula sends, carries the device identification of corresponding equipment in the initial message, including:
Second equipment is sent out with multicast mode by the network interface card of corresponding each network plane in the LAN respectively Send initial message, and in receiving the LAN miscellaneous equipment respectively by the net of each network plane of correspondence Block the initial message sent with multicast mode, the equipment that corresponding equipment is carried in the initial message The network plane of mark and corresponding network plane is identified;
Any appliance determined based on comparative result in the miscellaneous equipment of working as meets default transmitting terminal choosing When taking condition, second equipment sends detection notice message to any appliance, including:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, second equipment sends detection notice message to any appliance, The network plane mark of any network plane is carried in the detection notice message;
The detection notice message that the miscellaneous equipment in second equipment receives the LAN sends When, second equipment itself will be set to link detecting transmitting terminal, including:
It is flat that what the miscellaneous equipment in second equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, second equipment itself will be set to the target network The link detecting transmitting terminal of network plane.
14. a kind of devices of link failure detection, it is characterised in that described device includes receiver, treatment Device, wherein:
Processor, in the state of as link detecting receiving terminal, according to default detection cycle, inspection Survey the link sent by multicast mode as the second equipment of link detecting transmitting terminal that the receiver is received Detection message;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, it is determined that described There is link failure between first equipment and second equipment.
15. devices according to claim 14, it is characterised in that described device also includes:
Transmitter, for sending initial message in the LAN by multicast mode;
The receiver, is additionally operable to:
Receive the initial message that miscellaneous equipment in the LAN is sent by multicast mode, the initialization The device identification of corresponding equipment is carried in message;
The processor, is additionally operable to:
Its device identification is compared with the device identification of the other equipment;
The transmitter, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processor, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
16. devices according to claim 15, it is characterised in that also carried in the initial message There is the available logic that corresponding equipment is chosen according to the logic port selection rule of default link detecting function Port-mark;
The processor, is additionally operable to:
Under as the initiation of the second equipment of link detecting transmitting terminal, with second equipment according to the chain The logic port selection rule of function is detected on road, consults to choose common available logic port mark, and by institute State the logic port mark that common available logic port mark is set to link detecting function.
17. devices according to claim 15, it is characterised in that the transmitter, are used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processor, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
18. devices according to claim 15, it is characterised in that the processor, are additionally operable to:
In the state of as link detecting receiving terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, using the device identification of second equipment as link detecting transmitting terminal and the 3rd equipment Device identification be compared;
The transmitter, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message.
19. devices according to claim 15, it is characterised in that the transmitter, are used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The transmitter, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processor, is used for:
The network plane for carrying objective network plane that miscellaneous equipment in the LAN is received sends During the detection notice message of mark, the link detecting transmitting terminal of the objective network plane itself will be set to.
20. devices according to claim 14, it is characterised in that the processor, are used for:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
21. a kind of devices of link failure detection, it is characterised in that described device includes transmitter, wherein:
The transmitter, in the state of as link detecting transmitting terminal, according to default detection cycle, By multicast mode, transmission link detects message in LAN.
22. devices according to claim 21, it is characterised in that the transmitter, are additionally operable to:
Initial message is sent in the LAN by multicast mode,
Described device also includes:Receiver, multicast mode is passed through for receiving miscellaneous equipment in the LAN The initial message of transmission, carries the device identification of corresponding equipment in the initial message;
Described device also includes:Processor, for by the device identification of its device identification and the other equipment It is compared;
The transmitter, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processor, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
23. devices according to claim 22, it is characterised in that also carried in the initial message There is the available logic that corresponding equipment is chosen according to the logic port selection rule of default link detecting function Port-mark;
The processor, is additionally operable to:
Judge the logic port mark carried in the initial message that the other equipment and the second equipment send It is whether consistent, if unanimously, the consistent logic port mark is set into patrolling for link detecting function Port-mark is collected, if inconsistent, second equipment is with the other equipment according to the link detecting work( The logic port selection rule of energy, consults to choose common available logic port mark, and jointly may be used described Logic port mark is set to the logic port mark of link detecting function.
24. devices according to claim 22, it is characterised in that the transmitter, are used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processor, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
25. devices according to claim 24, it is characterised in that the processor, are additionally operable to:
In the state of as link detecting transmitting terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, the device identification of second equipment is compared with the device identification of the 3rd equipment;
The transmitter, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message;
The processor, is additionally operable to:
And itself will be set to link detecting receiving terminal.
26. devices according to claim 22, it is characterised in that the transmitter, are used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The transmitter, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processor, is used for:
The network plane for carrying objective network plane that miscellaneous equipment in the LAN is received sends During the detection notice message of mark, the link detecting transmitting terminal of the objective network plane itself will be set to.
27. a kind of devices of link failure detection, it is characterised in that described device includes receiver module, place Reason module, wherein:
Processing module, in the state of as link detecting receiving terminal, according to default detection cycle, Detect that the second equipment as link detecting transmitting terminal that the receiver module is received is sent by multicast mode Link detecting message;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, it is determined that There is link failure between first equipment and second equipment.
28. devices according to claim 27, it is characterised in that described device also includes:
Sending module, for sending initial message in the LAN by multicast mode;
The receiver module, is additionally operable to:
Receive the initial message that miscellaneous equipment in the LAN is sent by multicast mode, the initialization The device identification of corresponding equipment is carried in message;
The processing module, is additionally operable to:
Its device identification is compared with the device identification of the other equipment;
The sending module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processing module, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
29. devices according to claim 28, it is characterised in that also carried in the initial message There is the available logic that corresponding equipment is chosen according to the logic port selection rule of default link detecting function Port-mark;
The processing module, is additionally operable to:
Under as the initiation of the second equipment of link detecting transmitting terminal, with second equipment according to the chain The logic port selection rule of function is detected on road, consults to choose common available logic port mark, and by institute State the logic port mark that common available logic port mark is set to link detecting function.
30. devices according to claim 28, it is characterised in that the sending module, are used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processing module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, first equipment terminates sending initial message.
31. devices according to claim 28, it is characterised in that the processing module, are additionally operable to:
In the state of as link detecting receiving terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, using the device identification of second equipment as link detecting transmitting terminal and the 3rd equipment Device identification be compared;
The sending module, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message.
32. devices according to claim 28, it is characterised in that the sending module, are used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver module, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The sending module, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processing module, is used for:
It is flat that what the miscellaneous equipment in first equipment receives the LAN sent carries objective network During the detection notice message of the network plane mark in face, the link of the objective network plane itself will be set to Detection transmitting terminal.
33. devices according to claim 27, it is characterised in that the processing module, are used for:
Second is reached when the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, wrong bag quantity When predetermined threshold value or network delay quantity reach three predetermined threshold values, first equipment and described second is determined Occurs link failure between equipment.
34. a kind of devices of link failure detection, it is characterised in that described device includes sending module and deposits Storage module, wherein:
The sending module, in the state of as link detecting transmitting terminal, according to default detection week Phase, by multicast mode, transmission link detects message in LAN.
35. devices according to claim 34, it is characterised in that the sending module, are additionally operable to:
Initial message is sent in the LAN by multicast mode,
Described device also includes:Receiver module, multicast side is passed through for receiving miscellaneous equipment in the LAN The initial message that formula sends, carries the device identification of corresponding equipment in the initial message;
Described device also includes:Processing module, for by the equipment mark of its device identification and the other equipment Knowledge is compared;
The sending module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, detection notice message is sent to any appliance,
The processing module, is additionally operable to:
Itself will be set to link detecting receiving terminal;Or, the miscellaneous equipment in the LAN is received During the detection notice message of transmission, link detecting transmitting terminal itself will be set to.
36. devices according to claim 35, it is characterised in that also carried in the initial message There is the available logic that corresponding equipment is chosen according to the logic port selection rule of default link detecting function Port-mark;
The processing module, is additionally operable to:
Judge the logic port mark carried in the initial message that the other equipment and the second equipment send It is whether consistent, if unanimously, the consistent logic port mark is set into patrolling for link detecting function Port-mark is collected, if inconsistent, second equipment is with the other equipment according to the link detecting work( The logic port selection rule of energy, consults to choose common available logic port mark, and jointly may be used described Logic port mark is set to the logic port mark of link detecting function.
37. devices according to claim 35, it is characterised in that the sending module, are used for:
According to default initialization cycle, initial message is sent in the LAN by multicast mode;
The processing module, is additionally operable to:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default transmitting terminal and chooses bar During part, terminate sending initial message.
38. device according to claim 37, it is characterised in that the processing module, is additionally operable to:
In the state of as link detecting transmitting terminal, when receive newly add the LAN in the 3rd equipment During the initial message sent by multicast mode, the 3rd equipment is carried in the initial message Device identification, the device identification of second equipment is compared with the device identification of the 3rd equipment;
The sending module, is additionally operable to:
When determining that the 3rd equipment meets default transmitting terminal selection condition based on comparative result, to described 3rd equipment sends detection notice message;
The processing module, is additionally operable to:
And itself will be set to link detecting receiving terminal.
39. devices according to claim 35, it is characterised in that the sending module, are used for:
Initialization is sent in the LAN with multicast mode by the network interface card of corresponding each network plane respectively Message;
The receiver module, is used for:
Miscellaneous equipment is respectively by the network interface card of corresponding each network plane with multicast mode in receiving the LAN The initial message of transmission, carries the device identification of corresponding equipment and corresponding in the initial message The network plane mark of network plane;
The sending module, is used for:
Any appliance in the miscellaneous equipment is determined based on comparative result meets default any network plane When corresponding transmitting terminal chooses condition, detection notice message, the detection notice are sent to any appliance The network plane mark of any network plane is carried in message;
The processing module, is used for:
The network plane for carrying objective network plane that miscellaneous equipment in the LAN is received sends During the detection notice message of mark, the link detecting transmitting terminal of the objective network plane itself will be set to.
40. a kind of systems of link detecting, it is characterised in that the system sets including the first equipment and second It is standby, wherein:
Second equipment, in the state of as link detecting transmitting terminal, according to default detection week Phase, by multicast mode, transmission link detects message in LAN;
First equipment, in the state of as link detecting receiving terminal, according to default detection week Phase, detection is disappeared as second equipment of link detecting transmitting terminal by the link detecting that multicast mode sends Breath;When the packet loss quantity for detecting link detecting message reaches the first predetermined threshold value, determine that described first sets It is standby link failure occur between second equipment.
CN201510844330.3A 2015-11-27 2015-11-27 Method, device and system for detecting link fault Active CN106817264B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510844330.3A CN106817264B (en) 2015-11-27 2015-11-27 Method, device and system for detecting link fault

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510844330.3A CN106817264B (en) 2015-11-27 2015-11-27 Method, device and system for detecting link fault

Publications (2)

Publication Number Publication Date
CN106817264A true CN106817264A (en) 2017-06-09
CN106817264B CN106817264B (en) 2020-09-08

Family

ID=59101867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510844330.3A Active CN106817264B (en) 2015-11-27 2015-11-27 Method, device and system for detecting link fault

Country Status (1)

Country Link
CN (1) CN106817264B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426030A (en) * 2017-08-09 2017-12-01 杭州迪普科技股份有限公司 A kind of link failure based reminding method and device
CN108683542A (en) * 2018-05-22 2018-10-19 郑州云海信息技术有限公司 A kind of fault self-diagnosis method of distributed memory system, system and device
CN109104338A (en) * 2018-11-12 2018-12-28 北京天融信网络安全技术有限公司 Link intelligent detection method, storage medium and computer equipment
CN109586959A (en) * 2018-11-26 2019-04-05 新华三技术有限公司 A kind of method and device of fault detection
CN109982065A (en) * 2017-12-27 2019-07-05 浙江宇视科技有限公司 The method, apparatus and storage medium that equipment fault restores in video surveillance network
CN110830283A (en) * 2018-08-10 2020-02-21 华为技术有限公司 Fault detection method, device, equipment and system
CN110855530A (en) * 2019-11-28 2020-02-28 北京恒泰实达科技股份有限公司 Method for assisting detection of RS232 serial interface communication link
CN111756588A (en) * 2019-03-26 2020-10-09 华为技术有限公司 Communication link detection method and related device
CN114760222A (en) * 2022-06-13 2022-07-15 北京国科天迅科技有限公司 Link disconnection detection method and device for 100base-T1 PHY chip
CN115396344A (en) * 2021-05-08 2022-11-25 华为技术有限公司 Method, device and equipment for detecting link
WO2023236874A1 (en) * 2022-06-08 2023-12-14 华为技术有限公司 Communication link detection method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778113A (en) * 2010-01-25 2010-07-14 福建星网锐捷网络有限公司 Method for detection of RP state in multicast network, device, RP device and multicast system
CN102130778A (en) * 2010-10-22 2011-07-20 华为技术有限公司 Method and system for protecting IPTV (Internet Protocol Television) multicast service
CN102724086A (en) * 2012-06-21 2012-10-10 中兴通讯股份有限公司 Method and device for detecting quality of transmission link
CN103036904A (en) * 2012-12-27 2013-04-10 东方通信股份有限公司 Method of data reliable transmission with user datagram protocol (UDP) in communication network
US8705580B2 (en) * 2010-01-22 2014-04-22 Aruba Networks, Inc. Aggregating multiple wireless channels
CN104717140A (en) * 2013-12-11 2015-06-17 华为技术有限公司 Method and device for fault treatment for edge route bridge equipment in TRILL network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8705580B2 (en) * 2010-01-22 2014-04-22 Aruba Networks, Inc. Aggregating multiple wireless channels
CN101778113A (en) * 2010-01-25 2010-07-14 福建星网锐捷网络有限公司 Method for detection of RP state in multicast network, device, RP device and multicast system
CN102130778A (en) * 2010-10-22 2011-07-20 华为技术有限公司 Method and system for protecting IPTV (Internet Protocol Television) multicast service
CN102724086A (en) * 2012-06-21 2012-10-10 中兴通讯股份有限公司 Method and device for detecting quality of transmission link
CN103036904A (en) * 2012-12-27 2013-04-10 东方通信股份有限公司 Method of data reliable transmission with user datagram protocol (UDP) in communication network
CN104717140A (en) * 2013-12-11 2015-06-17 华为技术有限公司 Method and device for fault treatment for edge route bridge equipment in TRILL network

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426030A (en) * 2017-08-09 2017-12-01 杭州迪普科技股份有限公司 A kind of link failure based reminding method and device
CN107426030B (en) * 2017-08-09 2020-11-06 杭州迪普科技股份有限公司 Link fault reminding method and device
CN109982065B (en) * 2017-12-27 2020-10-20 浙江宇视科技有限公司 Method, device and storage medium for equipment fault recovery in video monitoring network
CN109982065A (en) * 2017-12-27 2019-07-05 浙江宇视科技有限公司 The method, apparatus and storage medium that equipment fault restores in video surveillance network
CN108683542A (en) * 2018-05-22 2018-10-19 郑州云海信息技术有限公司 A kind of fault self-diagnosis method of distributed memory system, system and device
CN110830283B (en) * 2018-08-10 2021-10-15 华为技术有限公司 Fault detection method, device, equipment and system
CN110830283A (en) * 2018-08-10 2020-02-21 华为技术有限公司 Fault detection method, device, equipment and system
CN109104338A (en) * 2018-11-12 2018-12-28 北京天融信网络安全技术有限公司 Link intelligent detection method, storage medium and computer equipment
CN109104338B (en) * 2018-11-12 2020-10-16 北京天融信网络安全技术有限公司 Link intelligent detection method, storage medium and computer equipment
CN109586959A (en) * 2018-11-26 2019-04-05 新华三技术有限公司 A kind of method and device of fault detection
CN109586959B (en) * 2018-11-26 2021-11-26 新华三技术有限公司 Fault detection method and device
CN111756588A (en) * 2019-03-26 2020-10-09 华为技术有限公司 Communication link detection method and related device
CN111756588B (en) * 2019-03-26 2023-01-06 华为技术有限公司 Communication link detection method and related device
CN110855530B (en) * 2019-11-28 2021-08-20 北京恒泰实达科技股份有限公司 Method for assisting detection of RS232 serial interface communication link
CN110855530A (en) * 2019-11-28 2020-02-28 北京恒泰实达科技股份有限公司 Method for assisting detection of RS232 serial interface communication link
CN115396344A (en) * 2021-05-08 2022-11-25 华为技术有限公司 Method, device and equipment for detecting link
CN115396344B (en) * 2021-05-08 2024-06-25 华为技术有限公司 Link detection method, device and equipment
WO2023236874A1 (en) * 2022-06-08 2023-12-14 华为技术有限公司 Communication link detection method and apparatus
CN114760222A (en) * 2022-06-13 2022-07-15 北京国科天迅科技有限公司 Link disconnection detection method and device for 100base-T1 PHY chip

Also Published As

Publication number Publication date
CN106817264B (en) 2020-09-08

Similar Documents

Publication Publication Date Title
CN106817264A (en) A kind of methods, devices and systems of link failure detection
KR100733020B1 (en) Customer MAC Frame Forwarding Method, Edge Bridge, And Storage Medium Registering Program
JP2021166390A (en) Bit-forwarding ingress router, bit-forwarding router, and method of operation, administration, maintenance, and test
CN107925629B (en) Method and device for sending data message in IPv6 network
US20080062874A1 (en) Network monitoring device and network monitoring method
CN116208524A (en) Method, equipment and system for detecting data message
CN102457409B (en) Method and system for link failure detection
WO2016082588A1 (en) Link connectivity checking method and apparatus
EP2587755A1 (en) Method, apparatus and system for implementing multicast
CN109496409B (en) Data transmission method and virtual switch
US10623278B2 (en) Reactive mechanism for in-situ operation, administration, and maintenance traffic
CN105429841A (en) NNI PING realization method and device
CN101026469A (en) Network relay apparatus and method for transmitting data packet
CN111614505B (en) Message processing method and gateway equipment
US9197467B2 (en) Multiple protocol receiver
CN107205239A (en) A kind of method and detection device for detecting wireless network connection
JP5678678B2 (en) Provider network and provider edge device
CN107682221A (en) A kind of Link State inspection method and device based on ERPS
CN107547430A (en) A kind of file transmitting method and device
CN101834759A (en) Detection method of binding link and distributed equipment
CN108400911A (en) A kind of device and method for realizing Micro-BFD agreements
CN105099805A (en) Bidirectional forwarding detection method and system
CN101331717B (en) Method and system for transmitting data in packet-based network
CN102571464B (en) Link tracking processing method and system
CN112769653B (en) Network detection and switching method, system and medium based on network port binding

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
TA01 Transfer of patent application right

Effective date of registration: 20200201

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 210012 Ande Gate No. 94, Yuhuatai District, Jiangsu, Nanjing

Applicant before: Huawei Technologies Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant