Summary of the invention
In view of this, the application provides a kind of method and device of monitoring network failure, with accurate measurements particular link
Link state.
Specifically, the application is achieved by the following technical solution:
According to the embodiment of the present application in a first aspect, providing the method for monitoring network failure, which comprises
Recognizing message to be sent is probe messages;
The probe messages are sent to monitored destination address according to policybased routing, include in the policybased routing according to
Particular link reaches forwarding information used in the destination address;
According to the detection result of the probe messages, the accessibility of the destination address is determined.
In one embodiment, the method also includes:
It will include phase with the policybased routing if the detection result of the probe messages shows that the destination address is unreachable
Common routing with the forwarding information is set as invalid state;
When the detection result of the probe messages show the destination address up to when, will be described general in invalid state
Access is by being set as effective status.
It is in one embodiment, described that recognize message to be sent be probe messages, comprising:
If in message to be sent including snoop tag, it is determined that the message is probe messages.
In one embodiment, the method also includes:
If the message to be sent is not probe messages, selected according to the purpose IP address of the message corresponding general
Message described in logical routing forwarding, the corresponding common routing is comprising reaching forwarding information used in the destination IP address.
In any of the above-described embodiment, the forwarding information includes: destination network segment, outgoing interface and next hop address.
According to the second aspect of the embodiment of the present application, the device of monitoring network failure is provided, described device includes:
Recognition unit, arriving message to be sent for identification is probe messages;
First transmission unit, it is described for the probe messages to be sent to monitored destination address according to policybased routing
It include that forwarding information used in the destination address is reached according to particular link in policybased routing;
Determination unit determines the accessibility of the destination address for the detection result according to the probe messages.
In one embodiment, described device further include:
Processing unit will be with institute for when the detection result of the probe messages shows that the destination address is unreachable
It states the common routing that policybased routing includes the identical forwarding information and is set as invalid state;
When the detection result of the probe messages show the destination address up to when, will be described general in invalid state
Access is by being set as effective status.
In one embodiment, the recognition unit, if for including snoop tag in message to be sent, it is determined that institute
Stating message is probe messages.
In one embodiment, described device further include:
Second transmission unit, for when the message to be sent is not probe messages, then according to the mesh of the message
IP address select message described in corresponding common routing forwarding, the corresponding common routing is comprising with reaching the destination IP
Forwarding information used in location.
In any of the above-described embodiment, the forwarding information includes: destination network segment, outgoing interface and next hop address.
The method of the present embodiment monitoring network failure, by when sending probe messages to destination address, according to setting in advance
The policybased routing set forwards the probe messages, since the policybased routing includes to reach used in the destination address according to particular link
The forwarding information arrived is forwarded probe messages according to the particular link, so as to accurately obtain the specific chain
The state on road.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.
It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
Health examination is a kind of technology of monitoring network failure, is typically configured on the network equipment, which can be with
It is router, the equipment such as interchanger.For example, with reference to the example of Fig. 1, one kind that Fig. 1 illustrates the method for monitoring network failure is answered
With scene figure.By taking the network equipment (for example, router) 11 in Fig. 1 as an example, health examination mould is configured on the network equipment 11
Block 111, the network equipment 11 can monitor the accessibility of destination address by the health examination module 111, be set with detection from network
Whether standby 11 is normal to the link between destination address.For example, destination address is the IP address of the network equipment 13, the network equipment 11
Link " the A between the network equipment 13 can be detected by the health examination module 1111-B1" whether normal, the link " A1-
B1" it is particular link.
In actual implementation, the network equipment 11 periodically can send detection report to destination address by health examination module 111
Text, if receiving back message within a preset period of time, then it is assumed that the link between the network equipment 11 and destination address is normal;It is no
Then, it is believed that the link failure.Certainly, application scenario diagram shown in FIG. 1 is only by taking a kind of malfunction monitoring of link as an example, in reality
In the network architecture on border, network structure can be more complicated, and the network equipment 11 can also be connected with more equipment, also,
The link of the network equipment 11 to destination address can also be with more than one.
In the embodiment of the present application, in order to between particular link, such as the network equipment shown in FIG. 1 11 and the network equipment 13
Link " A1-B1" state accurately monitored, a kind of method for devising monitoring network failure.Example referring to fig. 2,
Fig. 2 illustrates a kind of application scenario diagram that the embodiment of the present application realizes the method for monitoring network failure, includes three networks in Fig. 2
Equipment (network equipment 21 to the network equipment 23), both links (link A2With link B2).It is executed with the network equipment 21 in Fig. 2
For the method for the application monitoring network failure, it is assumed that destination address is the IP address of the network equipment 23, then the network equipment 21 can
To realize to the particular link " A2-B2" be monitored.Can be set on the usual network equipment 21 unsoundness check module 211,
Common routing 212, wherein health examination module 211 is used to send detection to destination address, such as the IP address of the network equipment 23
Message;The data message that common routing 212 is sent for forwarding network appliance 21 to other equipment, on this basis, the application
It is also provided with policybased routing 213 on the network equipment 21 of embodiment, the detection report for being used to that health examination module 211 to be forwarded to send
Text.
In addition, being also provided with multiple common routings on the network equipment 21, each common route corresponds to a link, when
When monitoring the state of particular link, one and the common identical tactful road of routing corresponding to the particular link can be set
By the corresponding policybased routing of the particular link and forwarding information having the same commonly being routed, for example, destination network segment, going out to connect
Mouth, next hop address, wherein the address of network segment where destination network segment refers to destination address, outgoing interface indicate the network equipment by message
Interface when forwarding, next hop address indicate message by the address for the next stop being forwarded to.The network equipment 21 passes through strong
When health checks that module 211 sends the probe messages of particular link, the spy will be forwarded according to the corresponding policybased routing of the particular link
Observe and predict text;It, will be according to the corresponding common routing forwarding of the particular link when network equipment 21 sends the data message of particular link
The data message.
By taking application scenarios shown in Fig. 2 as an example, Fig. 3 illustrates one embodiment of the method for the application monitoring network failure
Flow chart, the Fig. 3 may include: so that the network equipment 21 executes this method as an example
Step S301: recognizing message to be sent is probe messages.
In the present embodiment, when the network equipment 21 is monitored particular link, it can be constructed by health examination module 211
Probe messages, and snoop tag is carried in the probe messages, for indicating that the message is the probe messages of health examination, for example,
The snoop tag is present in the Option Field of probe messages, is indicated with character " T ".
The network equipment 21 is when sending message, it can by the way that whether there is or not snoop tags in determination message to be sent, thus
Identify whether message to be sent is probe messages.
Step S302: the probe messages are sent to according to policybased routing by monitored destination address, the policybased routing
In include that forwarding information used in the destination address is reached according to particular link.
In the present embodiment, seen from the above description, corresponding policybased routing can be set for monitored particular link, it should
Comprising forwarding information corresponding to the particular link in policybased routing, and the forwarding information that the policybased routing is included can be with this
The forwarding information commonly routed corresponding to particular link is identical, for example, as illustrated in fig. 2, it is assumed that the network equipment 23 is located at dst net
In section, forwarding information that the policybased routing configured on the network equipment 21 includes be " dst, interface 1, the network equipment 22 IP
Location ", three item data respectively indicate destination network segment, outgoing interface, next hop address, the corresponding common routing of the particular link
Route1, it includes forwarding information be " IP address of dst, interface 1, the network equipment 22 ".
When executing the step S301, recognize message to be sent be probe messages when, then, can be according to this in this step
Policybased routing forwards the probe messages, which is forwarded according to the monitored particular link, with standard
Really monitor the state of the particular link.
In addition, if identifying, message to be sent is not probe messages, i.e., report to be sent in embodiments herein
Text is data message, then the network equipment 21 can select corresponding common routing forwarding data message according to the data message.
Step S303: according to the detection result of the probe messages, the accessibility of the destination address is determined.
In this embodiment, if within a preset time period, the network equipment 21 receives the back message of the probe messages,
It can be said that the bright particular link " A2-B2" normally, the destination address is reachable;Otherwise, it is believed that the destination address is unreachable,
The particular link " A2-B2" there are failures.
In addition, in the embodiment of the present application, when determining that the destination address is unreachable, particular link " A2-B2" failure when, net
Network equipment 21 can will be with the particular link " A2-B2" corresponding to common routing, such as above-mentioned route1 is set as invalid shape
State, so that the network equipment 21 causes data message to be forwarded to faulty link, lead not further according to route1 forwarding data packets
Data message is caused to lose.
By foregoing description, the network equipment 21 is monitored to particular link, when sending probe messages to destination address,
Independent of common routing, and it is to rely on the corresponding policybased routing of the particular link, and according to detection result, this can be changed
The corresponding state commonly routed of particular link.Even from detection result by the corresponding common routing change be invalid state
When, the network equipment 21 can still continue to forward probe messages according to policybased routing, continue to carry out the particular link to realize
Monitoring.If determining that the particular link has restored normally subsequently through monitoring, the network equipment 21 described can will be in invalid shape
The common route resetting of state is effective status, so that the common routing can continue forwarding data packets.
The method of the present embodiment monitoring network failure, by when sending probe messages to destination address, according to setting in advance
The policybased routing set forwards the probe messages, since the policybased routing includes to reach used in the destination address according to particular link
The forwarding information arrived is forwarded probe messages according to the particular link, so as to accurately obtain the specific chain
The state on road.
It should be noted that a kind of example of the application scenario diagram shown in Fig. 2 as just the network architecture, practical application
In, it can also include multilink in the network architecture, for example, there are more than one chains between the network equipment 21 and the network equipment 23
Road when then the network equipment 21 sends message to the network equipment 23, can select one to be used to forward the message from all links.
Under normal conditions, the network equipment 21 can select a wherein link, for example, can according to these according to pre-set rule
The priority height commonly routed corresponding to select chain road, the corresponding link of the common routing for selecting priority high, in another example,
According to flow load sharing algorithm, determines a common routing, that is, select link corresponding to the common routing.
It in the embodiment of the present application, can be by the way that plan be arranged on the network equipment 21 when monitoring the state of particular link
It slightly routes, which includes to arrive at the destination forwarding information used in location according to the particular link, sends detection report
Wen Shi is forwarded using the policybased routing, so that the probe messages are forwarded according to monitored particular link, it is quasi-
Really obtain the state of the monitored particular link.
Following Fig. 4 illustrates another application scenario diagram that the embodiment of the present application realizes the method for monitoring network failure.
The Fig. 4 by between the network equipment 21 and the network equipment 23 there are for both links, for example, link " A2-B2" and link " C2-
D2".Assuming that link " A2-B2" it is corresponding it is common routing be route1, link " C2-D2" it is corresponding it is common routing be route2, should
Route1 and route2 is equivalent route, i.e. point without priority of route1 and route2.In the present embodiment, network is set
Standby to be above also provided with policybased routing, the policybased routing is identical as route1, for monitoring the corresponding link " A of route12-B2" be
No failure, i.e. particular link are link " A2-B2”。
It is clearer in order to understand those skilled in the art to the technical solution of the application, application as shown in connection with fig. 4
Scene figure, following Fig. 5, the Fig. 5 illustrate another embodiment flow chart of the method for the application monitoring network failure, the figure
5 methods that the application monitoring network failure is executed with the network equipment 21, to particular link " A2-B2" be monitored for, to this Shen
Please monitoring network failure method application, be described further, comprising:
Step S501: recognize whether message to be sent is probe messages, if so, thening follow the steps S502, otherwise, hold
Row step S507.
How to identify whether message to be sent is that probe messages may refer to step in above-described embodiment in this step
The associated description of S301, in this not go into detail.
Step S502: the probe messages are sent to according to policybased routing by monitored destination address, the policybased routing
In include that forwarding information used in the destination address is reached according to particular link.
Step S503: according to the detection result of the probe messages, the accessibility of the destination address is determined.
The detailed description of step S502 and S503 may refer to the associated description of step S302 and S303 in above-described embodiment,
In this not go into detail.
Step S504: if it is determined that the destination address is unreachable, it will include that the identical forwarding is believed with the policybased routing
The common routing of breath is set as invalid state.
For example, when the network equipment 21 passes through the particular link " A2-B2" forwarding probe messages, according to detection result, however, it is determined that
When the IP address of the network equipment 23 is unreachable, illustrate the particular link " A2-B2" there are failures, in order to avoid subsequent network device
21 yet by the particular link " A2-B2" forwarding data packets, cause data message to be lost, the network equipment 23 can be specific by this
Link " A2-B2" corresponding common routing route1, it is set as invalid state, so that the route1 can not continue on for forwarding number
According to message.
Step S505: continue to send probe messages to the destination address according to the policybased routing, to continue to described
Particular link is detected, and detection result is obtained.
When sending probe messages to destination address due to the network equipment 21, it is not rely on common routing, such as route1,
And it is to rely on policybased routing, therefore, even if route1 has been in invalid state, has no effect on the network equipment 21 and continue according to plan
Slightly route to destination address send probe messages, so as to continue to be monitored particular link, in this step how basis
The policybased routing sends probe messages to the destination address, and the process for obtaining detection result may refer to above-mentioned steps
S301 is to the associated description of step S303, and in this not go into detail.
Step S506: when the detection result of the probe messages show the destination address up to when, described will be in nothing
The common routing of effect state is set as effective status;Terminate process.
For example, when the network equipment 21 passes through the particular link " A2-B2" continue to forward probe messages, it is false according to detection result
If determine the network equipment 23 IP address up to when, illustrate the particular link " A2-B2" failure has been not present, then it can will be in
The route1 of invalid state is re-set as effective status, and route1 is allowed to continue on for forwarding data packets, realizes
Accurately know the state of particular link.
Step S507: described according to message described in the corresponding common routing forwarding of the purpose IP address of message selection
Corresponding common routing is comprising reaching forwarding information used in the destination IP address.
In the present embodiment, if message to be sent is data message, according to the common routing forwarding data message, example
Such as, if route1 and route2 are in effective status, and since route1 and route2 are equivalent routes, then the network equipment 21
It can choose one of forwarding data message;In another example route1 is in invalid state, then the network equipment 21 can choose
Route2 forwards the data message.
As can be seen from the above description, when the network equipment 21, and monitored destination address, for example, between the network equipment 23
There are when more than one link, probe messages transmitted by the network equipment 21, dependent on corresponding to monitored particular link
Policybased routing is forwarded, so as to accurately obtain the state of monitored particular link.So as to avoid probe messages
It is forwarded dependent on common routing, and since there are more than one links, even if a wherein link failure, such as link
“A2-B2" failure, probe messages still can pass through other links, such as link " C2-D2", it is forwarded, to obtain purpose
Address is reachable as a result, then the network equipment 21 still maintains the validity of route1, subsequent, forwards datagram still according to route1
Text will lead to data message loss.
The method of the present embodiment monitoring network failure, by when sending probe messages to destination address, according to setting in advance
The policybased routing set forwards the probe messages, since the policybased routing includes to arrive at the destination used in location according to particular link
Forwarding information is forwarded probe messages according to particular link, so as to accurately obtain the shape of the particular link
State;Also, when determining that destination address is unreachable, invalid state is set by common routing corresponding to the particular link, from
And make subsequent not further according to the common routing forwarding data message, it avoids and data message is caused to lose;It is subsequent, the network equipment
It can still continue to forward probe messages accurately to obtain to continue to be monitored particular link to realize according to policybased routing
Know the state of particular link.
In the application, it should be noted that in above-mentioned Fig. 2 and application scenario diagram shown in Fig. 4, the network equipment 21 and network
Chain road between equipment 23 only exists a network equipment, and in practical application, the network architecture is increasingly complex, each of the links
On there may be the more network equipments, then monitored particular link is increasingly complex.In response to this, the application monitoring network
The method of failure stands good, and for example, with reference to Fig. 6, illustrates the another of the method for the embodiment of the present application realization monitoring network failure
A kind of application scenario diagram, in the Fig. 6, there are a links between the network equipment 61 and the network equipment 62, and chain road exists
More network equipments are (for example, the network equipment 63 is to network equipment 6n).With the network equipment 61 execute monitoring network failure method,
For being monitored to the accessibility of the IP address of the network equipment 62, carry out as described below:
Based on application scenarios shown in fig. 6, it is assumed that the network equipment 62 is located in dst network segment.By the corresponding description of above-mentioned Fig. 2
It is found that can be configured with health examination module, common routing, policybased routing, for example, the policybased routing is wrapped on the network equipment 61
The forwarding information contained is " IP address of dst, the interface 1 of the network equipment 61, the network equipment 63 ", when the network equipment 61 executes this Shen
Please monitoring network failure method, probe messages are forwarded to the network equipment 63 according to the policybased routing, the network equipment 63 can be with
According to the forward rule of itself, for example, the common routing saved according to itself continues to forward the probe messages.Assuming that the detection report
Text is finally successfully forwarded to the network equipment 62, and the network equipment 61 eventually receives corresponding back message, then the network equipment
61 it is considered that the IP address of the network equipment 62 is reachable, and network failure is not present in particular link corresponding to interface 1.It can manage
Solution, for example, if the network equipment 63 is wanted to be monitored the accessibility of the IP address of network equipment 6n, it can also be in net
Health examination module and policybased routing are configured in network equipment 63, so that the network equipment 63 can also execute the event of the application monitoring network
The method of barrier.
Corresponding with the embodiment of method of aforementioned monitoring network failure, present invention also provides the dresses of monitoring network failure
The embodiment set.
The embodiment of the application monitoring network failed equipment can be using on network devices.Installation practice can pass through
Software realization can also be realized by way of hardware or software and hardware combining.Taking software implementation as an example, it anticipates as a logic
Device in justice is by the processor of the network equipment where it by computer program instructions corresponding in nonvolatile memory
It is read into memory what operation was formed.For hardware view, as shown in fig. 7, for the device institute of the application monitoring network failure
In a kind of hardware structure diagram of the network equipment, in addition to processor 71 shown in Fig. 7, memory 72, network interface 73 and non-volatile
Except property memory 74, the network equipment in embodiment where device, can be with generally according to the actual functional capability of the network equipment
Including other hardware, this is repeated no more.
Referring to FIG. 8, one embodiment block diagram of the device for the application monitoring network failure, may include: that identification is single
First 81, first transmission unit 82, determination unit 83.
Wherein, the recognition unit 81, can be used for recognizing message to be sent is probe messages;
First transmission unit 82 can be used for that the probe messages are sent to monitored purpose according to policybased routing
Address includes that forwarding information used in the destination address is reached according to particular link in the policybased routing;
The determination unit 83, can be used for the detection result according to the probe messages, determine the destination address
Accessibility.
Referring to FIG. 9, another embodiment block diagram of the device for the application monitoring network failure, the Fig. 9 are shown in Fig. 8
Device on the basis of, can also include: processing unit 84, the second transmission unit 85.
Wherein, the processing unit 84 can be used for showing the destination address in the detection result of the probe messages
When unreachable, invalid state will be set as with the common routing that the policybased routing includes the identical forwarding information;
When the detection result of the probe messages show the destination address up to when, will be described general in invalid state
Access is by being set as effective status;
Second transmission unit 85 can be used for when the message to be sent is not probe messages, then according to institute
The purpose IP address for stating message selects message described in corresponding common routing forwarding, and the corresponding common routing is comprising reaching institute
State forwarding information used in purpose IP address.
The recognition unit 81, if can be used for includes snoop tag in message to be sent, it is determined that the message is
Probe messages.
In Fig. 8 and Installation practice shown in Fig. 9, the forwarding information, may include: destination network segment, outgoing interface with
And next hop address.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.