CN103716215A - Loop judging method and device - Google Patents

Loop judging method and device Download PDF

Info

Publication number
CN103716215A
CN103716215A CN201210370525.5A CN201210370525A CN103716215A CN 103716215 A CN103716215 A CN 103716215A CN 201210370525 A CN201210370525 A CN 201210370525A CN 103716215 A CN103716215 A CN 103716215A
Authority
CN
China
Prior art keywords
message
interface
send
sampling
loop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201210370525.5A
Other languages
Chinese (zh)
Inventor
万丽
付天福
孙胜涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201210370525.5A priority Critical patent/CN103716215A/en
Publication of CN103716215A publication Critical patent/CN103716215A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a loop judging method and a loop judging device. The loop judging method comprises the following steps that: in a first time threshold value, sampling processing is performed on messages which are uploaded to a central processing unit (CPU) according to sampling frequency so as to obtain first sampling messages; under a first uploading interface in uploading interfaces of the first sampling messages, the number of repeat messages in sampling messages that are uploaded via the first uploading interface is calculated; and if the number of corresponding repeat massages of the first uploading interface achieves a first message number threshold value, it can be judged that a loop exists on the first uploading interface. Thus, with the loop judging method and the loop judging device of the embodiments of the invention adopted, whether loops exist in interfaces can be still judged in a broadcast storm.

Description

Loop determination methods and device
Technical field
The present invention relates to networking technology area, relate in particular to a kind of loop determination methods and device.
Background technology
Ethernet annular networking is a kind of common networking mode; but need to anti-loop agreement Spanning-Tree Protocol (Spanning Tree Protocol for example; STP), the support of rapid ring protection protocol (Rapid RingProtection Protocol, RRPP).Yet at some in particular cases, other than ring type network is because error connection line causes looped network, or looped network is because the reasons such as attack, overload cause the inefficacy of anti-ring agreement, or because various loop problem inevitably appear in the unidirectional break-make problem that optical module single channel lost efficacy and causes.
Once hang double layer network under router, there is loop, will receive rapidly a large amount of broadcast, multicast and unknown unicast message with two layers of interface being connected, wherein more commonly address resolution protocol (AddressResolution Protocol, ARP) and Virtual Router Redundacy Protocol (Virtual Router
Redundancy Protocol, VRRP) some protocol massages.These messages send the control plane of router on can be directly, on the one hand, very large to the impact of router, on the other hand, because a lot of broadcast and multicast message belong to protocol massages for router, in general meeting, send CPU (central processing unit) (Central
Processing Unit, CPU), while delivering to CPU on these messages are a large amount of, can impact and send passage, make to send passage congested on router, thereby cause agreement to be interrupted, the serious consequence of service disconnection; And a large amount of messages impact router cpus, cause cpu busy, cannot process regular traffic.
For loop detection, be all by loop, to survey agreement to detect at present, then break ring and process.Whether loop detection protocol theory is: by send a kind of special message on the port of equipment, and detect this message and can send back from the port sending, determine on this port, whether there is loopback situation.Loop detection is a lasting process, that is to say, needs interval at regular intervals to carry out one-time detection on equipment, determines on each port, whether there is loopback, and finds to exist the situations such as whether loopback has disappeared on the port of loopback last time.But when double-layer loop occurs, network message can be copied by madness in the mode of atom bomb " chain reaction ", almost can with interior, just a 10G link be thoroughly full of in 1 second.Now, the probe messages that loop detection agreement is sent may just be dropped on network.In addition, when probe messages is returned, first still need to send and on passage, deliver to CPU and judge in experience, and probe messages may not just can be competed the message of other mad massive duplications, such as broadcasting packet is shared ripple message etc.Therefore, the sending and receiving of probe messages, the time of going through, that before loop storm thoroughly blocks network, can return is very risky.
For these reasons, utilize existing loop to survey agreement and cannot solve the broadcast storm problem that the loop under this Scene causes.
Summary of the invention
The embodiment of the present invention provides a kind of loop judgement side and device, solved the broadcast causing due to loop in prior art and divided storm to cause loop detection agreement cannot detect the problem that whether has loop, realized while there is broadcast storm and still can judge and whether have loop.
On the one hand, the embodiment of the present invention provides a kind of loop determination methods, and described method comprises:
In very first time threshold values, according to sample frequency, to above sending the message of central processor CPU to carry out sampling processing, obtain the first sampling message;
On described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first;
If send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.
On the one hand, the embodiment of the present invention provides a kind of loop judgment means, and described device comprises:
Sampling unit, in very first time threshold values, to above sending the message of central processor CPU to carry out sampling processing, obtains the first sampling message according to sample frequency;
Statistic unit, for described first sampling message on send interface first on send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first;
The first judging unit, if send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judges on described first and send interface to have loop.
In the embodiment of the present invention, by very first time threshold values, according to sample frequency, to above sending the message of central processor CPU to carry out sampling processing, obtain the first sampling message; On described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first; If send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.Thereby realized and judged interface and whether have loop.
Accompanying drawing explanation
The loop determination methods flow chart that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 is the counting messages schematic diagram that the embodiment of the present invention provides;
The loop judgment means schematic diagram that Fig. 3 provides for the embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the specific embodiment of the invention is described in further detail.
It should be noted that, in the embodiment of the present invention, relate to several similar concepts, at this, do Unified Explanation: wherein, two different time periods that relate to, for ease of distinguishing, two time periods are called to very first time threshold value and the second time threshold; Three message amount threshold values that relate to, for ease of distinguishing, by the first message amount threshold value that is called of the threshold value of the duplicate message quantity sum that under the same interface of judgement, all sampling messages are corresponding, the threshold value of the duplicate message quantity of the single type sampling of judgement message is called to the second message amount threshold, the threshold value of judgement message amount is called to the 3rd message amount threshold value; The sampling message obtaining in the different step relating to, for ease of distinguishing, is called the first sampling message by the sampling message that sampling is obtained for the first time, and the sampling message obtaining in subsequent step is called to the second sampling message; The message obtaining in the different step relating to, is called the first message by the message obtaining for the first time, and the message obtaining in subsequent step is called to the second message.
The embodiment of the present invention, for the defect of loop judgement under prior art, provides a kind of loop determination methods and device, by very first time threshold values, according to sample frequency, to above sending the message of central processor CPU to carry out sampling processing, obtains the first sampling message; On described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first; If send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, determine on described first and send interface to have loop.Thereby realized and judged interface and whether have loop.
What following embodiment described is the concrete steps of loop determination methods.The loop determination methods flow chart that Fig. 1 provides for the embodiment of the present invention.As shown in Figure 1, the method that the embodiment of the present invention provides comprises:
101, in very first time threshold values, according to sample frequency, the message of transmitted to CPU is carried out to sampling processing, obtain the first sampling message.
Particularly, judging whether interface exists in the process of loop, in very first time threshold values, router, according to sample frequency, carries out sampling processing to the message of transmitted to CPU, obtains the first sampling message.
In addition, because loop detection is processed by CPU at chain of command, also can loss CPU, therefore, certain condition can be set, when preliminary judgement may produce loop, just start loop judgement.
Therefore, alternatively, before 101, can also carry out loop according to type of message quantity and type of message amount threshold and judge in advance.Can be on router on the broadcast and the multicast message that send carry out trend statistics, within the scope of certain hour, if the quantity of the message of any one or more type surpasses setting threshold, think and meet the entry condition that loop judges, start double-layer loop judgement.Detailed process comprises:
First, in the second time threshold, obtain the first message of transmitted to CPU.
Secondly, described the first message obtaining is carried out to message amount statistics by type of message.
Particularly, because the message of the transmitted to CPU obtaining may comprise multiple message types, therefore, need to add up the message of every type, count every kind of duplicate message quantity that message is corresponding.
Finally, if message amount surpasses type of message quantity that the message of the second message amount threshold is corresponding for reaching type of message amount threshold, again in the second setting-up time section, obtain the second message of transmitted to CPU, described the second message obtaining is carried out to the judgement of message amount statistics by type of message; If surpassing the type of message quantity corresponding to message of described the second message amount threshold, message amount reaches type of message amount threshold, perform step 101, simultaneously, still need to be in the second setting-up time section, obtain the second message of transmitted to CPU, described the second message obtaining is carried out to the judgement of message amount statistics by type of message.
From said process, can find out the execution that moves in circles of the process of pre-judgement.
Particularly, suppose to have 3 kinds of duplicate message quantity corresponding to message all to surpass the second message amount threshold, the type of message quantity is here 2, type of message amount threshold is 3, known, type of message quantity is no more than type of message amount threshold, needs to re-start message amount statistics, need again, in the second setting-up time section, to obtain the second message of transmitted to CPU; If surpassing the type of message quantity corresponding to message of the second message amount threshold, message amount reaches type of message amount threshold, may there is loop in explanation, therefore, need to carry out loop determining step 101, meanwhile, still need to re-start the judgement of message amount statistics.It should be noted that, type of message amount threshold can be determined according to actual conditions.
102, described first state sampling message on send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first.
On described the first sampling message, send on first in interface and send under interface, the message information of mutual more described sampling message, obtain the message amount that this send the duplicate message in the sampling message sending on interface on first, wherein, message information comprises: virtual local area network address vlanid, source medium access control MAC Address and message cycle redundancy check CRC result under message length, type of message, message protocol type, message.
Particularly, as shown in Figure 2, Fig. 2 is the counting messages schematic diagram that the embodiment of the present invention provides, suppose a certain router through the sampling message of 101 acquisitions have 20 (actual message amount is very large, here for sake of convenience, take message number as 20 be example), under this router, connect 3 interfaces, at this moment, need statistics through the quantity of duplicate message in message corresponding to each interface, thereby judge which interface exists loop.
The statistical method of duplicate message is: first, different according to the interface that message is corresponding, by message classification storage, as shown in Figure 2, suppose that 1 pair, interface should have 2 messages, and 2 pairs, interface should have 13 messages, and 3 pairs, interface should have 5 messages.Then, under each interface, the message corresponding to this interface again, according to message information, compare classification, add up the quantity of every kind of corresponding duplicate message of message, for saving the relatively time, can compare by different level, as shown in Figure 2, can first according to the MAC in message, to message, classify, the interface 2 of take in Fig. 2 is example, for explaining conveniently, here by 13 messages from 1 to 13 number consecutively of interface 2 correspondences, and suppose through relatively finding altogether corresponding 3 the different MAC Address of 13 messages in interface 2, it is MAC Address 1, MAC Address 2 and MAC Address 3, and the MAC in message is that the message of MAC Address 1 is No. 1, No. 2 and No. 4 messages, MAC in message is that the message of MAC Address 2 is No. 3, No. 7, No. 8, No. 9, No. 10, No. 11, No. 12 and No. 13 messages, MAC Address in message is that the message of MAC Address 1 is No. 5 and No. 6 messages.Because identical message length must be identical, therefore, first next step can compare according to the message length of each message the message under each MAC Address mutually, judged whether duplicate message.The message of take here in MAC Address 2 is example, first get No. 3 messages (supposing it is all to get from small to large message by message label), using it as first group, then get message No. 7, by No. 7 message lengths and No. 3 message length comparisons, if identical, No. 7 messages are put into first group, if not identical, set up another one group, here suppose that No. 7 message lengths are identical with No. 3 message lengths, therefore, No. 7 messages are put into the 1st group; Get again message No. 8, and by the message length comparison in No. 8 message lengths and several groups above (first group), identical with the message length of any group, put it into which group, if not identical with the message length of message in arbitrary group, set up another one group, suppose that No. 8 message lengths are not identical with the message length of message in first group here, therefore, No. 8 messages are put into second group; Then get other messages (No. 9, No. 10, No. 11, No. 12 and No. 13 messages), adopt with same above method and carry out message length comparison, suppose through comparing, the message length of No. 9, No. 10 and No. 13 messages is not identical with the message length of message in first group and second group, No. 9, No. 10 and No. 13 messages are put into the 3rd group, and No. 11 identical with the message length of message in first group with the message length of No. 12 messages, therefore No. 11 and No. 12 messages are put into first group.After completeer message length, again according to other information in message information, and with same method, the message in every group is compared mutually, count the quantity of duplicate message, here hypothesis, to three groups of messages in MAC Address 2 separately relatively after, in first group, No. 3 and No. 11 messages are identical messages, and No. 7 and No. 12 messages are identical messages, and second group is only had a message, in the 3rd group, No. 9 and No. 13 messages are identical messages, and No. 10 messages are the another kind of messages that are different from No. 9 and No. 13 messages.So, the duplicate message quantity sum in every group that the quantity of 2 times corresponding duplicate messages of MAC Address is its correspondence, i.e. 2 messages in 4 messages in first group and the 3rd group, totally 6 messages.Suppose to adopt same statistical method, duplicate message quantity corresponding under MAC1 is 2,3 times corresponding duplicate message quantity of MAC Address are 0, and 2 times corresponding duplicate message quantity of interface are MAC Address 1, MAC Address 2 and 3 times corresponding duplicate message quantity sums of MAC Address, are 2+6+0=8.
Other interfaces can be adopted and use the same method to add up duplicate message quantity.
It should be noted that, above-mentioned statistical method is to add up duplicate message quantity according to other sequences of information that compare in MAC Address, message length and message information, also can, according to message information, adopt other order to carry out duplicate message statistics.
103, if send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.
According to the duplicate message quantity corresponding to each interface of above-mentioned steps statistics, the first message amount threshold value of this duplicate message quantity and setting is compared, if this duplicate message quantity surpasses the first message amount threshold value, can judge that this interface exists loop, otherwise judge that this interface does not exist loop.
Alternatively, if send the MAC that interface is corresponding on described first, be more than two, and on described first, send the corresponding duplicate message quantity of interface to reach the first message amount threshold values, judge on described first and send interface to have loop.
Alternatively, when judging a certain interface and have loop, for preventing the situation of erroneous judgement, the method for can take repeatedly to close this interface, restarting this interface and re-starting loop judgement is again avoided erroneous judgement, specifically comprises:
First, will on described first, send interface to close.
Alternatively, before this step, can also send loop alarm log, for the work of consequent malfunction investigation provides necessary reference information.
Secondly, restart on described first and send interface, and in described very first time threshold values, according to described sample frequency, on described first, send the message that interface reports to sample, obtain the second sampling message.
After sending interface to close on described first, can adopt and manually restart or the mode of autoboot is restarted this interface, then according to the method the same with 101, on described first, send the message that interface reports to sample, obtain the second sampling message.
Again secondly, add up the message amount of the duplicate message of described the second sampling message.
Be specially, according to the quantity of duplicate message corresponding to first interface described in the method statistic the same with 102.
Finally, if described duplicate message quantity does not reach described the first message amount threshold values, no longer close on described first and send interface; If described duplicate message quantity reaches described the first message amount threshold values, on described first, send the number of times that interface is closed not reach while closing threshold value, again close on described first, to send interface and restart on described first and send interface, and the message amount of adding up the duplicate message of described the second sampling message, on described first, send the number of times that interface is closed to reach while closing threshold value, close on described first and send interface also no longer to restart.
Particularly, if described duplicate message quantity does not reach the first message amount threshold values, illustrate and occurred erroneous judgement, there is not loop in this interface, therefore, can restart this interface and no longer close; If described duplicate message quantity reaches the first message amount threshold values, illustrate that this interface still may exist loop, for preventing erroneous judgement, again close this interface, and then restart this interface, and adopt method sampling as before to obtain the second sampling message, and the quantity of adding up the duplicate message that the second sampling message is corresponding.If after restarting after closing, still judge and have loop at every turn, and close number of times and reach and close threshold value, illustrate that this interface exists loop really, therefore, no longer restart after closing this interface.
Need explanation time, can set according to actual conditions the threshold value of down interface number of times,
The embodiment of the present invention, by very first time threshold values, to above sending the message of central processor CPU to carry out sampling processing, obtains the first sampling message according to sample frequency; On described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first; If send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.Thereby realized and judged interface and whether have loop.
What following embodiment described is the course of work of loop judgment means, the loop judgment means schematic diagram that Fig. 3 provides for the embodiment of the present invention, as shown in Figure 3, the device that the embodiment of the present invention provides comprises: sampling unit 301, statistic unit 302 and judging unit 303.
Sampling unit 301, in very first time threshold values, to above sending the message of central processor CPU to carry out sampling processing, obtains the first sampling message according to sample frequency, and described the first sampling message transmissions is arrived to statistic unit 302.
Particularly, judging whether interface exists in the process of loop, in very first time threshold values, router, according to sample frequency, carries out sampling processing to the message of transmitted to CPU, obtains the first sampling message.
Statistic unit 302 is for receiving described the first sampling message from described sampling unit 301, on described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first, the message amount of sending the duplicate message in the sampling message sending on interface on described first is transferred to the first judging unit 303.
On described the first sampling message, send on first in interface and send under interface, the message information of mutual more described sampling message, obtain the message amount that this send the duplicate message in the sampling message sending on interface on first, wherein, message information comprises: message length, type of message, message protocol type, vlanid, source MAC and message CRC result.The first judging unit 303 is for receiving the described first message amount of sending the duplicate message of the sampling message that interface send from described statistic unit 302, if send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.
According to the duplicate message quantity corresponding to each interface of statistic unit 302 statistics, the first message amount threshold value of this duplicate message quantity and setting is compared, if this duplicate message quantity surpasses the first message amount threshold value, can judge that this interface exists loop, otherwise judge that this interface does not exist loop.
Alternatively, if send the MAC Address that interface is corresponding on described first, be more than two, and on described first, send the corresponding duplicate message quantity of interface to reach the first message amount threshold values, judge on described first and send interface to have loop.
Alternatively, the loop judgment means that the embodiment of the present invention provides also comprises pre-judging unit 310, because loop detection is processed by CPU at chain of command, also can loss CPU, therefore, certain condition can be set, when preliminary judgement may produce loop, just start loop judgement.
Pre-judging unit 310 judges in advance for carrying out loop according to type of message quantity and type of message amount threshold.Be specially, in the second time threshold, obtain the first message of transmitted to CPU; Described the first message obtaining is carried out to message amount statistics by type of message; If surpassing the type of message quantity corresponding to message of the 3rd message amount threshold value, described message amount do not reach type of message amount threshold, again in described the second time threshold, obtain the second message of transmitted to CPU, described the second message obtaining is carried out to the judgement of message amount statistics by type of message; If surpassing the type of message quantity corresponding to message of described the 3rd message amount threshold value, described message amount reaches described type of message amount threshold, carry out sampling unit 301, simultaneously, still need to be in the second setting-up time section, obtain the second message of transmitted to CPU, described the second message obtaining is carried out to the judgement of message amount statistics by type of message.Pre-judging unit 310 is the accounting message number of types that move in circles and judges, always in running order.
Alternatively, the loop judgment means that the embodiment of the present invention provides also comprises the second judging unit 320, for sending interface to close on described first; Restart on described first and send interface, and in very first time threshold values, according to sample frequency, on described first, send the message that interface reports to sample, obtain the second sampling message; Add up the message amount of the duplicate message of described the second sampling message; If described duplicate message quantity does not reach described the first message amount threshold values, no longer close on described first and send interface; If described duplicate message quantity reaches described the first message amount threshold values, on described first, send the number of times that interface is closed not reach while closing threshold value, again close on described first, to send interface and restart on described first and send interface, and the message amount of adding up the duplicate message of described the second sampling message, on described first, send the number of times that interface is closed to reach while closing threshold value, close on described first and send interface also no longer to restart.
The loop judgment means that the embodiment of the present invention provides has been implanted the loop determination methods that above-described embodiment provides, and therefore, in loop judgment means, the specific works process of unit does not repeat again at this.
The embodiment of the present invention, by very first time threshold values, to above sending the message of central processor CPU to carry out sampling processing, obtains the first sampling message according to sample frequency; On described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first; If send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.Thereby realized and judged interface and whether have loop.
Professional should further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software is clearly described, composition and the step of each example described according to function in the above description in general manner.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can use hardware, processor to carry out, or the combination of the two is implemented.Software module can be placed in the storage medium of any other form known in random asccess memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above-described embodiment; object of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only the specific embodiment of the present invention; the protection range being not intended to limit the present invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (16)

1. a loop determination methods, is characterized in that, described method comprises:
In very first time threshold values, according to sample frequency, to above sending the message of central processor CPU to carry out sampling processing, obtain the first sampling message;
On described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first;
If send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.
2. loop determination methods according to claim 1, it is characterized in that, describedly on described the first sampling message, send on first in interface and send under interface, adding up on described first send the message amount of the duplicate message in the sampling message sending on interface to be specially: on described the first sampling message, send under each source medium access control MAC Address of sending interface on first in interface, the message information of mutual more described sampling message, and the message that message amount is surpassed to the second message amount threshold is included in duplicate message statistics, thereby obtain the message amount that this send the duplicate message in the sampling message sending on interface on first.
3. loop determination methods according to claim 2, is characterized in that, described message information comprises: virtual local area network address vlanid, MAC and message cycle redundancy check CRC result under message length, type of message, message protocol type, message.
4. loop determination methods according to claim 1, it is characterized in that, if send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judging on described first send interface to exist loop to be specially: if send the MAC that interface is corresponding on described first, be more than two, and the corresponding duplicate message quantity of sending interface on described first reaches described the first message amount threshold values, judges on described first and send interface to have loop.
5. loop determination methods according to claim 1, it is characterized in that, described in very first time threshold values, according to sample frequency to above sending the message of central processor CPU to carry out sampling processing, before obtaining the first sampling message, also comprise: according to type of message quantity and type of message amount threshold, carry out loop and judge in advance.
6. loop determination methods according to claim 1, is characterized in that, if send the corresponding message amount of interface to reach the first message amount threshold values on described first, judges and on described first, send after interface exists loop, also comprises:
To on described first, send interface to close;
Restart on described first and send interface, and in described very first time threshold values, according to described sample frequency, on described first, send the message that interface reports to sample, obtain the second sampling message;
Add up the message amount of the duplicate message of described the second sampling message;
If described duplicate message quantity does not reach described the first message amount threshold values, no longer close on described first and send interface;
If described duplicate message quantity reaches described the first message amount threshold values, on described first, send the number of times that interface is closed not reach while closing threshold value, again close on described first, to send interface and restart on described first and send interface, and the message amount of adding up the duplicate message of described the second sampling message, on described first, send the number of times that interface is closed to reach while closing threshold value, close on described first and send interface also no longer to restart.
7. loop determination methods according to claim 6, is characterized in that, described by sending on described first before interface closes, and also comprises: send loop alarm log.
8. loop determination methods according to claim 6, is characterized in that, described in restart on described first and send interface to be specially: described in autoboot, send interface or manually restart on described first on first and send interface.
9. a loop judgment means, is characterized in that, described device comprises:
Sampling unit, in very first time threshold values, to above sending the message of central processor CPU to carry out sampling processing, obtains the first sampling message according to sample frequency, and described the first sampling message transmissions is arrived to statistic unit;
Statistic unit, for receive described the first sampling message from described sampling unit, on described the first sampling message, send on first in interface and send under interface, add up the message amount of sending the duplicate message in the sampling message sending on interface on described first, will on described first, send the message amount of the duplicate message in the sampling message sending on interface to be transferred to the first judging unit;
The first judging unit, for receive the described first message amount of sending the duplicate message of the sampling message that interface send from described statistic unit, if send the corresponding duplicate message quantity of interface to reach the first message amount threshold values on described first, judge on described first and send interface to have loop.
10. loop judgment means according to claim 9, it is characterized in that, described statistic unit specifically for sending under each MAC that send interface on first in interface on described the first sampling message, the message information of mutual more described sampling message, and the message that message amount reaches the second message amount threshold is included in duplicate message statistics, thereby obtained the message amount that this send the duplicate message in the sampling message sending on interface on first.
11. loop judgment means according to claim 10, is characterized in that, the message information in described statistic unit comprises: message length, type of message, message protocol type, vlanid, source MAC and message CRC result.
12. loop judgment means according to claim 9, it is characterized in that, if described the first judging unit is more than two specifically for sending the MAC that interface is corresponding on described first, and on described first, send the corresponding duplicate message quantity of interface to reach the first message amount threshold values, judge on described first and send interface to have loop.
13. loop judgment means according to claim 9, is characterized in that, described device also comprises:
Pre-judging unit, judges in advance for carrying out loop according to type of message quantity and type of message amount threshold.
14. loop judgment means according to claim 9, is characterized in that, described device also comprises:
The second judging unit, for,
To on described first, send interface to close;
Restart on described first and send interface, and in described very first time threshold values, according to described sample frequency, on described first, send the message that interface reports to sample, obtain the second sampling message;
Add up the message amount of the duplicate message of described the second sampling message;
If described duplicate message quantity does not reach described the first message amount threshold values, no longer close on described first and send interface;
If described duplicate message quantity reaches described the first message amount threshold values, on described first, send the number of times that interface is closed not reach while closing threshold value, again close on described first, to send interface and restart on described first and send interface, and the message amount of adding up the duplicate message of described the second sampling message, on described first, send the number of times that interface is closed to reach while closing threshold value, close on described first and send interface also no longer to restart.
15. loop judgment means according to claim 12, is characterized in that, described device is also for sending loop alarm log.
16. loop judgment means according to claim 14, is characterized in that, send interface or manually restart on described first on first described in described the second judging unit autoboot and send interface.
CN201210370525.5A 2012-09-28 2012-09-28 Loop judging method and device Pending CN103716215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210370525.5A CN103716215A (en) 2012-09-28 2012-09-28 Loop judging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210370525.5A CN103716215A (en) 2012-09-28 2012-09-28 Loop judging method and device

Publications (1)

Publication Number Publication Date
CN103716215A true CN103716215A (en) 2014-04-09

Family

ID=50408819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210370525.5A Pending CN103716215A (en) 2012-09-28 2012-09-28 Loop judging method and device

Country Status (1)

Country Link
CN (1) CN103716215A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038386A (en) * 2014-05-30 2014-09-10 华为技术有限公司 Method for detecting service looped network, node and network management device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038386A (en) * 2014-05-30 2014-09-10 华为技术有限公司 Method for detecting service looped network, node and network management device

Similar Documents

Publication Publication Date Title
CN110380907B (en) Network fault diagnosis method and device, network equipment and storage medium
CN102055525B (en) loop detection and control method
CN101132320B (en) Method for detecting interface trouble and network node equipment
CN101188527B (en) A heartbeat detection method and device
CN106817264B (en) Method, device and system for detecting link fault
US20080062874A1 (en) Network monitoring device and network monitoring method
CN107547300B (en) Network quality detection method and device
CN101252479A (en) Loop detection method and switch
US7701862B2 (en) Method and system for PHY loop detection
CN102647312B (en) A kind of detection method of whole net multicast topology and device
CN103634166B (en) Equipment survival detection method and equipment survival detection device
CN106973012A (en) A kind of computer network loop detecting method
CN111010328A (en) Method and equipment for preventing white board switch from being looped
US9893979B2 (en) Network topology discovery by resolving loops
CN1783837A (en) Method for detecting route unit fault
JP2014147066A (en) Method and system for providing redundancy in data network communication
CN101582815B (en) Protocol security testing method and device
CN103716215A (en) Loop judging method and device
US10148515B2 (en) Determining connections of non-external network facing ports
CN109495311B (en) Network fault detection method and device
CN103746842A (en) Method and system for detecting fault restarting of line card
US20160344571A1 (en) Determining Connections Between Disconnected Partial Trees
CN103684719B (en) Network dual-redundancy hot swap method independent of platforms
CN102315962B (en) Method for detecting MTU (Maximum Transmission Unit) of Ethernet and maintenance end point
CN114978939A (en) Method for detecting network link quality

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140409