CN106559288B - A kind of quick fault testing method based on icmp packet - Google Patents
A kind of quick fault testing method based on icmp packet Download PDFInfo
- Publication number
- CN106559288B CN106559288B CN201611051832.1A CN201611051832A CN106559288B CN 106559288 B CN106559288 B CN 106559288B CN 201611051832 A CN201611051832 A CN 201611051832A CN 106559288 B CN106559288 B CN 106559288B
- Authority
- CN
- China
- Prior art keywords
- time
- equipment
- test equipment
- test
- icmp packet
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The quick fault testing method based on icmp packet that the present invention relates to a kind of includes the steps of determining that the test equipment connected required for test, selects the test equipment that bottom is communicated using ICP/IP protocol, and establishes test equipment connection list;Before equipment initialization, in test process, after test, test equipment periodicity sending icmp packet of the host computer into connection list, order is returned until receiving normal icmp packet, it is enabled if not receiving icmp packet in time-out time and returning, then it is assumed that there are failures for network or test equipment, export fault cues information;Quick fault testing technology proposed by the present invention based on icmp packet judges whether link is normal by way of sending icmp packet and waiting icmp reply message, can find failure in time, and switch to redundance unit.
Description
Technical field
The quick fault testing method based on icmp packet that the present invention relates to a kind of, belongs to observation and control technology field.
Background technique
In Aerospace Tracking & Control, there is a kind of external equipment, which is communicated using the driving of encapsulation,
Only need driving interface to external equipment operation.By taking VXI equipment as an example, such equipment uses VISA general-purpose interface in application layer,
And it is communicated in bottom actual use ICP/IP protocol.It is not perfect due to external drive, in the driving for calling such equipment
When, link failure can not be identified in time, caused even if with the presence of redundance unit, since failure can not be found in time, redundance unit
Practical function can not be played.
When the driving function provided using measuring and controlling equipment operates equipment, due to not perfect, the Wu Faji of driving
When identify communication link fails;When communication link break down when, continue to use driving its result of providing method will be can not be pre-
It surveys, may cause application program under extreme case and exited without response, or even exception.Therefore, how such set is being diagnosed in time
Standby link failure, and the switching for carrying out redundance unit has far-reaching significance for improving the reliability of observing and controlling.
At this stage, in the TT&C system using such equipment, technological means there is no to detect the link of such external equipment
Failure needs manually to check in the preparation stage not only to need to expend a large amount of manpower and material resources to guarantee the normal of communication link,
And only can guarantee the correctness of the link before equipment connects, the link failure occurred during the test can not be detected.
How automatic identification link failure is this field technical problem urgently to be resolved.
Summary of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide a kind of quick fault testings based on icmp packet
Technology judges whether link is normal by way of sending icmp packet and waiting icmp reply message, can find in time
Failure, and switch to redundance unit.
The object of the invention is achieved by following technical solution:
A kind of quick fault testing method based on icmp packet is provided, is included the following steps:
(1) it determines the test equipment connected required for test, selects the test that bottom is communicated using ICP/IP protocol
Equipment, and establish test equipment connection list;
(2) before equipment initialization, test equipment periodicity sending icmp packet of the host computer into connection list, until
It receives normal icmp packet and returns order, enabled if not receiving icmp packet in time-out time and returning, then it is assumed that network or survey
Trying equipment, there are failures, export fault cues information;
(3) during the test, the test equipment periodicity sending icmp packet from host computer into connection list, if
Icmp packet is not received in time-out time and returns order, then it is assumed that there are failures for network or test equipment, export fault cues letter
Breath, and the test equipment is stopped using to continue to test, redundance unit, then be switched to redundance unit and continue to test if it exists;
It is enabled if receiving icmp packet in time-out time and returning, shows that test equipment connection is normal, be able to use the test equipment
Continue to test;
(4) after test, test equipment periodicity sending icmp packet of the host computer into connection list, if
Icmp packet is not received in time-out time and returns order, then it is assumed that there are failures for network or test equipment, export fault cues information;
It is enabled if receiving icmp packet in time-out time and returning, shows that test equipment connection is normal, it being capable of the normal switching-off test
Equipment.
Preferably, step (2) concrete operation method are as follows:
A. the equipment connection list established in read step (1), and obtain each test equipment in equipment connection list
IP address;
B. ICMP request message is sent to each IP address by Ethernet, and waits the icmp reply of each test equipment
Message, wherein the time-out time of icmp reply message is adjusted according to following principle dynamic:
B1. time-out time initial value is set as Ttimeout, 100ms is used under default conditions;
If b2. test equipment is that embedded device or processor host frequency are lower than 1Ghz, TtimeoutValue increases 50ms;
If b3. equipment to be connected and host computer are not at same network segment, every to cross over a layer switch TtimeoutValue increases
50ms;
If b4. not receiving reply message in specified time-out time, permission is retried automatically, is at most retried 2 times, every time weight
Try TtimeoutValue increases 100ms;
If c. receiving reply message in time-out time, then it is assumed that device network connection has been established and can carry out just
Beginningization enables if not receiving icmp packet in time-out time and returning, then it is assumed that there are failure, output events for network or test equipment
Hinder prompt information.
Preferably, step (3) during the test, from host computer to connection list in test equipment periodicity sending
Icmp packet method particularly includes:
A. to connection having been established in step (2) and the equipment initialized establishes keepalive mechanism, whenever interval TspanTime
When not carrying out data transmission with certain test equipment, then ICMP request message is sent from host computer to the test equipment, it should with detection
Test equipment operating status;The time-out time of icmp reply message is adjusted according to following principle dynamic:
A1. time-out time initial value is set as Ttimeout, 100ms is used under default conditions;
If a2. test equipment is that embedded device or processor host frequency are lower than 1Ghz, TtimeoutValue increases 50ms;
If a3. equipment to be connected and host computer are not at same network segment, every to cross over a layer switch TtimeoutValue increases
50ms;
If c. not receiving reply message in time-out time, then it is assumed that network or the test equipment there are failure, this
When redundancy backup equipment if it exists, then automatically switch to alternate device and provide fault cues, if it does not exist redundancy backup equipment,
It then provides miscue information and the equipment is stopped using to continue to test;If receiving reply message in time-out time, recognize
It is normal for the test equipment, it can continue to for testing.
Preferably, equipment is closed after testing described in step (4) method particularly includes:
Request message is sent to the stateful normal test equipment of institute in step (3), and if waited to be answered in time-out
The interior icmp packet that do not receive returns order, then it is assumed that network or test equipment export fault cues information there are failure, and continue
Test equipment state is detected, until equipment state restores good or user cancels;If receiving icmp packet in time-out time
Hui Ling then shows that test equipment connection is normal, and equipment calls driving function normal for detection is counter to be initialized and closed
Hull closure.
The invention has the following advantages over the prior art:
(1) fault detection method of the invention sets test before initialization, in test process and after test
It is standby to carry out fault detection, just driving function is called to operate equipment when ensuring that test equipment state is ready to, avoided
It is not perfect to host computer bring risk due to driving, so that the reliability of whole system further increases;
(2) running fault detection mechanism is provided, it is ensured that switch in time in link or device fails
To redundancy backup equipment, hot spare devices is made really to play a role.
Detailed description of the invention
Fig. 1 is present device initial phase fault detection flow chart;
Fig. 2 is test phase fault detection flow chart of the present invention;
Fig. 3 is pass hull closure stage fault detection flow chart of the present invention.
Specific embodiment
Method proposed by the present invention carries out fault detection using the ICMP agreement in TCP/IP protocol suite, all to use TCP/
The equipment that IP agreement carries out network communication supports ICMP agreement, after the equipment on network receives ICMP request message, needs
Communication link can be carried out by this mechanism effective in specified time-out time to other side's loopback icmp reply message
It checks, and can have found that it is likely that existing failure in time, to carry out respective handling.
Quick fault testing method proposed by the present invention based on icmp packet is broadly divided into the following four stage:
(1) the state preparation stage is determined the test equipment connected required for this test, selects bottom and assisted using TCP/IP
The test equipment communicated is discussed, and establishes equipment connection list.
Step (1) selects equipment ready for use according to the test item demand that will be carried out, and according to the feature of every kind of equipment
Classify, use Ethernet is attached and the equipment for carrying out fault detection is needed to establish list in software, in case after
Continuous detection uses.
(2) before equipment initialization, the host computer (usually surveying hair control software) in TT&C system needs that equipment is called to drive
It is dynamic that test equipment in list is initialized, it is upper to ensure that equipment has powered on completion at this time and network has connected
Machine sends icmp packet to device periodically to be connected, and returns order until receiving normal icmp packet, shows equipment at this time
Have connected, can normal call driving function equipment is initialized, equipment initialization process is as shown in Figure 1.If about
The interior icmp packet that do not receive of fixing time returns order, then it is assumed that there are failures for network or test equipment, export fault cues information.
Before initialization or homing device using send icmp packet and take over icmp packet reply by the way of carry out shape
State detection is completed and can be initialized to judge whether equipment has connected.This step concrete operation method are as follows:
A. the list established in read step (1), and obtain the IP address of each equipment in list;
B. ICMP request message is sent to each IP address by Ethernet, can be used on windows platform
IcmpCreateFile and IcmpSendEcho series A PI completes the operation, and waits icmp reply message, wherein icmp reply
The time-out time of message is adjusted according to following principle dynamic:
B1. time-out time initial value is set as Ttimeout, empirical value 100ms is used under default conditions;
If b2. equipment to be connected processor performance is weaker (such as embedded device or processor host frequency are lower than 1Ghz),
TtimeoutValue increases 50ms;
If b3. equipment to be connected and host computer are not at same network segment, every to cross over a layer switch TtimeoutValue increases
50ms;
If b4. not receiving reply message in specified time-out time, permission is retried automatically, is at most retried 2 times, every time weight
Try TtimeoutValue increases 100ms.
If c. receiving reply message in specified time-out time, then it is assumed that device network connection has been established and can be into
Row initialization, provides prompt information otherwise to remind user.
It (3) during the test, is discovery test equipment failure in time, by host computer periodicity sending icmp packet to setting
Standby situation in place is detected.When detecting mistake, miscue is provided in time, and the equipment is stopped using to continue to test;
Redundance unit if it exists is then switched to redundance unit and continues to test, and test phase fault detection mechanism is as shown in Figure 2.
A. to connection being completed in step (2) and the equipment initialized establishes Keep-Alive mechanism, whenever interval
TspanWhen time does not carry out data transmission with certain equipment, need to send ICMP request message, with detection device operating status, wherein
TspanUse experience value 2S, the value can require dynamic to adjust according to system reliability, TspanIt is worth smaller, then can detects fastlyer
Problem, but system and network overhead also increase accordingly, and vice versa.The time-out time calculation method step of icmp reply message
(2) consistent in, but do not allow to retry automatically.
B. unsanctioned equipment is detected for ICMP, redundancy backup equipment, then automatically switch to alternate device simultaneously if it exists
Prompt is provided, miscue information is otherwise provided and the equipment is stopped using to continue to test.To avoid casual network congestion from causing
Network Abnormal, above-mentioned switching allows repeatedly.
(4) after test, call driver interface is needed to close all initialized equipment, to guarantee to close
Operation smoothly completes, and in call driver, is detected first by icmp packet to equipment connection, only when setting
For subsequent operation is just carried out when connecting normal, mistake is otherwise prompted, fault detection mechanism is as shown in Figure 3 at the end of test.
A. all equipment that connection is completed and has initialized send request message in step (2), and wait to be answered, side
Method is consistent with method described in step (2);
B. anti-initialization and pass hull closure are carried out for detecting normal equipment calls driving function, it is abnormal for detecting
Equipment provide prompt information to remind user, and continue to detect opposite end situation, until equipment state restores good or user takes
Disappear;
C. the equipment calls driving function restored for state in step b carries out anti-initialization and pass hull closure.
The above, optimal specific embodiment only of the invention, but scope of protection of the present invention is not limited thereto,
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by anyone skilled in the art,
It should be covered by the protection scope of the present invention.
The content that description in the present invention is not described in detail belongs to the well-known technique of professional and technical personnel in the field.
Claims (2)
1. a kind of quick fault testing method based on icmp packet, which comprises the steps of:
(1) it determines the test equipment connected required for test, selects the test equipment that bottom is communicated using ICP/IP protocol,
And establish test equipment connection list;
(2) before equipment initialization, test equipment periodicity sending icmp packet of the host computer into connection list, until receiving
It returns and enables to normal icmp packet, enabled if not receiving icmp packet in time-out time and returning, then it is assumed that network or test are set
Standby there are failures, export fault cues information;
(3) during the test, the test equipment periodicity sending icmp packet from host computer into connection list, if super
When the time in do not receive icmp packet and return and enable, then it is assumed that there are failures for network or test equipment, export fault cues information, and
It stops using the test equipment to continue to test, if it exists redundance unit, is then switched to redundance unit and continues to test;If
Icmp packet is received in time-out time and returns order, then shows that test equipment connection is normal, be able to use the test equipment and continue to survey
Examination;
(4) after test, test equipment periodicity sending icmp packet of the host computer into connection list, if in time-out
Icmp packet is not received in time and returns order, then it is assumed that there are failures for network or test equipment, export fault cues information;If
Icmp packet is received in time-out time return and enable, then show that test equipment connection is normal, it being capable of the normal switching-off test equipment;
Step (2) concrete operation method are as follows:
A. the equipment connection list established in read step (1), and obtain the IP of each test equipment in equipment connection list
Address;
B. ICMP request message is sent to each IP address by Ethernet, and waits the icmp reply report of each test equipment
Text, wherein the time-out time of icmp reply message is adjusted according to following principle dynamic:
B1. time-out time initial value is set as Ttimeout, 100ms is used under default conditions;
If b2. test equipment is that embedded device or processor host frequency are lower than 1 Ghz, TtimeoutValue increases 50ms;
If b3. equipment to be connected and host computer are not at same network segment, every to cross over a layer switch TtimeoutValue increases 50ms;
If b4. not receiving reply message in specified time-out time, permission retries automatically, at most retries 2 times, retry every time
TtimeoutValue increases 100ms;
If c. receiving reply message in time-out time, then it is assumed that device network connection has been established and can carry out initial
Change, enabled if not receiving icmp packet in time-out time and returning, then it is assumed that there are failures for network or test equipment, export failure
Prompt information;
Equipment is closed after testing described in step (4) method particularly includes:
Send request message to the stateful normal test equipment of institute in step (3), and wait it is to be answered, if in time-out time
It does not receive icmp packet and returns order, then it is assumed that network or test equipment export fault cues information there are failure, and continue to detect
Test equipment state, until equipment state restores good or user cancels;It is enabled if receiving icmp packet in time-out time and returning,
Then show that test equipment connection is normal, for detect normal equipment calls driving function it is counter initialized and closed set
It is standby.
2. the quick fault testing method described in claim 1 based on icmp packet, which is characterized in that step (3) is being tested
In the process, the test equipment periodicity sending icmp packet from host computer into connection list method particularly includes:
A. to connection having been established in step (2) and the equipment initialized establishes keepalive mechanism, whenever interval TspanTime not with certain
When test equipment carries out data transmission, then ICMP request message is sent from host computer to the test equipment, set with detecting the test
Standby operating status;The time-out time of icmp reply message is adjusted according to following principle dynamic:
A1. time-out time initial value is set as Ttimeout, 100ms is used under default conditions;
If a2. test equipment is that embedded device or processor host frequency are lower than 1Ghz, TtimeoutValue increases 50ms;
If a3. equipment to be connected and host computer are not at same network segment, every to cross over a layer switch TtimeoutValue increases 50ms;
If c. not receiving reply message in time-out time, then it is assumed that there are failures for network or the test equipment, if at this time
There are redundancy backup equipment, then automatically switch to alternate device and provide fault cues, redundancy backup equipment, then give if it does not exist
The prompt information that makes mistake simultaneously stops using the equipment to continue to test;If receiving reply message in time-out time, then it is assumed that should
Test equipment is normal, can continue to for testing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611051832.1A CN106559288B (en) | 2016-11-23 | 2016-11-23 | A kind of quick fault testing method based on icmp packet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611051832.1A CN106559288B (en) | 2016-11-23 | 2016-11-23 | A kind of quick fault testing method based on icmp packet |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106559288A CN106559288A (en) | 2017-04-05 |
CN106559288B true CN106559288B (en) | 2019-11-12 |
Family
ID=58444965
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611051832.1A Active CN106559288B (en) | 2016-11-23 | 2016-11-23 | A kind of quick fault testing method based on icmp packet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106559288B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108521437A (en) * | 2018-02-28 | 2018-09-11 | 深圳市大迈科技有限公司 | A kind of searching method and search system of lan device |
CN109787824A (en) * | 2019-01-11 | 2019-05-21 | 上海凯岸信息科技有限公司 | A method of control three-layer network automatically switches |
CN114079620B (en) * | 2020-08-06 | 2024-02-27 | 北京国基科技股份有限公司 | Method and device for determining online state of network equipment |
CN113395190B (en) * | 2021-08-16 | 2021-11-30 | 南京云柜网络科技有限公司 | Express cabinet terminal fault detection method and device, computer equipment and storage medium |
CN114666252A (en) * | 2022-05-25 | 2022-06-24 | 苏州英特模汽车科技有限公司 | Bench test system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7596097B1 (en) * | 2006-03-09 | 2009-09-29 | Cisco Technology, Inc. | Methods and apparatus to prevent network mapping |
CN101562531A (en) * | 2008-04-15 | 2009-10-21 | 中国移动通信集团公司 | Method and system for processing network fault and router |
CN101695048A (en) * | 2009-10-29 | 2010-04-14 | 福建星网锐捷网络有限公司 | Discovering and processing method of maximum transmission unit of tunnel and device as well as router |
CN101808043A (en) * | 2010-03-12 | 2010-08-18 | 成都市华为赛门铁克科技有限公司 | Method and device for detecting service message forwarding state of TRUNK members |
CN102098188A (en) * | 2011-01-11 | 2011-06-15 | 深圳创维-Rgb电子有限公司 | Method and system for detecting IP (Internet Protocol) connection |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7284147B2 (en) * | 2003-08-27 | 2007-10-16 | International Business Machines Corporation | Reliable fault resolution in a cluster |
CN101800774A (en) * | 2010-02-04 | 2010-08-11 | 中兴通讯股份有限公司 | Environmental-friendly accessing method and environmental-friendly accessing network |
-
2016
- 2016-11-23 CN CN201611051832.1A patent/CN106559288B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7596097B1 (en) * | 2006-03-09 | 2009-09-29 | Cisco Technology, Inc. | Methods and apparatus to prevent network mapping |
CN101562531A (en) * | 2008-04-15 | 2009-10-21 | 中国移动通信集团公司 | Method and system for processing network fault and router |
CN101695048A (en) * | 2009-10-29 | 2010-04-14 | 福建星网锐捷网络有限公司 | Discovering and processing method of maximum transmission unit of tunnel and device as well as router |
CN101808043A (en) * | 2010-03-12 | 2010-08-18 | 成都市华为赛门铁克科技有限公司 | Method and device for detecting service message forwarding state of TRUNK members |
CN102098188A (en) * | 2011-01-11 | 2011-06-15 | 深圳创维-Rgb电子有限公司 | Method and system for detecting IP (Internet Protocol) connection |
Non-Patent Citations (1)
Title |
---|
一种卫星IP交换系统中ICMP协议FPGA实现方法;李静玲,黎军,张怡,粱薇;《空间电子技术》;20150205;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN106559288A (en) | 2017-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106559288B (en) | A kind of quick fault testing method based on icmp packet | |
EP3142011A1 (en) | Anomaly recovery method for virtual machine in distributed environment | |
US8868968B2 (en) | Partial fault processing method in computer system | |
US8347142B2 (en) | Non-disruptive I/O adapter diagnostic testing | |
CN109286529A (en) | A kind of method and system for restoring RabbitMQ network partition | |
US9798625B2 (en) | Agentless and/or pre-boot support, and field replaceable unit (FRU) isolation | |
CN103944750A (en) | Method and device for processing bonded network card faults | |
US10417101B2 (en) | Fault monitoring device, virtual network system, and fault monitoring method | |
US11442831B2 (en) | Method, apparatus, device and system for capturing trace of NVME hard disc | |
CN106411643B (en) | BMC detection method and device | |
US8880956B2 (en) | Facilitating processing in a communications environment using stop signaling | |
US8111625B2 (en) | Method for detecting a message interface fault in a communication device | |
JP5548160B2 (en) | Fault monitoring node device and fault detection and recovery method | |
US11954509B2 (en) | Service continuation system and service continuation method between active and standby virtual servers | |
JP2006285453A (en) | Information processor, information processing method, and information processing program | |
JP2012075009A (en) | Redundancy device and redundancy program | |
JP5268820B2 (en) | Rewriting method for monitoring device program | |
CN103605593A (en) | Fault diagnosis and recovery method and device for heterogeneous system | |
CN102136921A (en) | Method for rapidly detecting computer crash and computer system including same | |
US20240159812A1 (en) | Method for monitoring in a distributed system | |
CN112084074B (en) | Remote connection control method | |
JP2751861B2 (en) | Network system fault detection processing circuit | |
JP2008059531A (en) | Computer system failure notification method | |
KR100604552B1 (en) | Method for dealing with system troubles through joint-owning of state information and control commands | |
CN116248551A (en) | Method for realizing high availability of serial port equipment in kvm virtualization environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |