CN109586959A - A kind of method and device of fault detection - Google Patents

A kind of method and device of fault detection Download PDF

Info

Publication number
CN109586959A
CN109586959A CN201811419429.9A CN201811419429A CN109586959A CN 109586959 A CN109586959 A CN 109586959A CN 201811419429 A CN201811419429 A CN 201811419429A CN 109586959 A CN109586959 A CN 109586959A
Authority
CN
China
Prior art keywords
address
bfd message
heading
network equipment
bfd
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811419429.9A
Other languages
Chinese (zh)
Other versions
CN109586959B (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201811419429.9A priority Critical patent/CN109586959B/en
Publication of CN109586959A publication Critical patent/CN109586959A/en
Application granted granted Critical
Publication of CN109586959B publication Critical patent/CN109586959B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults

Abstract

This application provides a kind of method and devices of fault detection, it is related to field of communication technology, the method is applied to first network equipment, the described method includes: receiving the first BFD message that second network equipment is sent, according to the receiving time of the receiving time of last the 2nd BFD message received and the first BFD message, determine the receiving time interval of the first BFD message and the 2nd BFD message, if receiving time interval is greater than preset time interval threshold value, then delete the first heading encapsulated in the first BFD message by second network equipment, judge whether purpose internet protocol address and the local IP address of the first BFD message are identical, if purpose IP address is identical as local IP address, then output state monitoring information, status monitoring information includes that the first BFD message is current Heading, which is missing from the heading of first heading.The efficiency of fault location can be improved using the application.

Description

A kind of method and device of fault detection
Technical field
This application involves fields of communication technology, more particularly to a kind of method and device of fault detection.
Background technique
Two-way converting detection (English: Bidirectional Forwarding Detection, referred to as: BFD) it is a kind of General, standardized, the unrelated quick fault testing mechanism unrelated with agreement of medium.Mainly for detection of between the network equipment Communication link whether link failure occurs.
In the prior art, can pass through between two network equipments (such as first network equipment and second network equipment) BFD message is sent, periodically to detect whether communication link occurs link failure.Wherein, first network equipment and the second net At least one intermediate equipment can be set between network equipment.If first network equipment be more than preset duration (such as BFD hair Send the multiple of interval duration) receive the BFD message that second network equipment is sent, then determine first network equipment and the second network Link failure, output state monitoring information occur for the communication link between equipment.
Based on the prior art, when between first network equipment and second network equipment there are when multiple intermediary network devices, If link failure occurs for the communication link between first network equipment and second network equipment, technical staff needs centering one by one Between the network equipment checked, just can determine that the network equipment to break down, cause the efficiency of fault location lower.
Summary of the invention
The method and device for being designed to provide a kind of fault detection of the embodiment of the present application, to improve the effect of fault location Rate.Specific technical solution is as follows:
In a first aspect, providing a kind of method of fault detection, the method is applied to first network equipment, the method Include:
Receive second network equipment transmission the first two-way converting detection BFD message, the first BFD message include to Few one layer of heading;
According to the receiving time of the receiving time of last the 2nd BFD message received and the first BFD message, really The receiving time interval of the fixed first BFD message and the 2nd BFD message, the 2nd BFD message and the first BFD Message is the BFD message for same communication link;
If the receiving time interval is greater than preset time interval threshold value, delete in the first BFD message First heading, first heading are the headings encapsulated by second network equipment;
Judge whether purpose internet protocol address and the local IP address of the first BFD message are identical;
If the destination IP address is identical as the local IP address, output state monitoring information, the state Monitoring information includes the current heading of the first BFD message, and the current heading is missing from first heading Heading.
Optionally, the method also includes:
If the receiving time interval is not more than preset time interval threshold value, the judgement the destination IP is executed The whether identical step of the IP address of address and local.
Optionally, the method also includes:
If the destination IP address is different from the local IP address, the first BFD message is superimposed and is encapsulated Second heading, and according to the purpose IP address of the first BFD message, the first BFD message is forwarded to third network Equipment.
Optionally, second heading is Ethernet protocol head, source media access control MAC in second heading Address is the MAC Address of the outgoing interface of first network equipment, and target MAC (Media Access Control) address is the incoming interface of the third network equipment MAC Address.
Optionally, second heading is IP agreement head, and source IP address is first net in second heading The IP address of the outgoing interface of network equipment, purpose IP address are the purpose IP address of the first BFD message.
Second aspect, provides a kind of device of fault detection, and described device is applied to first network equipment, described device Include:
Receiving module, the first two-way converting detection BFD message sent for receiving second network equipment, described first BFD message includes at least one layer of heading;
Determining module, the receiving time of the 2nd BFD message for being received according to the last time and the first BFD message Receiving time, determine the receiving time interval of the first BFD message and the 2nd BFD message, the 2nd BFD message With the BFD message that the first BFD message is for same communication link;
Removing module deletes described the if being greater than preset time interval threshold value for the receiving time interval The first heading in one BFD message, first heading are the headings encapsulated by second network equipment;
First judgment module, for judging the purpose internet protocol address and local IP of the first BFD message Whether address is identical;
First output module, if identical as the local IP address for the destination IP address, output state Monitoring information, the status monitoring information include the current heading of the first BFD message, and the current heading is scarce It becomes homeless and states the heading of the first heading.
Optionally, described device further include:
Second judgment module triggers if being not more than preset time interval threshold value for the receiving time interval The first judgment module execute it is described judge the destination IP address and local IP address whether same steps.
Optionally, described device further include:
Adding module, if different from the local IP address for the destination IP address, to the first BFD Message superposition the second heading of encapsulation, and according to the purpose IP address of the first BFD message, the first BFD message is turned It is sent to the third network equipment.
Optionally, second heading is Ethernet protocol head, source media access control MAC in second heading Address is the MAC Address of the outgoing interface of first network equipment, and target MAC (Media Access Control) address is the incoming interface of the third network equipment MAC Address.
Optionally, second heading is IP agreement head, and source IP address is first net in second heading The IP address of the outgoing interface of network equipment, purpose IP address are the purpose IP address of the first BFD message.
The third aspect provides a kind of network equipment, including processor, communication interface, memory and communication bus, In, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step described in first aspect.
Fourth aspect provides a kind of computer readable storage medium, is stored in the computer readable storage medium Computer program realizes method and step described in second aspect when the computer program is executed by processor.
5th aspect, provides a kind of computer program product comprising instruction, when run on a computer, so that The method that computer executes any of the above-described fault detection.
It is two-way to receive second network equipment is sent first for the method and device of fault detection provided by the embodiments of the present application Forwarding detection BFD message.It wherein, include at least one heading in the first BFD message.Then, it is received according to the last time The receiving time of 2nd BFD message and the receiving time of the first BFD message determine connecing for the first BFD message and the 2nd BFD message Time interval is received, the 2nd BFD message and the first BFD message are the BFD message for same communication link.Later, judge to receive Time interval is greater than preset time interval threshold value.If receiving time interval is greater than preset time interval threshold value, delete The first heading in first BFD message.Wherein, the first heading is the heading encapsulated by second network equipment.Finally, sentencing Whether the purpose internet protocol address of disconnected first BFD message and local IP address are identical.If purpose IP address and sheet The IP address on ground is identical, then output state monitoring information, which includes the current heading of the first BFD message, Current heading is missing from the heading of the first heading.In this way, technical staff can lack according in current heading Heading, determine the network equipment that breaks down, improve the efficiency of fault location.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach all the above excellent Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the system architecture diagram of communication network provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of the method for fault detection provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of the device of fault detection provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram of the device of fault detection provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of the device of fault detection provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of the network equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of method of fault detection, and this method can be applied to the network in communication network Equipment.Fig. 1 is the system architecture diagram of communication network provided by the embodiments of the present application, as shown in Figure 1, the communication network includes first The network equipment, second network equipment, the third network equipment, the 4th network equipment, the 5th network equipment, the 6th network equipment and Seven network equipments.The connection relationship and interface message of each network equipment are as follows in the communication network: the first of first network equipment (IP address is the third interface of interface (IP address 1.1.1.1, MAC Address 1-1-1-1-1-1) and second network equipment 1.1.1.2, MAC Address 1-1-1-1-1-2) it is connected;Second interface (the IP address 2.1.1.1, MAC of first network equipment Address is 2-1-1-1-1-1) with the 5th interface (the IP address 2.1.1.2, MAC Address 2-1-1-1- of the third network equipment 1-2) it is connected;The 4th interface (IP address 3.1.1.1, MAC Address 3-1-1-1-1-1) and the 4th net of second network equipment The 8th interface (IP address 3.1.1.2, MAC Address 3-1-1-1-1-2) of network equipment is connected;The 6th of the third network equipment (IP address is 9th interface of interface (IP address 4.1.1.1, MAC Address 4-1-1-1-1-1) and the 4th network equipment 4.1.1.2, MAC Address 4-1-1-1-1-2) it is connected;7th interface (IP address 5.1.1.1, MAC of the third network equipment Address is 5-1-1-1-1-1) with the 11st interface (the IP address 5.1.1.2, MAC Address 5-1-1- of the 5th network equipment 1-1-2) it is connected;The tenth interface (IP address 6.1.1.1, MAC Address 6-1-1-1-1-1) and the 6th of 4th network equipment The 14th interface (IP address 6.1.1.2, MAC Address 6-1-1-1-1-2) of the network equipment is connected;5th network equipment The 15th interface (IP of 12nd interface (IP address 7.1.1.1, MAC Address 7-1-1-1-1-1) and the 6th network equipment Address is 7.1.1.2, MAC Address 7-1-1-1-1-2) it is connected;(IP address is 13rd interface of the 5th network equipment 8.1.1.1, MAC Address 8-1-1-1-1-1) with the 17th interface of the 7th network equipment (IP address 8.1.1.2, MAC Location is 8-1-1-1-1-2) it is connected;The 16th interface (the IP address 9.1.1.1, MAC Address 9-1-1- of 6th network equipment 1-1-1) it is connected with the 18th interface of the 7th network equipment (IP address 9.1.1.2, MAC Address 9-1-1-1-1-2).
It is detailed to a kind of method progress of fault detection provided by the embodiments of the present application below in conjunction with specific embodiment Explanation.It should be noted that first network equipment can be appointing in communication system shown in FIG. 1 in the embodiment of the present application It anticipates a network equipment, second network equipment can be direct-connected with first network equipment and report to first network device forwards BFD The network equipment of text.As shown in Figure 2, the specific steps are as follows:
Step 201, the first BFD message that second network equipment is sent is received.
Wherein, the first BFD message includes at least one layer of heading.
In an implementation, when first network equipment receives the first BFD message of second network equipment transmission, first network is set The standby receiving time (hereinafter referred to as the first receiving time) that can recorde the first BFD message.Wherein, the first BFD message includes At least one layer of heading, the heading can be Ethernet protocol head, or IP agreement head can also be multiprotocol label Exchange (English: Multiprotocol Label Switching, abbreviation: MPLS) protocol header, the embodiment of the present application do not limit It is fixed.
When step 202, according to the reception of the receiving time of last the 2nd BFD message received and the first BFD message Between, determine the receiving time interval of the first BFD message and the 2nd BFD message.
Wherein, the 2nd BFD message and the first BFD message are the BFD message for same communication link.
In an implementation, the reception of last the 2nd BFD message received can be previously stored in first network equipment Time (hereinafter referred to as the second receiving time).After first network equipment determines the first receiving time of the first BFD message, Ke Yiji Calculate the difference of the first receiving time Yu the second receiving time, i.e. the receiving time interval of the first BFD message and the 2nd BFD message. Then, first network equipment can further judge whether the receiving time interval is greater than preset time interval threshold value.
In one implementation, if being stored with the reception of the BFD message of multiple communication links in first network equipment Time, then first network equipment can also record the source IP address and purpose IP address of each BFD message, and then inquire and first The identical BFD message of the source IP address and purpose IP address carried in BFD message (i.e. the 2nd BFD message).Then, first network Equipment can be in the 2nd BFD message, the determining receiving time with the immediate 2nd BFD message of current time.
In another implementation, after first network equipment often receives a BFD message, it can star timer. It is subsequent, it, can after first network equipment receives BFD message identical with the source IP address of the BFD message and purpose IP address To determine receiving time interval according to the time of timer current record.
Step 203, it if receiving time interval is greater than preset time interval threshold value, deletes in the first BFD message First heading.
Wherein, the first heading is the heading encapsulated by second network equipment.
In an implementation, after first network equipment determines receiving time interval, it can be determined that whether the receiving time interval is big In preset time interval threshold value.If receiving time interval is greater than preset time interval threshold value, illustrate that first network is set The standby communication link between second network equipment breaks down, first network equipment can in the first BFD message, determine by The heading of second network equipment encapsulation.First network equipment can delete first heading.
Optionally, above-mentioned time interval threshold value can be configured by technical staff, for example, time interval threshold value can be The multiple for time interval of giving out a contract for a project, such as time interval of giving out a contract for a project are 10ms, and it is to give out a contract for a project the time that above-mentioned time interval threshold value, which can be set, 3 times of interval, i.e. 30ms.Alternatively, above-mentioned time interval threshold value is also possible to give out a contract for a project time interval and time delay and value, accordingly , it can first determine the time delay in link.For example, can determine time delay by some network measurement tools, surveyed according to network Amount tool determines the time delay in link in real time, and then calculates time interval threshold value.Wherein, network measurement tools can use link Performance measurement tool etc., the embodiment of the present application is without limitation.Alternatively, can also determine in some longer cycle, BFD gives out a contract for a project The busier maximum BFD without when BFD concussion occurs of network service gives out a contract for a project spacing value, using the value as time interval threshold Value.
Step 204, judge whether purpose IP address and the local IP address of the first BFD message are identical.
In an implementation, after first network equipment deletes the first heading in the first BFD message, it can further judge the Whether the purpose IP address of one BFD message and local IP address are identical.Wherein, local IP address can set for first network The IP address of standby some upper interface, or the IP for the loopback interface (loopback) being arranged in first network equipment Location.
Step 205, if purpose IP address is identical as local IP address, output state monitoring information.
Wherein, status monitoring information includes the current heading of the first BFD message, and current heading is missing from the first report The heading of literary head.
In an implementation, if purpose IP address is identical as local IP address, illustrate that first network equipment is not necessarily to the One BFD message is forwarded (i.e. first network equipment is the final jump network equipment or tail node), and first network equipment can be with To designated equipment output state monitoring information.Wherein, designated equipment can be certain management terminal or preset server, the first net The status monitoring information can be sent to designated equipment by network equipment, and designated equipment then can store the status monitoring information;Or Person, designated equipment are also possible to first network equipment, and status monitoring information can be locally stored in first network equipment.Wherein, Status monitoring information includes the current heading of the first BFD message, and current heading is missing from the heading of the first heading.
In this way, technical staff can know the current heading of the first BFD message by checking status monitoring information, into And according to the corresponding communication link of the first BFD message, determine the heading lacked in the first BFD message, i.e. second network equipment First heading of addition improves so that it is determined that being that link between second network equipment and first network equipment breaks down The efficiency of fault location.
In the embodiment of the present application, the first BFD message is the BFD message that second network equipment is sent to first network equipment, The BFD message may be the BFD message that other network equipments are sent to second network equipment, based on processing similar to the above, The current heading of first BFD message is other than lacking the first heading, it is also possible to lack the network that other break down and set Standby corresponding heading.At this point, technical staff by checking status monitoring information, can know the complete of the first BFD message missing Portion's heading, so that it is determined that the overall network equipment to break down in communication link.
Optionally, if receiving time interval is not more than preset time interval threshold value, directly judge purpose IP address It is whether identical as local IP address.If purpose IP address is identical as local IP address, output state monitoring information.Its In, status monitoring information includes the current heading of the first BFD message.
In an implementation, if receiving time interval is less than or equal to preset time interval threshold value, illustrate first network Communication link between equipment and second network equipment does not break down, and first network equipment is without deleting in the first BFD message The first heading.Then, first network equipment can directly judge the purpose IP address of the first BFD message with local IP Whether location is identical.If purpose IP address is identical as local IP address, illustrate that first network equipment is not necessarily to report the first BFD Text is forwarded (i.e. first network equipment is the final jump network equipment or tail node), and first network equipment can be with output state Monitoring information.Wherein, status monitoring information includes the current heading of the first BFD message.In this way, technical staff can be according to shape The heading that is not present in the current heading of the first BFD message that state monitoring information includes determines failed network device, from And improve the efficiency of fault location.
Optionally, if purpose IP address is different from local IP address, to the first BFD message superposition the second report of encapsulation Literary head, and according to the purpose IP address of the first BFD message, the first BFD message is forwarded to the third network equipment.
In an implementation, if purpose IP address is different from local IP address, illustrate that first network equipment is needed to the One BFD message is forwarded (i.e. first network equipment is intermediary network device or intermediate node), and first network equipment can be right The second heading of superposition encapsulation in first BFD message.Then, first network equipment can be according to the destination IP of the first BFD message Corresponding with purpose IP address outgoing interface is inquired in address in pre-stored route forwarding table, and passes through the outgoing interface for the One BFD message is forwarded to the third network equipment (i.e. next-hop network equipment).
Optionally, the case where being Ethernet protocol head for heading, source MAC is first network in the second heading The MAC Address of the outgoing interface of equipment, target MAC (Media Access Control) address are the MAC Address of the incoming interface of the third network equipment.
Correspondingly, it is connecing out for first network equipment that first network equipment can encapsulate source MAC to the first BFD message Mouthful MAC Address, target MAC (Media Access Control) address be the third network equipment incoming interface MAC Address the second heading.
First network equipment can also set ethernet type for the type field in the second heading, so as to third net After network equipment receives the first BFD message, it can determine that second heading is new according to the type field in the second heading The heading of the ethernet type of increasing.
Optionally, the case where being IP agreement head for heading, source IP address is first network equipment in the second heading The IP address of outgoing interface, the purpose IP address that purpose IP address is the first BFD message.
Correspondingly, it is connecing out for first network equipment that first network equipment can encapsulate source IP address to the first BFD message Second heading of the IP address of mouth, the purpose IP address that purpose IP address is the first BFD message.
Optionally, first network equipment can also set IP type for the type field in the second heading, so as to After three network equipments receive the first BFD message, second heading can be determined according to the type field in the second heading For the heading of newly-increased IP type.
The embodiment of the present application also provides a kind of method examples of fault detection.Referring to Fig.1, in example one, the first net The first BFD message that network equipment is sent reaches the 5th network through the third network equipment, the 4th network equipment and the 6th network equipment Equipment.Wherein, heading is Ethernet protocol head, and event occurs for the communication link between the 4th network equipment and the 6th network equipment Hinder, the communication link between other network equipments is normal.Specific step is as follows:
Step 1, first network equipment encapsulates the first heading to the first BFD message, and sends the to the third network equipment One BFD message.
Wherein, heading current in the first BFD message is as shown in Table 1, and source MAC is second in the first heading The MAC Address 2-1-1-1-1-1 of interface, target MAC (Media Access Control) address are the MAC Address 2-1-1-1-1-2 of the 5th interface, and type field is IP。
Table one
Serial number Source MAC Target MAC (Media Access Control) address Type field
1 2-1-1-1-1-1 2-1-1-1-1-2 IP
Step 2 after the third network equipment receives the first BFD message, is superimposed the second message of encapsulation to the first BFD message Head, and the first BFD message is forwarded to the 4th network equipment.
Wherein, heading current in the first BFD message is as shown in Table 2, and source MAC is the 6th in the second heading The MAC Address 4-1-1-1-1-1 of interface, target MAC (Media Access Control) address are the MAC Address 4-1-1-1-1-2 of the 9th interface, and type field is Ethernet.
Table two
Serial number Source MAC Target MAC (Media Access Control) address Type field
2 4-1-1-1-1-1 4-1-1-1-1-2 Ethernet
1 2-1-1-1-1-1 2-1-1-1-1-2 IP
Step 3 after the 4th network equipment receives the first BFD message, is superimposed encapsulation third message to the first BFD message Head, and the first BFD message is forwarded to the 6th network equipment.
Wherein, heading current in the first BFD message is as shown in Table 3, and source MAC is the tenth in third heading The MAC Address 6-1-1-1-1-1 of interface, target MAC (Media Access Control) address are the MAC Address 6-1-1-1-1-2 of the 14th interface, type field For Ethernet.
Table three
Serial number Source MAC Target MAC (Media Access Control) address Type field
3 6-1-1-1-1-1 6-1-1-1-1-2 Ethernet
2 4-1-1-1-1-1 4-1-1-1-1-2 Ethernet
1 2-1-1-1-1-1 2-1-1-1-1-2 IP
Step 4 after the 6th network equipment receives the first BFD message, deletes the third message of the 4th network equipment encapsulation Head is superimposed the 4th heading of encapsulation to the first BFD message, and forwards the first BFD message to the 5th network equipment.
Wherein, heading current in the first BFD message is as shown in Table 4, and source MAC is the tenth in the 4th heading The MAC Address 7-1-1-1-1-2 of five interfaces, target MAC (Media Access Control) address are the MAC Address 7-1-1-1-1-1 of the 12nd interface, class type-word Section is Ethernet.
Table four
Serial number Source MAC Target MAC (Media Access Control) address Type field
3 7-1-1-1-1-2 7-1-1-1-1-1 Ethernet
2 4-1-1-1-1-1 4-1-1-1-1-2 Ethernet
1 2-1-1-1-1-1 2-1-1-1-1-2 IP
Step 5, after the 5th network equipment receives the first BFD message, output state monitoring information, status monitoring information Include the current heading of the first BFD message.
Wherein, heading current in the first BFD message is as shown in Table 5.
Table five
In this way, technical staff can determine in the current heading of the first BFD message that status monitoring information includes, missing The third heading of 4th network equipment addition, so that it is determined that the link between the 4th network equipment and the 6th network equipment occurs Failure, to improve the efficiency of fault location.
The embodiment of the present application also provides the method example of another fault detection.Referring to Fig.1, in example two, the first net The first BFD message that network equipment is sent reaches the 5th network through the third network equipment, the 4th network equipment and the 6th network equipment Equipment.Wherein, heading is IP agreement head, and the communication link between the 4th network equipment and the 6th network equipment breaks down, Communication link between other network equipments is normal.Specific step is as follows:
Step 1, first network equipment encapsulates the first heading to the first BFD message, and sends the to the third network equipment One BFD message.
Wherein, heading current in the first BFD message is as shown in Table 6, and source IP address connects in the first heading for second The IP address 2.1.1.1 of mouth, purpose IP address are the IP address 7.1.1.1, type field TCP/UDP of the 12nd interface.
Table six
Serial number Source IP address Purpose IP address Type field
1 2.1.1.1 7.1.1.1 IP
Step 2 after the third network equipment receives the first BFD message, is superimposed the second message of encapsulation to the first BFD message Head, and the first BFD message is forwarded to the 4th network equipment.
Wherein, heading current in the first BFD message is as shown in Table 7, and source IP address connects in the second heading for the 6th The IP address 4.1.1.1 of mouth, purpose IP address are the IP address 7.1.1.1 of the 12nd interface, and type field is Ethernet.
Table seven
Step 3 after the 4th network equipment receives the first BFD message, is superimposed encapsulation third message to the first BFD message Head, and the first BFD message is forwarded to the 6th network equipment.
Wherein, heading current in the first BFD message is as shown in Table 8, and source IP address connects in third heading for the tenth The IP address 6.1.1.1 of mouth, purpose IP address are the IP address 6-1-1-1-1-2 of the 14th interface, and type field is Ethernet.
Table eight
Serial number Source IP address Purpose IP address Type field
3 6.1.1.1 7.1.1.1 IP
2 4.1.1.1 7.1.1.1 IP
1 2.1.1.1 7.1.1.1 IP
Step 4 after the 6th network equipment receives the first BFD message, deletes the 4th network equipment in the first BFD message The third heading of middle addition is superimposed the 4th heading of encapsulation to the first BFD message, and forwards first to the 5th network equipment BFD message.
Wherein, heading current in the first BFD message is as shown in Table 9, and source IP address is the 15th in the 4th heading The IP address 7.1.1.2 of interface, purpose IP address are the IP address 7-1-1-1-1-1 of the 12nd interface, and type field is ether Net.
Table nine
Serial number Source IP address Purpose IP address Type field
3 7.1.1.2 7.1.1.1 IP
2 4.1.1.1 7.1.1.1 IP
1 2.1.1.1 7.1.1.1 IP
Step 5, after the 5th network equipment receives the first BFD message, output state monitoring information, status monitoring information Include the current heading of the first BFD message.
Wherein, heading current in the first BFD message is as shown in Table 10.
Table ten
Serial number Source IP address Purpose IP address Type field
3 7.1.1.2 7.1.1.1 IP
2 4.1.1.1 7.1.1.1 IP
1 2.1.1.1 7.1.1.1 IP
In this way, the source IP address that technical staff can include according to current heading, determines the 4th network equipment of missing Source IP address it is fixed to improve failure so that it is determined that the link between the 4th network equipment and the 6th network equipment breaks down The efficiency of position.
The method of fault detection provided by the embodiments of the present application receives the first two-way converting inspection that second network equipment is sent Survey BFD message.Wherein, at least one heading is carried in the first BFD message.Then, second received according to the last time The receiving time of the receiving time of BFD message and the first BFD message, when determining the reception of the first BFD message and the 2nd BFD message Between be spaced.Later, judge that receiving time interval is greater than preset time interval threshold value.If receiving time interval is greater than preset Time interval threshold value then deletes the first heading in the first BFD message.Wherein, the first heading is by second network equipment The heading of addition.Finally, judge the purpose internet protocol address of the first BFD message and local IP address whether phase Together.If purpose IP address is identical as local IP address, output state monitoring information, status monitoring information includes first The current heading of BFD message, current heading are missing from the heading of the first heading.In this way, technical staff can root According to the heading lacked in current heading, failed network device is determined, improve the efficiency of fault location.
Based on the same technical idea, as shown in figure 3, the embodiment of the present application also provides a kind of device of fault detection, The device is applied to first network equipment, which includes:
Receiving module 310, the first two-way converting for receiving the transmission of second network equipment detect BFD message, and described the One BFD message includes at least one layer of heading;
Determining module 320, the receiving time of the 2nd BFD message for being received according to the last time and the first BFD The receiving time of message determines the receiving time interval of the first BFD message and the 2nd BFD message, the 2nd BFD Message and the first BFD message are the BFD message for same communication link;
Removing module 330, if for the receiving time interval be greater than preset time interval threshold value, delete described in The first heading in first BFD message, first heading are the headings encapsulated by second network equipment;
First judgment module 340, for judging purpose internet protocol address and the local of the first BFD message Whether IP address is identical;
If first output module 350 exports shape identical as the local IP address for the destination IP address State monitoring information, the status monitoring information include the current heading of the first BFD message, and the current heading is Lack the heading of first heading.
Optionally, as shown in figure 4, the device further include:
Second judgment module 360 touches if being not more than preset time interval threshold value for the receiving time interval Send out first judgment module described and execute it is described judge the destination IP address and local IP address whether same steps.
Optionally, as shown in figure 5, the device further include:
Adding module 370, if different from the local IP address for the destination IP address, to described first BFD message superposition the second heading of encapsulation, and according to the purpose IP address of the first BFD message, by the first BFD message It is forwarded to the third network equipment.
Optionally, the second heading is Ethernet protocol head, and source MAC address is the in the second heading The MAC Address of the outgoing interface of one network equipment, target MAC (Media Access Control) address are the MAC Address of the incoming interface of the third network equipment.
Optionally, the second heading is IP agreement head, and source IP address is connecing out for first network equipment in the second heading The IP address of mouth, purpose IP address are the purpose IP address of the first BFD message.
The device of fault detection provided by the embodiments of the present application receives the first two-way converting inspection that second network equipment is sent Survey BFD message.Wherein, at least one heading is carried in the first BFD message.Then, second received according to the last time The receiving time of the receiving time of BFD message and the first BFD message, when determining the reception of the first BFD message and the 2nd BFD message Between be spaced.Later, judge that receiving time interval is greater than preset time interval threshold value.If receiving time interval is greater than preset Time interval threshold value then deletes the first heading in the first BFD message.Wherein, the first heading is by second network equipment The heading of addition.Finally, judge the purpose internet protocol address of the first BFD message and local IP address whether phase Together.If purpose IP address is identical as local IP address, output state monitoring information, status monitoring information includes first The current heading of BFD message, current heading are missing from the heading of the first heading.In this way, technical staff can root According to the heading lacked in current heading, failed network device is determined, improve the efficiency of fault location.
The embodiment of the present application also provides a kind of network equipments, as shown in fig. 6, include processor 601, communication interface 602, Memory 603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 are complete by communication bus 604 At mutual communication,
Memory 603, for storing computer program;
Processor 601 when for executing the program stored on memory 603, realizes the method step of above-mentioned fault detection Suddenly.
The communication bus that the above-mentioned network equipment is mentioned can be Peripheral Component Interconnect standard (English: Peripheral Component Interconnect, referred to as: PCI) bus or expanding the industrial standard structure (English: Extended Industry Standard Architecture, referred to as: EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control Bus processed etc..Only to be indicated with a thick line in figure convenient for indicating, it is not intended that an only bus or a type of total Line.
Communication interface is for the communication between the above-mentioned network equipment and other equipment.
Memory may include random access memory (English: Random Access Memory, abbreviation: RAM), can also To include nonvolatile memory (English: Non-Volatile Memory, abbreviation: NVM), for example, at least a disk storage Device.Optionally, memory can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (English: Central Processing Unit, referred to as: CPU), network processing unit (English: Network Processor, referred to as: NP) etc.;It can also be digital signal Processor (English: Digital Signal Processing, abbreviation: DSP), specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC), field programmable gate array (English: Field- Programmable Gate Array, referred to as: FPGA) either other programmable logic device, discrete gate or transistor logic Device, discrete hardware components.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described fault detection when being executed by processor Method the step of.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that the method that computer executes any fault detection in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (12)

1. a kind of method of fault detection, which is characterized in that the method is applied to first network equipment, which comprises
The first two-way converting detection BFD message of second network equipment transmission is received, the first BFD message includes at least one Layer heading;
According to the receiving time of the receiving time of last the 2nd BFD message received and the first BFD message, institute is determined State the receiving time interval of the first BFD message Yu the 2nd BFD message, the 2nd BFD message and the first BFD message For the BFD message for same communication link;
If the receiving time interval is greater than preset time interval threshold value, first in the first BFD message is deleted Heading, first heading are the headings encapsulated by second network equipment;
Judge whether purpose internet protocol address and the local IP address of the first BFD message are identical;
If the destination IP address is identical as the local IP address, output state monitoring information, the status monitoring Information includes the current heading of the first BFD message, and the current heading is missing from the report of first heading Literary head.
2. the method according to claim 1, wherein the method also includes:
If the receiving time interval is not more than preset time interval threshold value, the judgement the destination IP address is executed The whether identical step with local IP address.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
If the destination IP address is different from the local IP address, to the first BFD message superposition encapsulation second Heading, and according to the purpose IP address of the first BFD message, the first BFD message is forwarded to the third network equipment.
4. according to the method described in claim 3, it is characterized in that, second heading is Ethernet protocol head, described the Source MAC address is the MAC Address of the outgoing interface of first network equipment in two headings, and target MAC (Media Access Control) address is The MAC Address of the incoming interface of the third network equipment.
5. according to the method described in claim 3, described second reports it is characterized in that, second heading is IP agreement head Source IP address is the IP address of the outgoing interface of the first network equipment in literary head, and purpose IP address is the first BFD message Purpose IP address.
6. a kind of device of fault detection, which is characterized in that described device is applied to first network equipment, and described device includes:
Receiving module, the first two-way converting for receiving the transmission of second network equipment detect BFD message, the first BFD report Text includes at least one layer of heading;
Determining module, the 2nd receiving time of BFD message and connecing for the first BFD message for being received according to the last time Between time receiving, the receiving time interval of the first BFD message and the 2nd BFD message, the 2nd BFD message and institute are determined Stating the first BFD message is the BFD message for same communication link;
Removing module deletes the first BFD if being greater than preset time interval threshold value for the receiving time interval The first heading in message, first heading are the headings encapsulated by second network equipment;
First judgment module, for judging the purpose internet protocol address of the first BFD message and the IP address of local It is whether identical;
First output module, if identical as the local IP address for the destination IP address, output state monitoring Information, the status monitoring information include the current heading of the first BFD message, and the current heading is missing from institute State the heading of the first heading.
7. device according to claim 6, which is characterized in that described device further include:
Second judgment module, if for the receiving time interval be not more than preset time interval threshold value, triggering described in First judgment module execute it is described judge the destination IP address and local IP address whether same steps.
8. device according to claim 6 or 7, which is characterized in that described device further include:
Adding module, if different from the local IP address for the destination IP address, to the first BFD message Superposition the second heading of encapsulation, and according to the purpose IP address of the first BFD message, the first BFD message is forwarded to The third network equipment.
9. device according to claim 8, which is characterized in that second heading is Ethernet protocol head, described the Source MAC address is the MAC Address of the outgoing interface of first network equipment in two headings, and target MAC (Media Access Control) address is The MAC Address of the incoming interface of the third network equipment.
10. device according to claim 8, which is characterized in that second heading be IP agreement head, the described secondth Source IP address is the IP address of the outgoing interface of the first network equipment in heading, and purpose IP address is the first BFD report The purpose IP address of text.
11. a kind of network equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-5 any method and step when the computer program is executed by processor.
CN201811419429.9A 2018-11-26 2018-11-26 Fault detection method and device Active CN109586959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811419429.9A CN109586959B (en) 2018-11-26 2018-11-26 Fault detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811419429.9A CN109586959B (en) 2018-11-26 2018-11-26 Fault detection method and device

Publications (2)

Publication Number Publication Date
CN109586959A true CN109586959A (en) 2019-04-05
CN109586959B CN109586959B (en) 2021-11-26

Family

ID=65924040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811419429.9A Active CN109586959B (en) 2018-11-26 2018-11-26 Fault detection method and device

Country Status (1)

Country Link
CN (1) CN109586959B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535720A (en) * 2019-08-20 2019-12-03 新华三技术有限公司合肥分公司 A kind of BFD multi-hop detection method and device
CN110971459A (en) * 2019-11-29 2020-04-07 新华三半导体技术有限公司 Session fault detection method and device, terminal equipment and readable storage medium
CN112073987A (en) * 2019-06-11 2020-12-11 阿里巴巴集团控股有限公司 State monitoring method, device, equipment and storage medium
CN113055224A (en) * 2021-02-05 2021-06-29 新华三信息安全技术有限公司 Equipment message forwarding fault detection and device
CN114363222A (en) * 2021-12-17 2022-04-15 ***数智科技有限公司 Network equipment inspection method and system based on Netconf protocol
CN116760765A (en) * 2023-08-10 2023-09-15 新华三技术有限公司 Network state detection method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624584A (en) * 2012-03-01 2012-08-01 中兴通讯股份有限公司 Link detection method and link detection device
CN103916275A (en) * 2014-03-31 2014-07-09 杭州华三通信技术有限公司 BFD detection device and method
US9258234B1 (en) * 2012-12-28 2016-02-09 Juniper Networks, Inc. Dynamically adjusting liveliness detection intervals for periodic network communications
CN106817264A (en) * 2015-11-27 2017-06-09 华为软件技术有限公司 A kind of methods, devices and systems of link failure detection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624584A (en) * 2012-03-01 2012-08-01 中兴通讯股份有限公司 Link detection method and link detection device
US9258234B1 (en) * 2012-12-28 2016-02-09 Juniper Networks, Inc. Dynamically adjusting liveliness detection intervals for periodic network communications
CN103916275A (en) * 2014-03-31 2014-07-09 杭州华三通信技术有限公司 BFD detection device and method
CN106817264A (en) * 2015-11-27 2017-06-09 华为软件技术有限公司 A kind of methods, devices and systems of link failure detection

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073987A (en) * 2019-06-11 2020-12-11 阿里巴巴集团控股有限公司 State monitoring method, device, equipment and storage medium
CN110535720A (en) * 2019-08-20 2019-12-03 新华三技术有限公司合肥分公司 A kind of BFD multi-hop detection method and device
CN110535720B (en) * 2019-08-20 2022-01-25 新华三技术有限公司合肥分公司 BFD multi-hop detection method and device
CN110971459A (en) * 2019-11-29 2020-04-07 新华三半导体技术有限公司 Session fault detection method and device, terminal equipment and readable storage medium
CN110971459B (en) * 2019-11-29 2020-07-14 新华三半导体技术有限公司 Session fault detection method and device, terminal equipment and readable storage medium
CN113055224A (en) * 2021-02-05 2021-06-29 新华三信息安全技术有限公司 Equipment message forwarding fault detection and device
CN113055224B (en) * 2021-02-05 2022-05-27 新华三信息安全技术有限公司 Equipment message forwarding fault detection and device
CN114363222A (en) * 2021-12-17 2022-04-15 ***数智科技有限公司 Network equipment inspection method and system based on Netconf protocol
CN116760765A (en) * 2023-08-10 2023-09-15 新华三技术有限公司 Network state detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109586959B (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN109586959A (en) A kind of method and device of fault detection
CN103401726B (en) Network path detection method and device, system
CN108123824A (en) A kind of network fault detecting method and device
CN108322351A (en) Generate method and apparatus, fault determination method and the device of topological diagram
CN104852828B (en) A kind of network delay detection method, apparatus and system
EP3720075B1 (en) Data transmission method and virtual switch
CN109698788A (en) Flow forwarding method and flow forwarding device
KR20160019096A (en) Method and system for virtual network mapping protection and computer storage medium
CN105308904A (en) Oam packet processing method, network device and network system
CN109245961A (en) Link-quality detection method, device, storage medium and equipment
CN104283780A (en) Method and device for establishing data transmission route
CN109889411A (en) A kind of method and device of data transmission
CN107547430A (en) A kind of file transmitting method and device
CN101820359A (en) Fault processing method and equipment for network equipment
CN104639386B (en) fault location system and method
Pedretti et al. Using the Cray Gemini Performance Counters.
CN108234234A (en) Using modified Ethernet connectivity fault management signaling to avoid deadlock
CN110022236A (en) A kind of message forwarding method and device
JP5503600B2 (en) Failure management system and failure management method
CN107332793A (en) A kind of message forwarding method, relevant device and system
CN109802879A (en) A kind of flow routing method and device
CN106506265B (en) Detection fpga chip hangs dead method and device
CN107819596A (en) Diagnostic method, the apparatus and system of SDN failure
CN109120449A (en) A kind of detection method and device of link failure
CN105763347B (en) For method getparms, the network equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant