CN101771583A - Method and device for detecting elimination or no elimination of network failure - Google Patents
Method and device for detecting elimination or no elimination of network failure Download PDFInfo
- Publication number
- CN101771583A CN101771583A CN200910244544A CN200910244544A CN101771583A CN 101771583 A CN101771583 A CN 101771583A CN 200910244544 A CN200910244544 A CN 200910244544A CN 200910244544 A CN200910244544 A CN 200910244544A CN 101771583 A CN101771583 A CN 101771583A
- Authority
- CN
- China
- Prior art keywords
- timer
- value
- mep
- packet sending
- sending period
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method and a device for detecting elimination or no elimination of network failure. When local MEP detects that CCM messages have faults, the duration N of a software timer is set according to the contract issuing period T1 of the CCM messages and the contract issuing period T2 of the local MEP; in the duration of the timer, the local MEP judges whether the current value of the timer is zero or not once passing one contract issuing period; if the value of the timer is not zero, the value of the timer subtracts one; when the value of the timer becomes zero from N, the network fault is eliminated. The method and the device of the invention realize the timer of the millisecond grade by a software timer which does not use CPU, thus greatly saving hardware timer resource in the network, simplifying the distribution and maintenance difficulty of the timer resource, and owning better application value and superiority.
Description
Technical Field
The present invention relates to data communication Fault detection technology, and more particularly, to a method and apparatus for detecting whether a network Fault is eliminated in a Connectivity Fault Management (CFM) protocol.
Background
According to the actual needs of operator network operation, the management work of the network is generally divided into three main categories: respectively, Operation, management, Maintenance, OAM, which mainly performs the work of analyzing, predicting, planning, etc. on the daily network and its service, and the daily Operation activities of testing and fault management, etc. on the network and its service. With the popularization of carrier-class ethernet technology, carrier-class OAM technology becomes more and more important, and various OAM protocols are proposed in the industry, wherein CFM protocol is a protocol with a wider application range.
In the prior art, a maintenance association node (MEP) is configured in a network according to a CFM protocol, the MEP periodically sends a Connectivity Check Message (CCM), and receives a CCM Message to detect network faults such as cross-connection, a faulty CCM, and a remote loss. Each local MEP needs to be configured with at least two timers respectively used for detecting cross-connection and wrong CCM faults; after a local MEP receives a CCM message sent by a remote MEP, if the CCM message is detected to be wrong, the type of the network fault is determined according to the wrong type of the CCM message, the local MEP starts a timer corresponding to the fault, and the timing time of the timer is set to be N (3.5) interval according to a CFM (computational fluid model) protocol, wherein the interval is the period of the CCM message received by the local MEP, and in the N time, if the fault is not eliminated, the timing time of the timer is reset to be N every time the local MEP receives a wrong CCM message; if the local MEP does not receive the wrong CCM message within the N time, the fault is eliminated; similarly, each configured remote MEP needs to be allocated with a timer for detecting whether the remote loss fault is eliminated.
Currently, a software timer implemented by a CPU, or a hardware timer may be employed; when the software timer realized by the CPU is adopted, because the detection period of the network fault is mostly in milliseconds (ms), for example, 3.3ms and 10ms, under the CFM protocol, the timer used therein also needs to be in ms, and the software timer realized by the CPU has a longer period and cannot meet the requirement of ms; when a hardware timer is used, the number of MEPs that can be supported in the network is limited due to the limited resources of the hardware timer.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and an apparatus for detecting whether a network failure is eliminated, which can satisfy the requirement of millisecond timing and solve the problem of limited hardware timer resources.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for detecting whether a network fault is eliminated, which comprises the following steps:
when a local maintenance association node (MEP) detects that a Connectivity Check Message (CCM) is wrong, setting the duration N of a software timer according to a packet sending period T1 of the CCM message and a packet sending period T2 of the local MEP;
within the time length of the timer, the local MEP judges whether the current value of the timer is zero or not every time a packet sending period passes, and the value of the timer is reduced by 1 until the value of the timer is reduced from N to zero when the value is non-zero.
In the above scheme, the method further comprises: and in the time length of the timer, periodically detecting that the CCM message is wrong by the local MEP, and resetting the time length of the timer.
In the foregoing solution, after subtracting 1 from the value of the timer, the method further includes: judging whether the current value of the timer is zero, if so, generating an interrupt alarm, and continuing to judge after the next packet sending period; if not, the judgment is continued after the next packet sending period.
In the above scheme, the duration N of the timer is a multiple of the local MEP packet sending period, and N is a positive integer.
In the above scheme, the duration N of the timer is 3.5 × T1/T2.
The invention also provides a device for detecting whether the network fault is eliminated, which comprises: the system comprises a message receiving detection module, a software timer and a message sending query module; wherein,
a message receiving and detecting module: the local MEP is used for receiving the CCM message sent by the remote MEP and detecting the received CCM message;
the software timer is used for setting a timing duration N according to the packet sending period T1 of the received CCM message and the packet sending period T2 of the local MEP, and counting the value of the timer;
and the message sending and inquiring module is used for periodically sending the CCM message to the remote MEP by the local MEP, judging whether the current value of the timer is zero or not every time the local MEP passes a packet sending period, and subtracting 1 from the value of the timer when the value of the timer is not zero.
In the foregoing solution, the software timer includes: the timer parameter setting module and the timer counting module are connected with the timer parameter setting module; wherein,
the timer parameter setting module is used for setting the duration N of the timer according to the packet sending period T1 of the received CCM message and the packet sending period T2 of the local MEP, and writing the set duration N into a software timer corresponding to the local MEP;
and the timer counting module is used for subtracting 1 from the timer for counting every time the local MEP passes a packet sending period in the time length of the timer, and stopping counting when the value of the timer is zero.
In the above solution, the timer counting module is further configured to provide the current timer value to the message sending and querying module after each packet sending period of the local MEP.
In the above scheme, the duration N of the timer is a multiple of the local MEP packet sending period, and N is a positive integer.
In the above scheme, the duration N of the timer is 3.5 × T1/T2.
According to the method and the device for detecting whether the network fault is eliminated, when the local MEP detects that the CCM message is faulty, a software timer with the duration of N being 3.5T 1/T2 is started according to the packet sending period T1 of the CCM message and the packet sending period T2 of the local MEP; within the time length of the timer, judging whether the current value of the timer is zero or not every time the local MEP passes a packet sending period, and if the value of the timer is not zero, subtracting 1 from the value of the timer; when the value of the timer is reduced from N to zero, the network fault is eliminated; after the software timer is started, in the time length of the timer, when the local MEP detects that the CCM message is wrong, the time length of the timer is reset.
By adopting the method and the device, the millisecond-level timer is realized by a software timer without using a CPU (Central processing Unit), so that the hardware timer resource in a network is greatly saved, and the distribution and maintenance difficulty of the timer resource is simplified; when the type of the network fault needs to be refined, the method can also realize a plurality of software timers, thereby reflecting better application value and superiority.
Drawings
FIG. 1 is a flow chart of a CCM message detection and timer setting method according to the present invention;
FIG. 2 is a flow chart of a method for detecting whether a network failure is eliminated according to the present invention;
fig. 3 is a block diagram of an apparatus for detecting whether a network failure is eliminated according to the present invention.
Detailed Description
The basic idea of the invention is: when the local MEP detects that the CCM message is wrong, setting the duration N of the software timer according to the packet sending period T1 of the CCM message and the packet sending period T2 of the local MEP; within the time length set by the timer, judging whether the current value of the timer is zero or not every time the local MEP passes a packet sending period, and if the value of the timer is not zero, subtracting 1 from the value of the timer; when the value of the timer is reduced from N to zero, it indicates that the network fault has cleared.
The method and apparatus for implementing the present invention are described in detail below with reference to specific embodiments.
As shown in fig. 1 and 2, the method for detecting whether a network fault is eliminated includes:
step 101: the local MEP detects whether the CCM message has errors, if the local MEP detects that the CCM message has errors, the step 102 is executed; if the local MEP detects that the CCM message is correct, the step 101 is executed repeatedly;
in this step, the local MEP receives a CCM message sent by the remote MEP and detects the CCM message; the CCM message includes a packet transmission period (CCM. interval) and other related information of the MEP.
The process of detecting the received CCM message by the local MEP specifically includes: and the local MEP compares the information in the CCM message received with the information configured in advance locally, if the information of the CCM message is not consistent with the information of the CCM message received in advance, the CCM message is wrong, the network fails, and the local MEP determines the type of the corresponding network failure according to the type of the CCM message error. The above-mentioned fault detection method and the determination of the fault type are prior art and will not be described in detail herein.
Step 102: setting timer parameters and starting a timer corresponding to the local MEP;
in this step, the packet transmission period (CCM. interval) included in the CCM message is set to T1, and the packet transmission period (MEP. interval) of the local MEP is set to T2; the packet sending period of the local MEP is a period for the local MEP to send the CCM message to the remote MEP, and the period is set by the local MEP.
According to the CFM protocol, setting N to 3.5T 1/T2, wherein N is a multiple of the packet sending period of the local MEP, N is a positive integer, writing N as the initial value of a timer into a software timer corresponding to the local MEP, starting the timer, and jumping the timer value from zero to nonzero to be regarded as the starting timer.
Step 201: the local MEP judges whether the time of a packet sending period is passed, if so, the step 202 is executed; otherwise, returning to step 201;
in this step, in the packet sending process, the local MEP sends a CCM message to the remote MEP periodically, and the packet sending period is set by the local MEP; since the period for the local MEP to send the CCM message to the remote MEP is fixed, each time the local MEP sends a CCM message to the remote MEP, the time for passing a packet sending period is equivalent.
in this step, the local MEP checks the value of the timer corresponding to the local MEP once every time the local MEP sends a CCM message, that is, every time a packet sending period elapses; if the value of the timer is non-zero, the value of the timer is decremented by 1.
Step 204: the local MEP checks whether the value of the timer is zero; if the value of the timer is not zero, returning to step 201; if the value of the timer is zero, step 205 is performed.
Step 205: the timer times out, an interrupt alarm is generated, and the process returns to step 201.
In steps 101 to 102 of fig. 1, if the local MEP detects that the CCM message is erroneous, resetting the value of the timer to N3.5 × T1/T2, so that the timer starts to count again from N; in steps 201-205 of fig. 2, if the timer corresponding to the local MEP has been started, that is, the timer has a non-zero value, after a packet sending period elapses, the value of the timer is decremented by 1; the flows shown in fig. 1 and fig. 2 are two completely independent and concurrent flows, there is no sequential waiting order between the two flows, and the only common resource of the two flows is the use of the same software timer.
Therefore, after the software timer is started, on one hand, in the flow of fig. 1, if a fault is detected, the timer is continuously reset to N; on the other hand, in the flow of fig. 2, the value of the timer is continuously decreased by 1 until the value of the timer is decreased to zero, indicating that the network failure has been eliminated.
In conclusion, the invention realizes the timer of millisecond grade by the way of the software timer, greatly saves the hardware timer resource in the network and simplifies the distribution and maintenance difficulty of the timer resource; moreover, when the content of the network detection needs to be expanded, namely the type of the network fault is refined, a plurality of software timers can be set, and the advantages of the invention are further embodied.
In order to implement the above method, the present invention provides a device for detecting whether a network failure is eliminated, as shown in fig. 3, the device includes: the system comprises a message receiving detection module, a software timer and a message sending query module; wherein,
a message receiving and detecting module: the local MEP is used for receiving the CCM message sent by the remote MEP and detecting the received CCM message;
the software timer is used for setting a timing duration N according to the packet sending period T1 of the CCM message and the packet sending period T2 of the local MEP, and counting the value of the timer;
and the message sending and inquiring module is used for periodically sending the CCM message to the remote MEP by the local MEP, judging whether the current value of the timer is zero or not every time the local MEP passes a packet sending period, and subtracting 1 from the value of the timer when the value of the timer is not zero.
The software timer includes: the timer parameter setting module and the timer counting module are connected with the timer parameter setting module; wherein,
the timer parameter setting module is used for setting the time length N of the timer according to the packet sending period T1 of the CCM message and the packet sending period T2 of the local MEP, and writing the set time length N into a software timer corresponding to the local MEP;
and the timer counting module is used for subtracting 1 from the timer for counting every time the local MEP passes a packet sending period in the time length of the timer, and stopping counting when the value of the timer is zero.
In the above solution, the timer counting module is further configured to provide the current timer value to the message sending and querying module after each packet sending period of the local MEP.
The initial value N of the timer is a multiple of the local MEP packet sending period, and N is a positive integer.
The duration N of the timer is 3.5 × T1/T2.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.
Claims (10)
1. A method for detecting whether a network failure is resolved, the method comprising:
when a local maintenance association node (MEP) detects that a Connectivity Check Message (CCM) is wrong, setting the duration N of a software timer according to a packet sending period T1 of the CCM message and a packet sending period T2 of the local MEP;
within the time length of the timer, the local MEP judges whether the current value of the timer is zero or not every time a packet sending period passes, and the value of the timer is reduced by 1 until the value of the timer is reduced from N to zero when the value is non-zero.
2. The method of claim 1, further comprising: and in the time length of the timer, periodically detecting that the CCM message is wrong by the local MEP, and resetting the time length of the timer.
3. The method of claim 1, wherein after subtracting 1 from the value of the timer, the method further comprises: judging whether the current value of the timer is zero, if so, generating an interrupt alarm, and continuing to judge after the next packet sending period; if not, the judgment is continued after the next packet sending period.
4. The method according to any one of claims 1 to 3, wherein the duration N of the timer is a multiple of the local MEP packet sending period, and N is a positive integer.
5. The method of claim 4, wherein the duration N of the timer is 3.5T 1/T2.
6. An apparatus for detecting whether a network failure is resolved, the apparatus comprising: the system comprises a message receiving detection module, a software timer and a message sending query module; wherein,
a message receiving and detecting module: the local MEP is used for receiving the CCM message sent by the remote MEP and detecting the received CCM message;
the software timer is used for setting a timing duration N according to the packet sending period T1 of the received CCM message and the packet sending period T2 of the local MEP, and counting the value of the timer;
and the message sending and inquiring module is used for periodically sending the CCM message to the remote MEP by the local MEP, judging whether the current value of the timer is zero or not every time the local MEP passes a packet sending period, and subtracting 1 from the value of the timer when the value of the timer is not zero.
7. The apparatus of claim 6, wherein the software timer comprises: the timer parameter setting module and the timer counting module are connected with the timer parameter setting module; wherein,
the timer parameter setting module is used for setting the duration N of the timer according to the packet sending period T1 of the received CCM message and the packet sending period T2 of the local MEP, and writing the set duration N into a software timer corresponding to the local MEP;
and the timer counting module is used for subtracting 1 from the timer for counting every time the local MEP passes a packet sending period in the time length of the timer, and stopping counting when the value of the timer is zero.
8. The apparatus of claim 7, wherein the timer counting module is further configured to provide the current timer value to the packet forwarding lookup module after each packet sending period of the local MEP.
9. The apparatus according to claim 6 or 7, wherein the duration N of the timer is a multiple of the local MEP packet sending period, and N is a positive integer.
10. The apparatus of claim 9, wherein the timer has a duration N of 3.5 × T1/T2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102445441A CN101771583B (en) | 2009-12-30 | 2009-12-30 | Method and device for detecting elimination or no elimination of network failure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102445441A CN101771583B (en) | 2009-12-30 | 2009-12-30 | Method and device for detecting elimination or no elimination of network failure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101771583A true CN101771583A (en) | 2010-07-07 |
CN101771583B CN101771583B (en) | 2012-11-28 |
Family
ID=42504199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009102445441A Active CN101771583B (en) | 2009-12-30 | 2009-12-30 | Method and device for detecting elimination or no elimination of network failure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101771583B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143005A (en) * | 2011-04-14 | 2011-08-03 | 中兴通讯股份有限公司 | Method and device for determining fault elimination based on operation and maintenance (OAM) |
CN102546404A (en) * | 2011-12-27 | 2012-07-04 | 盛科网络(苏州)有限公司 | Method and system for optimizing MEP (message exchange pattern) packet sending time in OAM (operation administration and maintenance) chip |
CN102970171A (en) * | 2012-12-06 | 2013-03-13 | 盛科网络(苏州)有限公司 | Method for realizing multiple operations, administration and maintenance (OAM) time precision through chip level |
CN103023671A (en) * | 2011-09-20 | 2013-04-03 | 盛科网络(苏州)有限公司 | Chip-level method and device for achieving various Intervals by OAM (operations, administration and maintenance) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100550785C (en) * | 2006-08-30 | 2009-10-14 | 华为技术有限公司 | A kind of method of ethernet device link failure detection and system thereof |
CN100563180C (en) * | 2007-05-30 | 2009-11-25 | 杭州华三通信技术有限公司 | Link failure detection method and device |
-
2009
- 2009-12-30 CN CN2009102445441A patent/CN101771583B/en active Active
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143005A (en) * | 2011-04-14 | 2011-08-03 | 中兴通讯股份有限公司 | Method and device for determining fault elimination based on operation and maintenance (OAM) |
WO2012139477A1 (en) * | 2011-04-14 | 2012-10-18 | 中兴通讯股份有限公司 | Method and device for determining failure elimination based on oam protocol |
CN102143005B (en) * | 2011-04-14 | 2015-01-28 | 中兴通讯股份有限公司 | Method and device for determining fault elimination based on operation and maintenance (OAM) |
CN103023671A (en) * | 2011-09-20 | 2013-04-03 | 盛科网络(苏州)有限公司 | Chip-level method and device for achieving various Intervals by OAM (operations, administration and maintenance) |
CN103023671B (en) * | 2011-09-20 | 2015-04-22 | 盛科网络(苏州)有限公司 | Chip-level method and device for achieving various Intervals by OAM (operations, administration and maintenance) |
CN102546404A (en) * | 2011-12-27 | 2012-07-04 | 盛科网络(苏州)有限公司 | Method and system for optimizing MEP (message exchange pattern) packet sending time in OAM (operation administration and maintenance) chip |
CN102970171A (en) * | 2012-12-06 | 2013-03-13 | 盛科网络(苏州)有限公司 | Method for realizing multiple operations, administration and maintenance (OAM) time precision through chip level |
Also Published As
Publication number | Publication date |
---|---|
CN101771583B (en) | 2012-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101355466B (en) | Method and apparatus for transmitting continuous check information message | |
CN110808873B (en) | Method and device for detecting link failure | |
CN101188527B (en) | A heartbeat detection method and device | |
CN106487679B (en) | Active-standby switching system and switching method of Ethernet switch | |
EP2698948A1 (en) | Method and device for determining failure elimination based on oam protocol | |
CN101247270A (en) | System and method for implementing bidirectional forwarding detection | |
CN104796329B (en) | A kind of link automatic switching method and device | |
CN103684835A (en) | Link fault reporting method and processing method, and transmission node and primary node | |
EP3220556B1 (en) | Method, device and system for detecting rogue optical network unit | |
CN109194547A (en) | Message transmitting method, device, local device and readable storage medium storing program for executing | |
CN102263651A (en) | Method for detecting connection state of local end equipment in SNMP (simple network management protocol) network management system (NMS) | |
CN101771583B (en) | Method and device for detecting elimination or no elimination of network failure | |
CN103227725A (en) | Method and device for dual-server backup of firewall | |
US9007228B2 (en) | Transmission system using dying gasp | |
CN101355511B (en) | Method and apparatus for protecting chain polymerization traffic | |
CN102055624A (en) | Method and system for detecting connectivity fault | |
CN110908872A (en) | Server state detection method and system | |
CN104104542B (en) | RS 485-based real-time intelligent obstacle removing method | |
CN100563201C (en) | A kind of method for detecting route unit fault and device | |
CN105897446B (en) | A kind of EFM OAM processing method and hardware realization apparatus based on FPGA | |
CN110138657B (en) | Aggregation link switching method, device, equipment and storage medium between switches | |
CN103684897A (en) | Method, system and device for detecting network connectivity in client | |
CN101465762B (en) | Method, equipment and system for detecting error connection between protection set ports | |
US20070171896A1 (en) | Management system and management method for managing a communication apparatus | |
CN101414937A (en) | Method and apparatus for switching tunnel |
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 |