CN107888714B - Method and device for selecting local cache DNS - Google Patents

Method and device for selecting local cache DNS Download PDF

Info

Publication number
CN107888714B
CN107888714B CN201711045450.2A CN201711045450A CN107888714B CN 107888714 B CN107888714 B CN 107888714B CN 201711045450 A CN201711045450 A CN 201711045450A CN 107888714 B CN107888714 B CN 107888714B
Authority
CN
China
Prior art keywords
local cache
dns
cache dns
cidr
client
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
CN201711045450.2A
Other languages
Chinese (zh)
Other versions
CN107888714A (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.)
Guizhou Baishan Cloud Polytron Technologies Inc
Original Assignee
Guizhou Baishan Cloud Polytron Technologies 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 Guizhou Baishan Cloud Polytron Technologies Inc filed Critical Guizhou Baishan Cloud Polytron Technologies Inc
Priority to CN201711045450.2A priority Critical patent/CN107888714B/en
Publication of CN107888714A publication Critical patent/CN107888714A/en
Application granted granted Critical
Publication of CN107888714B publication Critical patent/CN107888714B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/695Types of network addresses using masks or ranges of addresses

Abstract

The invention discloses a method and a device for selecting a local cache DNS, wherein the method comprises the following steps: determining a mask bit for a DNS expansion protocol function under a combination pair of a local cache DNS IP and a network region; acquiring a CIDR host IP corresponding to a client IP under the use condition of mask bits of different local cache DNS IPs and combination pairs of network areas; and determining a network area where the client IP and each CIDR host IP belong to the same, and selecting a local cache DNS from the network area. When the local cache DNS with the DNS extension protocol function is used, the consistency of the network areas of the client IP and the host IP of the CIDR is referred, so that the local cache DNS with the DNS extension protocol function can accurately transmit the network area information of the client IP.

Description

Method and device for selecting local cache DNS
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for selecting a local cache DNS.
Background
In an existing internet service system, in order to improve access quality of a client, an intelligent scheduling technology is generally used to guide access of a user to a node closest to the user for service. Namely, the network area where the client is located is positioned, the nearest and optimal node of the network area where the service client is located is selected, and network access service is carried out. The accurate determination of the network area of the client IP is a core issue.
At present, a common way to realize intelligent scheduling is to realize an intelligent scheduling function through a DNS partition resolution function.
As shown in figure 1 of the drawings, in which,
1. and the client requests to access the IP corresponding to the domain name from the local cache DNS.
2. The local cache DNS (8.8.8.8) queries the local cache if the content is not cached, and requests the DNS authority server of the CDN intelligent scheduling system for access to the IP of the domain name.
3. A DNS authoritative server of the CDN intelligent scheduling system acquires a recursive outlet IP (IP2) of a local cache DNS, matches a local IP library to determine a network region of the IP, and intelligently schedules according to the network region to select the IP with the best service for service.
The authoritative server in FIG. 1 can only obtain the information of IP2, IP3 and IP4, and perform intelligent analysis according to IP 2.
In order to solve the problem, the local cache DNS realizes a DNS extension protocol function, namely a function of allowing a domain name resolution device to transmit an IP address of a user to an authoritative DNS server, namely an DNS-client-subnet function, so that the local cache DNS can carry the IP of the client to transmit to the DNS authoritative server of the intelligent scheduling system, the authoritative server of the DNS can carry the IP of the client to carry out network area positioning according to the IP of the client carried by the local cache DNS, and intelligent scheduling is carried out according to the IP of the client to select the IP with the best service for service.
As shown in figure 2 of the drawings, in which,
1. client requests local cache DNS for accessing IP corresponding to domain name
2. The local cache DNS (8.8.8.8) queries the local cache if the content is not cached, and requests the DNS authority server of the CDN intelligent scheduling system for access to the IP of the domain name. The request packet carries the client IP (IP1) accessed.
3. The DNS authoritative server of the CDN intelligent scheduling system acquires a client IP (IP1) carried by a local cache DNS, matches with a local IP library to determine a network area of the IP, and intelligently schedules according to the network area to select the IP with the best service for service.
In practical implementation, in order to hide an IP of a real client and reduce resolution pressure of a local cache DNS (two types of local cache DNS), a public DNS or an operator DNS (a local cache DNS) may mask a client IP into a CIDR according to a certain mask bit and send the CIDR to a DNS authority server when carrying the client IP, and at this time, when a host IP and the client IP in the CIDR are not in a unified area, inaccurate network area positioning may be caused, and accuracy of intelligent scheduling may be affected. The patent judges whether the local cache DNS with the DNS-client-subnet function can cause inaccurate positioning by reasonably evaluating the network regional relationship between the client IP and the host IP in the CIDR, determines whether the client IP can use the designated local cache DNS server, and solves the problem of inaccurate positioning
CIDR: category-free inter-domain routing, referred to herein as bit-formats of subnet masks, e.g., 192.168.0.0/24, 192.168.1.8/32, etc
Mask bits: the number of bits of the subnet mask, e.g. 24 and 32 in the above example
For example, if the client IP is 192.168.1.8, the local cache DNS gets CIDR as per mask bit of 24: 192.168.1.0/24, a DNS authoritative server of the CDN intelligent scheduling system obtains 192.168.1.0/24 and uses 192.168.1.0 to perform network area location of the client, and location abnormality can be caused once the network areas of the client IP192.168.1.8 and the host IP192.168.1.0 of the CIDR are different. Therefore, the local cache DNS service can be used only when the host IP network areas of the client IP and CIDR need to be guaranteed to be consistent.
In the prior art, when a client selects a local cache DNS with an DNS-client-subnet function, the consistency of the host IP network areas of the client IP and the CIDR is not considered, so that the intelligent scheduling system does not accurately determine the client IP network area, and the final service quality is affected.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a device for selecting a local cache DNS.
The invention provides a method for selecting a local cache DNS, which comprises the following steps:
determining a mask bit for a DNS expansion protocol function under a combination pair of a local cache DNS IP and a network region;
acquiring a CIDR host IP corresponding to a client IP under the use condition of mask bits of different local cache DNS IPs and combination pairs of network areas;
and determining a network area where the client IP and each CIDR host IP belong to the same, and selecting a local cache DNS from the network area.
Further, the method also has the following characteristics:
selecting a local caching DNS from the network region comprises: when a plurality of local cache DNS servers are available in the network area, each local cache DNS IP in the network area is obtained, and the local cache DNS IP corresponding to the maximum mask bit in the corresponding mask bits is selected.
Further, the method also has the following characteristics:
determining a combination of a local cache DNS IP and a network region for a mask bit for DNS extension protocol functionality under the pair comprises:
determining a local cache DNS IP list for a DNS extension protocol function;
setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, acquiring a log of the test domain name, and acquiring mask bits for a DNS extension protocol function under the combination pair of the local cache DNS IP and a network region from the log.
Further, the method also has the following characteristics:
determining a combination of a local cache DNS IP and a network region for a mask bit for DNS extension protocol functionality under the pair comprises:
determining a local cache DNS IP list for a DNS extension protocol function;
setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, capturing the analysis request and a response message of the test domain name, and extracting mask bits from the optsunnet field of the message.
Further, the method also has the following characteristics:
acquiring a CIDR host IP corresponding to a client IP under the mask bit use condition of different local cache DNS IPs and network area combination pairs comprises the following steps:
and generating a CIDR format by the client IP according to the mask bit under the combination pair of the local cache DNS IP and the network area, and extracting the CIDR host IP from the CIDR format.
Further, the method also has the following characteristics:
when the network areas of the client IP and the CIDR host IPs belong to the same network area are determined, the network area of the client IP is obtained according to the IP library of the scheduling system, the network area of the CIDR host IP is obtained according to the IP library of the scheduling system, and when the network areas of the client IP and the CIDR host IP are the same, the network area is used as the network area of the client IP and the CIDR host IP which belong to the same network area.
The invention also provides a device for selecting the local cache DNS, which comprises the following steps:
the mask bit determining module is used for determining mask bits for DNS expansion protocol functions under the combination pair of the local cache DNS IP and the network region;
the CIDR host IP determining module is used for acquiring the corresponding CIDR host IP under the condition that the client IP uses mask bits of different local cache DNS IPs and combination pairs of network areas;
the network area determining module is used for determining the network area where the client IP and each CIDR host IP belong to the same;
and the selection module is used for selecting the local cache DNS from the network area selected by the network area determination module.
Further, the device also has the following characteristics:
and the selecting module is used for acquiring each local cache DNS IP in the network region when a plurality of available local cache DNS servers exist in the network region, and selecting the local cache DNS IP corresponding to the maximum mask bit in the corresponding mask bits.
Further, the device also has the following characteristics:
a mask bit determination module, configured to determine mask bits for DNS extension protocol functions for a combination of a local cache DNS IP and a network region, using the following method:
determining a local cache DNS IP list for a DNS extension protocol function;
setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, acquiring a log of the test domain name, and acquiring mask bits for a DNS extension protocol function under the combination pair of the local cache DNS IP and a network region from the log.
Further, the device also has the following characteristics:
a mask bit determination module, configured to determine mask bits for DNS extension protocol functions for a combination of a local cache DNS IP and a network region, using the following method: determining a local cache DNS IP list used for a DNS extension protocol function, setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, capturing the analysis request and a response message of the test domain name, and extracting mask bits from an optsunnet field of the message.
Further, the device also has the following characteristics:
the CIDR host IP determining module is used for acquiring the corresponding CIDR host IP under the use condition of mask bits of different combination pairs of local cache DNSIP and network areas of the client IP by using the following method: and generating a CIDR format for the client IP according to the mask bits under the combination pair of the local cache DNS IP and the network area, and extracting the CIDR host IP from the CIDR format.
Further, the device also has the following characteristics:
a network area determining module, configured to determine a network area to which the client IP and each CIDR host IP belong using the following method: and acquiring the network area to which the client IP belongs according to the IP library of the scheduling system, acquiring the network area to which the CIDR host IP belongs according to the IP library of the scheduling system, and taking the network area as the network area to which the client IP and each CIDR host IP belong when the network areas to which the client IP and the CIDR host IP belong are the same.
When the local cache DNS with the DNS extension protocol function is used, the consistency of the network areas of the host IP of the client IP and the CIDR is referred, and the local cache DNS with the DNS extension protocol function can accurately transmit the network area information of the client IP.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a diagram of a DNS zone resolution function in the prior art;
FIG. 2 is a schematic diagram of another DNS zone resolution function in the prior art;
FIG. 3 is a flow diagram of a method of selecting a local cache DNS in an embodiment;
fig. 4 is a flowchart of an apparatus for selecting a local cache DNS in an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
FIG. 3 is a flow diagram of a method of selecting a local cache DNS in an embodiment; the method comprises the following steps:
step 1, determining a mask bit for a DNS expansion protocol function under a combination pair of a local cache DNS IP and a network region;
step 2, acquiring a CIDR host IP corresponding to the client IP under the use condition of mask bits of different local cache DNS IPs and combination pairs of network areas;
and 3, determining the network area where the client IP and each CIDR host IP belong to the same, and selecting a local cache DNS from the network area.
By the method, the local cache DNS can be selected in the network area where the client IP and each CIDR host IP belong to the same domain, and when the local cache DNS with the DNS extension protocol function is used, the consistency of the network areas of the client IP and the host IP of the CIDR is referred to, so that the local cache DNS with the DNS extension protocol function can accurately transmit the network area information of the client IP.
Wherein the content of the first and second substances,
in step 1, the DNS extension protocol function refers to a function that allows the domain name resolution device to transmit the ip address of the user to the authoritative DNS server, and is called an DNS-client-subnet function.
In step 1, determining the combination of the local cache DNS IP and the network area for the following mask bits for the DNS-client-subnet function includes the following two ways:
the first method is as follows:
step 101, determining a local cache DNS IP list for the DNS-client-subnet function.
For example:
the local cache DNS IP list includes: 1.1.1.1, 2.2.2.2.
Step 102, setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, obtaining a log of the test domain name, and obtaining a mask bit for the edge-client-subnet function of the combination pair of the local cache DNS IP and the network region from the log. Specifically, each network area is provided with a detection server, and a detection program and a local cache DNSIP list are arranged in the detection server. After the detection program is started, the detection server constructs a test domain name for each IP in the local cache DNS IP list (when the test domain name is constructed, each test domain name can be a DNS IP plus a fixed domain name to ensure that each domain name is only corresponding to one local cache DNS), and sends an analysis domain name to each IP in the local cache DNS IP list at intervals of a time period to be the pre-constructed test domain name.
For example: the probing domain name set for 1.1.1.1 in the local caching DNS IP list in the above example is 1.1.1.1.test.com, and the probing domain name set for 2.2.2.2 in the local caching DNS IP list in the above example is 2.2.2.2. test.com. And sending a detection request with a detection domain name of 1.1.1.1.test.com to 1.1.1.1 and sending a detection request with a detection domain name of 2.2.2.2.test.com to 2.2.2.2 at intervals.
The content of the CIDR field obtained from the log is as follows:
TABLE 1
Detecting domain names Network area CIDR field
1.1.1.1.test.com Unicom Beijing 192.168.1.1/32
1.1.1.1.test.com Telecommunication Shanghai 192.168.1.0/24
2.2.2.2.test.com Unicom Beijing 192.168.0.0/16
2.2.2.2.test.com Telecommunication Shanghai 192.168.2.0/24
Finally, the combination of the local cache DNS IP and the network area is obtained as follows for the following mask bits for the DNS-client-subnet function:
TABLE 2
Local cacheStoring DNS IP Network area Masking bit
1.1.1.1 Unicom Beijing 32
1.1.1.1 Telecommunication Shanghai 24
2.2.2.2 Unicom Beijing 16
2.2.2.2 Telecommunication Shanghai 24
The second method comprises the following steps:
determining a local cache DNS IP list for a DNS extension protocol function; setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, capturing the analysis request and a response message of the test domain name, and extracting mask bits from an optsunnet field of the message.
The step 2 of obtaining the CIDR host IP corresponding to the client IP under the mask bit use condition of different local cache DNS IP and network area combination pairs comprises: and generating a CIDR format for the client IP according to the mask bit under the combination pair of the local cache DNS IP and the network area, and extracting the CIDR host IP from the CIDR format.
For example:
the IP of the Unicom Beijing netizen is 172.16.1.1, and the IP of the telecom Shanghai netizen is 172.16.2.1. The client IP is 172.16.1.1 and the mask bitmap is shown in table 2.
TABLE 3
Figure BDA0001452173130000091
In step 3, when the network areas of the client IP and the CIDR host IPs belong to the same network area are determined, the network area of the client IP is obtained according to the IP library of the scheduling system, the network area of the CIDR host IP is obtained according to the IP library of the scheduling system, and when the network areas of the client IP and the CIDR host IP are the same, the network area is used as the network area of the client IP and the CIDR host IP which belong to the same network area.
For example:
the network area corresponding to the CIDR host IP in the IP library of the dispatching system is as follows:
TABLE 4
CIDR host IP Network area
172.16.1.1 Unicom Beijing
172.16.2.1 Shanghai telecommunication
172.16.2.0 Shanghai telecommunication
172.16.0.0 United states of America
If the network areas of the client IP and the CIDR host IP are consistent, the local cache DNS is in the network area and can provide service for the client IP; if not, the service can not be provided for the client IP.
After the network area of the client IP is obtained, table 5 is obtained:
Figure BDA0001452173130000101
after the network area of the CIDR host IP is obtained, table 6 is obtained:
Figure BDA0001452173130000102
as can be seen from Table 6, the Unicom Beijing netizen 1.1.1 is the same and usable, and the Unicom Beijing netizen 2.2.2 is different and unusable, so the Unicom Beijing netizen 172.16.1.1 can use 1.1.1.1. The telecom shanghai netizen is the same at 1.1.1.1 and 2.2.2.2, so telecom shanghai netizen 172.16.2.1 can use 1.1.1.1 and 2.2.2.2.
Selecting a local caching DNS from the network region comprises: and obtaining each local cache DNSIP in the network area, and selecting the local cache DNS IP corresponding to the maximum mask bit in the corresponding mask bits. And if the mask bits corresponding to the local cache DNS IPs in the network area are the same, randomly selecting a local cache DNS IP. For example, in the area of the network in the Shanghai of telecommunications, the mask bits are all the same, and a local cache DNS IP can be arbitrarily selected.
Fig. 4 is a block diagram of an apparatus for selecting a local cache DNS according to an embodiment, the apparatus includes:
the mask bit determining module is used for determining mask bits for DNS expansion protocol functions under the combination pair of the local cache DNS IP and the network region;
the CIDR host IP determining module is used for acquiring the corresponding CIDR host IP under the condition that the client IP uses mask bits of different local cache DNS IPs and combination pairs of network areas;
the network area determining module is used for determining the network area where the client IP and each CIDR host IP belong to the same;
and the selection module is used for selecting the local cache DNS from the network area selected by the network area determination module.
Wherein the content of the first and second substances,
the selection module is used for acquiring each local cache DNS IP in the network region when a plurality of available local cache DNS servers exist in the network region, and selecting the local cache DNS IP corresponding to the maximum mask bit in the corresponding mask bits.
The mask bit determining module is used for determining mask bits for DNS extension protocol functions under the combination pair of the local cache DNS IP and the network region by using the following method one or method two:
the method comprises the steps of determining a local cache DNS IP list for a DNS extension protocol function; setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNSIP by using the test domain name, acquiring a log of the test domain name, and acquiring a mask bit for a DNS extension protocol function under the combination pair of the local cache DNS IP and a network region from the log.
Determining a local cache DNS IP list used for the DNS extension protocol function, setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to a corresponding local cache DNSIP by using the test domain name, capturing the analysis request and a response message of the test domain name, and extracting mask bits from an optsunnet field of the message.
The CIDR host IP determining module is used for acquiring the corresponding CIDR host IP of the client IP under the mask bit use condition of different local cache DNS IP and network area combination pairs by using the following method: and generating a CIDR format by the client IP according to the mask bit under the combination pair of the local cache DNS IP and the network area, and extracting the CIDR host IP from the CIDR format.
The network area determining module is used for determining the network area of the client IP and each CIDR host IP which belong to the same domain by using the following method: and acquiring the network area to which the client IP belongs according to the IP library of the scheduling system, acquiring the network area to which the CIDR host IP belongs according to the IP library of the scheduling system, and taking the network area as the network area to which the client IP and each CIDR host IP belong when the network areas to which the client IP and the CIDR host IP belong are the same.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by associated hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
It is noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device in which the element is included.
The above embodiments are merely to illustrate the technical solutions of the present invention and not to limit the present invention, and the present invention has been described in detail with reference to the preferred embodiments. It will be understood by those skilled in the art that various modifications and equivalent arrangements may be made without departing from the spirit and scope of the present invention and it should be understood that the present invention is to be covered by the appended claims.

Claims (10)

1. A method for selecting a local cache DNS, comprising:
determining a mask bit for a DNS expansion protocol function under a combination pair of a local cache DNS IP and a network region;
acquiring a CIDR host IP corresponding to a client IP under the use condition of mask bits of different local cache DNS IPs and combination pairs of network areas;
determining a network area where the client IP and each CIDR host IP belong to the same, and selecting a local cache DNS from the network area;
the selecting a local caching DNS from the network area comprises: and when a plurality of available local cache DNS servers exist in the network region, acquiring each local cache DNS IP in the network region, and selecting the local cache DNS IP corresponding to the maximum mask bit in the corresponding mask bits.
2. The method of selecting a local cache DNS of claim 1,
the determining of the mask bits for the DNS extension protocol function under the combination of the local cache DNS IP and the network region comprises:
determining a local cache DNS IP list for a DNS extension protocol function;
setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, acquiring a log of the test domain name, and acquiring mask bits for DNS extension protocol functions under the combination of the local cache DNS IP and a network region from the log.
3. The method of selecting a local cache DNS of claim 1,
the determining of the mask bits for the DNS extension protocol function under the combination of the local cache DNS IP and the network region comprises:
determining a local cache DNS IP list for a DNS extension protocol function;
setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, capturing the analysis request and a response message of the test domain name, and extracting mask bits from an optsunnet field of the message.
4. The method of selecting a local cache DNS of claim 1,
the acquiring the CIDR host IP corresponding to the client IP under the mask bit use condition of different local cache DNS IP and network area combination pairs comprises the following steps:
and generating a CIDR format by the client IP according to the mask bit under the combination pair of the local cache DNS IP and the network area, and extracting the CIDR host IP from the CIDR format.
5. The method of selecting a local cache DNS of claim 1,
and when the network areas of the client IP and the CIDR host IPs belong to the same network area are determined, acquiring the network area of the client IP according to a scheduling system IP library, acquiring the network area of the CIDR host IPs according to the scheduling system IP library, and taking the network area as the network area of the client IP and the CIDR host IPs which belong to the same network area when the network areas of the client IP and the CIDR host IPs are the same.
6. An apparatus for selecting a local cache DNS, comprising:
the mask bit determining module is used for determining mask bits for DNS expansion protocol functions under the combination pair of the local cache DNS IP and the network region;
the CIDR host IP determining module is used for acquiring the corresponding CIDR host IP under the condition that the client IP uses mask bits of different local cache DNS IPs and combination pairs of network areas;
the network area determining module is used for determining the network area where the client IP and each CIDR host IP belong to the same;
the selection module is used for selecting a local cache DNS from the network area selected by the network area determination module;
the selection module is used for acquiring each local cache DNS IP in the network area when a plurality of available local cache DNS servers exist in the network area, and selecting the local cache DNSIP corresponding to the maximum mask bit in the corresponding mask bits.
7. The apparatus to select local cache DNS of claim 6,
the mask bit determining module is used for determining mask bits for DNS extension protocol functions under the combination pair of the local cache DNS IP and the network region by using the following method:
determining a local cache DNS IP list for a DNS extension protocol function;
setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to the corresponding local cache DNS IP by using the test domain name, acquiring a log of the test domain name, and acquiring mask bits for DNS extension protocol functions under the combination of the local cache DNS IP and a network region from the log.
8. The apparatus to select local cache DNS of claim 6,
the mask bit determining module is used for determining mask bits for DNS extension protocol functions under the combination pair of the local cache DNS IP and the network region by using the following method: determining a local cache DNS IP list used for a DNS extension protocol function, setting a unique test domain name for each local cache DNS IP in the local cache DNS IP list, sending an analysis request to a corresponding local cache DNS IP by using the test domain name, capturing the analysis request and a response message of the test domain name, and extracting mask bits from an optsunnet field of the message.
9. The apparatus to select local cache DNS of claim 6,
the CIDR host IP determining module is configured to obtain a CIDR host IP corresponding to the client IP under the mask bit usage condition of the combined pair of the different local cache DNS IP and the network area by using the following method: and generating a CIDR format by the client IP according to the mask bit under the combination pair of the local cache DNS IP and the network area, and extracting the CIDR host IP from the CIDR format.
10. The apparatus to select local cache DNS of claim 6,
the network area determining module is configured to determine a network area to which the client IP and each CIDR host IP belong using the following method: and acquiring the network area to which the client IP belongs according to a scheduling system IP library, acquiring the network area to which the CIDR host IP belongs according to the scheduling system IP library, and taking the network area as the network area to which the client IP and each CIDR host IP belong when the network areas to which the client IP and the CIDR host IP belong are the same.
CN201711045450.2A 2017-10-31 2017-10-31 Method and device for selecting local cache DNS Active CN107888714B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711045450.2A CN107888714B (en) 2017-10-31 2017-10-31 Method and device for selecting local cache DNS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711045450.2A CN107888714B (en) 2017-10-31 2017-10-31 Method and device for selecting local cache DNS

Publications (2)

Publication Number Publication Date
CN107888714A CN107888714A (en) 2018-04-06
CN107888714B true CN107888714B (en) 2020-02-11

Family

ID=61783143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711045450.2A Active CN107888714B (en) 2017-10-31 2017-10-31 Method and device for selecting local cache DNS

Country Status (1)

Country Link
CN (1) CN107888714B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392123B (en) * 2018-04-23 2022-06-14 阿里巴巴集团控股有限公司 Method, device and system for detecting outlet IP address
CN113067909B (en) * 2020-01-02 2023-04-07 中国移动通信有限公司研究院 Edge node addressing method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557349A (en) * 2009-05-26 2009-10-14 孙斌 Method and system for processing Internet data message
CN106790747A (en) * 2016-12-13 2017-05-31 北京网瑞达科技有限公司 A kind of method of the secondary recursion resolution of domain name system DNS

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10805110B2 (en) * 2015-03-27 2020-10-13 Akamai Technologies, Inc. Traffic delivery using anycast and end user-based mapping in an overlay network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557349A (en) * 2009-05-26 2009-10-14 孙斌 Method and system for processing Internet data message
CN106790747A (en) * 2016-12-13 2017-05-31 北京网瑞达科技有限公司 A kind of method of the secondary recursion resolution of domain name system DNS

Also Published As

Publication number Publication date
CN107888714A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
CN107395683B (en) Method for selecting return path and server
US10742550B2 (en) Updating routing information based on client location
CN111541796B (en) CDN access flow scheduling method, device, communication system and storage medium
EP3567881B1 (en) Request routing and updating routing information utilizing client location information
CN102859942B (en) Using DNS reflection to measure network performance
KR101668272B1 (en) Characterizing unregistered domain names
CN101764855A (en) Method, device and system for providing domain name resolution services
CN103873604B (en) Network access method based on analysis of CDN data
CN107786678B (en) Domain name resolution method, device and system
JP2014516499A (en) Global traffic management using changed hostnames
CN108111548A (en) A kind of domain name system attack detection method, apparatus and system
CN107888714B (en) Method and device for selecting local cache DNS
CN111447304A (en) Anycast node IP address enumeration method and system for anycast recursive domain name system
CN113037680A (en) Application server access method and device based on domain name resolution result
CN108848205A (en) A kind of CNAME domain name analytic method for distinguishing IPv4, IPv6
CN107135238A (en) A kind of DNS reflection amplification attacks detection method, apparatus and system
CN109474698A (en) Access request labeling method, device, equipment and storage medium
CN106411819A (en) Method and apparatus for recognizing proxy Internet protocol address
CN111371914A (en) IP library generation method, domain name resolution method, electronic device and readable storage medium
KR100342107B1 (en) Methods for deciding Internet address groups distinguished by assigned organizations or locations and for resolving the geographical information for each address group, which are intended to set up Internet address supplementary system and its applications
CN112040027B (en) Data processing method and device, electronic equipment and storage medium
CN112532765B (en) Network access method and system thereof
CN114500456B (en) DNS (Domain name System) scheduling optimization method and device based on whole network sniffing and computing equipment
US10193853B1 (en) Web browser or web service based detection of internet facing DNS server
CN111082977B (en) Method and device for acquiring IP address and terminal equipment

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
CB02 Change of applicant information

Address after: 550003 Building No. 12 in the Southern Park of Gui'an High-end Equipment Industrial Park, Guizhou Province

Applicant after: Guizhou Baishan cloud Polytron Technologies Inc

Address before: 100015 5 floor, block E, 201 IT tower, electronic city, 10 Jiuxianqiao Road, Chaoyang District, Beijing.

Applicant before: Guizhou white cloud Technology Co., Ltd.

CB02 Change of applicant information
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1253409

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant