CN104852826B - A kind of loop detecting method and device - Google Patents

A kind of loop detecting method and device Download PDF

Info

Publication number
CN104852826B
CN104852826B CN201510172793.XA CN201510172793A CN104852826B CN 104852826 B CN104852826 B CN 104852826B CN 201510172793 A CN201510172793 A CN 201510172793A CN 104852826 B CN104852826 B CN 104852826B
Authority
CN
China
Prior art keywords
business datum
loop detection
datum message
udp messages
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510172793.XA
Other languages
Chinese (zh)
Other versions
CN104852826A (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.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital 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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201510172793.XA priority Critical patent/CN104852826B/en
Publication of CN104852826A publication Critical patent/CN104852826A/en
Application granted granted Critical
Publication of CN104852826B publication Critical patent/CN104852826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides loop detecting method and device, the network equipment generates loop detection User Data Protocol UDP messages;Inquire the corresponding routing of purpose network protocol IP address of the loop detection UDP messages;The loop detection UDP messages are sent using the routing;Receive the first business datum message;When the first business datum message is matched with the loop detection UDP messages, identify that the routing corresponding to the purpose IP address of the second business datum message is routine cycling.The network equipment generates loop detection UDP messages, it is forwarded to other equipment, when the loop detection UDP messages that the network equipment receives again, the i.e. described loop detection UDP messages again return to the network equipment after being forwarded via multiple equipment, it indicates to form loop in network, identifies that the routing corresponding to the purpose IP address of the loop detection message is routine cycling.Routine cycling so as to effectively and timely detect in network is eliminated, and the invalid forwarding of business datum message is avoided.

Description

A kind of loop detecting method and device
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of loop detecting method and device.
Background technology
During network is disposed, due to router misconfiguration etc., business datum message transmissions may be will produce Loop.As shown in Figure 1, network equipment A, network equipment B, network equipment C and network equipment D-shaped are passed at a business datum message Defeated loop, business datum message is forwarded to network equipment B by network equipment A, then is forwarded to network equipment C by network equipment B, then It is forwarded to network equipment D from network equipment C, network equipment A is finally forwarded to by network equipment D.It is passed in the business datum message Cycle forwards the business datum message in defeated loop, until the business datum message life span (Time To Live, When TTL) reducing to 0 or 1, the business datum message is abandoned.
The business datum message of forwarding is recycled in route loop to be normally forwarded to purpose equipment, largely occupy net Network bandwidth can also influence the forwarding of other regular traffic data messages.But can not have in time in currently available technology The method for detecting business datum message transmissions loop of effect.
Invention content
Present invention solves the technical problem that being to provide a kind of loop detecting method and device, business datum report can be detected Loop in the transmission path of text solves in the prior art since route loop causes what business datum message was dropped to ask Topic.
For this purpose, the technical solution that the present invention solves technical problem is:
First aspect present invention provides a kind of loop detecting method, the method includes:
The network equipment generates loop detection User Data Protocol UDP messages;
The network equipment inquires the corresponding routing of purpose network protocol IP address of the loop detection UDP messages;
The network equipment sends the loop detection UDP messages using the routing;
The network equipment receives the first business datum message;
When the first business datum message is matched with the loop detection UDP messages, the network equipment identifies institute It is routine cycling to state the routing corresponding to the purpose IP address of loop detection UDP messages.
In first aspect present invention in the first possible embodiment, the method further includes:
The network equipment receives the second business datum message;
When the life span TTL of the second business datum message is equal to 0 or 1, and the second business datum report When text is not traceroute messages, the network equipment triggering, which executes, generates loop detection UDP messages, the loop detection The purpose IP address of UDP messages is the purpose IP address of the second business datum message, the loop detection UDP messages and institute The transmission path for stating the second business datum message is consistent.
In conjunction with first aspect present invention, the first possible embodiment, described in second of possible embodiment Method further includes:
The network equipment sets the routine cycling to inactive, triggering loop alarm.
In the third possible embodiment of the invention, the method further includes:
The network equipment receives third business datum message;
When the purpose IP address of the third business datum message is preset loop detection purpose IP address, the net The triggering of network equipment, which executes, generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is the third industry The purpose IP address of business data message, the transmission path one of the loop detection UDP messages and the third business datum message It causes.
In conjunction with the third possible embodiment of the invention, in the 4th kind of possible embodiment, the method is also wrapped It includes:
The network equipment sends the third business datum message using the routing;
When stating the first business datum message and being matched with the loop detection UDP messages, the network equipment receives again To the third business datum message;
The network equipment inquires directed routing, and the directed routing is to give reception the third business datum message in advance Port setting routing;
The network equipment is forwarded the third business datum message using the directed routing.
Second aspect of the present invention provides a kind of loop detection means, and described device includes:
Generation unit, for generating loop detection User Data Protocol UDP messages;
First query unit, the corresponding road of purpose network protocol IP address for inquiring the loop detection UDP messages By;
First transmission unit, for sending the loop detection UDP messages using the routing;
First receiving unit, for receiving the first business datum message;
Recognition unit, for when the first business datum message is matched with the loop detection UDP messages, identifying institute It is routine cycling to state the routing corresponding to the purpose IP address of the second business datum message.
In second aspect of the present invention in the first possible embodiment, described device further includes:
Second receiving unit, for receiving the second business datum message;
First trigger element, for being equal to 0 or 1, and institute as the life span TTL of the second business datum message When to state the second business datum message be not traceroute messages, triggering, which executes, generates loop detection UDP messages, the loop inspection Survey UDP messages purpose IP address be the second business datum message purpose IP address, the loop detection UDP messages with The transmission path of the second business datum message is consistent.
In conjunction with second aspect of the present invention, the first possible embodiment, described in second of possible embodiment Device further includes:
Alarm Unit, for setting the routine cycling to inactive, triggering loop alarm.
In the third possible embodiment of the invention, described device further includes:
Third receiving unit, for receiving third business datum message;
Second trigger element, for being preset loop testing goal when the purpose IP address of the third business datum message When IP address, triggering, which executes, generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is described the The purpose IP address of three business datum messages, the transmission road of the loop detection UDP messages and the third business datum message Diameter is consistent.
In conjunction with the third possible embodiment of the invention, in the 4th kind of possible embodiment,
First transmission unit is additionally operable to send the third business datum message using the routing;
First receiving unit, the first business datum message ought be stated by being additionally operable to matches with the loop detection UDP messages When, the third business datum message is received again;
Described device further includes:Second query unit, for inquiring directed routing, the directed routing is in advance to reception The routing of the port setting of the third business datum message;
Second transmission unit, for being forwarded to the third business datum message using the directed routing.
According to the above-mentioned technical solution, the method have the advantages that:
The present invention provides loop detecting method and device, the network equipment generates loop detection User Data Protocol UDP reports Text;Inquire the corresponding routing of purpose network protocol IP address of the loop detection UDP messages;Described in routing transmission Loop detection UDP messages;Receive the first business datum message;When the first business datum message and the loop detection UDP When message matches, identify that the routing corresponding to the purpose IP address of the second business datum message is routine cycling.Network is set It is standby to generate loop detection UDP messages, it is forwarded to other equipment, when the loop detection that the network equipment receives again When UDP messages, i.e., the described loop detection UDP messages again return to the network equipment after being forwarded via multiple equipment, indicate net Loop is formed in network, identifies that the routing corresponding to the purpose IP address of the loop detection message is routine cycling.So as to It effectively and timely detects that the routine cycling in network is eliminated, avoids the invalid forwarding of business datum message.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is schematic network structure provided by the invention;
Fig. 2 is a kind of loop detecting method schematic diagram provided in an embodiment of the present invention;
Fig. 3 is the first application scenarios flow chart of loop detecting method provided by the invention;
Fig. 4 is second of application scenarios flow chart of loop detecting method provided by the invention;
Fig. 5 is enterprise network structural schematic diagram provided in an embodiment of the present invention;
Fig. 6 is a kind of loop detection means structural schematic diagram provided in an embodiment of the present invention;
Fig. 7 is a kind of loop detection means hardware architecture diagram provided in an embodiment of the present invention.
Specific implementation mode
The implementation of the loop in transmission path in order to provide detection business datum message, the embodiment of the present invention provide A kind of loop detecting method and device, below in conjunction with Figure of description, preferred embodiment of the present invention will be described, should Understand, preferred embodiments described herein are only used to illustrate and explain the present invention, is not intended to limit the present invention.And not In the case of conflict, the features in the embodiments and the embodiments of the present application can be combined with each other.
Fig. 2 is a kind of loop detecting method schematic diagram provided in an embodiment of the present invention, the method includes:
201:The network equipment generates loop detection User Data Protocol UDP messages.
When needing to detect the transmission circuit that whether there is business datum message in network, the network equipment utilizes Traceroute orders generate loop detection User Data Protocol (User Datagram Protocol, a UDP) message.Profit Route loop is detected with transmission of the loop detection UDP messages in network.
The purpose IP address of the loop detection UDP messages can be specifically arranged according to actual conditions.Below to several Kind application example is described in detail.
The first scene:When the network equipment receives the business datum message that a TTL is equal to 0 or 1, also wrap before 201 It includes:
The network equipment receives the second business datum message;
When the life span TTL of the second business datum message is equal to 0 or 1, and the second business datum report Text be not traceroute messages constantly, network equipment triggering, which executes, generates loop detection UDP messages, the loop detection The purpose IP address of UDP messages is the purpose IP address of the second business datum message, the loop detection UDP messages and institute The transmission path for stating the second business datum message is consistent.
The TTL of the second business datum message received by the network equipment is equal to 0 or 1, and second business When data message is not traceroute messages, need to abandon the second business datum message.At this point, indicating possible in network There are loop, the second business datum message circle transmission in the loop can not be transmitted to purpose equipment, and TTL is caused to be equal to 0 Or it is dropped when 1.At this point, the network equipment described in automatic trigger generates loop detection UDP messages, the loop detection UDP is set The purpose IP address of message is identical as the purpose IP address of the second business datum message.The i.e. described loop detection UDP messages Transmission path in a network is identical as transmission path of the second business datum message in network.The i.e. described loop detection The transmission path that UDP messages can detect the second business datum message whether there is the loop for including the network equipment.
Second of scene:Detect the network equipment to the business datum message of at least one purpose equipment transmission path With the presence or absence of loop, at least one loop detection purpose IP address is manually pre-set, further includes before 201:
The network equipment receives third business datum message;
When the purpose IP address of the third business datum message is preset loop detection purpose IP address, the net The triggering of network equipment, which executes, generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is the third industry The purpose IP address of business data message, the transmission path one of the loop detection UDP messages and the third business datum message It causes.
The purpose IP address of third business datum message received by the network equipment is preset loop detection When purpose IP address, automatic trigger loop detection generates loop detection UDP messages.At this point, the loop detection UDP messages Purpose IP address is the purpose IP address of the third business datum message, the loop detection UDP messages and the third industry The transmission path of business data message is consistent, detects from the network equipment to the purpose equipment of the third business datum message Include the loop of the network equipment in transmission path.
The third scene:The path for detecting the network equipment to the business datum message transmissions of selected purpose equipment is It is no that there are loops:
The purpose IP address of loop detection UDP messages described in human configuration, by the destination IP of the loop detection UDP messages Address is set as the IP address of the purpose equipment.Then the network equipment can utilize the routing corresponding to the destination IP address The loop detection UDP messages are forwarded, are detected from the network equipment to the transmission path of selected purpose equipment In loop.
What needs to be explained here is that other than above-mentioned three kinds of possible implement scenes, also other possible realization sides Formula.For example, when receiving the business datum message that specified source device is sent, with the purpose IP address of the business datum message As the purpose IP address of loop detection UDP messages, the transmission path of the business datum message for detecting source device transmission With the presence or absence of the loop for including the network equipment.
When generating loop detection UDP messages, other than needing that purpose IP address is arranged, it is also necessary to which the loop inspection is set Survey the destination slogan and protocol type of UDP messages.The destination slogan that the loop detection UDP messages are arranged is preset end Slogan, the preset port numbers are to for carrying out the UDP messages of loop detection specially pre-assigned port numbers.By institute It is UDP messages to state loop detection message, then it is 17 to give the protocol number of loop detection UDP messages distribution.
The source IP address of the loop detection UDP messages is with could be provided as a virtual interface of the network equipment Location may be set to be the source IP address of received business datum message, can also be specifically arranged according to actual needs. The TTL of the loop detection UDP messages is traditionally arranged to be maximum value 255.
202:The network equipment inquires the corresponding road of purpose network protocol IP address of the loop detection UDP messages By.
203:The network equipment sends the loop detection UDP messages using the routing.
The network equipment table of query and routing inquires the corresponding routing of purpose IP address of the loop detection UDP messages, The equipment that next-hop is forwarded to the loop detection UDP messages.The equipment of next-hop inquires the loop detection UDP messages again Purpose IP address, the routing corresponding to the purpose IP address of the loop detection UDP messages is inquired, to the loop detection The equipment that UDP messages are forwarded to next-hop again.So cycle, the loop detection UDP messages are transmitted in a network.
204:The network equipment receives the first business datum message.
205:When the first business datum message is matched with the loop detection UDP messages, the network equipment is known Routing corresponding to the purpose IP address of the not described loop detection UDP messages is routine cycling.
The network equipment, which receives the first business datum message and matched with the loop detection UDP messages, to be specifically included:It is described The purpose IP address of first business datum message is identical as the purpose IP address of loop detection UDP messages, first industry The destination slogan of business data message is identical as the destination slogan of loop detection UDP messages, first business datum The protocol number of message is identical as the protocol number of loop detection UDP messages.When the first business datum message and the ring When the matching of UDP messages is detected on road, the first business datum message is the loop detection UDP messages.
It is to be understood that when receiving the first business datum message, it first will be with the loop detection UDP messages Matching indicates the first business datum report when the first business datum message is matched with the loop detection UDP messages Text is the loop detection UDP messages, and there are loops in transmission path;When the first business datum message and the loop are examined When surveying UDP messages mismatch, indicates that the first business datum message is common business datum message, be directly forwarded i.e. It can.
That is, the loop detection UDP messages are generated by the network equipment and are forwarded to miscellaneous equipment, in network In transmitted by multiple equipment after and be back to the network equipment, this is indicated in the transmission path of the loop detection UDP messages There are circuits, and the network equipment is an equipment in circuit.Thus can using the loop detection UDP messages Timely and effectively detect the loop in network, and the routing corresponding to the purpose IP address of the loop detection UDP messages For routine cycling.Routine cycling so as to effectively and timely detect in network is eliminated, and business datum message is avoided Invalid forwarding.
Herein it should be noted that when the priority of the loop detection UDP messages is arranged, need to be arranged higher excellent Highest priority is arranged under normal circumstances in first grade, places the loop detection UDP messages in transmission process since network is stifled Plug is dropped.
In one embodiment, the method further includes:
The network equipment sets the routine cycling to inactive, triggering loop alarm.
The routing corresponding to purpose IP address due to the loop detection UDP messages is routine cycling, then by the loop Routing is set as inactive (inactive), and triggers loop alarm.Staff knows that the routing is loop according to alarm Routing changes the routing setting of the network equipment, releases the routine cycling.
In another embodiment, the method further includes:
The network equipment sends the third business datum message using the routing;
When stating the first business datum message and being matched with the loop detection UDP messages, the network equipment receives again To the third business datum message;
The network equipment inquires directed routing, and the directed routing is to give reception the third business datum message in advance Port setting routing;
The network equipment is forwarded the third business datum message using the directed routing.
The purpose IP address phase of the purpose IP address of the third business datum message and the loop detection UDP messages Together, the routing corresponding to the purpose IP address due to the loop detection UDP messages is routine cycling, then the third business number Consistent with the transmission path of loop detection UDP messages according to the transmission path of message, the third business datum message is also again It is secondary to be received by the network equipment.If at this point, purpose of the network equipment again according to the third business datum message IP address query routing, the routing corresponding to purpose IP address to third business datum according to the third business datum message It is forwarded, then the third business datum message then can constantly carry out cycle forwarding in a loop.
In the embodiment of the present invention, a directed routing is pre-set to the port for introducing the third business datum message, The third business datum message can be re-introduced on another transmission paths by the directed routing.When the network equipment When receiving the third business datum message again from the port, the directed routing that is arranged to the port is inquired, using described Directed routing is forwarded the third business datum message.At this point, third business datum message does not recycle the loop Routing is forwarded, and would not also return again to the network equipment, is forwarded to other network equipments.
Under normal circumstances, business datum flow is forwarded using the routing of highest priority, works as highest priority Routing be routine cycling when, that is, use suboptimum priority routing business datum flow is forwarded.Therefore, ordinary circumstance Under, the directed routing to port setting is the routing of sub-priority.
During concrete implementation, the method further includes:After manually adjusting routine cycling setting, the network equipment Loop detection UDP packet checks loop can be sent again, and whether there is also while carrying out timing, if beyond pre- to loop detection If after timed interval, the network equipment does not receive the loop detection UDP messages also, then it represents that the loop in network is Through eliminating, then the alarm to the routine cycling is eliminated.The business datum flow caused by routine cycling is solved in network The problem of middle cycle forwarding, caused network bandwidth resources waste.
There are two types of important application scenarios for loop detecting method provided in an embodiment of the present invention, carry out below in conjunction with the accompanying drawings detailed It describes in detail bright.
Fig. 3 is the first application scenarios flow chart of loop detecting method provided by the invention, the method includes:
301:The network equipment receives the first business datum packet loss that TTL is equal to 0 or 1, and second business Data message is not traceroute messages.
302:The network equipment generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is The purpose IP address of the first business datum message, destination slogan are preset port numbers.
303:The network equipment inquires the corresponding routing of purpose IP address of the loop detection UDP messages.
304:The network equipment sends the loop detection UDP messages using the routing.
305:The network equipment receives the second business datum message.
306:When the second business datum message is matched with the loop detection UDP messages, the network equipment is known Routing corresponding to the purpose IP address of the not described loop detection UDP messages is routine cycling.
307:The network equipment sets the routine cycling to inactive, triggering loop alarm.
Step 301 refers to the description of method shown in Fig. 2 to step 307 concrete implementation mode, and which is not described herein again.
The network equipment is receiving first business datum messages of the TTL for 1 or 0, and the second business datum report When text is not traceroute messages, indicate that there may be loops in network.The network equipment generates loop detection UDP reports Text, the purpose IP address of loop detection UDP messages are identical as the purpose IP address of the first business datum message.The then ring It is identical as the transmission path of the first business datum message in a network that the transmission path of UDP messages in a network is detected on road.
When the network equipment receives loop detection UDP messages again, the transmission path of loop detection UDP messages is indicated There are loop, i.e., there are loops for the transmission path of the described first business datum message, and the network equipment is in loop One equipment.Routing corresponding to the purpose IP address of the loop detection UDP messages is routine cycling, then with the first business number It can all be forwarded using the routine cycling by the network equipment according to the identical business datum flow of message purpose IP address, the industry Business data traffic can be recycled constantly in the loop until being dropped.
Business datum flow identical with the purpose IP address of the first business datum message is dropped in order to prevent, will The routine cycling is set as inactive, and triggers loop alarm, transmission path of the notification technique personnel to the routine cycling Checked, eliminate network present in loop, solve business datum flow recycle in a network forward cause network bandwidth The problem of waste.
Fig. 4 is second of application scenarios flow chart of loop detecting method provided by the invention, and the network equipment is fire prevention Fence net closes, the method includes:
401:Firewall gateway receives the first business datum message.
402:When the purpose IP address of the first business datum message is preset loop detection purpose IP address, institute It states firewall gateway triggering and executes generation loop detection UDP messages, the purpose IP address of the loop detection UDP messages is described The IP address of first business datum message, the transmission path of the loop detection UDP messages and the first business datum message Unanimously.
403:The firewall gateway inquires the corresponding road of purpose network protocol IP address of the loop detection UDP messages By.
404:The firewall gateway sends the loop detection UDP messages and the first business number using the routing According to message.
405:The firewall gateway receives the second business datum message.
406:When the second business datum message is matched with the loop detection UDP messages, the firewall gateway It identifies that the routing corresponding to the purpose IP address of the loop detection UDP messages is routine cycling, and receives described first again Business datum message.
407:The network equipment inquires directed routing, and the directed routing is to give reception first business datum in advance The routing of the port setting of message.
408:The network equipment is forwarded the first business datum message using the directed routing.
Step 401 refers to the description of method shown in Fig. 2 to step 409 concrete implementation mode, and which is not described herein again.
Enterprise network structural schematic diagram as shown in Figure 5, the IP address that firewall gateway receives are preset loop detection When the first business datum message of purpose IP address, i.e., firewall gateway receives the first business that purpose IP address is server Data message.The first business datum message is first first forwarded to fire wall and handled by firewall gateway.Meanwhile fire wall Gateway generates loop detection UDP messages, the purpose IP address of the loop detection UDP messages and the first business datum message Purpose IP address it is identical, the transmission road of the transmission path of the loop detection UDP messages and the first business datum message Diameter is identical, i.e., the loop detection UDP messages can be also forwarded to fire wall by firewall gateway.
When the first business datum message for accessing server is back to firewall gateway by fire wall, loop can also be examined It surveys UDP messages and is back to firewall gateway, is i.e. firewall gateway receives the loop detection UDP messages again.Then fire wall A loop is produced between gateway and fire wall, after firewall gateway receives loop detection UDP, identifies the loop detection Routing corresponding to the purpose IP address of UDP messages is routine cycling.
When firewall gateway identifies routine cycling, inquiry receives determining for the port of the first business datum message again To routing, the first business datum message is forwarded using the directed routing.The directed routing is in advance to reception The routing of the first business datum message setting, corresponding to the purpose IP address of the first business datum message in routing table Routing is different.In practical applications, the first business datum message is forwarded to server gateway by firewall gateway.
In the prior art, firewall gateway first inquires public network routing, and business datum flow is sent to fire wall, by anti- Treated that business datum flow is back to firewall gateway via VPN route for wall with flues.Firewall gateway needs to return on fire wall Business datum flow in the private network returned is forwarded to server gateway, and server gateway needs the mesh of first query traffic data flow IP address corresponding to VPN route, further according to VPN route purpose IP address inquiry public network routing, could inquire in place In the public network IP address of the server of public network, business datum flow could be forwarded to server.But the general network equipment Inquiry is not supported to route twice.
Therefore, using loop detecting method provided in an embodiment of the present invention, without individually disposing L 3 virtual in a network Dedicated network (Virtual Private Network, VPN), then the only transmission in public network of business datum message, avoids net Network equipment query is route twice.Only need while business datum message is forwarded to fire wall by firewall gateway, it will be with institute It states the identical loop detection UDP messages of business datum message purpose IP address and is also forwarded to fire wall.Work as firewall gateway When again by the loop detection UDP messages, firewall gateway receives the business datum message again, and inquire-receive should The directed routing of the port of business datum message is forwarded the business datum message using the directed routing, that is, fence net of preventing fires The business datum message can be forwarded directly to server gateway by pass.
Fig. 6 is a kind of loop detection means structural schematic diagram provided in an embodiment of the present invention, and described device includes:
Generation unit 601, for generating loop detection User Data Protocol UDP messages.
First query unit 602, the purpose network protocol IP address for inquiring the loop detection UDP messages are corresponding Routing.
First transmission unit 603, for sending the loop detection UDP messages using the routing.
First receiving unit 604, for receiving the first business datum message.
Recognition unit 605, for when the first business datum message is matched with the loop detection UDP messages, knowing Routing corresponding to the purpose IP address of the not described second business datum message is routine cycling.
In a specific embodiment, described device further includes:
Second receiving unit, for receiving the second business datum message;
First trigger element, for being equal to 0 or 1, and institute as the life span TTL of the second business datum message When to state the second business datum message be not traceroute messages, triggering, which executes, generates loop detection UDP messages, the loop inspection Survey UDP messages purpose IP address be the second business datum message purpose IP address, the loop detection UDP messages with The transmission path of the second business datum message is consistent.
Based on above-described embodiment, described device further includes:
Alarm Unit, for setting the routine cycling to inactive, triggering loop alarm.
In another embodiment, described device further includes:
Third receiving unit, for receiving third business datum message;
Second trigger element, for being preset loop testing goal when the purpose IP address of the third business datum message When IP address, triggering, which executes, generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is described the The purpose IP address of three business datum messages, the transmission road of the loop detection UDP messages and the third business datum message Diameter is consistent.
Based on above-described embodiment,
First transmission unit is additionally operable to send the third business datum message using the routing;
First receiving unit, the first business datum message ought be stated by being additionally operable to matches with the loop detection UDP messages When, the third business datum message is received again;
Described device further includes:Second query unit, for inquiring directed routing, the directed routing is in advance to reception The routing of the port setting of the third business datum message;
Second transmission unit, for being forwarded to the third business datum message using the directed routing.
Device shown in fig. 6 is to refer to shown in Fig. 2 with the device corresponding to method shown in Fig. 2, specific implementation Technology description in method, which is not described herein again.
Fig. 7 is a kind of loop detection means hardware architecture diagram provided in an embodiment of the present invention, and described device includes:
Transmitter 701, receiver 702, memory 703, and respectively with the transmitter 701, the receiver 702 with And the processor 704 that the memory 703 is connected, the memory 703 are instructed for batch processing.
The program instruction that the processor 704 is used to that the memory 703 to be called to store executes following operation:
Generate loop detection User Data Protocol UDP messages;
Inquire the corresponding routing of purpose network protocol IP address of the loop detection UDP messages;
The transmitter 701 executes and sends the loop detection UDP messages using the routing;
The receiver 702 executes and receives the first business datum message;
When the first business datum message is matched with the loop detection UDP messages, the processor 704 executes Identify that the routing corresponding to the purpose IP address of the loop detection UDP messages is routine cycling.
In one embodiment, the receiver 702 also executes and receives the second business datum message;
The processor 704 is additionally operable to the program instruction for calling the memory 703 to store and executes following operation:When described The life span TTL of second business datum message is equal to 0 or 1, and the second business datum message is not When traceroute messages, triggering, which executes, generates loop detection UDP messages, the purpose IP address of the loop detection UDP messages For the purpose IP address of the second business datum message, the loop detection UDP messages and the second business datum message Transmission path it is consistent.
Optionally, the processor 704 is additionally operable to the program instruction for calling the memory 703 to store and executes following behaviour Make:Set the routine cycling to inactive, triggering loop alarm.
In another embodiment,
The receiver 702 also executes and receives third business datum message;
The processor 704 is additionally operable to the program instruction for calling the memory 703 to store and executes following operation:When described When the purpose IP address of third business datum message is preset loop detection purpose IP address, the network equipment triggering executes Loop detection UDP messages are generated, the purpose IP address of the loop detection UDP messages is the mesh of the third business datum message IP address, the loop detection UDP messages are consistent with the transmission path of third business datum message.
Optionally, the transmitter 701 also executes and sends the third business datum message using the routing;
When stating the first business datum message and being matched with the loop detection UDP messages, the receiver 702 also executes The third business datum message is received again;
The program instruction that the processor 704 is additionally operable to that the memory 703 is called to store also executes following operation:Inquiry Directed routing, the directed routing are in advance to the routing for the port setting for receiving the third business datum message;
The transmitter 701 is also executed and is forwarded to the third business datum message using the directed routing.
Above-mentioned processor can be microprocessor or the processor can also be any conventional processor.In conjunction with this hair The step of method disclosed in bright embodiment, hardware processor can be embodied directly in and execute completion, or in processor Hardware and software module combination execute completion.When implemented in software, it can will realize that the code of above-mentioned function is stored in meter In calculation machine readable medium.Computer-readable medium includes computer storage media.Storage medium, which can be computer, to be accessed Any usable medium.As example but it is not limited to:Computer-readable medium can be that (full name in English is random access memory Random access memory, english abbreviation RAM), read-only memory (full name in English be read-only memory, English Text is abbreviated as ROM), Electrically Erasable Programmable Read-Only Memory (full name in English be electrically erasable Programmable read-only memory, english abbreviation EEPROM), CD-ROM (full name in English compact Disc read-only memory, english abbreviation CD-ROM) or other optical disc storages, magnetic disk storage medium or other magnetic Storage device or can be used in carry or store with instruction or data structure form program code and can be by computer Any other medium of access.Computer-readable medium can be that (full name in English is compact disc, English contracting to compression optical disc Be written as CD), laser disc, digital video disc (full name in English be digital video disc, english abbreviation DVD), floppy disk Or blu-ray disc.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the principle of the present invention, it can also make several improvements and retouch, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of loop detecting method, which is characterized in that the method includes:
The network equipment generates loop detection User Data Protocol UDP messages;
The network equipment inquires the corresponding routing of purpose network protocol IP address of the loop detection UDP messages;
The network equipment sends the loop detection UDP messages using the routing;
The network equipment receives the first business datum message;
When the first business datum message is matched with the loop detection UDP messages, the network equipment identifies the ring It is routine cycling that the routing corresponding to the purpose IP address of UDP messages is detected on road.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
The network equipment receives the second business datum message;
When the life span TTL of the second business datum message is equal to 0 or 1, and the second business datum message is not When being traceroute messages, the network equipment triggering, which executes, generates loop detection UDP messages, the loop detection UDP reports The purpose IP address of text is the purpose IP address of the second business datum message, the loop detection UDP messages and described the The transmission path of two business datum messages is consistent.
3. according to the method described in claim 2, it is characterized in that, the method further includes:
The network equipment sets the routine cycling to inactive inactive, triggering loop alarm.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
The network equipment receives third business datum message;
When the purpose IP address of the third business datum message is preset loop detection purpose IP address, the network is set Standby triggering, which executes, generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is the third business number According to the purpose IP address of message, the loop detection UDP messages are consistent with the transmission path of third business datum message.
5. according to the method described in claim 4, it is characterized in that, the method further includes:
The network equipment sends the third business datum message using the routing;
When stating the first business datum message and being matched with the loop detection UDP messages, the network equipment receives institute again State third business datum message;
The network equipment inquires directed routing, and the directed routing is in advance to the end for receiving the third business datum message The routing of mouth setting;
The network equipment is forwarded the third business datum message using the directed routing.
6. a kind of loop detection means, which is characterized in that described device includes:
Generation unit, for generating loop detection User Data Protocol UDP messages;
First query unit, the corresponding routing of purpose network protocol IP address for inquiring the loop detection UDP messages;
First transmission unit, for sending the loop detection UDP messages using the routing;
First receiving unit, for receiving the first business datum message;
Recognition unit, for when the first business datum message is matched with the loop detection UDP messages, identifying the ring It is routine cycling that the routing corresponding to the purpose IP address of UDP messages is detected on road.
7. device according to claim 6, which is characterized in that described device further includes:
Second receiving unit, for receiving the second business datum message;
First trigger element, for being equal to 0 or 1, and described the as the life span TTL of the second business datum message When two business datum messages are not traceroute messages, triggering, which executes, generates loop detection UDP messages, the loop detection The purpose IP address of UDP messages is the purpose IP address of the second business datum message, the loop detection UDP messages and institute The transmission path for stating the second business datum message is consistent.
8. device according to claim 7, which is characterized in that described device further includes:
Alarm Unit, for setting the routine cycling to inactive inactive, triggering loop alarm.
9. device according to claim 6, which is characterized in that described device further includes:
Third receiving unit, for receiving third business datum message;
Second trigger element, for working as the purpose IP address of the third business datum message for preset loop testing goal IP When location, triggering, which executes, generates loop detection UDP messages, and the purpose IP address of the loop detection UDP messages is the third industry The purpose IP address of business data message, the transmission path one of the loop detection UDP messages and the third business datum message It causes.
10. device according to claim 9, which is characterized in that
First transmission unit is additionally operable to send the third business datum message using the routing;
First receiving unit is additionally operable to when stating the first business datum message and being matched with the loop detection UDP messages, then It is secondary to receive the third business datum message;
Described device further includes:Second query unit, for inquiring directed routing, the directed routing is in advance to described in reception The routing of the port setting of third business datum message;
Second transmission unit, for being forwarded to the third business datum message using the directed routing.
CN201510172793.XA 2015-04-13 2015-04-13 A kind of loop detecting method and device Active CN104852826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510172793.XA CN104852826B (en) 2015-04-13 2015-04-13 A kind of loop detecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510172793.XA CN104852826B (en) 2015-04-13 2015-04-13 A kind of loop detecting method and device

Publications (2)

Publication Number Publication Date
CN104852826A CN104852826A (en) 2015-08-19
CN104852826B true CN104852826B (en) 2018-09-11

Family

ID=53852193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510172793.XA Active CN104852826B (en) 2015-04-13 2015-04-13 A kind of loop detecting method and device

Country Status (1)

Country Link
CN (1) CN104852826B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577536A (en) * 2016-01-29 2016-05-11 华为技术有限公司 Message processing method and network device
CN107172111B (en) * 2016-03-07 2020-05-05 大唐移动通信设备有限公司 Data transmission method, device and system
CN106789625B (en) * 2016-12-26 2021-02-23 北京华为数字技术有限公司 Loop detection method and device
CN107809351B (en) * 2017-10-24 2022-05-10 南京贝伦思网络科技股份有限公司 Method for detecting loop in bypass mode
CN110650086B (en) * 2018-06-27 2020-12-15 华为技术有限公司 Routing loop detection method and device
CN110445703B (en) * 2019-07-26 2021-05-07 新华三技术有限公司合肥分公司 Loop message intercepting method, forwarding equipment and controller

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197648A (en) * 2008-01-02 2008-06-11 中兴通讯股份有限公司 Self-loop detection method and device used for access network
CN103378998A (en) * 2012-04-27 2013-10-30 中兴通讯股份有限公司 Method and device for Ethernet port loopback detection

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9258213B2 (en) * 2012-05-30 2016-02-09 Cisco Technology, Inc. Detecting and mitigating forwarding loops in stateful network devices
US8681631B2 (en) * 2012-05-31 2014-03-25 Cisco Technology, Inc. Loop dampening in a computer network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197648A (en) * 2008-01-02 2008-06-11 中兴通讯股份有限公司 Self-loop detection method and device used for access network
CN103378998A (en) * 2012-04-27 2013-10-30 中兴通讯股份有限公司 Method and device for Ethernet port loopback detection

Also Published As

Publication number Publication date
CN104852826A (en) 2015-08-19

Similar Documents

Publication Publication Date Title
CN104852826B (en) A kind of loop detecting method and device
CN100413290C (en) Method for setting up notification function for route selection according to border gateway protocol
US20210243225A1 (en) Event driven route control
WO2016058245A1 (en) Processing method and apparatus for operation, administration and maintenance (oam) message
US9413652B2 (en) Systems and methods for path maximum transmission unit discovery
KR101617393B1 (en) Multiple connection system and method for service using internet protocol
CN101257388B (en) Lawless exterior joint detecting method, apparatus and system
CN105308904B (en) A kind of OAM message processing method, the network equipment and network system
CN101707608A (en) Method and device for automatically testing application layer protocol
CN103840976B (en) Communication means, light device and the network equipment
WO2015184771A1 (en) Method and node device for operation, administration, and maintenance of service function chaining
CN106789625A (en) A kind of loop detecting method and device
CN102195832A (en) Loopback testing method, device and system
CN104363243A (en) Method and device for preventing gateway deceit
US20210314246A1 (en) Data packet loss detection
KR20180038033A (en) Automatic configuration server and method
CN109347670A (en) Route tracing method and device, electronic equipment, storage medium
CN109586959B (en) Fault detection method and device
CN109981323A (en) A kind of method and the network equipment of detection data Link-Layer Multicast path status
US8971195B2 (en) Querying health of full-meshed forwarding planes
WO2017028391A1 (en) Virtual network communication method and apparatus
CN110855566B (en) Method and device for dragging upstream flow
JP2006174451A (en) Method for tracing route in wireless network including multiple nodes and wireless network of nodes configured to trace route
US10355953B2 (en) Method for simulating propagation times in networks
JP2014502063A (en) Communication path verification system, path verification apparatus, communication path verification method, and path verification program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant