Summary of the invention
In view of this, the application provides a kind of method and device monitoring network failure, specific with accurate measurements
The Link State of link.
Specifically, the application is achieved by the following technical solution:
First aspect according to the embodiment of the present application, it is provided that the method for monitoring network failure, described method includes:
Recognizing message to be sent is probe messages;
According to policybased routing, described probe messages is mail to monitored destination address, described policybased routing wraps
Include and arrive the forwarding information used in described destination address according to particular link;
According to the result of detection of described probe messages, determine the accessibility of described destination address.
In one embodiment, described method also includes:
If the result of detection of described probe messages shows that described destination address is unreachable, will be with described policybased routing
The common route comprising identical described forwarding information is set to disarmed state;
When the result of detection of described probe messages show described destination address up to time, be in invalid shape by described
The common route of state is set to effective status.
In one embodiment, described in recognize message to be sent be probe messages, including:
If message to be sent includes snoop tag, it is determined that described message is probe messages.
In one embodiment, described method also includes:
If described message to be sent is not probe messages, then according to the purpose IP address choice pair of described message
Message described in the common routing forwarding answered, the common route of described correspondence comprises the described purpose IP address institute of arrival
The forwarding information used.
In any of the above-described embodiment, described forwarding information includes: destination network segment, outgoing interface and down hop
Address.
Second aspect according to the embodiment of the present application, it is provided that the device of monitoring network failure, described device includes:
Recognition unit, is probe messages for recognizing message to be sent;
First transmitting element, for described probe messages being mail to monitored destination address according to policybased routing,
Described policybased routing includes arriving the forwarding information used in described destination address according to particular link;
Determine unit, for according to the result of detection of described probe messages, determine described destination address up to
Property.
In one embodiment, described device also includes:
Processing unit, is used for when the result of detection of described probe messages shows that described destination address is unreachable,
It is set to disarmed state by comprising commonly routeing of identical described forwarding information with described policybased routing;
When the result of detection of described probe messages show described destination address up to time, be in invalid shape by described
The common route of state is set to effective status.
In one embodiment, described recognition unit, if including snoop tag for message to be sent,
Then determine that described message is probe messages.
In one embodiment, described device also includes:
Second transmitting element, for when described message to be sent is not probe messages, then according to described report
Message described in the common routing forwarding that civilian purpose IP address choice is corresponding, the common route of described correspondence comprises
Arrive the forwarding information used in described purpose IP address.
In any of the above-described embodiment, described forwarding information includes: destination network segment, outgoing interface and down hop
Address.
The present embodiment monitoring network failure method, by destination address send probe messages time, according to
The policybased routing pre-set forwards this probe messages, arrives according to particular link owing to this policybased routing comprises
Forwarding information used in described destination address so that probe messages can forward according to this particular link,
Such that it is able to accurately obtain the state of this particular link.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Following retouches
Stating when relating to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.
Embodiment described in following exemplary embodiment does not represent all embodiment party consistent with the application
Formula.On the contrary, they only with describe in detail in appended claims, the application some in terms of mutually one
The example of the apparatus and method caused.
It is only merely for describing the purpose of specific embodiment at term used in this application, and is not intended to be limiting this
Application." a kind of ", " described " of singulative used in the application and appended claims
" it is somebody's turn to do " be also intended to include most form, unless context clearly shows that other implications.It is also understood that
Term "and/or" used herein refer to and comprise any of one or more project of listing being associated or
Likely combine.
Although should be appreciated that may use term first, second, third, etc. to describe various letter in the application
Breath, but these information should not necessarily be limited by these terms.These terms are only used for same type of information district each other
Separately.Such as, in the case of without departing from the application scope, the first information can also be referred to as the second information,
Similarly, the second information can also be referred to as the first information.Depend on linguistic context, word as used in this
" if " can be construed to " ... time " or " when ... time " or " in response to determining ".
Physical examination is a kind of technology monitoring network failure, is typically configured on the network equipment, and this network sets
Standby can be the equipment such as router, switch.For example, with reference to the example of Fig. 1, Fig. 1 illustrates monitoring net
A kind of application scenarios figure of the method for network fault.With the network equipment (such as, router) 11 in Fig. 1 it is
Example, this network equipment 11 is configured with health examination module 111, and the network equipment 11 can be examined by this health
Look into module 111 and monitor the accessibility of destination address, with detection chain from the network equipment 11 to destination address
Road is the most normal.Such as, destination address is the IP address of the network equipment 13, and the network equipment 11 can pass through
This health examination module 111 detects the link " A between the network equipment 131-B1" the most normal, this link
“A1-B1" it is particular link.
In actual enforcement, the network equipment 11 periodically can be sent to destination address by health examination module 111
Probe messages, if receive back message in preset time period, then it is assumed that the network equipment 11 and destination address it
Between link normal;Otherwise it is assumed that this link failure.Certainly, the application scenarios figure shown in Fig. 1 is only
As a example by the malfunction monitoring of a kind of link, in the actual network architecture, network structure can be more complicated,
The network equipment 11 can also be connected with more equipment, and, the chain of the network equipment 11 to destination address
Road can also more than one.
In the embodiment of the present application, in order to particular link, the such as network equipment 11 shown in Fig. 1 are set with network
Link " A between standby 131-B1" state monitor accurately, devise a kind of network failure of monitoring
Method.Seeing the example of Fig. 2, Fig. 2 illustrates the method for the embodiment of the present application realization monitoring network failure
A kind of application scenarios figure, Fig. 2 includes three network equipments (network equipment 21 to the network equipment 23), two
Bar link (link A2With link B2).Perform the application with the network equipment 21 in Fig. 2 and monitor network event
As a example by the method for barrier, it is assumed that destination address is the IP address of the network equipment 23, then the network equipment 21 can be real
Now to this particular link " A2-B2" be monitored.Generally can be provided with physical examination on this network equipment 21
Module 211, commonly route 212, wherein, health examination module 211 for destination address, such as net
The IP address of network equipment 23 sends probe messages;Common route 212 is used for forwarding network appliance 21 to other
The data message that equipment sends, on this basis, the network equipment 21 of the embodiment of the present application is also provided with plan
Slightly it route 213, its probe messages sent for forwarding health examination module 211.
Additionally, be also provided with multiple common route on the network equipment 21, corresponding one of each common route
Link, when the state of particular link to be monitored, can arrange common with corresponding to this particular link
Routeing identical policybased routing, the policybased routing that i.e. this particular link is corresponding has identical turning with common route
Photos and sending messages, such as, destination network segment, outgoing interface, next hop address, wherein, destination network segment refers to destination address
The address of the place network segment, outgoing interface represents the interface when network equipment forwards the packet away, next hop address
Represent the address of the next stop that message will be forwarded to.The network equipment 21 is sent by health examination module 211
During the probe messages of particular link, the policybased routing corresponding according to this particular link is forwarded this probe messages;
When the network equipment 21 sends the data message of particular link, the common route corresponding according to this particular link is turned
Send out this data message.
As a example by the application scenarios shown in Fig. 2, Fig. 3 illustrates that the application monitors the method for network failure
Individual embodiment flow chart, this Fig. 3, as a example by the network equipment 21 performs the method, may include that
Step S301: recognizing message to be sent is probe messages.
In the present embodiment, when particular link is monitored by the network equipment 21, health examination module can be passed through
211 structural exploration messages, and this probe messages carries snoop tag, it is used for representing that this message is physical examination
Probe messages, such as, this snoop tag is present in the Option Field of probe messages, with character " T " table
Show.
The network equipment 21, when sending message, i.e. can be determined by message to be sent with or without snoop tag,
Thus identify whether message to be sent is probe messages.
Step S302: described probe messages mail to monitored destination address, described plan according to policybased routing
Slightly route includes arriving the forwarding information used in described destination address according to particular link.
In the present embodiment, seen from the above description, the particular link that can be monitored arranges the strategy of correspondence
Route, comprises the forwarding information corresponding to this particular link, and this policybased routing is comprised in this policybased routing
Forwarding information can be identical, such as, such as Fig. 2 with the forwarding information of the common route corresponding to this particular link
Shown in, it is assumed that the network equipment 23 is positioned at the dst network segment, and on the network equipment 21, the policybased routing of configuration comprises
Forwarding information is " dst, interface 1, the IP address of the network equipment 22 ", and this three item data represents purpose respectively
The network segment, outgoing interface, next hop address, what this particular link was corresponding commonly route route1, its forwarding comprised
Information is " dst, interface 1, the IP address of the network equipment 22 ".
When execution of step S301, recognize message to be sent when being probe messages, then in this step, can
To forward this probe messages according to this policybased routing so that this probe messages can be monitored specific according to this
Link forwards, with the state of this particular link of monitor.
Additionally, in embodiments herein, if identifying message to be sent is not probe messages, i.e. treat
The message sent is data message, then the network equipment 21 can select corresponding common road according to this data message
By forwarding this data message.
Step S303: according to the result of detection of described probe messages, determine the accessibility of described destination address.
In this embodiment, if within the default time period, the network equipment 21 receives returning of this probe messages
Answer message, then this particular link " A can be described2-B2" normal, this destination address up to;Otherwise, permissible
Think that this destination address is unreachable, this particular link " A2-B2" there is fault.
Additionally, in the embodiment of the present application, when determining that described destination address is unreachable, particular link " A2-B2”
During fault, the network equipment 21 can by with this particular link " A2-B2Common route corresponding to ", such as, go up
State route1, be set to disarmed state, so that the network equipment 21 is not further according to route1 forwarding data packets,
Cause data message to be forwarded to faulty link, cause data message to be lost.
By foregoing description, particular link is being monitored by the network equipment 21, sends detection to destination address
During message, do not rely on common route, and be to rely on the policybased routing that this particular link is corresponding, and according to
Result of detection, can change the state of common route corresponding to this particular link.Will even from result of detection
When the common routing change of this correspondence is disarmed state, the network equipment 21 still can continue to turn according to policybased routing
Send out probe messages, thus realize continuing this particular link is monitored.If determining this spy subsequently through monitoring
Determine link and recovered normal, then the described common route resetting being in disarmed state can be by the network equipment 21
Effective status, so that this commonly route can continue forwarding data packets.
The present embodiment monitoring network failure method, by destination address send probe messages time, according to
The policybased routing pre-set forwards this probe messages, arrives according to particular link owing to this policybased routing comprises
Forwarding information used in described destination address so that probe messages can forward according to this particular link,
Such that it is able to accurately obtain the state of this particular link.
It should be noted that the application scenarios figure shown in Fig. 2 is as just a kind of example of the network architecture, real
In the application of border, the network architecture can also comprise multilink, such as, the network equipment 21 and the network equipment 23
Between there is more than one link, then the network equipment 21 is when the network equipment 23 sends message, can be from institute
Have in link and select one for forwarding this message.Under normal circumstances, the network equipment 21 can be according to setting in advance
The rule put, selects a wherein link, such as, according to the common route corresponding to these optional links
Priority height, selects the link corresponding to common route that priority is high, the most such as, according to flow load
Sharing Algorithm, determines a common route, i.e. selects this link corresponding to common route.
In the embodiment of the present application, when monitoring the state of particular link, can be by the network equipment 21
Provisioning Policy route, and this policybased routing comprises and arrives at the forwarding used in location according to described particular link
Information, send probe messages time, use this policybased routing to forward so that this probe messages according to
Monitored particular link forwards, and accurately obtains the state of this monitored particular link.
Following Fig. 4, illustrates the another kind of applied field that the embodiment of the present application realizes the method for monitoring network failure
Jing Tu.In this Fig. 4 as a example by there is both links between the network equipment 21 and the network equipment 23, such as, and chain
Road " A2-B2" and link " C2-D2”.Assume link " A2-B2" corresponding commonly routeing as route1, chain
Road " C2-D2" corresponding common route is equal-cost route for route2, this route1 Yu route2, i.e. route1
With route2 do not have priority point.In the present embodiment, the network equipment is also provided with policybased routing,
This policybased routing is identical with route1, for monitoring link " A corresponding for route12-B2" whether fault, i.e.
Particular link is link " A2-B2”。
In order to make those skilled in the art understand clearer, shown in Fig. 4 to the technical scheme of the application
Application scenarios figure, following Fig. 5, this Fig. 5 illustrate the application and monitor another of method of network failure
Embodiment flow chart, this Fig. 5 performs, with the network equipment 21, the method that the application monitors network failure, to specific
Link " A2-B2" be monitored as a example by, the application is monitored the application of the method for network failure, does further
Illustrate, including:
Step S501: recognize whether message to be sent is probe messages, the most then perform step S502,
Otherwise, step S507 is performed.
How this step identifying, whether message to be sent is that probe messages may refer to walk in above-described embodiment
The associated description of rapid S301, in this not go into detail.
Step S502: described probe messages mail to monitored destination address, described plan according to policybased routing
Slightly route includes arriving the forwarding information used in described destination address according to particular link.
Step S503: according to the result of detection of described probe messages, determine the accessibility of described destination address.
The detailed description of step S502 and S503 may refer in above-described embodiment step S302 with S303's
Associated description, in this not go into detail.
Step S504: if it is determined that described destination address is unreachable, will comprise identical described with described policybased routing
The common route of forwarding information is set to disarmed state.
Such as, when the network equipment 21 is by this particular link " A2-B2" forward probe messages, according to detection knot
Really, however, it is determined that when the IP address of the network equipment 23 is unreachable, this particular link " A is described2-B2" there is event
Barrier, in order to avoid subsequent network device 21 is yet by this particular link " A2-B2" forwarding data packets, cause
Data message is lost, and the network equipment 23 can be by this particular link " A2-B2" corresponding commonly it route route1,
It is set to disarmed state, thus this route1 cannot continue on for forwarding data packets.
Step S505: continue to send probe messages according to described policybased routing to described destination address, to continue
Described particular link is detected, obtains result of detection.
Owing to the network equipment 21 is when destination address sends probe messages, it is not rely on common route, such as
Route1, and it is to rely on policybased routing, therefore, even if route1 has been in disarmed state, have no effect on net
Network equipment 21 continues to send probe messages according to policybased routing to destination address, such that it is able to continue specific chain
Road is monitored, and how to send probe messages according to described policybased routing to described destination address in this step,
And the process obtaining result of detection may refer to above-mentioned steps S301 to the associated description of step S303, at this
No longer it is described in detail.
Step S506: when the result of detection of described probe messages show described destination address up to time, by described
The common route being in disarmed state is set to effective status;Terminate flow process.
Such as, when the network equipment 21 is by this particular link " A2-B2" continue to forward probe messages, according to spy
Survey result, it is assumed that determine the IP address of the network equipment 23 up to time, this particular link " A is described2-B2"
There is not fault, then the route1 being in disarmed state can be re-set as effective status so that route1
Forwarding data packets can be continued on for, it is achieved that accurately know the state of particular link.
Step S507: according to message described in the common routing forwarding that the purpose IP address choice of described message is corresponding,
The common route of described correspondence comprises the forwarding information arrived used in described purpose IP address.
In the present embodiment, if message to be sent is data message, then according to this datagram of common routing forwarding
Literary composition, such as, if route1 Yu route2 is in effective status, and owing to route1 Yu route2 is of equal value
Route, then the network equipment 21 can select one of them to forward this data message;The most such as, route1 is in
Disarmed state, then the network equipment 21 can select route2 to forward this data message.
By foregoing description, when the network equipment 21, with monitored destination address, such as, network sets
When there is more than one link between standby 23, the probe messages that the network equipment 21 is sent, depend on and supervised
The policybased routing corresponding to particular link surveyed forwards, such that it is able to accurately obtain monitored specific chain
The state on road.Thus avoid probe messages and also rely on common route and forward, and more than owing to existing
Article one, link, though a wherein link failure, such as link " A2-B2" fault, probe messages still may be used
With by other links, such as link " C2-D2", forward, thus obtain destination address up to knot
Really, then the network equipment 21 still maintains the effectiveness of route1, follow-up, still according to route1 forwarding data packets,
Data message will be caused to lose.
The present embodiment monitoring network failure method, by destination address send probe messages time, according to
The policybased routing pre-set forwards this probe messages, arrives according to particular link owing to this policybased routing comprises
Forwarding information used in destination address so that probe messages can forward according to particular link, thus
Can accurately obtain the state of this particular link;Further, when determining that destination address is unreachable, this is specific
Common route corresponding to link is set to disarmed state, so that follow-up commonly route further according to this turns
Send out data message, it is to avoid cause the data message to lose;Follow-up, the network equipment still can continue according to strategy
Routing forwarding probe messages, to continue to be monitored particular link, it is achieved thereby that accurately know specific chain
The state on road.
In the application, it should be noted that in the application scenarios figure shown in above-mentioned Fig. 2 and Fig. 4, network sets
A network equipment is all only existed on standby link between 21 and the network equipment 23, and in actual application, net
Network framework is increasingly complex, and each of the links there may be the multiple stage network equipment, and the most monitored particular link is more
For complexity.For this situation, the application monitors the method for network failure and stands good, for example, with reference to Fig. 6,
Illustrate the another kind of application scenarios figure that the embodiment of the present application realizes the method for monitoring network failure, in this Fig. 6,
There is a link between the network equipment 61 and the network equipment 62, and on this link, there is the multiple stage network equipment
(such as, the network equipment 63 to network equipment 6n).The side of monitoring network failure is performed with the network equipment 61
Method, as a example by being monitored the accessibility of the IP address of the network equipment 62, carries out as described below:
Based on the application scenarios shown in Fig. 6, it is assumed that the network equipment 62 is positioned at the dst network segment.By above-mentioned Fig. 2
Corresponding description understands, and the network equipment 61 can be configured with health examination module, common route, strategy road
By, such as, the forwarding information that this policybased routing is comprised is " dst, the interface 1 of the network equipment 61, network
The IP address of equipment 63 ", when the network equipment 61 performs the method that the application monitors network failure, will detection
Message is forwarded to the network equipment 63 according to this policybased routing, and the network equipment 63 can be regular according to the forwarding of self,
Such as, the common route preserved according to self continues to forward this probe messages.Assume this probe messages finally quilt
Be successfully forwarded to the network equipment 62, and the network equipment 61 eventually receives the back message of correspondence, then network sets
Standby 61 it is believed that the network equipment 62 IP address up to, and the particular link corresponding to interface 1 do not exists
Network failure.It is understood that such as, if the network equipment 63 wants the IP address to network equipment 6n
Accessibility be monitored, then can also configure health examination module and policybased routing on the network equipment 63,
Make the network equipment 63 can also perform the method that the application monitors network failure.
Corresponding with the embodiment of the method for aforementioned monitoring network failure, present invention also provides monitoring network event
The embodiment of the device of barrier.
The application monitors the embodiment of network failed equipment and can apply on network devices.Device embodiment can
To be realized by software, it is also possible to realize by the way of hardware or software and hardware combining.Implemented in software it is
Example, as the device on a logical meaning, is that the processor by its place network equipment is by non-volatile
Computer program instructions corresponding in memorizer reads and runs formation in internal memory.For hardware view,
As it is shown in fig. 7, monitor a kind of hardware structure diagram of the device place network equipment of network failure for the application,
Except the processor 71 shown in Fig. 7, internal memory 72, network interface 73 and nonvolatile memory 74 it
Outward, in embodiment the network equipment at device place generally according to the actual functional capability of this network equipment, it is also possible to bag
Include other hardware, this is repeated no more.
Refer to Fig. 8, monitor an embodiment block diagram of the device of network failure for the application, may include that
Recognition unit the 81, first transmitting element 82, determine unit 83.
Wherein, described recognition unit 81, may be used for recognizing message to be sent is probe messages;
Described first transmitting element 82, may be used for mailing to monitored according to policybased routing by described probe messages
Destination address, described policybased routing includes arriving turning used in described destination address according to particular link
Photos and sending messages;
Described determine unit 83, may be used for the result of detection according to described probe messages, determine described purpose
The accessibility of address.
Refer to Fig. 9, monitor another embodiment block diagram of the device of network failure for the application, this Fig. 9 exists
On the basis of device shown in Fig. 8, it is also possible to including: processing unit the 84, second transmitting element 85.
Wherein, described processing unit 84, may be used for showing described mesh at the result of detection of described probe messages
Address unreachable time, the common route comprising identical described forwarding information with described policybased routing is set to
Disarmed state;
When the result of detection of described probe messages show described destination address up to time, by described be in invalid
The common route of state is set to effective status;
Described second transmitting element 85, may be used for when described message to be sent is not probe messages,
Then according to message described in common routing forwarding corresponding to the purpose IP address choice of described message, described correspondence
Common route comprise the forwarding information arrived used in described purpose IP address.
Described recognition unit 81, if may be used for message to be sent to include snoop tag, it is determined that institute
Stating message is probe messages.
In the device embodiment shown in Fig. 8 Yu Fig. 9, described forwarding information, may include that purpose net
Section, outgoing interface and next hop address.
In said apparatus, the function of unit and the process that realizes of effect specifically refer to corresponding step in said method
Rapid realizes process, does not repeats them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part sees
The part of embodiment of the method illustrates.Device embodiment described above is only schematically, wherein
The described unit illustrated as separating component can be or may not be physically separate, as unit
The parts of display can be or may not be physical location, i.e. may be located at a place, or also may be used
To be distributed on multiple NE.Some or all of module therein can be selected according to the actual needs
Realize the purpose of the application scheme.Those of ordinary skill in the art in the case of not paying creative work,
I.e. it is appreciated that and implements.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, all in this Shen
Within spirit please and principle, any modification, equivalent substitution and improvement etc. done, should be included in this Shen
Within the scope of please protecting.