CN103780714A - Method and apparatus for probing DNS server - Google Patents
Method and apparatus for probing DNS server Download PDFInfo
- Publication number
- CN103780714A CN103780714A CN201210414759.5A CN201210414759A CN103780714A CN 103780714 A CN103780714 A CN 103780714A CN 201210414759 A CN201210414759 A CN 201210414759A CN 103780714 A CN103780714 A CN 103780714A
- Authority
- CN
- China
- Prior art keywords
- address
- server
- website
- server corresponding
- ttl
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method and apparatus for probing a DNS server in order to resolve a problem that a user cannot normally have access to the resource of a website in the prior art. According to a mapping relation between website domain names stored in an in-network DNS server and IP addresses, a server corresponding to an IP address is probed before TTL corresponding to the mapping relation expires. If the probed server corresponding to the IP address is normal, the TTL corresponding to the mapping relation is updated and probing is kept before the updated TTL expires, or the in-network DNS server is asked to delete the mapping relation. By means of the above method, if a server corresponding to a corresponding IP address cannot provide service before the TTL corresponding to the mapping relation expire, the in-network DNS server may delete the mapping relation timely. Thus, the IP address is inquired in the DNS server of a website which a user has access to and is returned back to the user. Therefore, the user may normally have access to the website.
Description
Technical field
The present invention relates to the communications field, relate in particular to a kind of detection method and device of dns server.
Background technology
Along with the development of the Internet and full-service, each macroreticular operation commercial city is in positive introducing Internet data center (Internet Data Center, IDC) resource, as shown in Figure 1.
Fig. 1 is the networking structure schematic diagram of having introduced respectively network A and the network B of IDC resource in prior art, in Fig. 1, network A and network B have all been introduced the IDC resource of website X, therefore, website X server 1 is direct-connected with network A, and website X server 2 is direct-connected with network B, is also, IDC resource in website X server 1 is exactly the IDC resource of operator's introducing of network A, and the IDC resource in website X server 2 is exactly the IDC resource of operator's introducing of network B.
In Fig. 1, user a is the user of network A, in order to make this user a only just can have access to the resource of website X by the network A under it, a kind of domain name analytic method that prior art adopts is: front end domain name system (Domain Name System is set in network A, DNS) server and rear end dns server, and make user a directly by network A access websites X server 1 by method as shown in Figure 2.
Fig. 2 is that in prior art, user a, by the process of the resource of the network A access websites X under it, specifically comprises the following steps:
S201: in the time of user a access websites X, forward end dns server sends domain name mapping request.
Also, user a need to obtain network interconnection agreement (InternetProtocol, IP) address corresponding to domain name of website X, the resource of ability access websites X.
S202: front end dns server carries out this territory parsing and buffer memory is resolved, and the domain name of the website X that needs are resolved sends to rear end dns server.
S203: rear end dns server is inquired about all IP address corresponding to domain name of this website X in the dns server of this website X.
Wherein, the dns server of website X is also not shown in Fig. 1, the dns server of this website X can all return to rear end dns server by all IP address corresponding domain name of website X, returns to the IP address of the IP address packet purse rope station X server 1 of rear end dns server, the IP address of website X server 2.
S204: rear end dns server, in the each IP address finding, filters out the IP address of the IP address field that belongs to this network A.
Because website X server 2 is IDC resources that network B is introduced, therefore the IP address of website X server 2 does not belong to the IP address field of network A, and the IP address that rear end dns server filters out only has the IP address of website X server 1.
S205: rear end dns server returns to user a by the IP address filtering out by front end dns server.
S206: the IP address access websites X server 1 that user a returns according to front end dns server.
As seen from Figure 2, when in prior art, network A is carried out domain name mapping, the IP address parsing is depended on the dns server IP address that dns server returns to the back-end of website X completely, if the IP address that the dns server of website X is resolved is inaccurate, in the IP address that dns server returns to the back-end in above-mentioned steps S203, there is not the IP address of the IP address field that belongs to network A, in follow-up step S204, rear end dns server also just can not filter out the IP address of the IP address field that belongs to this network A, introduce the IDC resource of website X even if cause network A, user a still can not directly have access to this resource by the network A under it.
For these reasons, the second domain name analytic method of available technology adopting is: do not distinguish front end dns server and rear end dns server, the mapping relations of direct set up a web site in the dns server of the network A domain name of X and the IP address of website X server 1, in the time of user a access websites X, dns server to network A sends domain name mapping request, the dns server of network A is directly according to these mapping relations, the IP address of website X server 1 is returned to user a, make user a directly by network A access websites X server 1.
Concrete, while adopting above-mentioned second method directly to set up a web site the mapping relations of the domain name of X and the IP address of website X server 1 in the dns server of network A, this mapping relations correspondence a time-to-live (Time To Live, TTL).
In the time that TTL is not yet due, these mapping relations are kept in the dns server of network A always.Now, if user a access websites X, the domain name mapping request that the dns server of network A can send according to user a, directly returns to user a by the IP address of website X the server 1 corresponding domain name of website X.
In the time that TTL expires, the dns server of network A is deleted these mapping relations.Now, if user a access websites X, the dns server of network A fails to find IP address corresponding to domain name of website X, therefore IP address corresponding to the domain name of query web X in the dns server of website X, and the IP address inquiring is returned to user a.
Like this, in the time that TTL corresponding to these mapping relations is not yet due, abnormal if website X server 1 occurs, service can not be provided, the dns server of network A still can return to user a the IP address of website X server 1, will cause the normally resource of access websites X of user a.
Summary of the invention
The embodiment of the present invention provides a kind of detection method and device of dns server, occur when abnormal in order to solve in prior art the website domain name TTL server not yet due and that this IP address is corresponding corresponding with the mapping relations of IP address of preserving in dns server in net, user is the problem of the resource of access websites normally.
The embodiment of the present invention provides a kind of detection method of dns server, comprising:
For the website domain name of preserving in dns server in net and the mapping relations of network interconnection protocol IP address, determine the time-to-live TTL that current described mapping relations are corresponding;
Before described TTL expires, whether normally survey server corresponding to described IP address;
If so, upgrade TTL corresponding to mapping relations described in dns server in described net, and before TTL after renewal expires, whether normally continue to survey server corresponding to described IP address;
Otherwise, indicate dns server in described net to delete described mapping relations.
The embodiment of the present invention provides a kind of sniffer of dns server, comprising:
Determination module, for the website domain name for dns server is preserved in net and the mapping relations of network interconnection protocol IP address, determines the time-to-live TTL that current described mapping relations are corresponding;
Whether normal detecting module, before expiring at described TTL, survey server corresponding to described IP address;
Update module, for determining and detect server corresponding to described IP address when normal at described detecting module, upgrade TTL corresponding to mapping relations described in dns server in described net, and indicate before the TTL of described detecting module after renewal expire, whether normally continue to survey server corresponding to described IP address;
Removing module, for determining and detect server corresponding to described IP address when undesired at described detecting module, indicates dns server in described net to delete described mapping relations.
The embodiment of the present invention provides a kind of detection method and device of dns server, the method is for the website domain name of preserving in dns server in net and the mapping relations of IP address, before TTL corresponding to these mapping relations expires, the server that this IP address is corresponding is surveyed, if it is normal to detect server corresponding to this IP address, upgrade TTL corresponding to these mapping relations, and TTL after renewal continues to survey before expiring, otherwise in indication net, dns server is deleted this mapping relations.Pass through said method, if mapping relations are in the time that its corresponding TTL is not yet due, server corresponding to corresponding IP address can not provide service, in net, dns server can be deleted this mapping relations in time, thereby the dns server of the website of accessing to user inquiry IP address, and return to user, make still normal access websites of user.
Accompanying drawing explanation
Fig. 1 is the networking structure schematic diagram of having introduced respectively network A and the network B of IDC resource in prior art;
Fig. 2 is the process that in prior art, user a passes through the resource of its affiliated network A access websites X;
The detection process of the dns server that Fig. 3 provides for the embodiment of the present invention;
The sniffer structural representation of the dns server that Fig. 4 provides for the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of detection method and device of dns server, the method is for the website domain name of preserving in dns server in net and the mapping relations of IP address, before TTL corresponding to these mapping relations expires, the server that this IP address is corresponding is surveyed, if it is normal to detect server corresponding to this IP address, upgrade TTL corresponding to these mapping relations, and TTL after renewal continues to survey before expiring, otherwise in indication net, dns server is deleted this mapping relations.Pass through said method, if mapping relations are in the time that its corresponding TTL is not yet due, server corresponding to corresponding IP address can not provide service, in net, dns server can be deleted this mapping relations in time, thereby the dns server of the website of accessing to user inquiry IP address, and return to user, make still normal access websites of user.
Below in conjunction with Figure of description, the embodiment of the present invention is described in detail.
The detection process of the dns server that Fig. 3 provides for the embodiment of the present invention, specifically comprises the following steps:
S301: for the website domain name of preserving in dns server in net and the mapping relations of IP address, determine TTL corresponding to current these mapping relations.
For example, network A has been introduced the IDC resource of website X, and network A and website X server 1 are direct-connected, and in the net described in step S301, dns server is the dns server of network A.The domain name of supposing website X is www.X.com, and the IP address of website X server 1 is 1.1.1.1, in the dns server of this network A, has preserved the mapping relations of www.X.com and 1.1.1.1, and has preserved TTL corresponding to these mapping relations.The www.X.com that first sniffer is preserved in the dns server for network A and the mapping relations of 1.1.1.1, determine the TTL that these mapping relations are corresponding.
In embodiments of the present invention, the website domain name of preserving in dns server in net and the mapping relations of IP address can be that this sniffer is pre-written in the interior dns server of net, concrete, sniffer is determined the first URL(uniform resource locator) (the Uniform Resource Locator under this website domain name, URL), according to the IP address corresponding to this website domain name of preserving in advance, based on a URL who determines, the server corresponding to this IP address sends probe requests thereby, in the time receiving the probe response that server corresponding to this IP address return for this probe requests thereby, by this website domain name, this IP address, and predefined TTL sends to dns server in net, in indication net, dns server is set up the mapping relations of this website domain name and this IP address and preserves, and using predefined TTL as TTL corresponding to these mapping relations.
Continue to adopt example, due in the IDC resource of website X is incorporated into network A time, IP address (1.1.1.1) with the direct-connected website X server 1 of this network A corresponding to the domain name (www.X.com) of this website X is known, therefore, can be in sniffer the corresponding relation of the domain name (www.X.com) of preset this website X and the IP address (1.1.1.1) of this website X server 1.
In addition, introduce after the IDC resource of website X, can in sniffer, in advance the URL of several resources in the IDC resource of this website X be kept in sniffer, as the URL of some Text Link in the IDC resource of this website X, or the URL of some picture link, the URL under the domain name of these Dou Shigai websites, URL address X.
Thereby, sniffer is determined a URL under the domain name of this website X, as a URL, and according to the www.X.com preserving in advance and the corresponding relation of 1.1.1.1, based on a URL who determines, the server that is 1.1.1.1 to IP address (website X server 1) sends probe requests thereby, and also, the server request that is 1.1.1.1 to IP address obtains resource corresponding to a URL.
If receive the probe response that website X server 1 returns for this probe requests thereby, sniffer is by the IP address (1.1.1.1) of the domain name of website X (www.X.com), website X server 1, and default TTL sends to the dns server of network A, the dns server of network A is set up the mapping relations of www.X.com and 1.1.1.1 and is preserved, and using this default TTL receiving as TTL corresponding to these mapping relations.
S302: before this TTL expires, whether normally survey server corresponding to this IP address, if so, perform step S303, otherwise execution step S304.
In embodiments of the present invention, the whether normal method of server corresponding to this IP address of detection comprises: determine the 2nd URL under this website domain name, based on the 2nd URL determining, periodically to this IP address, corresponding server repeatedly sends probe requests thereby, the each probe requests thereby sending for the server corresponding to this IP address, if receive the probe response that server corresponding to this IP address returns for this probe requests thereby, determine that server corresponding to this IP address is in service state, if do not receive the probe response that server corresponding to this IP address returns for this probe requests thereby, determine that server corresponding to this IP address is in non-service state, in the time determining server corresponding to this IP address in non-service state continuous K time, determine that to detect server corresponding to this IP address undesired, otherwise, determining that to detect server corresponding to this IP address normal, K is for setting quantity.Wherein, K can set as required.
Continue along using example, sniffer is determined a URL under the domain name of this website X, and as the 2nd URL, the 2nd URL specifically can be identical with an above-mentioned URL, also can be different from an above-mentioned URL.Sniffer is based on the 2nd URL, and the server (website X server 1) that is periodically 1.1.1.1 to IP address sends probe requests thereby, and also, sniffer is periodically to resource corresponding to website X server 1 acquisition request the 2nd URL.
For the probe requests thereby of each transmission, if sniffer receives the probe response that website X server 1 returns for this probe requests thereby, determine that website X server 1 is in service state, if do not receive the probe response of returning for this probe requests thereby, determine that website X server 1 is in non-service state.
Suppose that K is set to 5, when continuous 5 the definite website X servers 1 of sniffer are during in non-service state, determine that to detect website X server 1 undesired, otherwise, determine that to detect website X server 1 normal.
S303: upgrade TTL corresponding to these mapping relations in the interior dns server of net, and return to step S302.
In embodiments of the present invention, if sniffer determines that to detect server corresponding to this IP address normal, default TTL is sent to again to dns server in net, in indication net, dns server is updated to the TTL of current these mapping relations this TTL receiving, also, be equivalent to extend TTL corresponding to these mapping relations.After sniffer has upgraded the TTL of these mapping relations in the interior dns server of net, return to step S302, also, before the TTL of sniffer after renewal expires, whether normally continue to survey server corresponding to this IP address, and carry out corresponding operating according to result of detection.
S304: in indication net, dns server is deleted this mapping relations.
In embodiments of the present invention, if sniffer determines that to detect server corresponding to this IP address undesired, in indication net, dns server is deleted this mapping relations.
Continue along using example, if it is undesired that sniffer adopts said method to detect website X server 1, the dns server of indication network A is deleted the mapping relations of www.X.com and 1.1.1.1, thereby, if user's access websites X of follow-up network A, the dns server of network A can be owing to having deleted www.X.com and can not find with the mapping relations of 1.1.1.1 IP address corresponding to domain name www.X.com of this website X, therefore can only carry out alternately with the dns server of this website X, in the dns server of this website X, inquire about IP address corresponding to domain name www.X.com of this website X, and the IP address inquiring is returned to user, make user by the IP address access websites X inquiring.Certainly, the resource of the website X of now this user access is not to be provided by website X server 1 yet, but provided by the server of other IP addresses of this website X.
Pass through said method, when the TTL corresponding when the mapping relations of the domain name www.X.com of website X and the IP address 1.1.1.1 of website X server 1 is not yet due, if it is abnormal that website X server 1 occurs, server can not be normally provided, the dns server of network A can be deleted the mapping relations of www.X.com and 1.1.1.1 timely, thereby the user that can not make subsequent access website X still accesses and has occurred abnormal website X server 1, and can conduct interviews by other paths, therefore still access websites X normally of user.
Further, in the step S302 shown in above-mentioned Fig. 2, two URL of sniffer based on determining, when periodically to this IP address, corresponding server sends probe requests thereby, can adopt the mode that sends ping probe requests thereby, also the mode that sends GET request can be adopted, the mode of head (HEAD) request that sends HTML (Hypertext Markup Language) (Hypertext Transport Protocol, HTTP) can also be adopted.
Wherein, during due to employing ping detection mode, can only detect from sniffer and can reach in network layer to the route of server corresponding to this IP address, whether can not detect server corresponding to this IP address self occurs extremely, while adopting the mode of GET request, server corresponding to this IP address can return to sniffer by resource corresponding to the 2nd URL, the bandwidth taking is larger, therefore, preferably, in the embodiment of the present invention, sniffer adopts the HEAD request mode of HTTP, and periodically to this IP address, corresponding server sends probe requests thereby.In the time that server corresponding to this IP address receives the probe requests thereby that sniffer sends in the HEAD request mode of HTTP, resource corresponding to the 2nd URL can't be returned to sniffer, but return to a probe response for this probe requests thereby to sniffer, therefore while adopting the HEAD request mode of HTTP to survey server corresponding to this IP address, whether not only can detect server corresponding to this IP address self occurs extremely, also can saving bandwidth resources.
In addition, due in embodiments of the present invention, whether sniffer need to detect server corresponding to this IP address before this website domain name expires with the corresponding TTL of mapping relations of this IP address normal, and by these mapping relations write network in when dns server, TTL corresponding to these mapping relations is also predefined at this sniffer, therefore, in order to guarantee before TTL corresponding to these mapping relations expires, whether sniffer can detect server corresponding to this IP address normal, can in sniffer, preset detect cycle T and detection times N, and the product that makes detect cycle T and detection times N is less than this predefined TTL.Sniffer is in the time that periodically to this IP address, corresponding server sends probe requests thereby, specifically can be according to default detect cycle and detection times, in the time that this detect cycle arrives, the server corresponding to this IP address sends probe requests thereby, reach this detection times until send the number of times of probe requests thereby, wherein, this detect cycle is less than TTL corresponding to current these mapping relations with the product of this detection times.
Follow-up, if sniffer is in the process that has sent N probe requests thereby, determine that continuous K time (K is not more than N) detect server corresponding to this IP address in non-service state, the interior dns server of indication net is deleted the mapping relations of this website domain name and this IP address, otherwise, based on predefined TTL, upgrade in net in dns server TTL corresponding to mapping relations described in this, and before this TTL upgrading expires, whether normally continue to survey server corresponding to described IP address.
Further, consider that in sniffer and net, the information interaction between dns server also will spend the regular hour with processing, therefore, in order further to guarantee when detecting server corresponding to this IP address when normal, in net, dns server also can upgrade TTL corresponding to these mapping relations before TTL corresponding to these mapping relations expires, can also preset a time span, this default time span is exactly for the information interaction between dns server in sniffer and net and processes reserved time span, and make that detect cycle T is multiplied by the product of the detection times N time span default with this be less than TTL corresponding to these mapping relations with value, like this, just can guarantee after sniffer has sent N probe requests thereby, determine when server corresponding to this IP address is normal, sniffer can upgrade in net in dns server TTL corresponding to mapping relations described in this before TTL corresponding to these mapping relations expires.
In embodiments of the present invention, consider in actual applications, for the server of a website, the URL of a resource in this server may change, therefore, in order to improve the accuracy of detection, in the time not determining server corresponding to this IP address in non-service state for K time continuously, also to determine the 3rd URL(three URL different from above-mentioned the 2nd URL under this website domain name), based on the 3rd URL determining, the server corresponding to this IP address sends probe requests thereby, and judge whether to receive the probe response that server corresponding to this IP address returns for this probe requests thereby, if, determine that to detect server corresponding to this IP address normal, otherwise, determine that to detect server corresponding to this IP address undesired.Also be, based on the 2nd URL, periodically to this IP address, corresponding server sends after probe requests thereby, if do not determine continuously that server corresponding to this IP address is in non-service state for K time, determine three URL different from above-mentioned the 2nd URL under this website domain name, and send probe requests thereby based on the 3rd URL server corresponding to this IP address, if receive the probe response that server corresponding to this IP address returns for this probe requests thereby, upgrade TTL(corresponding to these mapping relations in the interior dns server of net and determine that server corresponding to this IP address is normal), otherwise can directly indicate dns server in net to delete these mapping relations (determining that server corresponding to this IP address is undesired).
Further, after having upgraded in net TTL corresponding to this mapping relations in dns server, before the TTL of sniffer after renewal expires, continue to survey server corresponding to this IP address when whether normal, can determine the 4th URL under this website domain name, and the 4th URL based on determining, whether normally adopt above-mentioned detection method to continue to survey server corresponding to this IP address.Wherein, the 4th URL is the 4th URL that is different from above-mentioned the 2nd URL, but the 4th URL can be identical with the 3rd URL.
The detection method of the above-mentioned dns server that the embodiment of the present invention provides, can be applied to the scene of the IP address of the corresponding server of a website domain name, also can be applied to the scene of the IP address of the corresponding multiple servers of website domain name.For example, suppose that the corresponding IP of the domain name address of website X is respectively two servers of 1.1.1.1 and 1.1.1.2, in net, in dns server, two mapping relations relevant to the domain name of this website X are preserved, one is the domain name of website X and the mapping relations of 1.1.1.1, and another is the domain name of website X and the mapping relations of 1.1.1.2.Now, sniffer can be respectively for these two mapping relations, and two servers that adopt said method to be respectively 1.1.1.1 and 1.1.1.2 to IP address are surveyed respectively, just repeat no longer one by one here.
In addition, in embodiments of the present invention, for the website domain name of preserving in dns server in net and the mapping relations of IP address, in the time that the detection server corresponding to this IP address is normal, when the interior dns server of net is not deleted these mapping relations yet, if user accesses website corresponding to this website domain name, in net, dns server is except returning to IP address corresponding this website domain name of current preservation user, can also adopt the method for prior art, in the dns server of the website that will access user, inquire about IP address corresponding to this website domain name, and the IP address inquiring is also returned to user, to improve user in the time accessing this website, select the flexibility of access path.Concrete, in net, dns server is in the time returning to IP address corresponding to this website domain name to user, can be by IP address sort corresponding this website domain name of the current preservation of dns server in this net front, by the IP address sort inquiring from the dns server of this website rear, and return to user, user priority is conducted interviews by the network under it.
More than the detection method of the dns server that provides of the embodiment of the present invention, the invention thinking based on same, the embodiment of the present invention also provides a kind of sniffer of dns server, as shown in Figure 4.
The sniffer structural representation of the dns server that Fig. 4 provides for the embodiment of the present invention, specifically comprises:
Whether normal detecting module 402, before expiring at described TTL, survey server corresponding to described IP address;
Removing module 404, detects server corresponding to described IP address when undesired for determining at described detecting module 402, indicates dns server in described net to delete described mapping relations.
Described device also comprises:
Described detecting module 402 specifically for, determine the second uniform resource position mark URL under the domain name of described website; Based on described the 2nd URL determining, periodically to described IP address, corresponding server sends probe requests thereby; The each probe requests thereby sending for the server corresponding to described IP address, if receive the probe response that server corresponding to described IP address returns for this probe requests thereby, determine that server corresponding to described IP address is in service state, if do not receive the probe response that server corresponding to described IP address returns for this probe requests thereby, determine that server corresponding to described IP address is in non-server state; In the time determining server corresponding to described IP address in non-service state continuous K time, determine that to detect server corresponding to described IP address undesired, otherwise, determine that to detect server corresponding to described IP address normal, wherein, K is for setting quantity.
Described detecting module 402 specifically for, adopt a HEAD request mode of HTML (Hypertext Markup Language) HTTP, periodically to described IP address, corresponding server sends probe requests thereby.
Described detecting module 402 specifically for, according to default detect cycle and detection times, in the time that described detect cycle arrives, the server corresponding to described IP address sends probe requests thereby, reach described detection times until send the number of times of probe requests thereby, wherein, described detect cycle is less than TTL corresponding to current described mapping relations with the product of described detection times.
Described detecting module 402 also for, in the time that continuously server corresponding to K definite described IP address is in non-service state, determine the 3rd URL under the domain name of described website; Based on described the 3rd URL determining, the server corresponding to described IP address sends probe requests thereby; Judge whether to receive the probe response that server corresponding to described IP address returns for this probe requests thereby, if so, determine that to detect server corresponding to described IP address normal, otherwise, determine that to detect server corresponding to described IP address undesired.
Described detecting module 402 specifically for, determine the 4th URL under the domain name of described website, before the TTL after renewal expires, based on described the 4th URL determining, whether normally continue to survey server corresponding to described IP address.
Certainly, the sniffer of the above-mentioned dns server that the embodiment of the present invention provides can be realized by a hardware entities, also can be realized by two or more hardware entities.
The embodiment of the present invention provides a kind of detection method and device of dns server, the method is for the website domain name of preserving in dns server in net and the mapping relations of IP address, before TTL corresponding to these mapping relations expires, the server that this IP address is corresponding is surveyed, if it is normal to detect server corresponding to this IP address, upgrade TTL corresponding to these mapping relations, and TTL after renewal continues to survey before expiring, otherwise in indication net, dns server is deleted this mapping relations.Pass through said method, if mapping relations are in the time that its corresponding TTL is not yet due, server corresponding to corresponding IP address can not provide service, in net, dns server can be deleted this mapping relations in time, thereby the dns server of the website of accessing to user inquiry IP address, and return to user, make still normal access websites of user.
Those skilled in the art should understand, the application's embodiment can be provided as method, system or computer program.Therefore, the application can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the application can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The application is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present application, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Although described the application's preferred embodiment, once those skilled in the art obtain the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the modification of the application's scope.
Obviously, those skilled in the art can carry out various changes and modification and the spirit and scope that do not depart from the application to the application.Like this, if within these of the application are revised and modification belongs to the scope of the application's claim and equivalent technologies thereof, the application is also intended to comprise these changes and modification interior.
Claims (14)
1. a detection method for domain name system DNS server, is characterized in that, comprising:
For the website domain name of preserving in dns server in net and the mapping relations of network interconnection protocol IP address, determine the time-to-live TTL that current described mapping relations are corresponding;
Before described TTL expires, whether normally survey server corresponding to described IP address;
If so, upgrade TTL corresponding to mapping relations described in dns server in described net, and before TTL after renewal expires, whether normally continue to survey server corresponding to described IP address;
Otherwise, indicate dns server in described net to delete described mapping relations.
2. the method for claim 1, is characterized in that, in net, dns server is preserved the mapping relations of website domain name and IP address, specifically comprises:
Determine the first uniform resource position mark URL under the domain name of described website;
According to the IP address corresponding to described website domain name of preserving in advance, based on a described URL who determines, the server corresponding to described IP address sends probe requests thereby;
In the time receiving the probe response that server corresponding to described IP address return for this probe requests thereby, by described website domain name, described IP address, and predefined TTL sends to dns server in described net, indicate dns server in described net set up the mapping relations of described website domain name and described IP address and preserve, and using described predefined TTL as TTL corresponding to described mapping relations.
3. the method for claim 1, is characterized in that, whether normally surveys server corresponding to described IP address, specifically comprises:
Determine the second uniform resource position mark URL under the domain name of described website;
Based on described the 2nd URL determining, periodically to described IP address, corresponding server sends probe requests thereby;
The each probe requests thereby sending for the server corresponding to described IP address, if receive the probe response that server corresponding to described IP address returns for this probe requests thereby, determine that server corresponding to described IP address is in service state, if do not receive the probe response that server corresponding to described IP address returns for this probe requests thereby, determine that server corresponding to described IP address is in non-service state;
In the time determining server corresponding to described IP address in non-service state continuous K time, determine that to detect server corresponding to described IP address undesired, otherwise, determining that to detect server corresponding to described IP address normal, K is for setting quantity.
4. method as claimed in claim 3, is characterized in that, periodically to described IP address, corresponding server sends probe requests thereby, specifically comprises:
A HEAD request mode that adopts HTML (Hypertext Markup Language) HTTP, periodically to described IP address, corresponding server sends probe requests thereby.
5. method as claimed in claim 3, is characterized in that, periodically to described IP address, corresponding server sends probe requests thereby, specifically comprises:
According to default detect cycle and detection times, in the time that described detect cycle arrives, the server corresponding to described IP address sends probe requests thereby, reach described detection times until send the number of times of probe requests thereby, wherein, described detect cycle is less than TTL corresponding to current described mapping relations with the product of described detection times.
6. method as claimed in claim 3, is characterized in that, in the time not determining server corresponding to described IP address in non-service state for K time continuously, described method also comprises:
Determine the 3rd URL under the domain name of described website;
Based on described the 3rd URL determining, the server corresponding to described IP address sends probe requests thereby;
Judge whether to receive the probe response that server corresponding to described IP address returns for this probe requests thereby, if so, determine that to detect server corresponding to described IP address normal, otherwise, determine that to detect server corresponding to described IP address undesired.
7. the method as described in as arbitrary in claim 1 ~ 6, is characterized in that, before the TTL after renewal expires, whether normally continues to survey server corresponding to described IP address, specifically comprises:
Determine the 4th URL under the domain name of described website, based on described the 4th URL determining, whether normally continue to survey server corresponding to described IP address.
8. a sniffer for domain name system DNS server, is characterized in that, comprising:
Determination module, for the website domain name for dns server is preserved in net and the mapping relations of network interconnection protocol IP address, determines the time-to-live TTL that current described mapping relations are corresponding;
Whether normal detecting module, before expiring at described TTL, survey server corresponding to described IP address;
Update module, for determining and detect server corresponding to described IP address when normal at described detecting module, upgrade TTL corresponding to mapping relations described in dns server in described net, and indicate before the TTL of described detecting module after renewal expire, whether normally continue to survey server corresponding to described IP address;
Removing module, for determining and detect server corresponding to described IP address when undesired at described detecting module, indicates dns server in described net to delete described mapping relations.
9. device as claimed in claim 8, is characterized in that, described device also comprises:
Writing module, for determining the first uniform resource position mark URL under the domain name of described website, according to the IP address corresponding to described website domain name of preserving in advance, based on a described URL who determines, the server corresponding to described IP address sends probe requests thereby, in the time receiving the probe response that server corresponding to described IP address return for this probe requests thereby, by described website domain name, IP address, and predefined TTL sends to dns server in described net, indicate dns server in described net set up the mapping relations of described website domain name and described IP address and preserve, and using described predefined TTL as TTL corresponding to described mapping relations.
10. device as claimed in claim 8, is characterized in that, described detecting module specifically for, determine the second uniform resource position mark URL under the domain name of described website; Based on described the 2nd URL determining, periodically to described IP address, corresponding server sends probe requests thereby; The each probe requests thereby sending for the server corresponding to described IP address, if receive the probe response that server corresponding to described IP address returns for this probe requests thereby, determine that server corresponding to described IP address is in service state, if do not receive the probe response that server corresponding to described IP address returns for this probe requests thereby, determine that server corresponding to described IP address is in non-server state; In the time determining server corresponding to described IP address in non-service state continuous K time, determine that to detect server corresponding to described IP address undesired, otherwise, determine that to detect server corresponding to described IP address normal, wherein, K is for setting quantity.
11. devices as claimed in claim 10, is characterized in that, described detecting module specifically for, adopt a HEAD request mode of HTML (Hypertext Markup Language) HTTP, periodically to described IP address, corresponding server sends probe requests thereby.
12. devices as claimed in claim 10, it is characterized in that, described detecting module specifically for, according to default detect cycle and detection times, in the time that described detect cycle arrives, the server corresponding to described IP address sends probe requests thereby, reaches described detection times until send the number of times of probe requests thereby, wherein, described detect cycle is less than TTL corresponding to current described mapping relations with the product of described detection times.
13. devices as claimed in claim 10, is characterized in that, described detecting module also for, in the time that continuously server corresponding to K definite described IP address is in non-service state, determine the 3rd URL under the domain name of described website; Based on described the 3rd URL determining, the server corresponding to described IP address sends probe requests thereby; Judge whether to receive the probe response that server corresponding to described IP address returns for this probe requests thereby, if so, determine that to detect server corresponding to described IP address normal, otherwise, determine that to detect server corresponding to described IP address undesired.
14. devices as described in as arbitrary in claim 8 ~ 13, is characterized in that, described detecting module specifically for, determine the 4th URL under the domain name of described website, before TTL after renewal expires, based on described the 4th URL determining, whether normally continue to survey server corresponding to described IP address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210414759.5A CN103780714B (en) | 2012-10-25 | 2012-10-25 | The detection method of a kind of dns server and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210414759.5A CN103780714B (en) | 2012-10-25 | 2012-10-25 | The detection method of a kind of dns server and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103780714A true CN103780714A (en) | 2014-05-07 |
CN103780714B CN103780714B (en) | 2016-12-21 |
Family
ID=50572529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210414759.5A Active CN103780714B (en) | 2012-10-25 | 2012-10-25 | The detection method of a kind of dns server and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103780714B (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105681482A (en) * | 2015-12-28 | 2016-06-15 | 哈尔滨工业大学 | DNS cache detection error correction method |
CN105871661A (en) * | 2016-06-16 | 2016-08-17 | 上海帝联信息科技股份有限公司 | Public network server detection method and detection server |
CN106789422A (en) * | 2016-12-16 | 2017-05-31 | 杭州迪普科技股份有限公司 | The monitoring method and device of a kind of dns server |
CN107231446A (en) * | 2016-03-23 | 2017-10-03 | 北京京东尚科信息技术有限公司 | Synchronous IP collocation methods and device |
CN107786678A (en) * | 2016-08-24 | 2018-03-09 | 北京金山云网络技术有限公司 | Domain name analytic method, apparatus and system |
CN107819890A (en) * | 2017-09-28 | 2018-03-20 | 安徽乐游网络科技有限公司 | A kind of domain name term of validity monitoring and alarm method |
CN108243265A (en) * | 2016-12-27 | 2018-07-03 | 中国移动通信集团浙江有限公司 | A kind of dns resolution processing method and processing device |
CN108259630A (en) * | 2016-12-29 | 2018-07-06 | 中国电信股份有限公司 | Non- recorded website detection method, platform and system |
CN108833424A (en) * | 2018-06-25 | 2018-11-16 | 哈尔滨工业大学 | A kind of system obtaining all resource records of domain name |
CN109842566A (en) * | 2019-01-10 | 2019-06-04 | 杭州迪普科技股份有限公司 | A kind of dns resolution method and device |
CN112543141A (en) * | 2020-12-04 | 2021-03-23 | 互联网域名系统北京市工程研究中心有限公司 | DNS forwarding server disaster tolerance scheduling method and system |
CN112839089A (en) * | 2021-01-08 | 2021-05-25 | 网宿科技股份有限公司 | CDN quality detection method and system |
CN113472910A (en) * | 2021-06-07 | 2021-10-01 | 广州根链国际网络研究院有限公司 | DNS authority record health monitoring method and system |
-
2012
- 2012-10-25 CN CN201210414759.5A patent/CN103780714B/en active Active
Non-Patent Citations (5)
Title |
---|
JAEYEON JUNG, ARTHUR W. BERGER,HARI BALAKRISHNAN: "Modeling TTL-based Internet Caches", 《2003 IEEE》 * |
SALEEM N. BHATTI,RANDALL ATKINSON: "Reducing DNS Caching", 《14TH IEEE GLOBAL INTERNET SYMPOSLUM》 * |
XIN CHEN, HAINING WANG,SHANSI REN,XIAODONG ZHANG: "Maintaining Strong Cache Consistency for the Domain Name System", 《IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING》 * |
YI WU, JANNE TUONONEN, MIKAEL LATVALA: "An Analytical Model for DNS Performance with TTL Value 0 in Mobile Internet", 《2006 IEEE》 * |
张志立,谢嵘,齐德昱: "基于再生策略的DNS 加速器设计与实现", 《计算机工程》 * |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105681482A (en) * | 2015-12-28 | 2016-06-15 | 哈尔滨工业大学 | DNS cache detection error correction method |
CN107231446A (en) * | 2016-03-23 | 2017-10-03 | 北京京东尚科信息技术有限公司 | Synchronous IP collocation methods and device |
CN105871661B (en) * | 2016-06-16 | 2019-07-26 | 上海帝联信息科技股份有限公司 | Public network server detection method and detecting server |
CN105871661A (en) * | 2016-06-16 | 2016-08-17 | 上海帝联信息科技股份有限公司 | Public network server detection method and detection server |
CN107786678A (en) * | 2016-08-24 | 2018-03-09 | 北京金山云网络技术有限公司 | Domain name analytic method, apparatus and system |
CN106789422A (en) * | 2016-12-16 | 2017-05-31 | 杭州迪普科技股份有限公司 | The monitoring method and device of a kind of dns server |
CN106789422B (en) * | 2016-12-16 | 2020-05-12 | 杭州迪普科技股份有限公司 | Monitoring method and device of DNS (Domain name Server) |
CN108243265A (en) * | 2016-12-27 | 2018-07-03 | 中国移动通信集团浙江有限公司 | A kind of dns resolution processing method and processing device |
CN108259630B (en) * | 2016-12-29 | 2021-01-12 | 中国电信股份有限公司 | Detection method, platform and system for unregistered website |
CN108259630A (en) * | 2016-12-29 | 2018-07-06 | 中国电信股份有限公司 | Non- recorded website detection method, platform and system |
CN107819890A (en) * | 2017-09-28 | 2018-03-20 | 安徽乐游网络科技有限公司 | A kind of domain name term of validity monitoring and alarm method |
CN108833424A (en) * | 2018-06-25 | 2018-11-16 | 哈尔滨工业大学 | A kind of system obtaining all resource records of domain name |
CN109842566A (en) * | 2019-01-10 | 2019-06-04 | 杭州迪普科技股份有限公司 | A kind of dns resolution method and device |
CN112543141A (en) * | 2020-12-04 | 2021-03-23 | 互联网域名系统北京市工程研究中心有限公司 | DNS forwarding server disaster tolerance scheduling method and system |
CN112839089A (en) * | 2021-01-08 | 2021-05-25 | 网宿科技股份有限公司 | CDN quality detection method and system |
CN112839089B (en) * | 2021-01-08 | 2023-06-23 | 网宿科技股份有限公司 | CDN quality detection method and system |
CN113472910A (en) * | 2021-06-07 | 2021-10-01 | 广州根链国际网络研究院有限公司 | DNS authority record health monitoring method and system |
Also Published As
Publication number | Publication date |
---|---|
CN103780714B (en) | 2016-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103780714A (en) | Method and apparatus for probing DNS server | |
CN103167044B (en) | The method of the intelligently parsing of domain name system DNS, testing device and system | |
CN107395683B (en) | Method for selecting return path and server | |
CN103051740B (en) | Domain name analytic method, dns server and domain name analysis system | |
CN109067930B (en) | Domain name access method, domain name resolution method, server, terminal and storage medium | |
US8577992B1 (en) | Request routing management based on network components | |
CN103888358B (en) | Routing method, device, system and gateway equipment | |
CN102136969B (en) | Method, device and system for probing link quality | |
CN104158919A (en) | Webpage access implementation method, server and client | |
US20150195244A1 (en) | Request routing management based on network components | |
CN101771585B (en) | Network delay measuring equipment and method thereof | |
CN108234207B (en) | Fault positioning method and device based on Content Delivery Network (CDN) | |
CN103338279A (en) | Optimal sorting method and system based on domain name resolution | |
CN101989951A (en) | Method, system and equipment for selecting service node | |
CN105871975A (en) | Method and device for selecting source server | |
CN105516385A (en) | Domain name resolution method, server and system | |
CN108600051B (en) | BGP Anycast cluster service quality detection method and detection equipment | |
CN104113447A (en) | Method, device and system for monitoring domain name resolution pollution | |
CN105610993B (en) | A kind of domain name analytic method, apparatus and system | |
CN103312716A (en) | Internet information accessing method and system | |
CN102394944B (en) | Method and equipment for correcting IP (Internet Protocol) address in Web access | |
CN103825919A (en) | Method, device and system for data resource caching | |
CN103825923A (en) | Resource download method, business server and mobile phone client-terminal | |
CN102938716A (en) | Content distribution network acceleration test method and device | |
CN103338278A (en) | Accelerating method and device for web page browsing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |