Summary of the invention
In view of this, the present invention provides the method and apparatus that a kind of multilink fault detects。Pass through the present invention so that present system expense is little, and implement very simple。
For realizing the object of the invention, implementation of the present invention is specific as follows:
The method of a kind of multilink fault detection, described method is applied to transmission equipment and opposite end receives equipment room and there is the situation of multiple communication links, and wherein said method comprises the steps:
Step 1, transmission equipment send detection messages according to default period 1 timing, and copy to described detection messages to receive with opposite end and send on all links of equipment communication simultaneously;
Step 2, opposite end receive equipment according to adding up the detection messages quantity received in each of the links default second round, and when terminating described second round, the detection messages quantity that every communication link receives are collected;
The detection messages quantity judged on step 3, opposite end reception equipment in the detection cycle in each of the links of statistics, whether more than the threshold value Ccmp set, if it is, judge that this Link State is normal, otherwise, then judges this communication link fails。
Further, described second round is the integral multiple x of period 1。
Further, before carrying out step 3, described opposite end receives equipment and also needs to judge detecting whether effectively in second round。
Further, opposite end receives equipment and finds out detection messages maximum count Cmax from the detection messages quantity of all links received, and judge that whether the detection messages maximum count Cmax that receives is: Cmin≤Cmax≤x, if it is, the detection in this cycle is effective, enter step 3, otherwise, detection in this cycle is invalid, returns step 2, and wherein minimum detection packet counting Cmin presets as required。
Further, described minimum detection packet counting Cmin < dynamically adjusts in advance within the scope of x at (1/2) x≤Cmin, and described threshold value Ccmp is set as: Ccmp < Cmin。
Present invention simultaneously provides the device of a kind of multilink fault detection, wherein said device is applied to transmission equipment and opposite end receives equipment room and there is the situation of multiple communication links, described device is specially described transmission equipment or opposite end receives equipment, and described device includes such as lower module:
Configuration module, for when described device is as the equipment of transmission, configuration sends the period 1 t of detection messages, and when described device receives equipment as opposite end, and configuration receives the T and judge the threshold value Ccmp of communication link whether fault second round of detection messages;
Transceiver module, for when described device is as the equipment of transmission, detection messages is sent according to default period 1 timing, and copy to described detection messages to receive with opposite end all links of equipment communication send simultaneously, when described device receives equipment as opposite end, send, for receiving transmission equipment, the detection messages of coming;
Statistical module, for when described device receives equipment as opposite end, according to the detection messages quantity added up default second round on each communication link that transceiver module receives, and when terminating described second round, each communication link detection messages quantity result of statistics is collected and is sent to judge module;
Judge module, more than the threshold value Ccmp set, whether the detection messages quantity result received on the every communication link sent according to statistical module judges whether communication link exists fault, if it is, judge that this Link State is normal, otherwise, then this communication link fails is judged。
Further, described judge module is judging in second round, whether communication link is deposited before the failure, in addition it is also necessary to judge to detect whether in this second round effectively。
Further, configuration further is also used for judging whether effective minimum detection message amount Cmin of described detection cycle by described configuration module。
Further, there is integral multiple relation between T and described period 1 t in described second round, i.e. T=xt, wherein x is positive integer;Cmin < sets within the scope of x, and threshold value Ccmp < Cmin, to guarantee accurately to judge communication link fails as required at (1/2x)≤Cmin。
Further, judge module judges that whether the detection messages maximum count Cmax of statistical module counts is: Cmin≤Cmax≤x, then judge that the detection in this cycle is effective, otherwise, detection in this cycle is invalid, and notice statistical module re-starts detection messages quantity statistics。
Compared with existing technical scheme, the present invention is when there is multiple communication links in LA Management Room, it is provided that a kind of simple testing mechanism, realizes the fault detect on all links simultaneously。Therefore, present system expense is little, contributes to the performance boost of whole network system。
Detailed description of the invention
In order to realize the object of the invention, the core concept that the present invention adopts is: when transmission equipment and opposite end reception equipment room exist multiple communication links, transmission equipment sends detection messages according to default period 1 timing, and copies to described detection messages to receive with opposite end and send on all links of equipment communication simultaneously;Opposite end receives equipment according to adding up the detection messages quantity received in each of the links default second round, and when terminating described second round, the detection messages quantity that every communication link receives is collected;Whether opposite end receives the detection messages quantity in each of the links that equipment judges to add up in the detection cycle more than the threshold value Ccmp set, if it is, judge that this Link State is normal, otherwise, then judges this communication link fails。By the present invention, the multilink fault testing mechanism of LA Management Room is simple, and overhead is little。
For making technical solution of the present invention clearly and understanding, described in detail below in conjunction with the specific embodiment of the invention。As in figure 2 it is shown, be the method flow diagram of a kind of multilink fault provided by the invention detection。Wherein said method is applied to transmission equipment and opposite end receives equipment room and there is the situation of multiple communication links, with reference to Fig. 1, for the network equipment A communication direction to network equipment B, the invention mainly comprises the following steps:
Step 1, transmission equipment send detection messages according to default period 1 timing, and copy to described detection messages to receive with opposite end and send on all links of equipment communication simultaneously。
In the application scenarios shown in Fig. 1, network equipment A sends detection messages by cycle t timing, and described detection messages is copied to and send on all communication links between network equipment A and network equipment B simultaneously。Wherein detection messages, it is possible to adopt the conventional heartbeat message of prior art or hello packet etc., be not repeated herein。
What detection messages sent on all communication links between network equipment A and network equipment B simultaneously is implemented as:
If each of the links has a sending module, then first detection messages is copied into many parts by software or specialized hardware, then transfers to each communication link sending module each to send。
If multiple communication links shares a sending module, then sending module adopts the mode of circulation to send on every communication link。
Step 2, opposite end receive equipment according to adding up the detection messages quantity received in each of the links default second round, and when terminating described second round, the detection messages quantity that every communication link receives are collected。
It is preferred that in embodiments of the present invention, described second round is the integral multiple x of period 1。Specifically, under application scenarios as shown in Figure 1, network equipment B adds up, by cycle T (T=xt, namely T is the integral multiple of t), the detection messages quantity received in each of the links。Counting is designated as C1, C2, C3 respectively ... Cn。
The detection messages quantity judged on step 3, opposite end reception equipment in the detection cycle in each of the links of statistics, whether more than the threshold value Ccmp set, if it is, judge that this link is that state is normal, otherwise, then judges this communication link fails。
Specifically, under application scenarios as shown in Figure 1, in order to enable effectively to judge whether certain communication link exists fault, need to set on network equipment B further a threshold value Ccmp, wherein said threshold value should be less than x, preferably, in embodiments of the present invention, set Ccmp < (1/2) x, within the detection cycle, if the counting of certain communication link is more than Ccmp, then judge that this communication link state is normal, otherwise, then judge that this link exists fault, and by corresponding fault alarm reporting to webmaster personnel。
In order to realize the object of the invention, further, carrying out before this step judges communication link fails, described opposite end receives equipment and also needs to judge detecting whether effectively in described second round。The process of implementing is: opposite end receives equipment and finds out detection messages maximum count Cmax from the detection messages quantity of all links received, and judge that whether the detection messages maximum count Cmax that receives is: Cmin≤Cmax≤x, if, then this detection cycle is effective, enter step 4, otherwise, abandon this detection cycle, returning step 2, wherein said Cmin presets as required。
Under application scenarios as shown in Figure 1, when cycle T terminates, network equipment B finds out a maximum count Cmax from C1-Cn, as Cmin≤Cmax≤x, then it is assumed that the detection in this cycle is effective。Otherwise, the detection in this cycle is invalid, returns step 2 and directly starts the next detection cycle。Wherein Cmin can dynamically regulate as required in advance, it is preferred that, in embodiments of the present invention, minimum detection packet counting Cmin is set as (1/2) x≤Cmin < x。
Further, described threshold value Ccmp should be set as: Ccmp < Cmin。
Refer to Fig. 3 and present invention simultaneously provides the device of a kind of multilink fault detection, wherein said device is applied to transmission equipment and opposite end receives equipment room and there is the situation of multiple communication links, specifically, in the present invention, described device can be transmission equipment or opposite end reception equipment, and described device includes such as lower module:
Configuration module, for when described device is as the equipment of transmission, configuration sends the period 1 t of detection messages, and when described device receives equipment as opposite end, configuration receives the T and judge whether effectively minimum detection message amount Cmin of described detection cycle and judge the threshold value Ccmp of communication link whether fault second round of detection messages。
It is preferred that in embodiments of the present invention, there is integral multiple relation between T and described period 1 t in described second round, i.e. T=xt, wherein x is positive integer。It addition, though Cmin can dynamically regulate as required in embodiments of the present invention, but preferably, Cmin should be set as (1/2) x≤Cmin < x, further, set and compare threshold value Ccmp < Cmin, to guarantee to judge whether communication link exists fault exactly。
Transceiver module, for when described device is as the equipment of transmission, sends detection messages according to default period 1 timing, and copies to described detection messages to receive with opposite end and send on all links of equipment communication simultaneously;When described device receives equipment as opposite end, send, for receiving transmission equipment, the detection messages of coming。
Statistical module, when described device receives equipment as opposite end, according to the detection messages quantity added up default second round on each communication link that transceiver module receives, and when terminating described second round, each communication link detection messages quantity result of statistics is collected and is sent to judge module。
Further, described statistical module, after terminating second round, also will find out the maximum detection messages quantity received on communication link in the detection messages quantity received from every communication link of described statistics。
Judge module, according to more than the threshold value Ccmp set, whether the detection messages quantity result received on every communication link that statistical module sends judges whether communication link exists fault, if, then judge that this Link State is normal, otherwise, then judge that this communication link exists fault, and by corresponding fault alarm reporting to webmaster personnel。
Further, described judge module is judging in this detection cycle, whether communication link is deposited before the failure, also need to judge detect whether effectively in second round, when judge module judges that the detection messages maximum count Cmax of statistical module counts is: Cmin≤Cmax≤x, then judge that the detection in this cycle is effective, otherwise, the detection in this cycle is invalid, and notice statistical module re-starts detection messages quantity statistics。
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within the scope of protection of the invention。