CN110769076A - DNS (Domain name System) testing method and system - Google Patents

DNS (Domain name System) testing method and system Download PDF

Info

Publication number
CN110769076A
CN110769076A CN201810830684.6A CN201810830684A CN110769076A CN 110769076 A CN110769076 A CN 110769076A CN 201810830684 A CN201810830684 A CN 201810830684A CN 110769076 A CN110769076 A CN 110769076A
Authority
CN
China
Prior art keywords
dns
tested
analysis result
analysis
standard
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
Application number
CN201810830684.6A
Other languages
Chinese (zh)
Other versions
CN110769076B (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 CN201810830684.6A priority Critical patent/CN110769076B/en
Publication of CN110769076A publication Critical patent/CN110769076A/en
Application granted granted Critical
Publication of CN110769076B publication Critical patent/CN110769076B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types

Abstract

The invention provides a DNS test method and a DNS test system. The method relates to a computer network and solves the problem that the performance of the self-developed DNS cannot be accurately evaluated. The method comprises the following steps: collecting the analysis results formed by the DNS to be tested and the standard DNS based on the same query request; and performing at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested. The technical scheme provided by the invention is suitable for DNS test, and realizes high-accuracy automatic DNS test verification.

Description

DNS (Domain name System) testing method and system
Technical Field
The present invention relates to computer networks, and in particular, to a DNS testing method and system.
Background
The DNS is an internet-based service that serves as a distributed database in which domain names and IP addresses are mapped to each other, enabling users to conveniently access the internet. When a user accesses a certain site through a domain name, a DNS query request is firstly sent to a DNS server to query an IP address corresponding to the domain name, and then the user accesses server resources of the site by using the IP address.
At present, there are many software for implementing DNS resolution service, such as: BIND, NSD, PowerDNS, etc. Although BIND occupation rate is high and relatively stable, concurrent processing capacity is not high, and DNS as an internet entrance is easily attacked by a large amount of DDos, so that a user cannot normally access the network. Therefore, in order to improve the processing capability of the DNS, many companies adopt a self-developed method to realize high-performance DNS software, and the processing capability is improved by more than tens of times compared with BIND software.
Because of the importance of DNS, no one-tenth resolution problems are allowed, and therefore, a sufficiently comprehensive validation of self-developed DNS is required. At present, the verification result is not analyzed, and the performance of the self-developed DNS cannot be accurately evaluated.
Disclosure of Invention
The present invention is directed to solving the problems described above.
According to a first aspect of the present invention, there is provided a DNS testing method, including:
collecting the analysis results formed by the DNS to be tested and the standard DNS based on the same query request;
and performing at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested.
Preferably, the step of performing at least one level of analysis on the resolution results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested includes:
performing first-level analysis on the DNS to be tested and the resolution result of the standard DNS by taking the resolution result of the standard DNS as a standard to obtain a first-level analysis result;
and performing second-stage analysis according to the first-stage analysis results to obtain second-stage analysis results under the first-stage analysis results, wherein each first-stage analysis result corresponds to at least one second-stage analysis result.
Preferably, the first stage analysis result at least comprises any one or any more of the following results:
successful Success, Pass, Notice of Notice, Error,
and performing first-level analysis on the DNS to be tested and the resolution result of the standard DNS by taking the resolution result of the standard DNS as a standard, and acquiring a first-level analysis result, wherein the step of acquiring the first-level analysis result comprises the following steps:
under the condition that the analysis results of the DNS to be tested and the standard DNS are completely consistent, judging that the first-level analysis result is Success;
under the condition that the analysis results of the DNS to be tested and the standard DNS are not completely consistent but conflict does not exist, judging that the first-level analysis result is Pass;
when the reason that the analysis results of the DNS to be tested and the standard DNS are not completely consistent and are not completely consistent is that the IP library lines are not matched or the number of response packets is limited, judging that the first-level analysis result is Notice;
and under the condition that the analysis results of the DNS to be tested and the standard DNS conflict, judging that the first-level analysis result is Error.
Preferably, the second-level analysis result corresponding to the first-level analysis result Pass at least includes any one or more of the following results:
the DNS to be tested only returns CNAME, a corresponding A record is obtained through the standard DNS, and after the analysis result of the DNS to be tested is supplemented according to the A record, the analysis result of the DNS to be tested is completely consistent with that of the standard DNS;
and the part of the analysis results of the DNS to be tested are repeated, and after the repeated analysis results are removed, the analysis results of the DNS to be tested are completely consistent with the analysis results of the standard DNS.
Preferably, the second-level analysis result corresponding to the first-level analysis result Notice at least includes:
and acquiring an original configuration file, extracting an original configuration analysis result of the DNS to be tested from the original configuration file, and comparing the original analysis result with an analysis result of the standard DNS to generate a second-level analysis result.
Preferably, the second level analysis result corresponding to the first level analysis result Error at least includes any one or more of the following results:
the analysis result log format of the standard DNS has problems;
the DNS to be tested does not support the DNS type with conflict resolution results;
processing exception by the program;
sending a packet error;
no problem is known.
Preferably, the step of performing at least one-stage analysis on the resolution results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested further includes:
performing third-level analysis to obtain an original configuration file under the condition that the first-level analysis result is Error and the second-level analysis result is an unknown problem, extracting an original configuration analysis result of the DNS to be tested from the original configuration, and comparing the original analysis result with an analysis result of the standard DNS to obtain a third-level analysis result, wherein the third-level analysis result at least comprises any one or more of the following results:
finally, the contrast is failed, and the DNS to be tested is in error;
limiting the number of response results of the individual domain name to the DNS domain name query request to be tested according to the special requirements of the individual domain name, wherein the actual results completely accord with the expected setting;
in response to an answer result polling mechanism, the DNS to be tested is partially matched with the actual resolution result of the standard DNS, and the actual resolution result meets the expected setting;
in response to the polling mechanism of the response result, the prefix of the record A of the actual analysis result is matched and conforms to the expected setting.
According to another aspect of the present invention, there is also provided a DNS testing system, including:
the analysis result acquisition module is used for collecting the analysis results formed by the DNS to be tested and the standard DNS based on the same query request;
and the problem judgment module is used for carrying out at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS and determining the problem of the DNS to be tested.
Preferably, the problem determination module includes:
the first-stage judging unit is used for carrying out first-stage analysis on the DNS to be tested and the analysis result of the standard DNS according to the analysis result of the standard DNS to obtain a first-stage analysis result;
and the second-stage judging unit is used for performing second-stage analysis according to the first-stage analysis results to obtain second-stage analysis results under the first-stage analysis results, and each first-stage analysis result corresponds to at least one second-stage analysis result.
Preferably, the first stage analysis result at least comprises any one or any more of the following results:
successful Success, Pass, Notice of Notice, Error,
the first-level determination unit is specifically configured to determine that the first-level analysis result is Success when the analysis results of the DNS to be tested and the standard DNS are completely consistent,
under the condition that the resolution results of the DNS to be tested and the standard DNS are not completely consistent but conflict-free, judging that the first-level analysis result is Pass,
when the reason that the analysis results of the DNS to be tested and the standard DNS are not completely consistent and are not completely consistent is the reason that the IP library lines are not matched or the number of the response packets is limited, judging that the first-level analysis result is Notice,
and under the condition that the analysis results of the DNS to be tested and the standard DNS conflict, judging that the first-level analysis result is Error.
The invention provides a DNS testing method and a DNS testing system, which are used for collecting the analytic results of a DNS to be tested and a standard DNS which are formed based on the same query request, and performing multi-level performance analysis on the DNS to be tested according to the analytic results of the DNS to be tested and the standard DNS. The high-accuracy automatic DNS test verification is realized, and the problem that the performance of the self-developed DNS cannot be accurately evaluated is solved.
Other characteristic features and advantages of the invention will become apparent from the following description of exemplary embodiments, which is to be read in connection with the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. In the drawings, like reference numerals are used to indicate like elements. The drawings in the following description are directed to some, but not all embodiments of the invention. For a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 exemplarily shows a flow of a DNS testing method provided by an embodiment of the present invention;
fig. 2 exemplarily shows a flow of another DNS testing method provided by an embodiment of the present invention;
fig. 3 exemplarily shows a structure of a DNS testing apparatus provided in an embodiment of the present invention;
fig. 4 exemplarily shows the structure of the result acquisition module 301 in fig. 3;
fig. 5 exemplarily shows an architecture of a DNS testing system provided by an embodiment of the present invention;
FIG. 6 schematically illustrates an architecture of yet another DNS test system provided by an embodiment;
fig. 7 exemplarily shows a flow of still another DNS testing method provided by an embodiment of the present invention;
FIG. 8 is a diagram illustrating an architecture of yet another DNS test system provided by an embodiment of the present invention;
fig. 9 exemplarily shows the structure of the problem determination module 802 in fig. 8.
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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection 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.
The embodiment of the invention provides a DNS testing method, a device and a system, wherein a standard DNS is constructed and operates together with a DNS to be tested, and the test and analysis are completed by comparing the analysis results of two DNS. The automatic DNS test verification is realized, and the problems of test data shortage, serious human resource consumption and influence on the actual network stability in the conventional DNS test analysis scheme are solved.
An embodiment of the present invention provides a DNS testing method, where a test validation machine is used as an execution subject, and a flow of using the method to complete DNS testing is shown in fig. 1, where the flow includes:
step 101, the standard DNS drains the received online query request to the DNS to be tested to trigger the DNS to be tested to form an analysis result.
In the embodiment of the invention, a BIND system is used as a standard DNS, and a self-research DNS is used as a DNS to be tested. And carrying out the same configuration on the BIND and the self-developed DNS, such as the configuration of host records, the configuration of an IP library corresponding to a line, the configuration of DNS software parameters and the like, so as to ensure that the operating conditions of the two DNS are the same.
In this step, the online query request received by the BIND system is directed to the self-developed DNS to collect the analysis results fed back by two DNS for the same query request. Specifically, online BIND queries are directed to the self-developed DNS system via udpcopy.
And step 102, collecting the resolution results formed by the DNS to be tested and the standard DNS based on the same query request.
In this step, the DNS to be tested and the DNS request log formed by the standard DNS based on the query request are pulled in real time.
Preferably, the reply packet generated by the self-developed DNS system waiting for the test DNS is discarded to prevent affecting the online service.
Specifically, query logs are generated by the self-research DNS and the BIND respectively and are uploaded to a test verification machine at regular time.
And 103, performing performance analysis on the DNS to be tested according to the DNS to be tested and the resolution result of the standard DNS.
In this step, the test and verification machine compares the query logs generated by the two machines in real time, and compares the resolution results of the DNS to be tested and the standard DNS with the resolution result of the standard DNS as the standard. Under the condition that the analysis results of the DNS to be tested and the standard DNS do not conflict, judging that the DNS to be tested has a normal function; and under the condition that the DNS to be tested is in conflict with the analysis result of the standard DNS, judging that the DNS function to be tested is abnormal.
Preferably, the test verification machine can collect and report detailed comparison result information at regular time, and if an abnormal result is found, the test verification machine gives an alarm to a tester. And follow-up testers can check the comparison result regularly to know the running condition of the DNS to be tested.
An embodiment of the present invention further provides another DNS testing method, where a flow of completing a test using the method is shown in fig. 2, and the method includes:
step 201, obtaining a query request log of a standard DNS.
And uploading the query log generated by the online BIND system to a test verification machine regularly.
Step 202, generating a DNS query request according to the query request log.
The test verification machine extracts key information from the log in real time, such as: domain name, type, line, etc
And step 203, sending the DNS query request to the DNS to be tested and the standard DNS.
The test validation machine sends query requests to the BIND system and the self-developed DNS simultaneously.
And step 204, collecting the resolution results formed by the DNS to be tested and the standard DNS based on the same query request.
In this step, a DNS query response returned by the DNS to be tested and the standard DNS is received.
And step 205, performing performance analysis on the DNS to be tested according to the DNS to be tested and the resolution result of the standard DNS.
And comparing the resolution results of the DNS to be tested and the standard DNS with the resolution result of the standard DNS as the standard. Under the condition that the analysis results of the DNS to be tested and the standard DNS do not conflict, judging that the DNS to be tested has a normal function; and under the condition that the DNS to be tested is in conflict with the analysis result of the standard DNS, judging that the DNS function to be tested is abnormal.
When the two inquiry responses are received, the test verification machine carries out detailed comparative analysis.
The test verification machine collects and reports the detailed comparison result information at regular time, and if an abnormal result is found, the test verification machine gives an alarm to a tester. And the tester checks the comparison result at regular time.
An embodiment of the present invention further provides a DNS testing method, where when performing comparative analysis on an analysis result, the ranking of the result is performed, where the method includes: success, pass, note, error and the like are subdivided for each level, and the subdivision is performed, because the DNS response result is relatively flexible, but not invariable, for example, factors affecting the comparison of the response result include an IP polling mechanism, a proportional scheduling mechanism and the like.
The tester can know the specific test condition through the summary information, and then carries out secondary analysis again aiming at different test results, and finally ensures that all the results are completely accurate and reliable.
An embodiment of the present invention further provides a DNS testing apparatus, the structure of which is shown in fig. 3, including:
a result collection module 301, configured to collect an analysis result formed by the DNS to be tested and the standard DNS based on the same query request;
a performance analysis module 302, configured to perform performance analysis on the DNS to be tested according to the DNS to be tested and the resolution result of the standard DNS.
Preferably, the structure of the result acquisition module 301 is shown in fig. 4, and includes:
and the log pulling unit 3011 is configured to pull, in real time, a DNS request log formed by the standard DNS based on the query request, and pull, in real time, a DNS request log formed by the to-be-tested DNS based on the query request drained from the standard DNS.
Preferably, the apparatus further comprises:
a request log obtaining module 303, configured to obtain a query request log of the standard DNS;
a query request generating module 304, configured to generate a DNS query request according to the query request log;
a query request sending module 305, configured to send the DNS query request to the DNS to be tested and the standard DNS.
Preferably, the result collecting module 301 further includes:
a response receiving unit 3012, configured to receive a DNS query response returned by the DNS to be tested and the standard DNS.
The embodiment of the invention also provides a DNS testing system, as shown in fig. 5, which includes a DNS testing device, a standard DNS, and a DNS to be tested, where the DNS testing device is connected to the standard DNS through a network, and the DNS testing device is connected to the DNS to be tested through a network;
the DNS testing device is used for collecting the resolution results of the DNS to be tested and the standard DNS based on the same query request, and then performing performance analysis on the DNS to be tested according to the resolution results of the DNS to be tested and the standard DNS.
Preferably, as shown in fig. 6, the standard DNS is connected to the DNS to be tested through a network;
and the standard DNS is used for guiding the received online query request to the DNS to be tested so as to trigger the DNS to be tested to form an analysis result.
Preferably, the standard DNS is further configured to upload the generated query request log to the DNS testing apparatus;
the DNS testing device is further configured to obtain a query request log of the standard DNS, generate a DNS query request according to the query request log, and send the DNS query request to the DNS to be tested and the standard DNS.
An embodiment of the present invention further provides a DNS testing method, which performs systematic comparison and analysis on a resolution result of a standard DNS and a resolution result of a DNS to be tested to determine a problem in the DNS to be tested, where a flow of the method is shown in fig. 7, and the method includes:
and 701, collecting the resolution results formed by the DNS to be tested and the standard DNS based on the same query request.
In this step, referring to steps 101 and 102 or step 201 and 204, the analysis result is obtained.
Step 702, performing at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS, and determining the problem of the DNS to be tested.
In this step, according to specific situations, performing multi-stage analysis, and continuously refining the comparison result of the analysis results until specific problems are determined, including:
1. performing first-level analysis on the DNS to be tested and the resolution result of the standard DNS by taking the resolution result of the standard DNS as a standard to obtain a first-level analysis result;
the first level analysis result at least comprises any one or any more of the following results:
successful Success, Pass, Notice of Notice, Error,
and performing first-level analysis on the DNS to be tested and the resolution result of the standard DNS by taking the resolution result of the standard DNS as a standard, and acquiring a first-level analysis result, wherein the step of acquiring the first-level analysis result comprises the following steps:
under the condition that the analysis results of the DNS to be tested and the standard DNS are completely consistent, judging that the first-level analysis result is Success;
under the condition that the analysis results of the DNS to be tested and the standard DNS are not completely consistent but conflict does not exist, judging that the first-level analysis result is Pass;
when the reason that the analysis results of the DNS to be tested and the standard DNS are not completely consistent and are not completely consistent is that the IP library lines are not matched or the number of response packets is limited, judging that the first-level analysis result is Notice;
and under the condition that the analysis results of the DNS to be tested and the standard DNS conflict, judging that the first-level analysis result is Error.
The mismatching of the IP library lines (abroad) means that the analysis results of the DNS to be tested and the standard DNS are not matched, but the DNS is currently a foreign line, the DNS is judged to be Notice, and a conclusion can be directly obtained through the original configuration analysis during the second-stage analysis.
The limitation of the number of the response packets means that partial results of the analysis results of the DNS to be tested and the standard DNS are completely matched, the DNS is judged to be Notice at this time, and a conclusion can be obtained directly through original configuration analysis during second-stage analysis.
2. And performing second-stage analysis according to the first-stage analysis results to obtain second-stage analysis results under the first-stage analysis results, wherein each first-stage analysis result corresponds to at least one second-stage analysis result.
The second-level analysis result corresponding to the first-level analysis result Pass at least comprises any one or more of the following results:
the DNS to be tested only returns CNAME, a corresponding A record is obtained through the standard DNS, and after the analysis result of the DNS to be tested is supplemented according to the A record, the analysis result of the DNS to be tested is completely consistent with that of the standard DNS;
and the part of the analysis results of the DNS to be tested are repeated, and after the repeated analysis results are removed, the analysis results of the DNS to be tested are completely consistent with the analysis results of the standard DNS.
The second-level analysis result corresponding to the first-level analysis result Notice at least comprises:
and acquiring an original configuration file, extracting an original configuration analysis result of the DNS to be tested from the original configuration file, and comparing the original analysis result with an analysis result of the standard DNS to generate a second-level analysis result.
The second-level analysis result corresponding to the first-level analysis result Error at least comprises any one or more of the following results:
the analysis result log format of the standard DNS has problems;
the DNS to be tested does not support the DNS type with conflict resolution results;
processing exception by the program;
sending a packet error;
no problem is known.
Performing third-level analysis to obtain an original configuration file under the condition that the first-level analysis result is Error and the second-level analysis result is an unknown problem, extracting an original configuration analysis result of the DNS to be tested from the original configuration, and comparing the original analysis result with an analysis result of the standard DNS to obtain a third-level analysis result, wherein the third-level analysis result at least comprises any one or more of the following results:
finally, the contrast is failed, and the DNS to be tested is in error;
limiting the number of response results of the individual domain name to the DNS domain name query request to be tested according to the special requirements of the individual domain name, wherein the actual results completely accord with the expected setting;
in response to an answer result polling mechanism, the DNS to be tested is partially matched with the actual resolution result of the standard DNS, and the actual resolution result meets the expected setting;
in response to the polling mechanism of the response result, the prefix of the record A of the actual analysis result is matched and conforms to the expected setting.
An embodiment of the present invention further provides a DNS testing method, which is described by taking online BIND as an example of a standard DNS, and a process of performing a comparative analysis on an analysis result by using the method includes:
1. key information such as domain name, type, line, clientIP, etc. is first extracted from the online BIND request log.
2. And then simultaneously initiating a query request to the online BIND and the DNS system to be tested.
3. After receiving DNS response results (i.e., resolution results) generated at both sides, the DNS response results need to be sorted at the same time due to the DNS polling response mechanism.
4. And directly comparing the sorted DNS response results, if the DNS response results are completely consistent, outputting a comparison success log, and counting the success number.
5. If the result does not meet the requirement, analyzing the specific reason of the result information, judging whether the result is related to the extended functions, and if so, classifying the result which does not meet the requirement according to all the extended functions, thereby ensuring that the response result is known and controllable as much as possible.
6. Marking the classified response results with specific field record logs, counting the corresponding number, marking the unknown problems with the specific field (such as unknown problems), and counting the number
7. After the comparison is finished, comparison summary information is generated, secondary analysis needs to be carried out manually or through script assistance aiming at unknown response conditions, and finally the result can be ensured to be known and controllable.
The comparison result is graded, and the grading comprises the following steps: success, pass, note, error, etc., which are then subdivided for each level, are subdivided because the DNS response results are relatively flexible, rather than invariant, and are analyzed in detail below.
Success shows the number of completely consistent response results;
pass [ return _ CNAME ] indicates that the DNS to be tested only returns CNAME, and the online BIND can cascade and return corresponding A records;
pass [ duplicates _ value ] indicates that duplicate resolution results exist;
notice [ foreign _ view ] indicates that the two system foreign IP library lines do not match for historical reasons.
Notice [ over _ maxIP ] indicates that the result caused by the DNS response packet number limitation is not matched.
Error log format indicates that there is a problem with the log format taken from the on-line BIND.
Error [ DNS _ type ] indicates a DNS type that is not supported by the DNS system to be tested, and the DNS is not used in actual traffic.
Error [ exception ] indicates a problem caused by a program handling exception.
Error send pkg indicates that the packet was sent in Error, such as due to a timeout or insufficient system resources.
Error indicates unknown problems, requiring secondary analysis, either manually or with script assistance.
Error [ other ] indicates errors caused by other problems.
For the second-level analysis result unknown, a third-level analysis needs to be performed, and the third-level analysis result specifically includes:
127: 127 segment of IP is self-testing IP, and the analysis results are inconsistent because the circuits of the two side programs are divided differently;
failed: finally, comparing failure results, and requiring related personnel to specifically investigate failure reasons;
ok: the number of response results is limited due to the special requirements of individual domain names, and the actual results completely accord with the expected setting;
ok _ part: in response to the polling mechanism of the response result, the actual analysis result is partially matched and conforms to the expected setting;
ok _ pre, which results in prefix matching of the actual parsing result (A record) in response to the result polling mechanism, conforms to the expected setting.
By the method, the correctness of the logic of the DNS system special for self-research can be verified more conveniently and rapidly, and finally, all results are completely known and controllable.
An embodiment of the present invention further provides a DNS testing system, whose structure is shown in fig. 8, including:
an analysis result acquisition module 801, configured to collect analysis results formed by the DNS to be tested and the standard DNS based on the same query request;
a problem determination module 802, configured to perform at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS, and determine a problem of the DNS to be tested.
Preferably, the structure of the problem determination module 802 is shown in fig. 9, and includes:
a first-stage determination unit 8021, configured to perform a first-stage analysis on the analysis results of the DNS to be tested and the standard DNS based on the analysis result of the standard DNS, to obtain a first-stage analysis result;
a second-stage determining unit 8022, configured to perform a second-stage analysis according to the first-stage analysis results, to obtain second-stage analysis results under the first-stage analysis results, where each first-stage analysis result corresponds to at least one second-stage analysis result.
Preferably, the first stage analysis result at least comprises any one or any more of the following results:
successful Success, Pass, Notice of Notice, Error,
the first-level determining unit 8021 is specifically configured to determine that the first-level analysis result is Success when the analysis results of the DNS to be tested and the standard DNS are completely consistent,
under the condition that the resolution results of the DNS to be tested and the standard DNS are not completely consistent but conflict-free, judging that the first-level analysis result is Pass,
when the reason that the analysis results of the DNS to be tested and the standard DNS are not completely consistent and are not completely consistent is the reason that the IP library lines are not matched or the number of the response packets is limited, judging that the first-level analysis result is Notice,
and under the condition that the analysis results of the DNS to be tested and the standard DNS conflict, judging that the first-level analysis result is Error.
Preferably, the second-level analysis result corresponding to the first-level analysis result Pass at least includes any one or more of the following results:
the DNS to be tested only returns CNAME, a corresponding A record is obtained through the standard DNS, and after the analysis result of the DNS to be tested is supplemented according to the A record, the analysis result of the DNS to be tested is completely consistent with that of the standard DNS;
and the part of the analysis results of the DNS to be tested are repeated, and after the repeated analysis results are removed, the analysis results of the DNS to be tested are completely consistent with the analysis results of the standard DNS.
Preferably, the second-level analysis result corresponding to the first-level analysis result Notice at least includes:
and acquiring an original configuration file, extracting an original configuration analysis result of the DNS to be tested from the original configuration file, and comparing the original analysis result with an analysis result of the standard DNS to generate a second-level analysis result.
Preferably, the second level analysis result corresponding to the first level analysis result Error at least includes any one or more of the following results:
the analysis result log format of the standard DNS has problems;
the DNS to be tested does not support the DNS type with conflict resolution results;
processing exception by the program;
sending a packet error;
no problem is known.
Preferably, the problem determination module 802 further includes:
a third-level determining unit 8023, configured to perform a third-level analysis to obtain an original configuration file, extract an original configuration analysis result of the DNS to be tested from the original configuration, and compare the original configuration analysis result with an analysis result of the standard DNS to obtain a third-level analysis result, where the third-level analysis result at least includes any one or more of the following results, when the first-level analysis result is Error and the second-level analysis result is an unknown problem:
finally, the contrast is failed, and the DNS to be tested is in error;
limiting the number of response results of the individual domain name to the DNS domain name query request to be tested according to the special requirements of the individual domain name, wherein the actual results completely accord with the expected setting;
in response to an answer result polling mechanism, the DNS to be tested is partially matched with the actual resolution result of the standard DNS, and the actual resolution result meets the expected setting;
in response to the polling mechanism of the response result, the prefix of the record A of the actual analysis result is matched and conforms to the expected setting.
The embodiment of the invention provides a DNS testing method, a device and a system, which are used for collecting the analytic results of a DNS to be tested and a standard DNS which are formed based on the same query request and carrying out multi-level performance analysis on the DNS to be tested according to the analytic results of the DNS to be tested and the standard DNS. The high-accuracy automatic DNS test verification is realized, and the problem that the performance of the self-developed DNS cannot be accurately evaluated is solved.
The verification process of the self-research DNS waiting for testing is automated and intelligentized, and the functions of real-time and accurate comparison of a large amount of data on a line, result reporting, abnormal alarming and the like are provided. The verification process is real-time and accurate, and utilizes a large amount of online data, so that the verification of the self-developed DNS system and the regression test of a subsequent new version are covered. And when result analysis is carried out, the steps are sequentially advanced according to the levels, are gradually refined, and the comparison result is associated with the requirement, so that the final result is known and controllable.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
Finally, it should be noted that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
Finally, it should be noted that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A DNS test method, comprising:
collecting the analysis results formed by the DNS to be tested and the standard DNS based on the same query request;
and performing at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested.
2. The DNS testing method according to claim 1, wherein the step of performing at least one level of analysis on the resolution results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested comprises:
performing first-level analysis on the DNS to be tested and the resolution result of the standard DNS by taking the resolution result of the standard DNS as a standard to obtain a first-level analysis result;
and performing second-stage analysis according to the first-stage analysis results to obtain second-stage analysis results under the first-stage analysis results, wherein each first-stage analysis result corresponds to at least one second-stage analysis result.
3. The DNS testing method according to claim 2, wherein the result of the first-level analysis includes at least any one or more of the following:
successful Success, Pass, Notice of Notice, Error,
and performing first-level analysis on the DNS to be tested and the resolution result of the standard DNS by taking the resolution result of the standard DNS as a standard, and acquiring a first-level analysis result, wherein the step of acquiring the first-level analysis result comprises the following steps:
under the condition that the analysis results of the DNS to be tested and the standard DNS are completely consistent, judging that the first-level analysis result is Success;
under the condition that the analysis results of the DNS to be tested and the standard DNS are not completely consistent but conflict does not exist, judging that the first-level analysis result is Pass;
when the reason that the analysis results of the DNS to be tested and the standard DNS are not completely consistent and are not completely consistent is that the IP library lines are not matched or the number of response packets is limited, judging that the first-level analysis result is Notice;
and under the condition that the analysis results of the DNS to be tested and the standard DNS conflict, judging that the first-level analysis result is Error.
4. The DNS testing method according to claim 3, wherein the second-level analysis result corresponding to the first-level analysis result Pass at least comprises any one or more of the following results:
the DNS to be tested only returns CNAME, a corresponding A record is obtained through the standard DNS, and after the analysis result of the DNS to be tested is supplemented according to the A record, the analysis result of the DNS to be tested is completely consistent with that of the standard DNS;
and the part of the analysis results of the DNS to be tested are repeated, and after the repeated analysis results are removed, the analysis results of the DNS to be tested are completely consistent with the analysis results of the standard DNS.
5. The DNS testing method according to claim 3, wherein the second-level analysis result corresponding to the first-level analysis result Notice at least includes:
and acquiring an original configuration file, extracting an original configuration analysis result of the DNS to be tested from the original configuration file, and comparing the original analysis result with an analysis result of the standard DNS to generate a second-level analysis result.
6. The DNS test method of claim 3, wherein the second-level analysis result corresponding to the first-level analysis result Error at least includes any one or more of the following results:
the analysis result log format of the standard DNS has problems;
the DNS to be tested does not support the DNS type with conflict resolution results;
processing exception by the program;
sending a packet error;
no problem is known.
7. The DNS testing method according to claim 6, wherein the step of performing at least one level of analysis on the resolution results of the DNS to be tested and the standard DNS to determine the problem of the DNS to be tested further comprises:
performing third-level analysis to obtain an original configuration file under the condition that the first-level analysis result is Error and the second-level analysis result is an unknown problem, extracting an original configuration analysis result of the DNS to be tested from the original configuration, and comparing the original analysis result with an analysis result of the standard DNS to obtain a third-level analysis result, wherein the third-level analysis result at least comprises any one or more of the following results:
finally, the contrast is failed, and the DNS to be tested is in error;
limiting the number of response results of the individual domain name to the DNS domain name query request to be tested according to the special requirements of the individual domain name, wherein the actual results completely accord with the expected setting;
in response to an answer result polling mechanism, the DNS to be tested is partially matched with the actual resolution result of the standard DNS, and the actual resolution result meets the expected setting;
in response to the polling mechanism of the response result, the prefix of the record A of the actual analysis result is matched and conforms to the expected setting.
8. A DNS testing system, comprising:
the analysis result acquisition module is used for collecting the analysis results formed by the DNS to be tested and the standard DNS based on the same query request;
and the problem judgment module is used for carrying out at least one-stage analysis on the analysis results of the DNS to be tested and the standard DNS and determining the problem of the DNS to be tested.
9. The DNS testing system of claim 8, wherein the problem determination module comprises:
the first-stage judging unit is used for carrying out first-stage analysis on the DNS to be tested and the analysis result of the standard DNS according to the analysis result of the standard DNS to obtain a first-stage analysis result;
and the second-stage judging unit is used for performing second-stage analysis according to the first-stage analysis results to obtain second-stage analysis results under the first-stage analysis results, and each first-stage analysis result corresponds to at least one second-stage analysis result.
10. The DNS test system according to claim 8, wherein the first level analysis result includes at least any one or more of the following results:
successful Success, Pass, Notice of Notice, Error,
the first-level determination unit is specifically configured to determine that the first-level analysis result is Success when the analysis results of the DNS to be tested and the standard DNS are completely consistent,
under the condition that the resolution results of the DNS to be tested and the standard DNS are not completely consistent but conflict-free, judging that the first-level analysis result is Pass,
when the reason that the analysis results of the DNS to be tested and the standard DNS are not completely consistent and are not completely consistent is the reason that the IP library lines are not matched or the number of the response packets is limited, judging that the first-level analysis result is Notice,
and under the condition that the analysis results of the DNS to be tested and the standard DNS conflict, judging that the first-level analysis result is Error.
CN201810830684.6A 2018-07-26 2018-07-26 DNS (Domain name System) testing method and system Active CN110769076B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810830684.6A CN110769076B (en) 2018-07-26 2018-07-26 DNS (Domain name System) testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810830684.6A CN110769076B (en) 2018-07-26 2018-07-26 DNS (Domain name System) testing method and system

Publications (2)

Publication Number Publication Date
CN110769076A true CN110769076A (en) 2020-02-07
CN110769076B CN110769076B (en) 2022-06-03

Family

ID=69327360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810830684.6A Active CN110769076B (en) 2018-07-26 2018-07-26 DNS (Domain name System) testing method and system

Country Status (1)

Country Link
CN (1) CN110769076B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432045A (en) * 2020-03-19 2020-07-17 杭州迪普科技股份有限公司 Method, device and equipment for testing server scheduling algorithm of domain name system
WO2021151314A1 (en) * 2020-08-07 2021-08-05 平安科技(深圳)有限公司 Dns automatic performance test method, apparatus, device, and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011004369A (en) * 2009-06-22 2011-01-06 Nippon Telegr & Teleph Corp <Ntt> Dns test apparatus, dns test method and dns test program
CN104113447A (en) * 2014-07-10 2014-10-22 北京蓝汛通信技术有限责任公司 Method, device and system for monitoring domain name resolution pollution
CN106571981A (en) * 2016-11-15 2017-04-19 中国互联网络信息中心 DNS (Domain Name System) server automated testing method and system
CN106649099A (en) * 2016-11-15 2017-05-10 中国互联网络信息中心 Automatic testing method and system for DNS monitoring service
CN107135236A (en) * 2017-07-06 2017-09-05 广州优视网络科技有限公司 A kind of detection method and system of target Domain Hijacking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011004369A (en) * 2009-06-22 2011-01-06 Nippon Telegr & Teleph Corp <Ntt> Dns test apparatus, dns test method and dns test program
CN104113447A (en) * 2014-07-10 2014-10-22 北京蓝汛通信技术有限责任公司 Method, device and system for monitoring domain name resolution pollution
CN106571981A (en) * 2016-11-15 2017-04-19 中国互联网络信息中心 DNS (Domain Name System) server automated testing method and system
CN106649099A (en) * 2016-11-15 2017-05-10 中国互联网络信息中心 Automatic testing method and system for DNS monitoring service
CN107135236A (en) * 2017-07-06 2017-09-05 广州优视网络科技有限公司 A kind of detection method and system of target Domain Hijacking

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432045A (en) * 2020-03-19 2020-07-17 杭州迪普科技股份有限公司 Method, device and equipment for testing server scheduling algorithm of domain name system
CN111432045B (en) * 2020-03-19 2022-05-31 杭州迪普科技股份有限公司 Method, device and equipment for testing server scheduling algorithm of domain name system
WO2021151314A1 (en) * 2020-08-07 2021-08-05 平安科技(深圳)有限公司 Dns automatic performance test method, apparatus, device, and readable storage medium

Also Published As

Publication number Publication date
CN110769076B (en) 2022-06-03

Similar Documents

Publication Publication Date Title
US20190197174A1 (en) Method and system for replicating data to heterogeneous database and detecting synchronization error of heterogeneous database through sql packet analysis
CN110362473B (en) Test environment optimization method and device, storage medium and terminal
CN112559361A (en) Flow playback method, device, equipment and computer readable medium
CN110532168B (en) Full-link interface pressure measurement method and device, computer equipment and storage medium
CN110764980A (en) Log processing method and device
CN111506489A (en) Test method, system, device, server and storage medium
CN109002391A (en) The method of automatic detection embedded software interface testing data
CN111427928A (en) Data quality detection method and device
CN110769076B (en) DNS (Domain name System) testing method and system
CN111552632A (en) Interface testing method and device
CN112199277A (en) Browser-based defect reproduction method, device, equipment and storage medium
CN115757150A (en) Production environment testing method, device, equipment and storage medium
CN112202647B (en) Test method, device and test equipment in block chain network
CN112948262A (en) System test method, device, computer equipment and storage medium
CN113704077B (en) Test case generation method and device
CN113179195A (en) CAN message embedded point detection method, system, device and computer readable storage medium
CN113127356A (en) Pressure measurement method and device, electronic equipment and storage medium
CN110661677B (en) DNS (Domain name System) testing method, device and system
CN110209575A (en) Test document generation method, device, electronic equipment and storage medium
KR101039874B1 (en) System for integration platform of information communication
CN111209180A (en) Regression testing method and device based on fuzzy matching
CN112463572B (en) Cross-border multi-service dial testing software testing system and method thereof
CN113282496A (en) Automatic interface test method, device, equipment and storage medium
CN114138839A (en) Test account number implementation method based on database routing
CN106547913B (en) Page information collection and classification feedback method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant