CN106603334B - A kind of IP address monitoring method and device - Google Patents

A kind of IP address monitoring method and device Download PDF

Info

Publication number
CN106603334B
CN106603334B CN201611155838.3A CN201611155838A CN106603334B CN 106603334 B CN106603334 B CN 106603334B CN 201611155838 A CN201611155838 A CN 201611155838A CN 106603334 B CN106603334 B CN 106603334B
Authority
CN
China
Prior art keywords
address
monitoring
information
business module
module
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
CN201611155838.3A
Other languages
Chinese (zh)
Other versions
CN106603334A (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.)
Beijing Venus Information Security Technology Co Ltd
Venustech Group Inc
Original Assignee
Beijing Venus Information Security Technology Co Ltd
Venustech Group Inc
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 Beijing Venus Information Security Technology Co Ltd, Venustech Group Inc filed Critical Beijing Venus Information Security Technology Co Ltd
Priority to CN201611155838.3A priority Critical patent/CN106603334B/en
Publication of CN106603334A publication Critical patent/CN106603334A/en
Application granted granted Critical
Publication of CN106603334B publication Critical patent/CN106603334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention proposes a kind of IP address monitoring method, comprising: receives the Monitoring instruction comprising monitored IP address information, and receives the business module transmission for needing to monitor the IP address, characterization needs to monitor the information of the IP address;According to the Monitoring instruction, Xiang Suoshu IP address sends detection messages;If receiving the response message of the corresponding detection messages in the time interval of setting, then confirming that the IP address is in effective status;If not receiving the response message of the corresponding detection messages in the time interval of setting, then confirming that the IP address is in failure state;The status information of the IP address is sent to the business module.Using IP address monitoring method proposed by the present invention, can be conducive to promote network system performance to avoid different business module monitors same IP address respectively and causes to repeat monitoring and the wasting of resources.

Description

A kind of IP address monitoring method and device
Technical field
The present invention relates to network communication technology field more particularly to a kind of IP address monitoring method and devices.
Background technique
In topological network, destination host IP address is reachable or corresponding serve port is opened, and is to guarantee network connectivty And the most important condition that business runs well.Therefore, it during network communication, needs to destination host IP address or corresponding Serve port is monitored, to take reply to arrange in time when destination host IP address is unreachable or serve port is not opened It applies.
In the prior art, each business module independently completes the monitoring to destination host IP address, including sends Detection packet, parsing returned packet etc..When there is multiple business modules to require to monitor the same destination host IP address, Ge Geye Business module is respectively independently monitored the destination host IP address.Each business module is respectively to the same destination host IP Location is monitored, and can be brought the wasting of resources, be repeated the problems such as monitoring, reduce network system performance.
Summary of the invention
Defect and deficiency based on the above-mentioned prior art, the present invention propose a kind of IP address monitoring method and device, can The automatic monitoring realized to IP address, and monitoring result is sent to the business module for needing to monitor the IP address, it avoids each Business module monitors the IP address respectively and causes to repeat to monitor, and is conducive to promote network system performance.
A kind of IP address monitoring method, comprising:
The Monitoring instruction comprising monitored IP address information is received, and receives the business for needing to monitor the IP address What module was sent, characterization needs to monitor the information of the IP address;
According to the Monitoring instruction, Xiang Suoshu IP address sends detection messages;
If receiving the response message of the corresponding detection messages, then with confirming the IP in the time interval of setting Location is in effective status;If not receiving the response message of the corresponding detection messages, then really in the time interval of setting Recognize the IP address and is in failure state;
The status information of the IP address is sent to the business module.
Preferably, the Monitoring instruction of the reception comprising monitored IP address information, and receive and need described in monitoring What the business module of IP address was sent, characterization needs to monitor the information of the IP address, comprising:
The Monitoring instruction comprising monitored IP address information is received, and monitoring standard module is generated according to the Monitoring instruction;
The business module transmission for needing to monitor the IP address is received, characterization needs to monitor the information of the IP address, And it is the business module is associated with the monitoring standard module.
Preferably, described receiving the business module transmission for needing to monitor the IP address, characterization needs to monitor the IP The information of address, and the business module is associated with the monitoring standard module, comprising:
The business module transmission for needing to monitor the IP address is received, association corresponding with the business module is removed The instruction of configuration information, and remove associated configuration information corresponding with the business module;
Receive the information that the characterization that the business module is sent needs to monitor the IP address;
The business module is associated with the monitoring standard module.
Preferably, the status information by the IP address is sent to the business module, comprising:
According to the IP address state in which, judge whether the state of the IP address changes;
When the state of the IP address changes, Xiang Suoshu business module sends the state hair for characterizing the IP address The raw information changed.
Preferably, described receiving the business module transmission for needing to monitor the IP address, characterization needs to monitor the IP The information of address, and by the business module it is associated with the monitoring standard module after, this method further include:
Receive and store what the business module was sent, for judging what whether the state of the monitoring standard module changed Conditional information;
Correspondingly, being sent with characterizing the IP when the state of the IP address changes to the business module Before the information that the state of location changes, judge whether the state of the monitoring standard module changes according to the conditional information Become;
If the state of the monitoring standard module changes, the shape for characterizing the IP address is sent to the business module The information that state changes.
A kind of IP address monitoring method is applied to business module, this method comprises:
The instruction for removing associated configuration information corresponding with itself is sent to IP address monitoring device;
Characterization, which is sent, to the IP address monitoring device needs to monitor the IP address that the IP address monitoring device is monitored Information;
Receive what the IP address monitoring device was sent, the status information of the IP address monitored.
Preferably, described to send characterization to the IP address monitoring device and need to monitor the IP address monitoring device and supervised The information of the IP address of survey, comprising:
It is associated with the monitoring standard module of the IP address monitoring device that characterization request is sent to the IP address monitoring device Information;Wherein, the monitoring standard module is that the IP address monitoring device is generated according to the IP address Monitoring instruction that user sends , for monitoring the monitoring standard module of the IP address.
A kind of IP address monitoring device, comprising:
Information receiving unit, for receive include monitored IP address information Monitoring instruction, and receive and need to supervise The business module transmission of the IP address is surveyed, characterization needs to monitor the information of the IP address;
Packet sending unit, for according to the Monitoring instruction, Xiang Suoshu IP address to send detection messages;
Processing unit is judged, for judging in the time interval of setting, if receive the sound of the corresponding detection messages Answer message;If receiving the response message of the corresponding detection messages in the time interval of setting, then confirming the IP address In effective status;If not receiving the response message of the corresponding detection messages in the time interval of setting, then confirming The IP address is in failure state;
Feedback unit, for the status information of the IP address to be sent to the business module.
Preferably, the information receiving unit, comprising:
First processing units, for receiving the Monitoring instruction comprising monitored IP address information, and according to the monitoring Instruction generates monitoring standard module;
The second processing unit, for receive need to monitor the IP address business module send, characterization need to monitor The information of the IP address, and the business module is associated with the monitoring standard module.
Preferably, described the second processing unit receives the business module transmission for needing to monitor the IP address, and characterization needs Monitor the information of the IP address, and the business module is associated with the monitoring standard module when, be specifically used for:
The business module transmission for needing to monitor the IP address is received, association corresponding with the business module is removed The instruction of configuration information, and remove associated configuration information corresponding with the business module;The business module is received to send Characterization need to monitor the information of the IP address;The business module is associated with the monitoring standard module.
Preferably, it is specific to use when the status information of the IP address is sent to the business module by the feedback unit In:
According to the IP address state in which, judge whether the state of the IP address changes;As the IP When the state of location changes, Xiang Suoshu business module, which is sent, characterizes the information that the state of the IP address changes.
Preferably, the information receiving unit is also used to receive and store what the business module was sent, for judging State the conditional information whether state of monitoring standard module changes;Wherein, the feedback unit sends table to the business module When levying the information that the state of the IP address changes, it is specifically used for:
Judge whether the state of the monitoring standard module changes according to the conditional information;If the monitoring standard module State changes, then the information for characterizing the state of the IP address and changing is sent to the business module.
A kind of business module, comprising:
Instruction sending unit, for sending the finger for removing associated configuration information corresponding with itself to IP address monitoring device It enables;
Request unit is monitored, needs to monitor the IP address monitoring dress for sending characterization to the IP address monitoring device Set the information of monitored IP address;
Information receiving unit, for receiving the IP address monitoring device transmission, the state letter of the IP address monitored Breath.
Preferably, the monitoring request unit, which sends to characterize to the IP address monitoring device, needs to monitor the IP address When the information for the IP address that monitoring device is monitored, it is specifically used for:
It is associated with the monitoring standard module of the IP address monitoring device that characterization request is sent to the IP address monitoring device Information;Wherein, the monitoring standard module is that the IP address monitoring device is generated according to the IP address Monitoring instruction that user sends , for monitoring the monitoring standard module of the IP address.
IP address monitoring method proposed by the present invention receives the Monitoring instruction comprising monitored IP address information first, And the business module transmission for needing to monitor the IP address is received, characterization needs to monitor the information of the IP address;Then According to the Monitoring instruction, Xiang Suoshu IP address sends detection messages;If received described in corresponding in the time interval of setting The response message of detection messages then confirms that the IP address is in effective status;If do not received in the time interval of setting To the response message of the correspondence detection messages, then confirm that the IP address is in failure state;Finally by the IP address Status information is sent to the business module.Using IP address monitoring method proposed by the present invention, completed by independent process to IP The monitoring of address, and monitoring result is sent to the business module for needing to monitor the IP address.It avoids the need for monitoring the IP address Business module monitor the IP address respectively and cause repeat monitor and the wasting of resources, be conducive to promoted network system performance.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of IP address monitoring method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another IP address monitoring method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another IP address monitoring method provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of another IP address monitoring method provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of network topology provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram for IP address monitoring device that the embodiment of the present invention proposes;
Fig. 7 is the structural schematic diagram of another IP address monitoring device provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of business module provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It is shown in Figure 1 the embodiment of the invention discloses a kind of IP address monitoring method, comprising:
S101, the Monitoring instruction comprising monitored IP address information is received, and receives and needs to monitor the IP address Business module send, characterization needs to monitor the information of the IP address;
Specifically, the IP address monitoring method that the embodiment of the present invention proposes is independently of the independent process except business module Program.Include monitored IP address in program initial operating stage, the first Monitoring instruction of acquisition user transmission, Monitoring instruction Information, monitoring mode, detection messages send interval, the information such as detection messages quantity forwarded, if it is transmission control protocol (Transmission Control Protocol, TCP) monitoring mode, it is also necessary to configure specified TCP port number.
After the Monitoring instruction for receiving user's transmission, the monitoring to IP address is may be implemented in the embodiment of the present invention.But The purpose of the embodiment of the present invention is through independent monitoring monitoring the process IP address, and monitoring result is sent to and needs to monitor The business module of the IP address, to remove the treatment process that business module independently carries out IP address monitoring from.Therefore, user is being received After the Monitoring instruction comprising monitored IP address information sent, the embodiment of the present invention is further received with needing to monitor the IP What the business module of location was sent, characterization needs to monitor the information of the IP address, in order to monitor monitored IP address After status information, the status information of the IP address is sent to the business module for needing to monitor the IP address.
S102, according to the Monitoring instruction, Xiang Suoshu IP address sends detection messages;
Specifically, the monitoring to purpose IP address, whether the main purpose IP address that monitors is reachable, or monitoring purpose IP address Whether corresponding serve port is opened.Monitor purpose IP address whether up to when, usually using Internet Control Message Protocol (Internet Control Message Protocol, ICMP) is detected, by sending ICMP echo to purpose IP address Request message and whether to receive the response message of ICMP echo reply and judge whether purpose IP address is reachable.And it is right Whether the specified TCP serve port of host is opened where testing goal IP address, can be by sending transmission control protocol (Transmission Control Protocol, TCP) message realizes, and whether to receive ACK or SYN+ACK message Judge whether the TCP serve port of purpose IP address is opened.
In the Monitoring instruction that user sends, comprising monitored IP address information, between monitoring mode, detection messages are sent Every, information such as detection messages quantity forwarded, if it is transmission control protocol (Transmission Control Protocol, TCP) monitoring mode, it is also necessary to configure specified TCP port number.The IP address monitoring method that the embodiment of the present invention proposes is receiving To user send Monitoring instruction after, according to the information set in Monitoring instruction, purpose IP address is monitored, i.e., according to The monitoring mode of family setting, sends according to detection messages set by user and is spaced, and the inspection of setting quantity is sent to purpose IP address Observe and predict text.
It is further to note that the monitoring processing routine that the embodiment of the present invention proposes, has parallel processing capability, it can Receive what user sent, the Monitoring instruction comprising multiple purpose IP address monitoring informations, concurrently simultaneously according to the setting of user Monitor multiple purpose IP address.
If receiving the response message of the corresponding detection messages in the time interval of setting, then follow the steps S103, Confirm that the IP address is in effective status;If not receiving the corresponding detection messages in the time interval of setting Response message thens follow the steps S104, the confirmation IP address is in failure state;
Specifically, the IP address monitoring method that the embodiment of the present invention proposes, after sending detection messages to purpose IP address, It opens two threads and monitors ICMP echo reply message and TCP ACK message respectively.It is returned if having been switched on thread and monitoring Message need not then be again turned on thread, monitor returned packet using existing returned packet listening thread.User is to correspond to Return time interval is arranged in the response message of detection messages, if having received corresponding detection messages in the time interval of setting Response message, then confirm that the purpose IP address is in effective status, i.e. the IP address is reachable, or the service of the corresponding IP address Port open;If not receiving the response message of corresponding detection messages in the time interval of setting, then the destination IP is confirmed Address is in failure state, i.e. the IP address is unreachable, or the serve port of the corresponding IP address is not opened.It needs to illustrate It is that, in order to handle simplicity, under normal circumstances, user is the return time interval of the response message setting of corresponding detection messages, i.e., It sends and is spaced for detection messages set by user.In practical application scene, corresponding detection can be arranged in user according to network state The return time interval of the response message of message, the embodiment of the present invention do not do considered critical.
S105, the status information of the IP address is sent to the business module.
Specifically, the IP address monitoring method that the embodiment of the present invention proposes, by the Monitoring instruction that is sent according to user to Purpose IP address sends detection messages, confirms purpose IP address state in which, and by the status information of purpose IP address, sends To the business module for needing to monitor the IP address, so that the business module for needing to monitor the IP address is not had to self monitor, can obtain The status information for taking purpose IP address alleviates the workload of business module.Further, technical side of the embodiment of the present invention Case is avoided multiple using independent process monitoring IP address by the independent process by IP address status information informing business module Business module monitors the same IP address simultaneously, causes to repeat monitoring and the wasting of resources.
IP address monitoring method proposed by the present invention receives the Monitoring instruction comprising monitored IP address information first, And the business module transmission for needing to monitor the IP address is received, characterization needs to monitor the information of the IP address;Then According to the Monitoring instruction, Xiang Suoshu IP address sends detection messages;If received described in corresponding in the time interval of setting The response message of detection messages then confirms that the IP address is in effective status;If do not received in the time interval of setting To the response message of the correspondence detection messages, then confirm that the IP address is in failure state;Finally by the IP address Status information is sent to the business module.Using IP address monitoring method proposed by the present invention, completed by independent process to IP The monitoring of address, and monitoring result is sent to the business module for needing to monitor the IP address.It avoids the need for monitoring the IP address Business module monitor the IP address respectively and cause repeat monitor and the wasting of resources, be conducive to promoted network system performance.
Optionally, in another embodiment of the present invention, shown in Figure 2, it is described to receive comprising monitored IP The Monitoring instruction of location information, and the business module transmission for needing to monitor the IP address is received, characterization needs described in monitoring The information of IP address, comprising:
S201, the Monitoring instruction comprising monitored IP address information is received, and is generated and is monitored according to the Monitoring instruction Template;
Specifically, in embodiments of the present invention, user sends comprising monitored IP address information, monitoring mode, detection Message sends interval, and the Monitoring instruction of the information such as detection messages quantity forwarded, the Monitoring instruction may be considered a monitoring mould Plate.Also, it, can also be according to the instruction of user, by a plurality of Monitoring instruction according to the correlation between monitored IP address It collects as the same monitoring standard module, is i.e. includes the monitoring information of a plurality of IP address in a monitoring standard module.The embodiment of the present invention mentions IP address monitoring method out generates monitoring standard module after the Monitoring instruction for receiving user's transmission, according to Monitoring instruction.Monitoring IP address information, monitoring mode, detection messages comprising corresponding one or more monitored purpose IP address in template are sent Interval, the information such as detection messages quantity forwarded, if it is TCP monitoring mode, also comprising specified TCP port number.
What the business module that S202, reception need to monitor the IP address was sent, characterization needs to monitor the IP address Information, and the business module is associated with the monitoring standard module.
Specifically, after the independent process for monitoring IP address generates monitoring standard module, it can be according to monitoring standard module realization pair The monitoring of the IP address.For the business module for needing to be monitored the monitored IP address recorded in monitoring standard module, only It need to be associated with the monitoring standard module, after monitoring standard module obtains monitoring result, monitoring result is sent to association itself Business module, such business module have just achieved the purpose that monitor the IP address.Based on the above principles, the embodiment of the present invention proposes IP address monitoring process after generating monitoring standard module, the reception business mould that needs to be monitored the IP address in monitoring standard module What block was sent, characterization needs to monitor the information of the IP address.The IP address monitoring process that the embodiment of the present invention proposes is receiving It is after the characterization that business module is sent needs to monitor the information of the IP address, the business module is associated with monitoring standard module, so as to After the status information that detection confirms the IP address, the status information of the IP address is sent to the business module.
Step S203~S206 in the present embodiment corresponds to step S102~S105 in embodiment of the method shown in FIG. 1, Its particular content refers to the content of corresponding embodiment of the method shown in FIG. 1, and details are not described herein again.
Optionally, in another embodiment of the present invention, described to receive the business module for needing to monitor the IP address It sends, characterization needs to monitor the information of the IP address, and the business module is associated with the monitoring standard module, packet It includes:
The business module transmission for needing to monitor the IP address is received, association corresponding with the business module is removed The instruction of configuration information, and remove associated configuration information corresponding with the business module;
Receive the information that the characterization that the business module is sent needs to monitor the IP address;
The business module is associated with the monitoring standard module.
Specifically, business module is when initializing or restarting, or there is new business module to need to monitor the IP address When, the IP address monitoring process proposed first to the embodiment of the present invention sends instruction, the IP address for proposing the embodiment of the present invention The removing of monitoring process currently saves, and associated configuration information corresponding with the business module prevents and the business module The corresponding associated configuration information situation inconsistent with the associated configuration information of this corresponding business module being arranged.Remove it Afterwards, business module sends the information that characterization needs to monitor the IP address, specifically namely sends and mentions with the embodiment of the present invention again The associated solicited message of monitoring modular that IP address monitoring process out generates.IP address monitoring process is receiving business mould After the characterization that block is sent needs to monitor the information of the IP address, the business module and the monitoring standard module for monitoring the IP address are carried out Association, so that after monitoring the status information of the IP address, the status information of the IP address is sent to the business module.
Optionally, in another embodiment of the present invention, shown in Figure 3, the state by the IP address is believed Breath is sent to the business module, comprising:
S306, according to the IP address state in which, judge whether the state of the IP address changes;
It is the business mould in order to when the state of purpose IP address changes specifically, the monitoring for purpose IP address Block can make respective handling in time.If the state of purpose IP address never changes, business module can be held Continuous current working status, does not need to adjust.Therefore, the embodiment of the present invention is set, in the shape of detection confirmation purpose IP address After state, further judge whether the state of the IP address of confirmation changes relative to state before.
S307, when the state of the IP address changes, Xiang Suoshu business module, which is sent, characterizes the IP address The information that state changes.
Specifically, if it is determined that confirming that the state of the IP address is changed relative to state before, then to needs The business module for monitoring the IP address, which is sent, characterizes the information that the state of the IP address changes, and does the business module in time Reply is handled out.If it is determined that confirming the state of the IP address, relative to state before, no change has taken place, then temporarily not to The business module for needing to monitor the IP address sends information.
Using the embodiment of the present invention propose to business module send information by the way of, it is possible to reduce monitoring process works Amount, while the processing workload of business module is reduced, keep network system working efficiency higher.
Step S301~S305 in the present embodiment corresponds to step S201~S205 in embodiment of the method shown in Fig. 2, Its particular content refers to the content of corresponding embodiment of the method shown in Fig. 2, and details are not described herein again.
Optionally, in another embodiment of the present invention, described to receive the business module for needing to monitor the IP address Send, characterization needs to monitor the information of the IP address, and by the business module it is associated with the monitoring standard module after, this Method further include:
Receive and store what the business module was sent, for judging what whether the state of the monitoring standard module changed Conditional information;
Correspondingly, being sent with characterizing the IP when the state of the IP address changes to the business module Before the information that the state of location changes, judge whether the state of the monitoring standard module changes according to the conditional information Become;
If the state of the monitoring standard module changes, the shape for characterizing the IP address is sent to the business module The information that state changes.
Specifically, business module, which can be further arranged, judges that the state of monitoring standard module changes in the embodiment of the present invention The condition of change, in the case where being particularly applicable in a plurality of IP address of monitoring standard module monitoring.When a monitoring standard module monitors simultaneously When a plurality of IP address, business module can be set according to demand: when the state of an IP address of monitoring standard module monitoring occurs Change, then it is assumed that the state of the monitoring standard module changes;Or setting is when the state of a plurality of IP address of monitoring standard module monitoring When all changing, it is believed that the state of the monitoring standard module changes.Correspondingly, when monitoring standard module monitor to be monitored it is a plurality of When the state of an IP address in IP address changes, information is being sent to business module associated with the monitoring standard module Before, it is first determined whether meeting the condition for judging the state of monitoring standard module and changing of business module setting, if met Condition then sends the information for characterizing the state of the IP address and changing to the business module;Otherwise it is not sent out to the business module It delivers letters breath.
For example, it is assumed that business module is associated with a certain monitoring standard module, which is used to monitor 3 IP address, and And business module setting just thinks the monitoring mould when the state for 3 IP address that the monitoring standard module monitors all changes The state of plate changes.According to above-mentioned setting, when the monitoring standard module detects that the state of an IP address changes, Judge and be unsatisfactory for business module setting the condition for judging the state of the monitoring standard module and changing, therefore monitoring standard module not to The business module, which is sent, characterizes the information that the state of the IP address changes;When the monitoring standard module detects monitored 3 When change all has occurred in the state of IP address, judgement meet business module setting judge that the state of the monitoring standard module changes The condition of change, therefore monitoring standard module sends the information for characterizing the state of this 3 IP address and all changing to the business module.
Above-mentioned treatment process, the case where being mainly used in a monitoring standard module while monitoring a plurality of IP address.In this feelings Under condition, when the state of an IP address of monitoring standard module monitoring changes, the industry of business module may can't be seriously affected Business, and when the state of a plurality of IP address monitored all changes, the business of business module can be just seriously affected, industry is needed Business module is handled it in time.Therefore, from the purpose for reducing business module workload, business module passes through setting judgement prison The mode for the condition that the state of survey template changes, so that detecting that the state of multiple IP address all changes in monitoring standard module Become, when seriously affecting the business of business module, reinforms business module and handle it.
The embodiment of the invention discloses another IP address monitoring methods, are applied to business module, shown in Figure 4, should Method includes:
S401, the instruction for removing associated configuration information corresponding with itself is sent to IP address monitoring device;
Specifically, when initialization or the business module restarted monitor IP address by IP address monitoring device, first to IP Address monitoring device sends instruction, and IP address monitoring device is made to remove the associated configuration letter of the previously stored correspondence business module Breath prevents previously stored associated configuration information and the associated configuration information that configures later inconsistent.
S402, Xiang Suoshu IP address monitoring device send characterization and need to monitor the IP that the IP address monitoring device is monitored The information of address;
Specifically, after the IP address information that business module confirmation needs to monitor, the IP address information monitored as needed, to The IP address monitoring device for monitoring the IP address sends the information that characterization needs to monitor the IP address.IP address monitoring device receives After the information for needing to monitor the IP address sent to business module, after detection obtains the status information of the IP address, by this The status information of IP address is sent to the business module.
S403, receive what the IP address monitoring device was sent, the status information of the IP address monitored.
The IP address monitoring method that the embodiment of the present invention proposes, is applied to business module, and business module is monitored to IP address Device sends the information that characterization needs to monitor IP address, makes IP address monitoring modular after detecting the status information of IP address, The status information of IP address is sent to business module.The IP address monitoring method proposed using the embodiment of the present invention, business mould Block does not need directly to monitor IP address, after the status information that IP address is detected by IP address monitoring device, by IP address state Information is sent to business module, avoids multiple business modules while monitoring the same IP address and occurring to repeat to monitor, avoids The wasting of resources.
Optionally, in another embodiment of the present invention, described to send characterization needs to the IP address monitoring device Monitor the information for the IP address that the IP address monitoring device is monitored, comprising:
It is associated with the monitoring standard module of the IP address monitoring device that characterization request is sent to the IP address monitoring device Information;Wherein, the monitoring standard module is that the IP address monitoring device is generated according to the IP address Monitoring instruction that user sends , for monitoring the monitoring standard module of the IP address.
Specifically, monitoring standard module is generated, by monitoring mould when the Monitoring instruction that IP address monitoring device is sent according to user When plate is monitored purpose IP address, business module is associated with monitoring standard module to the transmission characterization request of IP address monitoring device Information.IP address monitoring device is after the related information for receiving business module transmission, by the business module and corresponding prison Survey that template is associated, when the monitoring standard module detects that the state of monitored IP address changes, to being associated with the monitoring mould The business module of plate sends the information that the state of characterization IP address changes.
In order to introduce IP address monitoring method proposed by the present invention vividerly, below with reference to example, illustrate that the present invention mentions Implementation process of the IP address monitoring method in real network system out:
Fig. 5 is a kind of network topology in practical applications, and the example is using routing module and abnormal monitoring module as industry Illustrate for business module.
Routing module is configured with two static routing that destination network segment is 1.1.1.0/24, and next hop address is respectively And 3.3.3.1 2.2.2.1.This two routings form load balancing at this time, message by according to the weight of routing be split to this two Link.In the case where IP address not being used to monitor, if the address R2 (3.3.3.1) fails, the message of the address is branched to It will be unable to arrive at the destination, packet drop occur.And if having used IP address monitoring effectively can prevent such case from sending out It is raw, when monitoring R2 address failure, it will notice routing module will be directed toward the route break of the address, flows all in this way It will be split to R1;When system monitoring to the address R2 is restored to available mode, routing module can then come into force the routing again, shape At load balancing.
Abnormal monitoring module is configured with two upstream devices (R1, R2), and initialization Default device is in online service state. In the case where IP address not being used to monitor, if the address R2 (3.3.3.1) fails, client is detectable completely, at practical R2 In down status.And if used IP address monitoring can effectively prevent this from occurring, when monitor the address R2 lose Effect, it will notice abnormal monitoring module R2 is in down status, its is graying, and mail, short message send a warning message, and allows network Maintenance personnel's first time queueing problem failure.
Specific IP address monitoring process is as follows:
Address monitors the monitoring standard module information that process receives the entitled test1 and test2 of user configuration, wherein test1 packet The address monitoring information contained are as follows: IP address 2.2.2.1, type ICMP monitoring, message are divided into 3 seconds between sending, and detection packet number is 2 It is a;Test2 includes the information of address monitoring are as follows: IP address 3.3.3.1, type TCP monitoring, message are divided into 3 seconds between sending, and are detected Packet number is 2, TCP port number 80;
The related information that reception routing module and abnormal monitoring module are sent distinguishes routing module and abnormal monitoring module It is associated with test1, test2 monitoring standard module;
It opens two threads and monitors ICMP echo reply message and TCP ACK message respectively (if thread is existing just not It creates again);
ICMP request detection messages are cycled through according to the configuration of test1, message is divided into 3 seconds between sending, detection packet Number is 2;TCP sync detection messages are cycled through according to the configuration of test2, message is divided into 3 seconds between sending, detection packet Number is 2;
If receiving response message in time-out time (test1 and test2 is 3 seconds here), then it is assumed that address is effective, no Then it is determined as address failure;The example in 3,2.2.2.1 are determined as that address is effective with reference to the accompanying drawings, and 3.3.3.1 is determined as that address is lost Effect;
Judge whether address state changes (effectively becoming failing, or failure becomes effective);
Address state changes in this example, therefore traverses all relating modules, and then one module of every traversal can all pass through Interprocess communication sends message to associated module;The address 3.3.3.1 is failed from effectively becoming at this time, therefore to associated routing Module and abnormal monitoring module send message.
It is shown in Figure 6 the embodiment of the invention also discloses a kind of IP address monitoring device, comprising:
Information receiving unit 601, for receiving the Monitoring instruction comprising monitored IP address information, and reception needs The business module transmission of the IP address is monitored, characterization needs to monitor the information of the IP address;
Packet sending unit 602, for according to the Monitoring instruction, Xiang Suoshu IP address to send detection messages;
Processing unit 603 is judged, for judging in the time interval of setting, if receive the corresponding detection messages Response message;If receiving the response message of the corresponding detection messages, then with confirming the IP in the time interval of setting Location is in effective status;If not receiving the response message of the corresponding detection messages, then really in the time interval of setting Recognize the IP address and is in failure state;
Feedback unit 604, for the status information of the IP address to be sent to the business module.
Specifically, in the present embodiment each unit specific works content, refer to the content of corresponding embodiment of the method, Details are not described herein again.
The IP address monitoring device that the embodiment of the present invention proposes, when carrying out IP address monitoring, first by information receiving unit 601 receive the Monitoring instruction comprising monitored IP address information, and receive the business module for needing to monitor the IP address It sends, characterization needs to monitor the information of the IP address;Then packet sending unit 602 is according to the Monitoring instruction, to institute It states IP address and sends detection messages;If receiving the response message of the corresponding detection messages, then in the time interval of setting Judge that processing unit 603 confirms that the IP address is in effective status;If not receiving correspondence in the time interval of setting The response message of the detection messages then judges that processing unit 603 confirms that the IP address is in failure state;Last feedback The status information of the IP address is sent to the business module by member 604.IP address monitoring device proposed by the present invention, can It is automatically performed the monitoring to IP address, and monitoring result is sent to the business module for needing to monitor the IP address, reduces business Module workload, and can avoid multiple business modules while monitoring the same IP address, it causes to repeat monitoring and the wasting of resources.
Optionally, in another embodiment of the present invention, shown in Figure 7, information receiving unit 601, comprising:
First processing units 6011, for receiving the Monitoring instruction comprising monitored IP address information, and according to described Monitoring instruction generates monitoring standard module;
The second processing unit 6012, for receive need to monitor the IP address business module send, characterization need The information of the IP address is monitored, and the business module is associated with the monitoring standard module.
Specifically, in the present embodiment each unit specific works content, refer to the content of corresponding embodiment of the method, Details are not described herein again.
Optionally, in another embodiment of the present invention, the second processing unit 6012 receives with needing to monitor the IP What the business module of location was sent, characterization needs to monitor the information of the IP address, and by the business module and the monitoring mould When plate is associated, it is specifically used for:
The business module transmission for needing to monitor the IP address is received, association corresponding with the business module is removed The instruction of configuration information, and remove associated configuration information corresponding with the business module;The business module is received to send Characterization need to monitor the information of the IP address;The business module is associated with the monitoring standard module.
Specifically, in the present embodiment the second processing unit 6012 specific works content, refer to corresponding method and implement The content of example, details are not described herein again.
Optionally, in another embodiment of the present invention, feedback unit 604 sends the status information of the IP address When to the business module, it is specifically used for:
According to the IP address state in which, judge whether the state of the IP address changes;As the IP When the state of location changes, Xiang Suoshu business module, which is sent, characterizes the information that the state of the IP address changes.
Specifically, in the present embodiment feedback unit 604 specific works content, refer to the interior of corresponding embodiment of the method Hold, details are not described herein again.
Optionally, in another embodiment of the present invention, information receiving unit 601 is also used to receive and store the industry What module of being engaged in was sent, the conditional information whether to change for judging the state of the monitoring standard module;Wherein, feedback unit 604 send to the business module when characterizing the information that the state of the IP address changes, and are specifically used for:
Judge whether the state of the monitoring standard module changes according to the conditional information;If the monitoring standard module State changes, then the information for characterizing the state of the IP address and changing is sent to the business module.
Specifically, in the present embodiment feedback unit 604 specific works content, refer to the interior of corresponding embodiment of the method Hold, details are not described herein again.
It is shown in Figure 8 the embodiment of the invention also discloses a kind of business module, comprising:
Instruction sending unit 801 removes associated configuration information corresponding with itself for sending to IP address monitoring device Instruction;
Request unit 802 is monitored, needs to monitor the IP address prison for sending characterization to the IP address monitoring device Survey the information for the IP address that device is monitored;
Information receiving unit 803, for receiving the IP address monitoring device transmission, the state of the IP address monitored Information.
Specifically, in the present embodiment each unit specific works content, refer to the content of corresponding embodiment of the method, Details are not described herein again.
The business module that the embodiment of the present invention proposes, when needing to monitor the status information of IP address, by instruction sending unit 801 send the instruction for removing associated configuration information corresponding with itself to IP address monitoring device;Request unit 802 is monitored to institute It states IP address monitoring device and sends the information that characterization needs to monitor the IP address that the IP address monitoring device is monitored;Information connects It receives unit 803 and receives what the IP address monitoring device was sent, the status information of the IP address monitored.The embodiment of the present invention mentions Business module out obtains the IP address status information for needing to monitor by IP address monitoring device, eliminates itself monitoring IP The work of address, conducive to the performance loss for reducing business module.
Optionally, in another embodiment of the present invention, monitoring request unit 802 is sent out to the IP address monitoring device When characterization being sent to need to monitor the information for the IP address that the IP address monitoring device is monitored, it is specifically used for:
It is associated with the monitoring standard module of the IP address monitoring device that characterization request is sent to the IP address monitoring device Information;Wherein, the monitoring standard module is that the IP address monitoring device is generated according to the IP address Monitoring instruction that user sends , for monitoring the monitoring standard module of the IP address.
Specifically, monitoring the specific works content of request unit 802 in the present embodiment, corresponding embodiment of the method is referred to Content, details are not described herein again.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of IP address monitoring method characterized by comprising
The Monitoring instruction comprising monitored IP address information is received, and monitoring standard module is generated according to the Monitoring instruction;
The business module transmission for needing to monitor the IP address is received, characterization needs to monitor the information of the IP address, and will The business module is associated with the monitoring standard module;The IP address is the destination host IP that the business module needs to monitor Address;
According to the Monitoring instruction, Xiang Suoshu IP address sends detection messages;
If receiving the response message of the corresponding detection messages in the time interval of setting, then confirming at the IP address In effective status;If not receiving the response message of the corresponding detection messages in the time interval of setting, then confirming institute It states IP address and is in failure state;
The status information of the IP address is sent to the business module.
2. the method according to claim 1, wherein described receive the business module for needing to monitor the IP address It sends, characterization needs to monitor the information of the IP address, and the business module is associated with the monitoring standard module, packet It includes:
The business module transmission for needing to monitor the IP address is received, associated configuration corresponding with the business module is removed The instruction of information, and remove associated configuration information corresponding with the business module;
Receive the information that the characterization that the business module is sent needs to monitor the IP address;
The business module is associated with the monitoring standard module.
3. the method according to claim 1, wherein the status information by the IP address be sent to it is described Business module, comprising:
According to the IP address state in which, judge whether the state of the IP address changes;
When the state of the IP address changes, the state that Xiang Suoshu business module sends the characterization IP address changes The information of change.
4. according to the method described in claim 3, it is characterized in that, described receive the business module for needing to monitor the IP address Send, characterization needs to monitor the information of the IP address, and by the business module it is associated with the monitoring standard module after, this Method further include:
Receive and store what the business module was sent, the condition whether to change for judging the state of the monitoring standard module Information;
Correspondingly, characterizing the IP address sending to the business module when the state of the IP address changes Before the information that state changes, judge whether the state of the monitoring standard module changes according to the conditional information;
If the state of the monitoring standard module changes, the state hair for characterizing the IP address is sent to the business module The raw information changed.
5. a kind of IP address monitoring method, which is characterized in that it is applied to business module, this method comprises:
The instruction for removing associated configuration information corresponding with itself is sent to IP address monitoring device;
Characterization, which is sent, to the IP address monitoring device requests letter associated with the monitoring standard module of the IP address monitoring device Breath;Wherein, the monitoring standard module is that the IP address monitoring device is generated according to the IP address Monitoring instruction that user sends, and is used In the monitoring standard module for monitoring the IP address;The IP address is the destination host IP address that the business module needs to monitor;
Receive what the IP address monitoring device was sent, the status information of the IP address monitored.
6. a kind of IP address monitoring device characterized by comprising
Information receiving unit, the information receiving unit include: first processing units, include monitored IP address for receiving The Monitoring instruction of information, and monitoring standard module is generated according to the Monitoring instruction;The second processing unit needs to monitor institute for receiving State what the business module of IP address was sent, characterization needs to monitor the information of the IP address, and by the business module with it is described Monitoring standard module is associated;The IP address is the destination host IP address that the business module needs to monitor;
Packet sending unit, for according to the Monitoring instruction, Xiang Suoshu IP address to send detection messages;
Processing unit is judged, for judging in the time interval of setting, if receive the response report of the corresponding detection messages Text;If receiving the response message of the corresponding detection messages in the time interval of setting, then confirming that the IP address is in Effective status;If not receiving the response message of the corresponding detection messages, then described in confirmation in the time interval of setting IP address is in failure state;
Feedback unit, for the status information of the IP address to be sent to the business module.
7. device according to claim 6, which is characterized in that described the second processing unit receives with needing to monitor the IP What the business module of location was sent, characterization needs to monitor the information of the IP address, and by the business module and the monitoring mould When plate is associated, it is specifically used for:
The business module transmission for needing to monitor the IP address is received, associated configuration corresponding with the business module is removed The instruction of information, and remove associated configuration information corresponding with the business module;Receive the table that the business module is sent Sign needs to monitor the information of the IP address;The business module is associated with the monitoring standard module.
8. device according to claim 6, which is characterized in that the feedback unit sends out the status information of the IP address When giving the business module, it is specifically used for:
According to the IP address state in which, judge whether the state of the IP address changes;When the IP address When state changes, Xiang Suoshu business module, which is sent, characterizes the information that the state of the IP address changes.
9. device according to claim 8, which is characterized in that the information receiving unit is also used to receive and store described What business module was sent, the conditional information whether to change for judging the state of the monitoring standard module;Wherein, the feedback When the information that unit changes to the state that the business module sends the characterization IP address, it is specifically used for:
Judge whether the state of the monitoring standard module changes according to the conditional information;If the state of the monitoring standard module It changes, then sends the information for characterizing the state of the IP address and changing to the business module.
10. a kind of business module characterized by comprising
Instruction sending unit, for sending the instruction for removing associated configuration information corresponding with itself to IP address monitoring device;
Request unit is monitored, for sending the prison of characterization request and the IP address monitoring device to the IP address monitoring device Survey the associated information of template;Wherein, the monitoring standard module is the IP address that the IP address monitoring device is sent according to user What Monitoring instruction generated, for monitoring the monitoring standard module of the IP address;The IP address is that the business module needs to monitor Destination host IP address;
Information receiving unit, for receiving the IP address monitoring device transmission, the status information of the IP address monitored.
CN201611155838.3A 2016-12-14 2016-12-14 A kind of IP address monitoring method and device Active CN106603334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611155838.3A CN106603334B (en) 2016-12-14 2016-12-14 A kind of IP address monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611155838.3A CN106603334B (en) 2016-12-14 2016-12-14 A kind of IP address monitoring method and device

Publications (2)

Publication Number Publication Date
CN106603334A CN106603334A (en) 2017-04-26
CN106603334B true CN106603334B (en) 2019-10-18

Family

ID=58801423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611155838.3A Active CN106603334B (en) 2016-12-14 2016-12-14 A kind of IP address monitoring method and device

Country Status (1)

Country Link
CN (1) CN106603334B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108012308B (en) * 2017-11-27 2020-03-17 Oppo广东移动通信有限公司 Network connection method, mobile terminal and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447597A (en) * 2012-01-11 2012-05-09 浪潮(北京)电子信息产业有限公司 Method and device for realizing IP (Internet Protocol) effectiveness detection
CN102843240A (en) * 2012-09-13 2012-12-26 清华大学 Gateway charging method based on IP (Internet Protocol) address detection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3824274B2 (en) * 2004-07-09 2006-09-20 株式会社インテリジェントウェイブ Unauthorized connection detection system and unauthorized connection detection method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447597A (en) * 2012-01-11 2012-05-09 浪潮(北京)电子信息产业有限公司 Method and device for realizing IP (Internet Protocol) effectiveness detection
CN102843240A (en) * 2012-09-13 2012-12-26 清华大学 Gateway charging method based on IP (Internet Protocol) address detection

Also Published As

Publication number Publication date
CN106603334A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
EP2197179B1 (en) Apparatus and method for fast detection of communication path failures
CN105656645B (en) The decision-making technique and device of the troubleshooting of stacking system
US7974188B2 (en) Repeater and communication method
CN112311580B (en) Message transmission path determining method, device and system and computer storage medium
CN112311896B (en) Health examination method, device, equipment and computer readable storage medium
CN103825777A (en) DMZ server switching method and device
JP4616020B2 (en) Network monitoring program and network system
CN1859423B (en) Synchronous switching method for host and repeat device
CN103220189B (en) Multi-active detection (MAD) backup method and equipment
CN105516658A (en) Monitoring equipment control method and device
CN106487598B (en) The more examples of isomery redundancy Snmp agreements realize system and its implementation
CN108933818A (en) Communication means and device
CN102143011B (en) Device and method for realizing network protection
CN106603334B (en) A kind of IP address monitoring method and device
CN106487696B (en) Link failure detection method and device
CN109787860A (en) Two-way conversion link detection method and device
WO2018035766A1 (en) Network abnormality processing method and system
CN108270593A (en) A kind of two-node cluster hot backup method and system
CN113517994A (en) Network fault removing method and system
US7808982B2 (en) Method for verifying shared state synchronization of redundant modules in a high availability network switch
CN109039889A (en) A kind of message forwarding method and device
CN103001832B (en) The detection method of distributed file system interior joint and device
CN113037622B (en) System and method for preventing BFD from vibrating
CN104184661B (en) The method and device of control business switchback
CN113542052A (en) Node fault determination method and device and server

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