CN106027695B - Method for obtaining IP used by recursive DNS - Google Patents

Method for obtaining IP used by recursive DNS Download PDF

Info

Publication number
CN106027695B
CN106027695B CN201610550699.8A CN201610550699A CN106027695B CN 106027695 B CN106027695 B CN 106027695B CN 201610550699 A CN201610550699 A CN 201610550699A CN 106027695 B CN106027695 B CN 106027695B
Authority
CN
China
Prior art keywords
dns
domain name
client
recursive
analysis result
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
CN201610550699.8A
Other languages
Chinese (zh)
Other versions
CN106027695A (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.)
Chengdu Zhidaochuangyu Information Technology Co Ltd
Original Assignee
Chengdu Zhidaochuangyu Information Technology Co Ltd
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 Chengdu Zhidaochuangyu Information Technology Co Ltd filed Critical Chengdu Zhidaochuangyu Information Technology Co Ltd
Priority to CN201610550699.8A priority Critical patent/CN106027695B/en
Publication of CN106027695A publication Critical patent/CN106027695A/en
Application granted granted Critical
Publication of CN106027695B publication Critical patent/CN106027695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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]

Landscapes

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

Abstract

the invention discloses a method for acquiring IP used by a recursive DNS, which comprises the following steps: setting a fixed domain name, and sending A record query to an authoritative DNS by a client through a recursive DNS; when receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client; after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last level of recursive DNS; the invention can obtain the IP of the last level recursion DNS, can quickly position the IP of the recursion DNS, reduces the difficulty of manual analysis, improves the efficiency and reduces the cost.

Description

method for obtaining IP used by recursive DNS
Technical Field
The invention relates to a method for acquiring an IP (Internet protocol), in particular to a method for acquiring an IP used by a recursive DNS (Domain name System).
Background
The DNS domain name system is the basic core service of the Internet, maps and resolves domain names and IP addresses, and supports the normal operation of the Internet; according to the function role, the DNS can be divided into a recursive DNS and an authoritative DNS, and when a user initiates a domain name resolution request, recursive query is carried out step by step through the recursive DNS; if the query record is in the cache of the recursive DNS, returning the analysis result to the user; if TTL is expired, recursive DNS sends query request to authoritative DNS and updates analysis result.
The early DNS is only responsible for resolving available IP records for the user, and the source of the user cannot be judged; with the development of the internet, particularly the popularization of the CDN, authoritative DNS capable of providing more adaptive resolution results according to the source information (such as geographic location, operator, etc.) of the user arises; the working mechanism is based on a premise that the IP of the recursive DNS and the IP of the user client need to have the same information (such as the same geographical position and the same operator); however, this condition is not satisfied for all users, which requires acquiring the IP of the last level of recursive DNS and the IP of the user, and comparing and analyzing the two; however, the IP of the last level recursive DNS cannot be directly obtained, which brings a certain difficulty to problem analysis.
Disclosure of Invention
the invention provides a method for acquiring an IP of a last-level recursive DNS.
The technical scheme adopted by the invention is as follows: a method of obtaining IP for recursive DNS, comprising the steps of:
Setting a fixed domain name, and sending A record query to an authoritative DNS by a client through a recursive DNS;
when receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client;
and after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last-level recursive DNS.
Further, the method comprises the following steps:
Setting a fixed domain name prefix, and sending A record query to an authoritative DNS by a client through a recursive DNS;
after receiving the A record query of the related domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client;
And after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last-level recursive DNS.
Furthermore, when the analysis result is returned to the client, the returned IP can be restored.
Further, in the process of returning the IP of the requester as a domain name resolution result to the client, the TTL time is set to be less than 300 s.
further, the restorable processing is to adjust the position of four numbers in the IP format or to take the remainder of the four numbers in the IP format.
The invention has the beneficial effects that:
(1) According to the invention, the Ping program is adopted to process the domain name, the IP of the recursive DNS can be rapidly positioned, the difficulty of manual analysis can be reduced, the efficiency is improved, and the cost is reduced;
(2) The invention has high applicability and can prevent data from changing when the recursive DNS finds that the analysis result points to the self.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
as shown in fig. 1, a method for acquiring an IP used by a recursive DNS includes the steps of:
Setting a fixed domain name, and sending A record query to an authoritative DNS by a client through a recursive DNS;
when receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client;
And after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last-level recursive DNS.
A method of obtaining IP for recursive DNS, comprising the steps of:
Setting a fixed domain name prefix, and sending A record query to an authoritative DNS by a client through a recursive DNS;
after receiving the A record query of the related domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client;
And after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last-level recursive DNS.
furthermore, when the analysis result is returned to the client, the returned IP can be restored.
further, in the process of returning the IP of the requester as a domain name resolution result to the client, the TTL time is set to be less than 300 s.
further, the restorable processing is to adjust the positions of four numbers in the IP format or to take the remainder of the four numbers in the IP format; this approach can prevent some recursive DNS from finding that the resolution results point to itself, changing the data to 127.0.0.1 or other IP.
the client side sends A record query to the authoritative DNS through the recursive DNS, in the process, the client side firstly sends a request to the local recursive DNS, the local recursive DNS sends the request to the operator DNS-1, … …, the request passes through the last-stage recursive DNS of the operator, and then the request is sent to the authoritative DNS; and after receiving the A record query of the domain name, the authoritative DNS takes the IP of the requester as a domain name resolution result, and finally returns the domain name resolution result to the client through the last level recursive DNS, … …, the operator DNS-1 and the local recursive DNS of the operator.
A Domain Name System (DNS), wherein an authoritative DNS directly writes the corresponding relation between a domain Name and a host in a configuration file of the authoritative DNS and is authorized to manage the domain; ttl (time to live) (domain name resolution record) lifetime; CDN (content Delivery network) content Delivery network.
Example 1
Setting a fixed domain name, such as myrd.jiashule.com; the client sends A record query to an authoritative DNS through a recursive DNS;
when receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client, and the TTL time is set to be 30 s;
and after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last-level recursive DNS.
Example 2
A fixed domain name prefix is set, and assuming that both example-a.com and example-b.com use the same authoritative DNS for resolution, the authoritative DNS can set a uniform prefix myrd, which translates to: myrd.example-a.com and myrd.example-b.com; the client sends A record query to an authoritative DNS through a recursive DNS;
when receiving the A record query of the related domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client, and the TTL time is set to be 30 s;
And after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last-level recursive DNS.
example 3
setting a fixed domain name, such as myrd.jiashule.com; the client sends A record query to an authoritative DNS through a recursive DNS;
When receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client, and the TTL time is set to be 30 s;
when the analysis result is returned to the client, the returned IP is subjected to restorable processing, and the positions of four numbers in the IP format are adjusted; and processing the analysis result through the Ping program to obtain the IP used by the required last-stage recursive DNS.
Example 4
Setting a fixed domain name, such as myrd.jiashule.com; the client sends A record query to an authoritative DNS through a recursive DNS;
When receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client, and the TTL time is set to be 30 s;
When the analysis result is returned to the client, the returned IP is processed in a restorable way, and four numbers in the IP format are adjusted to take the remainder (for example, 58.217.249.156, which is converted into 197.38.6.99); and processing the analysis result through the Ping program to obtain the IP used by the required last-stage recursive DNS.
the A record is used for specifying an IP address record corresponding to a host name (or a domain name); a records also called IP direction, the user can set sub domain name and point to the address of the target host computer, thereby realizing finding the server through the domain name; the pointed target host address type can only use an IP address; ping refers to an internet packet explorer, a program for testing network connection amount; ping sends an ICMP (internet Control Messages protocol), internet message Control protocol, echo request message to the destination and reports whether the desired ICMP echo is received; a command to check whether the network is open or the speed of the network connection; the uniqueness of the IP address of the network machine is utilized to send a data packet to the target IP address, and then the opposite side is required to return a data packet with the same size to determine whether the two network machines are communicated or not and what the time delay is.
The invention sets a fixed domain name or a fixed domain name prefix based on an authoritative DNS, and when a recursion DNS queries the A record of the domain name, the IP of the recursion DNS is returned; the domain name is processed by the Ping program, so that the IP of the recursive DNS can be quickly positioned, the difficulty of manual analysis can be reduced, the efficiency is improved, and the cost is reduced; and the Ping program is contained in most operating systems by default, so that the applicability is high.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (4)

1. a method for obtaining IP for recursive DNS, comprising the steps of:
Setting a fixed domain name, and sending A record query to an authoritative DNS by a client through a recursive DNS;
when receiving the A record query of the domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client;
After receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last level of recursive DNS;
and when the analysis result is returned to the client, the returned IP can be restored.
2. A method for obtaining IP for recursive DNS, comprising the steps of:
setting a fixed domain name prefix, and sending A record query to an authoritative DNS by a client through a recursive DNS;
after receiving the A record query of the related domain name, the authoritative DNS returns the IP of the requester as a domain name resolution result to the client;
after receiving the analysis result, the client processes the analysis result through the Ping program to obtain the IP used by the required last level of recursive DNS;
and when the analysis result is returned to the client, the returned IP can be restored.
3. the method of claim 1 or 2, wherein the TTL time is set to less than 300s when the IP of the requester is returned to the client as the result of domain name resolution.
4. a method of obtaining IP for recursive DNS according to claim 1 or 2, wherein the restorable process is to adjust the position of four digits in the IP format or to take the remainder for four digits in the IP format.
CN201610550699.8A 2016-07-13 2016-07-13 Method for obtaining IP used by recursive DNS Active CN106027695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610550699.8A CN106027695B (en) 2016-07-13 2016-07-13 Method for obtaining IP used by recursive DNS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610550699.8A CN106027695B (en) 2016-07-13 2016-07-13 Method for obtaining IP used by recursive DNS

Publications (2)

Publication Number Publication Date
CN106027695A CN106027695A (en) 2016-10-12
CN106027695B true CN106027695B (en) 2019-12-06

Family

ID=57118635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610550699.8A Active CN106027695B (en) 2016-07-13 2016-07-13 Method for obtaining IP used by recursive DNS

Country Status (1)

Country Link
CN (1) CN106027695B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453685A (en) * 2016-11-15 2017-02-22 ***通信集团江苏有限公司 Method for resolving with public DNS (Domain Name System) server, system and server
CN108900648B (en) * 2018-06-13 2020-11-06 网宿科技股份有限公司 Method and device for controlling flow proportion of multiple CNAME (compressed air multicast AME)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287011A (en) * 2008-05-26 2008-10-15 蓝汛网络科技(北京)有限公司 Method, system and device for responding service request from user in content distributing network
CN103546590A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Method and device for choosing DNS (domain name server)

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287011A (en) * 2008-05-26 2008-10-15 蓝汛网络科技(北京)有限公司 Method, system and device for responding service request from user in content distributing network
CN103546590A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Method and device for choosing DNS (domain name server)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DNS Traffic Analysis: Issues of IPv6 and CDN;Kazunori Fujiwara et al;《2012 IEEE/IPSJ 12th International Symposium on Applications and the Internet》;20120720;全文 *
基于内容发布网络(CDN)的域名解析***;秦臻;《中国博士学位论文全文数据库信息科技辑》;20121225;第二章 *

Also Published As

Publication number Publication date
CN106027695A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
US7558880B2 (en) Dynamic DNS registration method, domain name solution method, DNS proxy server, and address translation device
US8326980B2 (en) Using DNS reflection to measure network performance
CN103731447B (en) A kind of data query method and system
US11778068B2 (en) Systems and methods for processing requests for content of a content distribution network
CN107786678B (en) Domain name resolution method, device and system
CN108848205B (en) CNAME domain name resolution method for distinguishing IPv4 and IPv6
US20080162724A1 (en) Direct domain name service query
GB2582477A (en) Accessing gateway management console
US11082394B2 (en) System and method for correlating routing protocol information
US11805093B2 (en) Systems and methods for processing requests for content of a content distribution network
US20190007371A1 (en) MAPPING IPv4 KNOWLEDGE TO IPv6
CN106817436B (en) Method and system for preventing DNS (domain name system) forced solution result from being polluted
CN111447304A (en) Anycast node IP address enumeration method and system for anycast recursive domain name system
CN101651718B (en) Method and system for changing IP flow protocol stack
CN106027695B (en) Method for obtaining IP used by recursive DNS
CN109995885B (en) Domain name space structure presentation method, device, equipment and medium
CN115668889A (en) Domain Name System (DNS) service for Variable Length Address (VLA) networks
JP2023508447A (en) Content delivery system using embedded requestor information
CN107592374B (en) Correction method and system for domain name error resolution
US20180375818A1 (en) Dns-based method of transmitting data
KR101645222B1 (en) Advanced domain name system and management method
CN116708368A (en) Public DNS domain name resolution service optimization method based on network space mapping
CN117768445A (en) VoIP disaster recovery method and device based on DNS
CN117614932A (en) Domain name resolution method, device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 9/F, Building C, No. 28, North Tianfu Avenue, China (Sichuan) Pilot Free Trade Zone, Hi tech Zone, Chengdu, 610000, Sichuan

Patentee after: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 8th Floor, Building 5, No. 801, Middle Section of Tianfu Avenue, High tech Zone, Chengdu City, Sichuan Province, 610000

Patentee before: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder