CN103475507B - Forwarding-table item fault detection method and device - Google Patents

Forwarding-table item fault detection method and device Download PDF

Info

Publication number
CN103475507B
CN103475507B CN201310381979.7A CN201310381979A CN103475507B CN 103475507 B CN103475507 B CN 103475507B CN 201310381979 A CN201310381979 A CN 201310381979A CN 103475507 B CN103475507 B CN 103475507B
Authority
CN
China
Prior art keywords
forwarding
table item
detection
fault
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310381979.7A
Other languages
Chinese (zh)
Other versions
CN103475507A (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.)
Shenzhen Shangge Intellectual Property Service Co ltd
Tongding Interconnection Information Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310381979.7A priority Critical patent/CN103475507B/en
Publication of CN103475507A publication Critical patent/CN103475507A/en
Application granted granted Critical
Publication of CN103475507B publication Critical patent/CN103475507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Embodiments provide a kind of forwarding-table item fault detection method and device, described method comprises determining that the first detection forwarding-table item and the second detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and described second detection forwarding-table item is the forwarding-table item not including described first detection forwarding-table item in described forwarding-table item to be detected;Within the detection cycle, detect the first detection forwarding-table item of the first quantity not detected in forwarding-table item to be detected and the second detection forwarding-table item of the second quantity.The technical scheme provided by the embodiment of the present invention can improve the efficiency of forwarding-table item fault detect.

Description

Forwarding-table item fault detection method and device
Technical field
The present invention relates to communication technical field, a kind of forwarding-table item fault detect side Method and device.
Background technology
Router is a kind of forwarding unit, is made up of different components.Wherein, forwarding engine is router Core devices.The forwarding-table item generated by various control protocols is handed down to turn by the control plane of router Carrying out the coffin upon burial and hold up, by the storage of forwarding engine control forwarding-table item, this forwarding-table item includes routing table or label Forward table etc..When carrying out the operations such as message forwarding or Route Selection, it is by forwarding engine to search storage Forwarding-table item, it is achieved the high speed forward of service message.
Forward engine to be typically forwarding-table item and be stored in corresponding memorizer, ran at actual router Cheng Zhong, due to memorizer long-play and the impact of the factor such as temperature or voltage, memorizer stores The content of forwarding-table item there will be single-bit, many bits or the fault of subregion content saltus step, because of This needs forwarding-table item is carried out fault detect.
In prior art, forwarding-table item fault detect is typically to carry out the forwarding-table item of memorizer storage time Going through detection, the content of the forwarding-table item of comparison storage is the most identical with the content of source forwarding-table item one by one, with Determining fault forwarding-table item, this source forwarding-table item is the forwarding of the control plane that various control protocol generates List item.
Inventor finds in research process, and existing this forwarding-table item fault detection method, in order to not Too much takies processor resource in router, and fault detect is generally periodically carried out, each detection cycle The forwarding-table item quantity of interior detection is limited, particularly when in memorizer storage forwarding-table item content very Time many, this allows for detecting that the time of fault forwarding-table item is longer, and fault detection efficiency is low.
Summary of the invention
In view of this, embodiments provide a kind of forwarding-table item fault detection method and device, use To solve the technical problem that in prior art, forwarding-table item fault detection efficiency is low.
For achieving the above object, the following technical scheme of embodiment of the present invention offer:
First aspect, it is provided that a kind of forwarding-table item fault detection method, including:
Determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second detection turns Forwarding list item, described second detection forwarding-table item is not include described first inspection in described forwarding-table item to be detected Survey the forwarding-table item of forwarding-table item;
Within the detection cycle, detect described the first of the first quantity not detected in forwarding-table item to be detected Detection forwarding-table item and the described second detection forwarding-table item of the second quantity, described first quantity is for being more than Or the positive integer equal to 1, described second quantity is the positive integer more than or equal to 0.
Implementation described may be determined in forwarding-table item to be detected in the first of described first aspect The first detection forwarding-table item and the second detection forwarding-table item that fault is easily sent out include:
The lookup number of times being used for instructing message to forward of each forwarding-table item to be detected in calculating Preset Time;
Using described lookup number of times more than or equal to searching the forwarding-table item to be detected of threshold value as described first inspection Surveying forwarding-table item, the forwarding-table item to be detected of non-described first detection forwarding-table item is as described second detection Forwarding-table item.
The second in described first aspect described may determine in forwarding-table item to be detected in implementation The first detection forwarding-table item and the second detection forwarding-table item that fault is easily sent out include:
Determine in forwarding-table item to be detected for setting up the forwarding-table item of communication protocol connection as described first Detection forwarding-table item, the forwarding-table item of non-described first detection forwarding-table item is as the second detection forwarding-table item.
In conjunction with described first aspect or any one possible implementation above-mentioned of described first aspect, also carry Having supplied the third possible implementation of described first aspect, described method also includes:
If be detected that fault forwarding-table item quantity more than or equal to first threshold, output fault cues letter Breath.
In conjunction with described first aspect or any one possible implementation above-mentioned of described first aspect, also carry Having supplied the 4th kind of possible implementation of described first aspect, described method also includes:
If be detected that fault forwarding-table item quantity more than or equal to Second Threshold, to forwarding engine again Issue the source forwarding-table item that described fault forwarding-table item is corresponding.
In conjunction with described first aspect or any one possible implementation above-mentioned of described first aspect, also carry Having supplied the 5th kind of possible implementation of described first aspect, described method also includes:
If be detected that fault forwarding-table item quantity more than or equal to the 3rd threshold value, determine in memorizer not The default memory area used, is stored in source list item corresponding for described fault forwarding-table item described presetting and deposits Storage area territory, and update that to index the index information of described fault forwarding-table item storage area address be described presetting The index information of storage area address.
Second aspect, it is provided that a kind of forwarding-table item failure detector, including:
List item determines unit, for determining the first detection forward table that in forwarding-table item to be detected, fault is easily sent out , and the second detection forwarding-table item, described second detection forwarding-table item is described forwarding-table item to be detected In do not include described first detection forwarding-table item forwarding-table item;
List item detector unit, within the detection cycle, detects in forwarding-table item to be detected detected The described first detection forwarding-table item of the first quantity and the described second detection forwarding-table item of the second quantity, Described first quantity is the positive integer more than or equal to 1, and described second quantity more than or equal to 0 is just Integer.
In the first possible implementation of described second aspect, described list item determines that unit includes:
Computing unit, in calculate Preset Time each forwarding-table item to be detected be used for instruct message to turn The lookup number of times sent out;
List item determines subelement, for described lookup number of times is more than or equal to search threshold value to be detected turn Forwarding list item is as described first detection forwarding-table item, and non-described first detects the forwarding to be detected of forwarding-table item List item is described second detection forwarding-table item.
Described second aspect the second may in implementation, described list item determine unit specifically for Determine that the forwarding-table item connected for setting up communication protocol in forwarding-table item to be detected detects as described first Forwarding-table item, and the forwarding-table item of non-described first detection forwarding-table item is as described second detection forwarding List item.
In conjunction with described second aspect or any one possible implementation above-mentioned of described second aspect, also carry Having supplied the third possible implementation of described second aspect, described device also includes:
Fault cues unit, for being more than or equal to first threshold when the fault forwarding-table item quantity detected, Output fault cues information.
In conjunction with described second aspect or any one possible implementation above-mentioned of described second aspect, also carry Having supplied the 4th kind of possible implementation of described second aspect, described device also includes:
Fisrt fault recovery unit, for when the fault forwarding-table item quantity detected is more than or equal to second Threshold value, re-issues, to forwarding engine, the source list item that described fault forwarding-table item is corresponding.
In conjunction with described second aspect or any one possible implementation above-mentioned of described second aspect, also carry Having supplied the 5th kind of possible implementation of described second aspect, described device also includes:
Second fault recovery unit, for when the fault forwarding-table item quantity detected is more than or equal to the 3rd Threshold value, determines untapped default memory area in memorizer, by source corresponding for described fault forwarding-table item Forwarding-table item is stored in described default memory area, and updates the described fault forwarding-table item memory area of index The index information of address is the index information of described default storage area address.
To sum up, a kind of forwarding-table item fault detection method and device are embodiments provided, by really The first detection forwarding-table item that in fixed forwarding-table item to be detected, fault is easily sent out, and the second detection forwarding-table item, This second detection forwarding-table item is not include turning of described first detection forwarding-table item in forwarding-table item to be detected Forwarding list item, and within the detection cycle, detects the of the first quantity not detected in forwarding-table item to be detected One detection forwarding-table item and the second detection forwarding-table item of the second quantity so that be susceptible to the of fault One detection forwarding-table item is preferentially detected, such that it is able to shorten the time detecting fault forwarding-table item, carries High fault detection efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below, Accompanying drawing in description is only embodiments of the invention, for those of ordinary skill in the art, not On the premise of paying creative work, it is also possible to obtain other accompanying drawing according to the accompanying drawing provided.
The stream of a kind of one embodiment of forwarding-table item fault detection method that Fig. 1 provides for the embodiment of the present invention Cheng Tu;
A kind of forwarding-table item another embodiment of fault detection method that Fig. 2 provides for the embodiment of the present invention Flow chart;
A kind of forwarding-table item another embodiment of fault detection method that Fig. 3 provides for the embodiment of the present invention Flow chart;
A kind of forwarding-table item another embodiment of fault detection method that Fig. 4 provides for the embodiment of the present invention Flow chart;
A kind of forwarding-table item another embodiment of fault detection method that Fig. 5 provides for the embodiment of the present invention Flow chart;
A kind of forwarding-table item another embodiment of fault detection method that Fig. 6 provides for the embodiment of the present invention Flow chart;
The knot of a kind of one embodiment of forwarding-table item failure detector that Fig. 7 provides for the embodiment of the present invention Structure schematic diagram;
Fig. 8 is a kind of structural representation that in the embodiment of the present invention, forwarding-table item determines unit;
A kind of forwarding-table item another embodiment of failure detector that Fig. 9 provides for the embodiment of the present invention Structural representation;
A kind of forwarding-table item another embodiment of failure detector that Figure 10 provides for the embodiment of the present invention Structural representation;
A kind of forwarding-table item another embodiment of failure detector that Figure 11 provides for the embodiment of the present invention Structural representation;
A kind of forwarding-table item another embodiment of failure detector that Figure 12 provides for the embodiment of the present invention Structural representation;
The structural representation of one embodiment of a kind of router that Figure 13 provides for the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing Go out the every other embodiment obtained under creative work premise, broadly fall into the scope of protection of the invention.
One of main thought of the embodiment of the present invention may include that
Determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second detection turns Forwarding list item, this second detection forwarding-table item is not include in forwarding-table item to be detected that described first detection forwards The forwarding-table item of list item, and within each detection cycle, detect in forwarding-table item to be detected and be not detected The first quantity first detection forwarding-table item and the second quantity second detection forwarding-table item.Easily send out First detection forwarding-table item of raw fault is preferentially detected, and detects fault forwarding-table item such that it is able to shorten Time, improve fault detection efficiency.
One embodiment of a kind of forwarding-table item fault detection method that Fig. 1 provides for the embodiment of the present invention, The method may include that
101: determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second inspection Survey forwarding-table item.
Wherein, this second detection forwarding-table item is not include in forwarding-table item to be detected that described first detection turns The forwarding-table item of forwarding list item.
Router is a kind of forwarding unit, is mainly searched device by processor, forwarding engine, algorithm, is deposited The device compositions such as reservoir, wherein, forwarding engine is the core devices in router, is responsible for the forwarding of message And process.
Router includes different types of forwarding-table item, such as routing table, Label Forwarding Information Base etc., mainly Generated by the computing of various control protocols by the control plane in router.The forwarding-table item conduct generated Source forwarding-table item is stored in the internal memory of processor, can be issued to forward engine simultaneously, is deposited by forwarding engine Store up in forwarding the memorizer that engine is corresponding.Forward engine when carrying out message forwarding etc. and processing, be to pass through Search the forwarding-table item in its corresponding memorizer, realize the operations such as message forwarding according to forwarding-table item.
This forwarding-table item to be detected is and forwards the forwarding-table item of storage in engine correspondence memorizer, is specially During once traveling through detection, memorizer needs the forwarding-table item being detected.
In the present embodiment, it is first determined go out the first detection forwarding-table item in this forwarding-table item to be detected, with And second detection forwarding-table item.
This first detection forwarding-table item refers to easily occur event in the forwarding-table item that fault is easily sent out, i.e. memorizer Barrier, causes the forwarding-table item that content is different from the content of corresponding source forwarding-table item.
Owing to the purpose of fault detect is to detect fault forwarding-table item, to implement corresponding measure, Reduce the impact that fault causes.Therefore in the embodiment of the present application, it is first determined go out and may easily break down First detection forwarding-table item, other forwarding-table items to be detected are i.e. as the second detection forwarding-table item.
The determination of the first detection forwarding-table item that this fault is easily sent out can have multiple implementation, real below Execute in example and can be discussed in detail.
102: within the detection cycle, detect the first inspection of the first quantity not detected in forwarding-table item to be detected Surveying the second detection forwarding-table item of forwarding-table item and the second quantity, described first quantity is more than or equal to 1 Positive integer, described second quantity is the positive integer more than or equal to 0.
In order to avoid taking processor resource, forwarding-table item fault detect is periodically carried out, in the detection cycle In a number of forwarding-table item to be detected is detected.Detection forwarding-table item is i.e. to be detected turn of comparison The content of the content of forwarding list item and source forwarding-table item corresponding to forwarding-table item to be detected is the most identical.
In the embodiment of the present application, can traversal detection multiple detection cycles each detection cycle in, Detecting the first detection forwarding-table item of the first quantity and the second detection forwarding-table item of the second quantity, this is the years old One detection forwarding-table item and the second detection forwarding-table item are and travel through detection process at a forwarding-table item In, not detected forwarding-table item to be detected, thereby may be ensured that each forwarding-table item to be detected all can quilt Detect one time.
This first quantity and the second quantity sum are equal to the forwarding-table item amount detection in the detection cycle.This is years old One quantity and the second quantity can be the same or different.
Owing to the quantity of the first detection forwarding-table item is limited, if within a detection cycle, the most tested When the quantity of the first detection forwarding-table item surveyed is less than this first quantity, then can examine within this detection cycle Surveying the first the most not detected detection forwarding-table item, within this detection cycle, the second detection of detection forwards The quantitative value of list item can be that described forwarding-table item amount detection turns with this first the most not detected detection The difference of forwarding list item quantity.When the first detection forwarding-table item has all detected, within the detection cycle, Only detection second can detect forwarding-table item, until all forwarding-table items to be detected are all detected one time.
Owing to, within the detection cycle, the forwarding-table item to be detected of detection includes the first detection that fault is easily sent out Forwarding-table item so that the forwarding-table item being susceptible to fault is preferentially detected, therefore shortens and detects event The time of barrier forwarding-table item, improve fault detection efficiency.
In a kind of possible implementation, this second quantity can be zero, thus carries out forwarding-table item fault During detection, can first detect the first detection forwarding-table item that fault is easily sent out, the first quantity is i.e. equal to each The forwarding-table item amount detection in detection cycle, can determine fault forwarding-table item faster.
In alternatively possible implementation, this first quantity can be more than or equal to the second quantity, due to Second detection forwarding-table item also likely to be present the forwarding-table item broken down, in order to avoid break down Second detection forwarding-table item can not comparatively fast be detected, can be in each detection cycle detection the second quantity Second detection forwarding-table item, it is ensured that the balance of fault detect.
When the first quantity is identical with the second quantity, it is assumed that the first detection forwarding-table item total quantity is M, often The forwarding-table item amount detection in one detection cycle is N, then can be divided into by the first detection forwarding-table item M*2/N group, often group N/2 bar first detects forwarding-table item, then, within a detection cycle, can detect N/2 bar first detects forwarding-table item and N/2 bar second detects forwarding-table item.So that Complete one in M*2/N detection cycle and take turns the traversal for the first detection forwarding-table item, the most each detection Cycle have detected the second detection forwarding-table item simultaneously, it is ensured that fault detect balances.
During forwarding-table item detects, if be detected that fault forwarding-table item, fault cues can be exported Information.May also take on corresponding failure recovery measure and recover fault forwarding-table item.
Certainly, during forwarding-table item detects, it is also possible to statistics fault forwarding-table item quantity, with basis The varying number of fault forwarding-table item, takes different faults measure.
Such as, the output fault cues information when fault forwarding-table item quantity is more than or equal to first threshold, Or when fault forwarding-table item quantity is more than or equal to Second Threshold, takes corresponding measure to recover fault and turn Forwarding list item etc..
In the present embodiment, when carrying out forwarding-table item fault detect, it is first determined the first inspection that fault is easily sent out Survey forwarding-table item and the second detection forwarding-table item of this first detection forwarding-table item non-, in each detection week In phase, the first detection forwarding-table item of the first quantity that detection is not detected and the second inspection of the second quantity Survey forwarding-table item, so that the first detection forwarding-table item being susceptible to fault is preferentially detected, Such that it is able to shorten the time detecting fault forwarding-table item, fault detection efficiency can be improved.
Another embodiment of a kind of forwarding-table item fault detection method that Fig. 2 provides for the embodiment of the present invention, The method may include that
201: the lookup being used for instructing message to forward time of each forwarding-table item to be detected in calculating Preset Time Number.
202: turn searching number of times as the first detection more than or equal to the forwarding-table item to be detected searching threshold value Forwarding list item, the forwarding-table item to be detected of non-first detection forwarding-table item is as the second detection forwarding-table item.
Inventor finds under study for action, and a kind of possible situation of the forwarding-table item that fault is easily sent out is carrying business number During the forwarding-table item that flow is bigger, i.e. service message forward process, the more forward table searched ?.
In the present embodiment, by calculate forwarding-table item each to be detected in Preset Time be used for instruct The lookup number of times that message forwards, when carrying out message and forwarding, requires to look up forwarding-table item to determine forwarding phase Pass information, this lookup number of times i.e. be statistics Preset Time in each forwarding-table item to be detected turn for message The lookup number of times sent out.Search forwarding-table item often and be traffic streams journey relatively greatly, may be fault The the first detection forwarding-table item easily sent out, therefore will search number of times more than or equal to search threshold value to be detected turn Forwarding list item is as the first detection forwarding-table item.
Wherein, owing to, in router message processing procedure, the carrying business datum amount of forwarding-table item is change , therefore to ensure the accuracy of the first detection forwarding-table item, it is also possible to periodically calculate and search number of times.
This is searched number of times can be by the lookup identification identifier (Identity, ID) in statistics forwarding-table item Determine.Each forwarding-table item to be detected can include search id field, by non-zero different numerical value Represent different forwarding-table item to be detected.During message forward process, if the forward table to be detected of hit The lookup id field numerical value of item is non-zero, and for example, 1 or 2 etc., then the hit to this forwarding-table item to be detected Number of times carries out accumulated counts, and the non-zero lookup id field of concrete can be different numerical value arranges depositing of correspondence Storage space, the hit-count of the corresponding forwarding-table item to be detected that storage is cumulative, it is forward table to be detected The lookup number of times of item.
203: within the detection cycle, detect the first of the first quantity not detected in forwarding-table item to be detected Detection forwarding-table item and the second detection forwarding-table item of the second quantity.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
The operation of 203 is similar to the operation of a upper embodiment step 101, and this is no longer going to repeat them.
This first quantity can be identical with this second quantity, it is also possible to different, this second quantity can be zero, Can also be not zero, to ensure that fault detect balances.
Detect fault forwarding-table item, fault cues information can be exported, it is also possible to take fault recovery to arrange Execute recovery fault forwarding-table item, can be discussed in detail in embodiment below.
Additionally, during forwarding-table item detects, it is also possible to statistics fault forwarding-table item quantity.With basis The varying number of fault forwarding-table item, takes different faults measure.
Such as, the output fault cues information when fault forwarding-table item quantity is more than or equal to first threshold. Or when fault forwarding-table item quantity is more than or equal to Second Threshold, takes corresponding measure to recover fault and turn Forwarding list item etc..
In the present embodiment, when carrying out forwarding-table item fault detect, by every in Preset Time of statistics The lookup number of times being used for instructing message to forward of one forwarding-table item to be detected, is more than or equal to lookup number of times Search the to be detected of threshold value to detect as first, detecting for second of non-first detection, thus in each inspection In the survey cycle, the first detection of the first quantity that detection is not detected and the second detection of the second quantity, So that the first detection being susceptible to fault is preferential detected, shorten detection out of order time Between, fault detection efficiency can be improved.
Another embodiment of a kind of forwarding-table item fault detection method that Fig. 3 provides for the embodiment of the present invention, The method may include that
301: determine that the forwarding-table item connected for setting up communication protocol in forwarding-table item to be detected is the first inspection Surveying forwarding-table item, the forwarding-table item of non-described first detection forwarding-table item is the second detection forwarding-table item.
Inventor finds under study for action, based in the communication connection that different communication protocol is set up, communicates to connect The forwarding-table item that iso-ip Internetworking protocol ISO-IP (Internet Protocol, the IP) address of use is corresponding is also easily to go out The forwarding-table item of existing fault, therefore in the present embodiment, sets up, by being used for, to be detected turn that communication protocol connects The first detection forwarding-table item that forwarding list item is easily sent out as fault.
This different communication protocol can include Border Gateway Protocol (border gateway protocol, BGP) Or tag distribution protocol (label distribution protocol, LDP) etc., the communication protocol set up Connect and include that transmission control protocol (Transmission Control Protocol, TCP) connects.Due to TCP Connect and need known source IP address, purpose IP address, tcp source port number and destination slogan.With BGP As a example by agreement, may determine that when disposing TCP connects the IP address used, therefore can be by this IP Route table items corresponding to address is as the project of preferential detection.
302: within the detection cycle, detect the first of the first quantity not detected in forwarding-table item to be detected Detection forwarding-table item and the second detection forwarding-table item of the second quantity.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
The operation of step 302 is similar to the operation of a upper embodiment step 101, and this is no longer going to repeat them.
This first quantity can be identical with this second quantity, it is also possible to different, this second quantity can be zero, Can also be not zero, to ensure that fault detect balances.
Detect fault forwarding-table item, fault cues information can be exported, certainly may also take on fault extensive Multiple measure recovers fault forwarding-table item, can be discussed in detail in embodiment below.
Additionally, during forwarding-table item detects, it is also possible to statistics fault forwarding-table item quantity.With basis The varying number of fault forwarding-table item, takes different faults measure.
Such as, the output fault cues information when fault forwarding-table item quantity is more than or equal to first threshold. Or when fault forwarding-table item quantity is more than or equal to Second Threshold, takes corresponding measure to recover fault and turn Forwarding list item etc..
In the present embodiment, when carrying out forwarding-table item fault detect, by being used for setting up communication protocol even The forwarding-table item to be detected connect is as the first detection forwarding-table item, and non-first detects the to be detected of forwarding-table item Forwarding-table item is as the second detection forwarding-table item, thus within each detection cycle, detection is not detected First detection forwarding-table item of the first quantity and the second detection forwarding-table item of the second quantity, so that The the first detection forwarding-table item being susceptible to fault is preferentially detected, and shortens and detects fault forwarding-table item Time, fault detection efficiency can be improved.
In the embodiment of forwarding-table item fault detection method shown in Fig. 2 and Fig. 3, give and determine the first detection The possible implementation of forwarding-table item, certain embodiment of the present invention can also adopt and realize in other ways, example As alternatively possible implementation is: determine that the first detection detection preset in forwarding-table item to be detected turns Forwarding list item, and the second detection forwarding-table item of non-first detection forwarding-table item.
This first detection forwarding-table item preset can be the forwarding-table item to be detected selected by user, route Device can provide corresponding interface, receives the selection request of user.
Another possible implementation is: according to historical failure record information, determine that fault is easily sent out One detection forwarding-table item.
Namely in forwarding-table item process fault detection, fault forwarding-table item can be carried out record.Thus When re-starting forwarding-table item fault detect, can determine what fault was easily sent out according to history information Forwarding-table item to be detected.
A kind of forwarding-table item another embodiment of fault detection method that Fig. 4 provides for the embodiment of the present invention, The method may include that
401: determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second inspection Survey forwarding-table item.
Wherein, this second detection forwarding-table item is not include in forwarding-table item to be detected that described first detection turns The forwarding-table item of forwarding list item.
Wherein it is determined that the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out can have multiple Implementation, such as can by calculate each forwarding-table item to be detected in Preset Time be used for instruct report Literary composition forward lookup number of times, using search number of times more than or equal to search threshold value forwarding-table item to be detected as First detection forwarding-table item;
Or forwarding-table item to be detected will be used for the forwarding-table item setting up communication protocol connection as the first inspection Surveying forwarding-table item, the forwarding-table item of non-first detection forwarding-table item is the second detection forwarding-table item;
Or this first detection forwarding-table item is the first detection forwarding-table item preset in forwarding-table item to be detected Deng.
402: within the detection cycle, detect the first of the first quantity not detected in forwarding-table item to be detected Detection forwarding-table item and the second detection forwarding-table item of the second quantity.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
The operation of this step 402 is similar to the operation of step 102, repeats no more.
Wherein, forwarding-table item fault detect is for periodically carrying out.
This first quantity and the second quantity sum are equal to the forwarding-table item amount detection in each detection cycle.
403: if be detected that fault forwarding-table item quantity more than or equal to Second Threshold, to forwarding engine Re-issue the source forwarding-table item that fault forwarding-table item is corresponding.
Forwarding-table item detect during, statistics fault forwarding-table item quantity, if be detected that fault Forwarding-table item quantity is more than or equal to Second Threshold, then to forwarding engine to re-issue this fault forwarding-table item Corresponding source forwarding-table item, to update the content of fault forwarding-table item.Wherein, this Second Threshold can be 1, As long as now i.e. fault forwarding-table item being detected, fault forwarding-table item pair can be re-issued to forwarding engine The source list item answered
Different types of route forwarding table items that router generates, is stored in processor as source forwarding-table item In internal memory, if fault forwarding-table item therefore being detected, this fault forwarding-table item can be re-issued corresponding Source forwarding-table item, storage in memory, replaces fault forwarding-table item, it is ensured that store in memorizer The content of forwarding-table item consistent with the content of source forwarding-table item so that router can be with normal operation.
In the present embodiment, when carrying out forwarding-table item fault detect, it is first determined the first inspection that fault is easily sent out Survey forwarding-table item, and the second detection forwarding-table item of non-first detection forwarding-table item, thus in each inspection In the survey cycle, the of the first detection forwarding-table item of the first quantity that detection is not detected and the second quantity Two detection forwarding-table items, so that the first detection forwarding-table item being susceptible to fault is preferentially detected, Shorten the time detecting fault forwarding-table item, fault detection efficiency can be improved.Simultaneously when detecting During fault forwarding-table item, it is also possible to re-issue the source forwarding-table item that this fault forwarding-table item is corresponding, to replace Change fault forwarding-table item so that fault forwarding-table item recovers, it is ensured that router correctly runs, and reduces On the current impact performing business.
Another embodiment of a kind of forwarding-table item fault detection method that Fig. 5 provides for the embodiment of the present invention, The method may include that
501: determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second inspection Survey forwarding-table item.
Wherein, this second detection forwards phenotype to be not include in forwarding-table item to be detected that this first detection forwards The forwarding-table item of list item.
Wherein it is determined that the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out can have multiple Implementation, such as can by calculate each forwarding-table item to be detected in Preset Time be used for instruct report Literary composition forward lookup number of times, using search number of times more than or equal to search threshold value forwarding-table item to be detected as First detection forwarding-table item;
Or forwarding-table item to be detected will be used for the forwarding-table item setting up communication protocol connection as the first inspection Survey forwarding-table item;
Or this first detection forwarding-table item is the first detection forwarding-table item preset in forwarding-table item to be detected Deng.
In list item to be detected, the forwarding-table item of non-first detection forwarding-table item is the second detection forwarding-table item.
502: within the detection cycle, detect the first of the first quantity not detected in forwarding-table item to be detected Detection forwarding-table item and the second detection forwarding-table item of the second quantity.
The operation of this step 502 is similar to the operation of step 102, repeats no more.
Wherein, forwarding-table item fault detect is for periodically carrying out.
This first quantity can be identical with this second quantity, it is also possible to different, this second quantity can be zero, Can also be not zero, to ensure that fault detect balances.
This first quantity and the second quantity sum are equal to the forwarding-table item amount detection in each detection cycle.
503: if be detected that fault forwarding-table item quantity more than or equal to the 3rd threshold value, determine described in deposit Untapped default memory area in reservoir, by source forwarding-table item storage corresponding for described fault forwarding-table item At described default memory area, and update the index letter indexing described fault forwarding-table item storage area address Breath is the index information of described default storage area address.
In the present embodiment, during memorizer forwarding table memory item, being commonly stored space will not all use.Cause This can arrange extra default memory area in memory, will mark off headspace by memorizer, During memorizer original state, it is not used in forwarding table memory item.
If the quantity of the fault forwarding-table item detected is more than or equal to the 3rd threshold value, then fault can be turned The source forwarding-table item that forwarding list item is corresponding is stored in this default memory area, updates index fault simultaneously and forwards The index information that index information is described default storage area address of list item storage address.Thus carry out During Message processing, the forwarding-table item of correspondence, this forward table can be found according to the index information updated Item is the forwarding-table item that there is not fault.Thus ensure that the correct operation of router.
Wherein, the 3rd threshold value can be identical with Second Threshold, it is also possible to different.
As a example by forwarding-table item in forwarding-table item is as routing table, each forwarding-table item is all to there being IP address And mask information, and the next hop information that IP address is corresponding with mask information.IP address and mask information Storage algorithm in the router is searched in device, and next hop information is stored in as forwarding-table item content In reservoir, algorithm is searched device and is also stored the forwarding-table item that different IP addresses is corresponding with mask information simultaneously The index information of the storage address of content.When routeing, it is to exist according to the target ip address in message Algorithm is searched in device and is mated, and finds the IP address and mask information mated with this target ip address, Thus i.e. would know that the index information of the forwarding-table item of correspondence, Target IP can be found according to this index information The storage area address of the next hop information that address is corresponding, such that it is able to read next in respective memory regions Hop-information, it is achieved message forwarding etc. operate.
Therefore when fault forwarding-table item storage area address change in memorizer, by updating correspondence simultaneously Index information, enabling when route querying, find this forwarding-table item.
Certainly, when quantity fault forwarding-table item being detected is more than or equal to first threshold, it is also possible to defeated Be out of order information, to point out user's forwarding-table item to break down.
In the present embodiment, when carrying out forwarding-table item fault detect, it is first determined the first inspection that fault is easily sent out Survey forwarding-table item, and the second detection forwarding-table item of non-first detection forwarding-table item, thus in each inspection In the survey cycle, the of the first detection forwarding-table item of the first quantity that detection is not detected and the second quantity Two detection forwarding-table items, so that the first detection forwarding-table item being susceptible to fault is preferentially detected, Shorten the time detecting fault forwarding-table item, fault detection efficiency can be improved.Simultaneously when detecting During fault forwarding-table item, it is also possible to be stored in source forwarding-table item corresponding for this fault forwarding-table item to preset and deposit In storage area territory, update the index information of this fault forwarding-table item, it is also possible to make fault forwarding-table item simultaneously Recover, it is ensured that router correctly runs, reduce the current impact performing business.
Fig. 6 is another embodiment of the embodiment of the present invention a kind of forwarding-table item fault detection method, the party Method may include that
601: determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second inspection Survey forwarding-table item.
Wherein it is determined that the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out can have multiple Implementation, such as can by calculate each forwarding-table item to be detected in Preset Time be used for instruct report Literary composition forward lookup number of times, using search number of times more than or equal to search threshold value forwarding-table item to be detected as First detection forwarding-table item;
Or forwarding-table item to be detected will be used for setting up the first detection of the forwarding-table item that communication protocol connects Forwarding-table item, the forwarding-table item of non-first detection forwarding-table item is as the second detection forwarding-table item;
Or this first detection forwarding-table item is the first detection forwarding-table item preset in forwarding-table item to be detected Deng.
In list item to be detected, the forwarding-table item of non-first detection forwarding-table item is the second detection forwarding-table item
602: within the detection cycle, detect the first of the first quantity not detected in forwarding-table item to be detected Detection forwarding-table item and the second detection forwarding-table item of the second quantity.
The operation of this step 602 is similar to the operation of step 102, repeats no more.
Wherein, forwarding-table item fault detect is for periodically carrying out.
This first quantity can be identical with this second quantity, it is also possible to different, this second quantity can be zero, Can also be not zero, to ensure that fault detect balances.
This first quantity and the second quantity sum are equal to the forwarding-table item amount detection in each detection cycle.
603: if be detected that the quantity of fault forwarding-table item is more than or equal to Second Threshold, to forwarding engine Re-issue the source forwarding-table item that fault forwarding-table item is corresponding.
604: whether failure judgement forwarding-table item is updated successfully, if it does not, perform step 605, if it is, Then return step 602 and continue detection.
605: determine untapped default memory area in described memorizer, by described fault forwarding-table item pair The source forwarding-table item answered is stored in described default storage content, and updates the described fault forwarding-table item of index and deposit The index information that index information is described default storage area address of storage address.
It is with the embodiment difference of forwarding-table item fault detection method shown in Fig. 4 or Fig. 5, works as detection During to fault forwarding-table item, first to forwarding engine to re-issue the source forward table that fault forwarding-table item is corresponding , to update this fault forwarding-table item.When fault forwarding-table item recovers unsuccessfully, then this fault is forwarded The source forwarding-table item that list item is corresponding is stored in the default memory area of memorizer, updates index described simultaneously The index information of fault forwarding-table item storage address.Two kinds of fault recovery mode classifications are used to carry out fault extensive Multiple, the fault recovery of fault forwarding-table item can be effectively ensured, further ensure the correct fortune of router OK.
First source forwarding-table item corresponding for this fault forwarding-table item can certainly be stored in presetting of memorizer In memory area, when the memory space inadequate of default memory area, e.g., less than preset value, then to turning Carry out the coffin upon burial to hold up and re-issue the source forwarding-table item that fault forwarding-table item is corresponding, to update this fault forwarding-table item.
In the present embodiment, when carrying out forwarding-table item fault detect, it is first determined the first inspection that fault is easily sent out Survey forwarding-table item, and the second detection forwarding-table item of non-first detection forwarding-table item, thus in each inspection In the survey cycle, the of the first detection forwarding-table item of the first quantity that detection is not detected and the second quantity Two detection forwarding-table items, so that the first detection forwarding-table item being susceptible to fault is preferentially detected, Shorten the time detecting fault forwarding-table item, fault detection efficiency can be improved.Simultaneously when detecting During fault forwarding-table item, it is also possible to re-issue the source forwarding-table item that fault forwarding-table item is corresponding, updating should Fault forwarding-table item, if updating unsuccessfully, is then stored in source forwarding-table item corresponding for this fault forwarding-table item Preset in memory area, update the index information of this fault forwarding-table item, it is possible to fault is forwarded simultaneously List item recovers, it is ensured that router correctly runs.
For aforesaid each method embodiment, in order to be briefly described, therefore it is all expressed as a series of dynamic Combining, but those skilled in the art should know, the present invention is not by described sequence of movement Limiting, because according to the present invention, some step can use other orders or carry out simultaneously.Secondly, Those skilled in the art also should know, embodiment described in this description belongs to preferred embodiment, Necessary to involved action and the unit not necessarily present invention.
The knot of a kind of one embodiment of forwarding-table item failure detector that Fig. 7 provides for the embodiment of the present invention Structure schematic diagram, this device may include that
List item determines unit 701, for determining that the first detection that in forwarding-table item to be detected, fault is easily sent out forwards List item and the second detection forwarding-table item.Wherein, this second detection forwarding-table item is described forwarding to be detected List item does not include the forwarding-table item of described first detection forwarding-table item.
Forwarding-table item failure detector described in the present embodiment is applied to router, and concrete is desirably integrated into In the processor of router.
Wherein it is determined that the first detection forwarding-table item that fault is easily sent out can use multiple implementation, as A kind of possible implementation, as shown in Figure 8, this forwarding-table item determines that unit 801 may include that
Computing unit 801, in calculate Preset Time each forwarding-table item to be detected be used for instruct message The lookup number of times forwarded.
Wherein, this computing unit specifically in each measurement period, each in calculating Preset Time is treated The lookup number of times being used for instructing message to forward of detection forwarding-table item.
List item determines subelement 802, for searching number of times more than or equal to the forwarding to be detected searching threshold value List item is as the first detection forwarding-table item, and the forwarding-table item to be detected of non-first detection forwarding-table item is second Detection forwarding-table item.
Inventor finds under study for action, and a kind of possible situation of the forwarding-table item that fault is easily sent out is carrying business number According to the forwarding-table item that flow is bigger, can be by calculating the forwarding-table item each to be detected in Preset Time Search efficiency, the big forwarding-table item traffic streams journey of search efficiency is relatively big, easily sends out as fault First detection forwarding-table item.
In order to ensure the accuracy of the first detection forwarding-table item, computing unit calculates lookup number of times can the cycle Property is carried out.
As alternatively possible implementation, this list item determines that unit 701 can be treated specifically for determining The forwarding-table item connected for setting up communication protocol in detection forwarding-table item is the first detection forwarding-table item, non- The forwarding-table item of the first detection forwarding-table item is the second detection forwarding-table item.
Inventor finds under study for action, based in the communication connection that different communication protocol is set up, communicates to connect The forwarding-table item that the IP address of use is corresponding is also the forwarding-table item easily broken down, therefore the present embodiment In, set up, using forwarding-table item to be detected is used for, the first detection easily sent out as fault that communication protocol connects Forwarding-table item.
As the implementation that another is possible, this list item determines that unit 701 can be treated specifically for determining The the first detection forwarding-table item preset in detection forwarding-table item, and the second of non-first detection forwarding-table item Detection forwarding-table item.
This first detection forwarding-table item preset can be the forwarding-table item to be detected selected by user, route Device can provide corresponding interface, receives the selection request of user.
Certainly the selection of this first detection forwarding-table item can also be adopted and be realized in other ways, such as can root According to historical failure record information, determine the first detection forwarding-table item that fault is easily sent out.
List item detector unit 702, within the detection cycle, detects in forwarding-table item to be detected and is not detected The first quantity first detection forwarding-table item and the second quantity second detection forwarding-table item.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
This first quantity and the second quantity sum can be equal to the forwarding-table item detection numbers in each detection cycle Amount.
Wherein, this forwarding-table item failure detector can also export when fault forwarding-table item being detected Fault cues information, or take corresponding measure to recover fault forwarding-table item etc..
Additionally, this forwarding-table item failure detector can also add up fault forwarding-table item quantity etc..
In the present embodiment, when carrying out forwarding-table item fault detect by this forwarding-table item failure detector, First determine that the first detection forwarding-table item and non-first that fault is easily sent out detects the second detection of forwarding-table item Forwarding-table item, within each detection cycle, the first detection forward table of the first quantity that detection is not detected Item and the second detection forwarding-table item of the second quantity, so that be susceptible to the first inspection of fault Survey forwarding-table item to be preferentially detected, such that it is able to shorten the time detecting fault forwarding-table item, Ke Yiti High fault detection efficiency.
A kind of forwarding-table item another embodiment of failure detector that Fig. 9 provides for the embodiment of the present invention Structural representation, this device may include that
List item determines unit 901, for determining that the first detection that in forwarding-table item to be detected, fault is easily sent out forwards List item, and the second detection forwarding-table item.
This second detection forwarding-table item is not include this first detection forwarding-table item in forwarding-table item to be detected Forwarding-table item.
Wherein, as a kind of possible implementation, this list item determines that unit 901 may include that
Computing unit, in calculate Preset Time each forwarding-table item to be detected be used for instruct message to turn The lookup number of times sent out.
List item determines subelement, for searching number of times more than or equal to the forward table to be detected searching threshold value Item is as the first detection forwarding-table item, and the forwarding-table item to be detected of non-first detection forwarding-table item is the second inspection Survey forwarding-table item.
As alternatively possible implementation, this list item determines that unit 901 can be treated specifically for determining The conduct first connecting forwarding-table item for setting up communication protocol in detection forwarding-table item detects forwarding-table item, The forwarding-table item of non-first detection forwarding-table item is as the second detection forwarding-table item.
As the implementation that another is possible, this list item determines that unit 901 can be treated specifically for determining The the first detection forwarding-table item preset in detection forwarding-table item, and the second of non-first detection forwarding-table item Detection forwarding-table item.
List item detector unit 902, within the detection cycle, detects in forwarding-table item to be detected and is not detected The first quantity first detection forwarding-table item and the second quantity second detection forwarding-table item.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
This first quantity can be identical with this second quantity, it is also possible to different, this second quantity can be zero, Can also be not zero, to ensure that fault detect balances.
This first quantity and the second quantity sum can be equal to the forwarding-table item detection numbers in each detection cycle Amount.
When carrying out forwarding-table item fault detect, the fault forwarding-table item quantity can haveing with statistic mixed-state.With Fault forwarding-table item according to varying number, takes corresponding failure measure.
Fault cues unit 903, is more than or equal to the first threshold for the fault forwarding-table item quantity detected Value, exports fault cues information.
In forwarding-table item process fault detection, if detecting, fault forwarding-table item quantity is more than or equal to the During one threshold value, fault cues information can be exported, to point out user's forwarding-table item fault to occur.
In the present embodiment, when carrying out forwarding-table item fault detect by this forwarding-table item failure detector, First determine that the first detection forwarding-table item and non-first that fault is easily sent out detects the second detection of forwarding-table item Forwarding-table item, within each detection cycle, the first detection forward table of the first quantity that detection is not detected Item and the second detection forwarding-table item of the second quantity, so that be susceptible to the first inspection of fault Survey forwarding-table item to be preferentially detected, such that it is able to shorten the time detecting fault forwarding-table item, Ke Yiti High fault detection efficiency.Barrier forwarding-table item or the fault forward table detected can also detected simultaneously Item quantity, more than or equal to first threshold, exports fault cues information, with notice user malfunction generation in time.
A kind of forwarding-table item another embodiment of failure detector that Figure 10 provides for the embodiment of the present invention Structural representation, this device may include that
Forwarding-table item determines unit 1001, for determining the first inspection that in forwarding-table item to be detected, fault is easily sent out Survey forwarding-table item, and the second detection forwarding-table item of non-first detection forwarding-table item.
Wherein, as a kind of possible implementation, this list item determines that unit 1001 may include that
Computing unit, in calculate Preset Time each forwarding-table item to be detected be used for instruct message to turn The lookup number of times sent out.
Wherein, this computing unit specifically in each measurement period, each in calculating Preset Time is treated The lookup number of times being used for instructing message to forward of detection forwarding-table item.
Forwarding-table item determines subelement, for searching number of times more than or equal to search threshold value to be detected turn Forwarding list item is as the first detection forwarding-table item, and the forwarding-table item to be detected of non-first detection forwarding-table item is the Two detection forwarding-table items.
As alternatively possible implementation, this list item determines that unit 1001 can be treated specifically for determining For setting up the first detection forwarding-table item that communication protocol connects in detection forwarding-table item, and non-first inspection Survey the second detection forwarding-table item in forwarding-table item.
As the implementation that another is possible, this list item determines that unit 1001 can be treated specifically for determining The the first detection forwarding-table item preset in detection forwarding-table item, and the second of non-first detection forwarding-table item Detection forwarding-table item.
List item detector unit 1002, within the detection cycle, detects in forwarding-table item to be detected the most tested First detection forwarding-table item of the first quantity surveyed and the second detection forwarding-table item of the second quantity.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
Fisrt fault recovery unit 1003, for being more than or equal to when the fault forwarding-table item quantity detected Second Threshold, re-issues, to forwarding engine, the source forwarding-table item that fault forwarding-table item is corresponding.
In forwarding-table item process fault detection, if fault forwarding-table item being detected, or this statistic unit When the fault forwarding-table item quantity of statistics is more than or equal to first threshold, fault forwarding-table item can be updated, Specifically can re-issue the source forwarding-table item that this fault forwarding-table item is corresponding, that replaces that this breaks down turns Forwarding list item.
Certainly this device can also include:
Fault cues unit, the quantity of the fault forwarding-table item for detecting is more than or equal to first threshold, Output fault cues information.
In the present embodiment, when carrying out forwarding-table item fault detect by this forwarding-table item failure detector, First the first detection forwarding-table item that fault is easily sent out, and the second inspection of non-first detection forwarding-table item are determined Survey forwarding-table item, thus within each detection cycle, the first detection of the first quantity that detection is not detected Forwarding-table item and the second detection forwarding-table item of the second quantity, so that be susceptible to the first of fault Detection forwarding-table item is preferentially detected, and shortens the time detecting fault forwarding-table item, can improve event Barrier detection efficiency.Simultaneously when fault forwarding-table item being detected, it is also possible to re-issue this fault forward table The source forwarding-table item that item is corresponding, to replace fault forwarding-table item so that fault forwarding-table item recovers, it is ensured that Router correctly runs.
A kind of forwarding-table item another embodiment of failure detector that Figure 11 provides for the embodiment of the present invention Structural representation, this device may include that
List item determines unit 1101, for determining that the first detection that in forwarding-table item to be detected, fault is easily sent out turns Forwarding list item, and the second detection forwarding-table item of non-first detection forwarding-table item.
Wherein, as a kind of possible implementation, this list item determines that unit 1101 may include that
Computing unit, in calculate Preset Time each forwarding-table item to be detected be used for instruct message to turn The lookup number of times sent out.
Wherein, this computing unit specifically in each measurement period, each in calculating Preset Time is treated The lookup number of times being used for instructing message to forward of detection forwarding-table item.
List item determines subelement, for searching number of times more than or equal to the forward table to be detected searching threshold value Item is as the first detection forwarding-table item, and the forwarding-table item to be detected of non-first detection forwarding-table item is the second inspection Survey forwarding-table item.
As alternatively possible implementation, this forwarding-table item determines that unit 1101 can be specifically for really Fixed forwarding-table item to be detected is used for set up communication protocol and connects forwarding-table item as the first detection forward table , the forwarding-table item of non-first detection forwarding-table item is the second detection forwarding-table item.
As the implementation that another is possible, this forwarding-table item determines that unit 1101 can be specifically for really The the first detection forwarding-table item preset in fixed forwarding-table item to be detected, and non-first detection forwarding-table item Second detection forwarding-table item.
List item detector unit 1102, within each detection cycle, detects in forwarding-table item to be detected not First detection forwarding-table item of the first detected quantity and the second detection forwarding-table item of the second quantity.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
Second fault recovery unit 1103, for being more than or equal to when the fault forwarding-table item quantity detected 3rd threshold value, determines untapped default memory area in described memorizer, by described fault forwarding-table item Corresponding source forwarding-table item is stored in described default memory area, and updates the described fault forwarding-table item of index The index information of storage area address is the index information of described default storage area address.
Memorizer arranges extra default memory area, during original state, is not used in storage routing forwarding List item.Such that it is able to source forwarding-table item corresponding for fault forwarding-table item is stored in this default memory area, The index information simultaneously updating index fault forwarding-table item storage address is described default storage area address Index information.Thus during carrying out Message processing, the index information according to updating can find correspondence Forwarding-table item, this forwarding-table item is the forwarding-table item that there is not fault, thus ensure that router Correct operation.
Certainly this device can also include:
Fault cues unit, the quantity of the fault forwarding-table item for detecting is more than or equal to first threshold, Output fault cues information.
In the present embodiment, when carrying out forwarding-table item fault detect by this forwarding-table item failure detector, First the first detection forwarding-table item that fault is easily sent out, and the second inspection of non-first detection forwarding-table item are determined Survey forwarding-table item, thus within each detection cycle, the first detection of the first quantity that detection is not detected Forwarding-table item and the second detection forwarding-table item of the second quantity, so that be susceptible to the first of fault Detection forwarding-table item is preferentially detected, and shortens the time detecting fault forwarding-table item, can improve event Barrier detection efficiency.Simultaneously when fault forwarding-table item being detected, it is also possible to this fault forwarding-table item is corresponding Source forwarding-table item be stored in default memory area, update the index information of this fault forwarding-table item simultaneously, Enable to fault forwarding-table item recover, it is ensured that router correctly runs.
A kind of forwarding-table item another embodiment of failure detector that Figure 12 provides for the embodiment of the present invention Structural representation, this device may include that
List item determines unit 1201, for determining that the first detection that in forwarding-table item to be detected, fault is easily sent out turns Forwarding list item, and the second detection forwarding-table item of non-first detection forwarding-table item.
Wherein, as a kind of possible implementation, this list item determines that unit 1201 may include that
Computing unit, in calculate Preset Time each forwarding-table item to be detected be used for instruct message to turn The lookup number of times sent out.
List item determines subelement, for searching number of times more than or equal to the forward table to be detected searching threshold value Item is as the first detection forwarding-table item, and the forwarding-table item to be detected of non-first detection forwarding-table item is the second inspection Survey forwarding-table item.
As alternatively possible implementation, this list item determines that unit 1201 can be treated specifically for determining Detection forwarding-table item is used for set up communication protocol connection forwarding-table item and detects forwarding-table item as first, non- Forwarding-table item in first detection forwarding-table item is the second detection forwarding-table item.
As the implementation that another is possible, this list item determines that unit 1201 can be treated specifically for determining The the first detection forwarding-table item preset in detection forwarding-table item, and the second of non-first detection forwarding-table item Detection forwarding-table item.
List item detector unit 1202, within each detection cycle, detects in forwarding-table item to be detected not First detection forwarding-table item of the first detected quantity and the second detection forwarding-table item of the second quantity.
Described first quantity is the positive integer more than or equal to 1, and described second quantity is more than or equal to 0 Positive integer.
Fisrt fault recovery unit 1203, for being more than or equal to when the fault forwarding-table item quantity detected Second Threshold, to forwarding engine to re-issue the source forwarding-table item that fault forwarding-table item is corresponding, updates described Fault forwarding-table item;
Fault recovery judging unit 1204, is used for judging that described Fisrt fault recovery unit updates described fault Forwarding-table item is the most successful, if it does not, trigger the second fault recovery unit 1205;
Second fault recovery unit 1205, for being more than or equal to when the fault forwarding-table item quantity detected 3rd threshold value, determines untapped default memory area in memorizer, and described fault forwarding-table item is corresponding Source forwarding-table item be stored in described default memory area, and update index described fault forwarding-table item storage The index information of regional address is the index information of described default storage area address.
In the present embodiment, use two kinds of fault recovery mode classifications to carry out fault recovery, can be effectively ensured The recovery of fault forwarding-table item, further ensures the correct operation of router.
First source forwarding-table item corresponding for this fault forwarding-table item can certainly be stored in presetting of memorizer In memory area, when the memory space inadequate of default memory area, e.g., less than preset value, then to turning Carry out the coffin upon burial to hold up and re-issue the source forwarding-table item that fault forwarding-table item is corresponding, to update this fault forwarding-table item.
Wherein, this device can also include:
Fault cues unit, for the quantity when the fault forwarding-table item detected more than or equal to the first threshold Value, exports fault cues information.
In the present embodiment, this forwarding-table item failure detector when carrying out forwarding-table item fault detect, First the first detection forwarding-table item that fault is easily sent out, and the second inspection of non-first detection forwarding-table item are determined Survey forwarding-table item, thus within each detection cycle, the first detection of the first quantity that detection is not detected Forwarding-table item and the second detection forwarding-table item of the second quantity, so that be susceptible to the first of fault Detection forwarding-table item is preferentially detected, and shortens the time detecting fault forwarding-table item, can improve event Barrier detection efficiency.Simultaneously when fault forwarding-table item being detected, it is also possible to re-issue fault forwarding-table item Corresponding source forwarding-table item, updates this fault forwarding-table item, if updating unsuccessfully, then by this fault forward table The source forwarding-table item that item is corresponding is stored in default memory area, updates the rope of this fault forwarding-table item simultaneously Fuse ceases, it is possible to fault forwarding-table item is recovered, it is ensured that router correctly runs.
Forwarding-table item failure detector described in the invention described above embodiment the most specifically should In router, can be effective by disposing the router of the present embodiment forwarding-table item failure detector Improve forwarding-table item fault detection efficiency.
By above description, those skilled in the art is it can be understood that can be by the present invention Software adds the mode of required general hardware platform and realizes.Seeing Figure 13, the embodiment of the present invention also provides for A kind of router.This router 1300 at least includes processor 1301 and with processor 1301 by total The memorizer 1302 that line connects.
This memorizer 1302 stores batch processing instruction, and this memorizer can be high-speed RAM memorizer, It is also likely to be nonvolatile memory (non-volatile memory), for example, at least one disk memory Deng.
This processor 1301, for calling the programmed instruction of this memorizer 1302 storage, performs to operate as follows:
Determine that the first detection forwarding-table item and the second detection that in forwarding-table item to be detected, fault is easily sent out forward List item, wherein, described second detection forwarding-table item is not include described the in described forwarding-table item to be detected The forwarding-table item of one detection forwarding-table item;
Within the detection cycle, detect the described of the first quantity not detected in described forwarding-table item to be detected First detection forwarding-table item and the described second detection forwarding-table item of the second quantity.
Alternatively, this router 1300 may be used for performing shown in Fig. 1-Fig. 7 that the embodiment of the present invention provides The method of arbitrary forwarding-table item fault detect.
This processor is probably a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or be configured to implement the embodiment of the present invention One or more integrated circuits.
Certainly this router can also include algorithm search device, forward engine and other such as master control borad Deng parts, same as the prior art, do not repeat them here.
In this specification, each embodiment uses the mode gone forward one by one to describe, and each embodiment stresses Being the difference with other embodiments, between each embodiment, identical similar portion sees mutually. For device disclosed in embodiment, owing to it corresponds to the method disclosed in Example, so describing Fairly simple, relevant part sees method part and illustrates.
Finally, in addition it is also necessary to explanation, in this article, the relational terms of such as first and second or the like It is used merely to separate an entity or operation with another entity or operating space, and not necessarily requires Or imply relation or the order that there is any this reality between these entities or operation.And, art Language " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, thus Make to include that the process of a series of key element, method, article or equipment not only include those key elements, and Also include other key elements being not expressly set out, or also include for this process, method, article or The key element that person's equipment is intrinsic.In the case of there is no more restriction, by statement " including ... " The key element limited, it is not excluded that also deposit in including the process of described key element, method, article or equipment In other identical element.
For convenience of description, it is divided into various unit to be respectively described with function when describing apparatus above.Certainly, The function of each unit can be realized in same or multiple softwares and/or hardware when implementing the present invention.
As seen through the above description of the embodiments, those skilled in the art is it can be understood that arrive The present invention can add the mode of required general hardware platform by software and realize.Based on such understanding, The part that prior art is contributed by technical scheme the most in other words can be with software product Form embody, this computer software product can be stored in storage medium, as ROM/RAM, Magnetic disc, CD etc., including some instructions with so that computer equipment (can be personal computer, Server, or the network equipment etc.) perform each embodiment of the present invention or some part institute of embodiment The method stated.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses The present invention.Multiple amendment to these embodiments will be aobvious and easy for those skilled in the art See, generic principles defined herein can without departing from the spirit or scope of the present invention, Realize in other embodiments.Therefore, the present invention is not intended to be limited to the embodiments shown herein, And it is to fit to the widest scope consistent with principles disclosed herein and features of novelty.

Claims (12)

1. a forwarding-table item fault detection method, it is characterised in that including:
Determine the first detection forwarding-table item that in forwarding-table item to be detected, fault is easily sent out, and the second detection turns Forwarding list item, described second detection forwarding-table item is not include described first inspection in described forwarding-table item to be detected Survey the forwarding-table item of forwarding-table item;
Within the detection cycle, detect the described of the first quantity not detected in described forwarding-table item to be detected First detection forwarding-table item and the described second detection forwarding-table item of the second quantity, described first quantity is Positive integer more than or equal to 1, described second quantity is the positive integer more than or equal to 0.
Method the most according to claim 1, it is characterised in that described determine forwarding-table item to be detected The first detection forwarding-table item and the second detection forwarding-table item that middle fault is easily sent out include:
The lookup number of times being used for instructing message to forward of each forwarding-table item to be detected in calculating Preset Time;
Using described lookup number of times more than or equal to searching the forwarding-table item to be detected of threshold value as described first inspection Surveying forwarding-table item, the forwarding-table item to be detected of non-described first detection forwarding-table item is that described second detection turns Forwarding list item.
Method the most according to claim 1, it is characterised in that described determine forwarding-table item to be detected The first detection forwarding-table item and the second detection forwarding-table item that middle fault is easily sent out include:
Determine in described forwarding-table item to be detected for setting up the forwarding-table item of communication protocol connection as described First detection forwarding-table item, the forwarding-table item of non-described first detection forwarding-table item is as described second detection Forwarding-table item.
4. according to the method described in any one of claims 1 to 3, it is characterised in that also include:
If be detected that fault forwarding-table item quantity more than or equal to first threshold, output fault cues letter Breath.
5. according to the method described in any one of claims 1 to 3, it is characterised in that also include:
If be detected that fault forwarding-table item quantity more than or equal to Second Threshold, to forwarding engine again Issue the source forwarding-table item that described fault forwarding-table item is corresponding.
6. according to the method described in any one of claims 1 to 3, it is characterised in that also include:
If be detected that the quantity of fault forwarding-table item more than or equal to the 3rd threshold value, determine in memorizer Untapped default memory area, is stored in described by source forwarding-table item corresponding for described fault forwarding-table item Preset memory area, and update that to index the index information of described fault forwarding-table item storage area address be institute State the index information of default storage area address.
7. a forwarding-table item failure detector, it is characterised in that including:
List item determines unit, for determining the first detection forward table that in forwarding-table item to be detected, fault is easily sent out , and the second detection forwarding-table item, described second detection forwarding-table item is described forwarding-table item to be detected In do not include described first detection forwarding-table item forwarding-table item;
List item detector unit, within the detection cycle, detects in forwarding-table item to be detected detected The described first detection forwarding-table item of the first quantity and the described second detection forwarding-table item of the second quantity, Described first quantity is the positive integer more than or equal to 1, and described second quantity more than or equal to 0 is just Integer.
Device the most according to claim 7, it is characterised in that described list item determines that unit includes:
Computing unit, in calculate Preset Time each forwarding-table item to be detected be used for instruct message to turn The lookup number of times sent out;
List item determines subelement, for described lookup number of times is more than or equal to search threshold value to be detected turn Forwarding list item is as described first detection forwarding-table item, the forwarding-table item conduct to be detected of non-described first detection Described second detection forwarding-table item.
Device the most according to claim 7, it is characterised in that described list item determines that unit is specifically used In determining that the forwarding-table item connected for setting up communication protocol in forwarding-table item to be detected is examined as described first Surveying forwarding-table item, the forwarding-table item of non-described first detection forwarding-table item is as described second detection forward table ?.
10. according to the device described in any one of claim 7~9, it is characterised in that also include:
Fault cues unit, for being more than or equal to first threshold when the fault forwarding-table item quantity detected, Output fault cues information.
11. according to the device described in any one of claim 7~9, it is characterised in that also include:
Fisrt fault recovery unit, for when the fault forwarding-table item quantity detected is more than or equal to second Threshold value, re-issues, to forwarding engine, the source forwarding-table item that described fault forwarding-table item is corresponding.
12. according to the device described in any one of claim 7~9, it is characterised in that also include:
Second fault recovery unit, for when the fault forwarding-table item quantity detected is more than or equal to the 3rd Threshold value, determines untapped default memory area in memorizer, by source corresponding for described fault forwarding-table item Forwarding-table item is stored in described default memory area, and updates the described fault forwarding-table item memory area of index The index information of address is the index information of described default storage area address.
CN201310381979.7A 2013-08-28 2013-08-28 Forwarding-table item fault detection method and device Active CN103475507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310381979.7A CN103475507B (en) 2013-08-28 2013-08-28 Forwarding-table item fault detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310381979.7A CN103475507B (en) 2013-08-28 2013-08-28 Forwarding-table item fault detection method and device

Publications (2)

Publication Number Publication Date
CN103475507A CN103475507A (en) 2013-12-25
CN103475507B true CN103475507B (en) 2016-10-05

Family

ID=49800218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310381979.7A Active CN103475507B (en) 2013-08-28 2013-08-28 Forwarding-table item fault detection method and device

Country Status (1)

Country Link
CN (1) CN103475507B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713132B (en) * 2016-11-23 2020-02-14 华为技术有限公司 Method and apparatus for updating forwarding table entry
CN110661635B (en) 2018-06-29 2022-02-25 华为技术有限公司 Method, device and system for acquiring device forwarding information base in network
CN111385120B (en) * 2018-12-29 2021-10-26 华为技术有限公司 Method and equipment for determining forwarding fault position
CN110145692B (en) * 2019-05-23 2021-03-26 昆山华新建设工程有限公司 Sewage pipeline CCTV detection system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN101984587A (en) * 2010-11-12 2011-03-09 中兴通讯股份有限公司 Method, system and device for detecting connectivity of two points of multicast forwarding tree

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4714081B2 (en) * 2006-06-01 2011-06-29 アラクサラネットワークス株式会社 Network connection device
JP2009303092A (en) * 2008-06-17 2009-12-24 Nec Corp Network equipment and line switching method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN101984587A (en) * 2010-11-12 2011-03-09 中兴通讯股份有限公司 Method, system and device for detecting connectivity of two points of multicast forwarding tree

Also Published As

Publication number Publication date
CN103475507A (en) 2013-12-25

Similar Documents

Publication Publication Date Title
CN105721297B (en) Detection method and system based on route loop in SDN network
CN105745870B (en) Extend operation from for detecting the serial multistage filter flowed greatly removal nose filter to remove stream to realize
CN103475507B (en) Forwarding-table item fault detection method and device
Sherwood et al. Discarte: a disjunctive internet cartographer
CN104184664B (en) Route forwarding table items generation method and device
CN108282497A (en) For the ddos attack detection method of SDN control planes
US8856584B2 (en) Transport control server that modifies routing information
CN107690778A (en) Use the performance of mirror image detection grouping mea-sure network
CN108809759A (en) Detect the method, apparatus and router of link state
WO2012134537A1 (en) Network topology discovery
CN102447639B (en) A kind of policy routing method and device
CN109155760A (en) Path is grouped using fixed header size to record
Flach et al. Quantifying violations of destination-based forwarding on the Internet
CN109361596A (en) Route computing method, device and electronic equipment
US20150372918A1 (en) System and method for providing congestion notification in layer 3 networks
CN106549819A (en) A kind of connective detection method, controller and equipment
CN104270384A (en) Fire wall policy redundancy detection method and device
CN108449273A (en) A kind of network accelerating method and system
CN102916893B (en) Device and method for setting internet protocol (IP) multicast retransmission port in three-layer switchboard
CN104205745B (en) Method and device for processing message
CN107547311A (en) A kind of flow statistical method and device
CN106100997A (en) A kind of network traffic information processing method and processing device
CN106302737A (en) The cleaning method of bench mark data in a kind of IP location technology
US9584387B1 (en) Systems and methods of sending a packet in a packet-switched network through a pre-determined path to monitor network health
CN109698814A (en) Botnet finds that method and Botnet find device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201027

Address after: No.8, Xiaoping Avenue, Badu Economic Development Zone, Zhenze Town, Wujiang District, Suzhou City, Jiangsu Province

Patentee after: TONGDING INTERCONNECTION INFORMATION Co.,Ltd.

Address before: 625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District

Patentee before: SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd.

Effective date of registration: 20201027

Address after: 625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District

Patentee after: SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.