CN109495598B - Domain name system parameter selection method and related device - Google Patents

Domain name system parameter selection method and related device Download PDF

Info

Publication number
CN109495598B
CN109495598B CN201811281554.8A CN201811281554A CN109495598B CN 109495598 B CN109495598 B CN 109495598B CN 201811281554 A CN201811281554 A CN 201811281554A CN 109495598 B CN109495598 B CN 109495598B
Authority
CN
China
Prior art keywords
domain name
suffixes
system configuration
name server
priority
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
CN201811281554.8A
Other languages
Chinese (zh)
Other versions
CN109495598A (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.)
New H3C Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN201811281554.8A priority Critical patent/CN109495598B/en
Publication of CN109495598A publication Critical patent/CN109495598A/en
Application granted granted Critical
Publication of CN109495598B publication Critical patent/CN109495598B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • 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/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses

Abstract

The disclosure provides a domain name system parameter selection method and a related device, and relates to the technical field of network communication. The terminal device in the IPv6 network receives a domain name system configuration packet sent by at least two external devices, where the domain name system configuration packet includes a domain name server address and a priority of a preconfigured domain name server address or includes a domain name suffix and a priority of a preconfigured domain name suffix, and the terminal device may determine, according to the order of the priorities of the at least two domain name server addresses, a selection order of the domain name server addresses in the domain name system configuration packet sent by the at least two external devices, and may determine, according to the order of the priorities of the at least two domain name suffixes, a selection order of the domain name suffixes in the domain name system configuration packet sent by the at least two external devices, thereby selecting a suitable domain name server address or domain name suffix.

Description

Domain name system parameter selection method and related device
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a method for selecting domain name system parameters and a related device.
Background
In an IPv6(Internet Protocol Version 6, sixth edition) network, a Host acquires a Domain Name suffix and an address of a Domain Name server providing Domain Name resolution service, through DNS (Domain Name System) information carried in a DHCP message sent by a Dynamic Host Configuration Protocol (DHCP) server or DNS information carried in an RA (Router Advertisement) message sent by a gateway device. When a plurality of gateway devices and a plurality of DHCP servers exist in an IPv6 network and both provide a host with a domain name server address and a domain name suffix, the host cannot determine the selection order of the plurality of domain name server addresses or the plurality of domain name suffixes.
Disclosure of Invention
The present disclosure aims to provide a domain name system parameter selection method and a related device, so as to solve a problem that when a terminal device obtains domain name server addresses and domain name suffixes provided by a plurality of external devices, a selection order of the domain name server addresses or the domain name suffixes cannot be determined.
In order to achieve the above purpose, the technical scheme adopted by the disclosure is as follows:
in a first aspect, the present disclosure provides a method for selecting domain name system parameters, where the method is applied to a terminal device in an IPv6 network, where the IPv6 network further includes at least two external devices, and the method includes: receiving domain name system configuration messages sent by the at least two external devices, wherein the domain name system configuration messages carry domain name system parameters, the domain name system parameters comprise domain name server addresses, the domain name system configuration messages comprise domain name server address options, and the domain name server addresses and the pre-configured priorities of the domain name server addresses are recorded in the domain name server options; and determining the selection sequence of the domain name server addresses in the domain name system configuration messages sent by the at least two pieces of external equipment according to the high-low sequence of the priorities of the at least two domain name server addresses.
In a second aspect, the present disclosure further provides a domain name system parameter selection method, applied to a terminal device in an IPv6 network, where the IPv6 network further includes at least two external devices, the method including:
receiving domain name system configuration messages sent by the at least two external devices, wherein the domain name system configuration messages carry domain name system parameters, the domain name system parameters comprise domain name suffixes, the domain name system configuration messages comprise domain name list options, and the domain name list options record the domain name suffixes and the priorities of the domain name suffixes configured in advance; and determining the selection sequence of the domain name suffixes in the domain name system configuration messages sent by the at least two pieces of external equipment according to the high-low sequence of the priorities of the at least two domain name suffixes.
In a third aspect, the present disclosure further provides a domain name system parameter selection apparatus, applied to a terminal device in an IPv6 network, where the IPv6 network further includes at least two external devices, and the apparatus includes: a message receiving module, configured to receive a domain name system configuration message sent by the at least two external devices, where the domain name system configuration message carries domain name system parameters, the domain name system parameters include a domain name server address, the domain name system configuration message includes a domain name server address option, and the domain name server address and a priority of a preconfigured domain name server address are recorded in the domain name server option; and the selection module is used for determining the selection sequence of the domain name server addresses in the domain name system configuration messages sent by the at least two pieces of external equipment according to the high-low sequence of the priorities of the at least two domain name server addresses.
In a fourth aspect, the present disclosure further provides a domain name system parameter selection apparatus, applied to a terminal device in an IPv6 network, where the IPv6 network further includes at least two external devices, the apparatus including: a message receiving module, configured to receive domain name system configuration messages sent by the at least two external devices, where the domain name system configuration messages carry domain name system parameters, the domain name system parameters include domain name suffixes, the domain name system configuration messages include domain name list options, and the domain name list options record priorities of the domain name suffixes and preconfigured domain name suffixes; and the selection module is used for determining the selection sequence of the domain name suffixes in the domain name system configuration messages sent by the at least two pieces of external equipment according to the priority sequence of the at least two domain name suffixes.
In a fifth aspect, the present disclosure also proposes a computer-readable storage medium, on which a computer program is stored, which, when read and executed by a processor, implements the method of the first or second aspect.
In a sixth aspect, the present disclosure also provides a terminal device, including a computer-readable storage medium storing a computer program and a processor, where the computer program is read by the processor and executed to implement the method of the first aspect or the second aspect.
The method for selecting the domain name system parameters and the related device provided by the disclosure have the advantages that on one hand, the terminal device receives the domain name system configuration messages sent by at least two external devices, the domain name system configuration messages carry the domain name system parameters, the domain name system parameters comprise domain name server addresses, the domain name system configuration messages comprise domain name server address options, the domain name server addresses record the priority of the domain name server addresses and the preconfigured domain name server addresses, and the selection sequence of the domain name server addresses in the domain name system configuration messages sent by the at least two external devices is determined according to the high-low sequence of the priority of the at least two domain name server addresses; on the other hand, the terminal device receives domain name system configuration messages sent by at least two external devices, the domain name system configuration messages carry domain name system parameters, the domain name system parameters comprise domain name suffixes, the domain name system configuration messages comprise domain name list options, the domain name list options record the domain name suffixes and the priorities of the preconfigured domain name suffixes, and the selection sequence of the domain name suffixes in the domain name system configuration messages sent by the at least two external devices is determined according to the sequence of the priorities of the at least two domain name suffixes. Therefore, when the terminal equipment acquires the domain name server addresses and the domain name suffixes provided by at least two pieces of external equipment, the terminal equipment can determine the selection sequence of the at least two domain name server addresses or the at least two domain name suffixes according to the priority information, so that the proper domain name server addresses or the domain name suffixes are selected.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the disclosure. The objectives and other advantages of the disclosure may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
To more clearly illustrate the technical solutions of the present disclosure, the drawings needed for the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present disclosure, and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 shows an application environment schematic diagram of a domain name system parameter selection method and apparatus provided by the present disclosure.
Fig. 2 shows a schematic diagram of the format of the RDNSS option provided by the present disclosure.
Fig. 3 shows a schematic diagram of the format of the DNSSL option provided by the present disclosure.
Fig. 4 shows a schematic diagram of the format of the DNS _ SERVERS option provided by the present disclosure.
Fig. 5 shows a schematic diagram of the format of the DOMAIN _ LIST option provided by the present disclosure.
Fig. 6 shows a flowchart of a domain name system parameter selection method provided by the present disclosure.
Fig. 7 is a flowchart illustrating another domain name system parameter selection method provided by the present disclosure
Fig. 8 shows a block diagram of a terminal device provided by the present disclosure.
Fig. 9 shows a functional module schematic diagram of a domain name system parameter selection device provided by the present disclosure.
Icon: 100-a terminal device; 200-a gateway device; 300-dynamic host configuration protocol server; 400-domain name system parameter selection means; 110-a memory; 120-a processor; 130-a communication interface; 410-a message receiving module; 420-selection module.
Detailed Description
The technical solutions in the present disclosure will be described clearly and completely with reference to the accompanying drawings in the present disclosure, and it is to be understood that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The components of the present disclosure, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Fig. 1 is a schematic view of an application environment of a method and an apparatus for selecting domain name system parameters according to the present disclosure. The terminal device 100, the gateway device 200 and the dhcp server 300 are located in an IPv6 network, and the terminal device 100, the gateway device 200 and the dhcp server 300 are sequentially connected in communication. In this embodiment, there may be a plurality of terminal devices 100, a plurality of gateway devices 200 in communication connection with the terminal device 100, each gateway device 200 is in communication connection with one dynamic host configuration protocol server 300, and the terminal device 100 performs message interaction with the gateway device 200 or the dynamic host configuration protocol server 300 to obtain DNS parameters (i.e., domain name system parameters), so as to implement automatic configuration of DNS according to the DNS parameters.
In this embodiment, the gateway device 200 may be a switch, a router, or the like, and the terminal device 100 may be a smartphone, a tablet computer, a Personal Computer (PC), a Mobile Internet Device (MID), a Personal Digital Assistant (PDA), or the like, which supports the IPv6 protocol.
The gateway device 200 and the dynamic host configuration protocol server 300 are both configured to send domain name system configuration messages to the terminal device 100, where each domain name system configuration message carries domain name system parameters, the domain name system parameters include a domain name server address and a domain name suffix, each domain name system configuration message includes a domain name server address option and a domain name list option, the domain name server address and the preconfigured priority of the domain name server address are recorded in the domain name server option, the domain name list option is recorded with the domain name suffix and the preconfigured priority of the domain name suffix, and the domain name list option is recorded with the domain name suffix and the preconfigured priority of the domain name suffix.
In this embodiment, the gateway device 200 is configured with domain name system parameters in advance, where the domain name system parameters include a domain name Server address and a domain name suffix, and when receiving a routing Request (RS) message sent by the terminal device 100, the gateway device 200 sends a Routing Advertisement (RA) message (i.e., the above-mentioned domain name system configuration message) to the terminal device 100 and records the preconfigured domain name Server address and domain name suffix in an RDNSS (Recursive DNS Server) option (i.e., the above-mentioned domain name Server address option) and a DNSSL (DNS Search List) option (i.e., the above-mentioned domain name List option) of the RA message, respectively. As shown in fig. 2, a schematic diagram of a format of the RDNSS option includes an option Type field (i.e. Type), an option Length field (i.e. Length), a priority field (i.e. Pro), a Reserved field (i.e. Reserved), a time-to-live field (i.e. Lifetime), and an address field (i.e. Addresses of IPv6 secure DNS Servers), where the address field is used to record a domain name server address of a domain name server providing the domain name resolution function for the terminal device 100, the time-to-live field is used to record a time-to-live of the domain name server address, the priority field is used to record a priority of the domain name server address, and a larger value indicates a higher priority. As shown in fig. 3, a schematic diagram of a format of the DNSSL option is shown, where the DNSSL option includes an option Type field (i.e. Type), an option Length field (i.e. Length), a priority field (i.e. Pro), a Reserved field (i.e. Reserved), a time-to-live field (i.e. Lifetime), and a Domain name field (i.e. Domain Names of DNS Search List), where the Domain name field is used to record a Domain suffix for the terminal device 100, the time-to-live field is used to record a time-to-live of the Domain suffix, the priority field is used to record a priority of the Domain suffix, and a larger value indicates a higher priority.
The dynamic host configuration protocol server 300 is preconfigured with DOMAIN name system parameters, and when receiving a DHCP request message from the terminal device 100 through the gateway device 200, the dynamic host configuration protocol server 300 sends a DHCP response message (i.e., the above-mentioned DOMAIN name system configuration message) to the terminal device 100 and records the preconfigured DOMAIN name server address and DOMAIN name suffix in a DNS _ SERVERS option (i.e., the above-mentioned DOMAIN name server address option) and a DOMAIN _ LIST option (i.e., the above-mentioned DOMAIN name LIST option) of the DHCP response message, respectively. As shown in fig. 4, the format of the DNS _ server option is schematically illustrated, where the DNS _ server option includes an option code field (i.e., option-code), an option length field (i.e., option-len), a priority field (i.e., Pro), a reserved field (i.e., Reserve), and an address field (i.e., DNS-correct-name-server (IPv6address)), where the address field is used to record a domain name server address of a domain name server providing a domain name resolution function for the terminal device 100, and the priority field is used to record a priority of the domain name server address, and a larger value indicates a higher priority. As shown in fig. 5, the format of the DOMAIN _ LIST option is illustrated, and the DOMAIN _ LIST option includes an option code field (i.e., option-code), an option length field (i.e., option-len), a priority field (i.e., Pro), a reserved field (i.e., Reserve), and a DOMAIN name field (i.e., searchlist), where the DOMAIN name field is used to record a DOMAIN name suffix for the terminal device 100, the priority field is used to record a priority of the DOMAIN name suffix, and a larger value indicates a higher priority.
When the terminal device 100 receives at least two domain name system configuration messages sent by the gateway device 200 and the dynamic host configuration protocol server 300, the selection order of the domain name server addresses in the at least two domain name system configuration messages can be determined according to the value in the priority field, the larger the value in the priority field is, the higher the priority of the domain name server address is, and the terminal device 100 selects the domain name server according to the high-low order of the priority of the domain name server address; determining the selection order of the domain name suffixes in the at least two domain name system configuration messages according to the size of the numerical value in the priority field, wherein the larger the numerical value in the priority field is, the higher the priority of the domain name suffix is, and the terminal device 100 selects the domain name suffixes according to the order of the priority of the domain name suffix. In this way, the terminal device 100 can select an appropriate domain name server address and domain name suffix from the at least two domain name server addresses and the at least two domain name suffixes provided by the gateway device 200 and the dynamic host configuration protocol server 300.
Fig. 6 is a schematic flow chart of a domain name system parameter selection method provided in the present disclosure. It should be noted that, the method for selecting domain name system parameters in the present disclosure is not limited by fig. 6 and the specific sequence described below, and it should be understood that, in other embodiments, the sequence of some steps in the method for selecting domain name system parameters in the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted. The domain name system parameter selection method is applicable to the terminal device 100 described above. The specific flow shown in fig. 6 will be described in detail below.
Step S101, receiving a domain name system configuration packet sent by the at least two external devices, where the domain name system configuration packet carries domain name system parameters, the domain name system parameters include a domain name server address, the domain name system configuration packet includes a domain name server address option, and the domain name server address and a priority of the domain name server address configured in advance are recorded in the domain name server option.
In this embodiment, the at least two external devices may include one of the gateway device 200 and the dhcp server 300, or may include both the gateway device 200 and the dhcp server 300.
Step S102, determining a selection order of domain name server addresses in domain name system configuration messages sent by the at least two external devices according to the order of priorities of the at least two domain name server addresses.
For example, if the terminal device 100 receives 4 domain name system configuration messages, the domain name server addresses carried in the 4 domain name system configuration messages are a1, a2, A3, and a4, the priority of a1 is 2, the priority of a2 is 6, the priority of A3 is 5, and the priority of a4 is 4, then the four domain name server addresses are selected in the order of a2, A3, a4, and a 1.
In this embodiment, the step S102 includes: when the priorities of at least two domain name server addresses are the same, if the survival time of the domain name server addresses is recorded in the domain name server address options, determining the selection sequence of the at least two domain name server addresses with the same priority according to the respective survival time of the at least two domain name server addresses with the same priority; if the survival time of the domain name server address is not recorded in the domain name server address options, determining that the priority of the domain name server address in the domain name server address options which are not recorded with the survival time is the highest.
That is, the terminal device 100 may select the domain name server addresses with the same priority according to the lifetime of the domain name server addresses, as can be seen from fig. 2 and fig. 4, the lifetime of the domain name server address is recorded in the RDNSS option of the domain name system configuration message sent by the gateway device 200, and the lifetime of the domain name server address is not recorded in the DNS _ server option of the domain name system configuration message sent by the dynamic host configuration protocol server 300, and at this time, the lifetime of the domain name server address is defaulted to be indefinite. For example, assuming that domain name server addresses carried in 4 domain name system configuration messages are a1, a2, A3, and a4, the priority of a4 is 2, the priority of a4 is 6, the priority of a4 is 4, when a4 and a4 are provided by different gateway devices 200, the lifetime T4 of a4 is recorded in a domain name server address option to which the a4 belongs, if T4> T4, the priority of a4 is higher than that of a4, at this time, the selection order of the four domain name server addresses is a4, and a4, if T4> T4, the priority of a4 is higher than that of the four domain name server addresses is selected in the order of a4, a4 and a 4; when a2 is provided by the gateway device 200 and A3 is provided by the dhcp server 300, the lifetime of A3 is defaulted to be indefinite, that is, the priority of A3 is highest among a2 and A3, and the four domain name server addresses are selected in the order of A3, a2, a4 and a 1.
Fig. 7 is a flowchart illustrating another domain name system parameter selection method provided in the present disclosure. It should be noted that, the method for selecting domain name system parameters in the present disclosure is not limited by the specific sequence shown in fig. 7 and described below, and it should be understood that, in other embodiments, the sequence of some steps in the method for selecting domain name system parameters in the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted. The domain name system parameter selection method is applicable to the terminal device 100 described above. The specific flow shown in fig. 7 will be described in detail below.
Step S201, receiving domain name system configuration messages sent by the at least two external devices, where the domain name system configuration messages carry domain name system parameters, the domain name system parameters include domain name suffixes, the domain name system configuration messages include domain name list options, and the domain name list options record the domain name suffixes and the priorities of the domain name suffixes configured in advance.
In this embodiment, the at least two external devices may include one of the gateway device 200 and the dhcp server 300, or may include both the gateway device 200 and the dhcp server 300.
Step S202, determining a selection order of domain name suffixes in the domain name system configuration messages sent by the at least two external devices according to the order of priorities of the at least two domain name suffixes.
For example, if the terminal device 100 receives 4 domain name system configuration messages, the domain name suffixes carried in the 4 domain name system configuration messages are respectively B1, B2, B3, and B4, the priority of B1 is 5, the priority of B2 is 4, the priority of B3 is 7, and the priority of B4 is 3, the four domain name suffixes are selected in the order of B3, B1, B2, and B4.
In this embodiment, the step S202 includes: when the priorities of at least two domain name suffixes are the same, if the survival time of the domain name suffixes is recorded in the domain name list option, determining the selection sequence of the at least two domain name suffixes with the same priority according to the respective survival time of the at least two domain name suffixes with the same priority; if the survival time of the domain name suffix is not recorded in the domain name list option, determining that the priority of the domain name suffix in the domain name list option which is not recorded with the survival time is highest.
That is, the terminal device 100 may select the DOMAIN name suffix with the same priority according to the lifetime of the DOMAIN name suffix, and as shown in fig. 3 and fig. 5, the lifetime of the DOMAIN name suffix is recorded in the DNSSL option of the DOMAIN name system configuration packet sent by the gateway device 200, while the lifetime of the DOMAIN name suffix is not recorded in the DOMAIN _ LIST option of the DOMAIN name system configuration packet sent by the dynamic host configuration protocol server 300, and the lifetime of the DOMAIN name suffix is defaulted to be indefinite. For example, assume that domain name suffixes carried in 4 domain name system configuration messages are B1, B2, B3, and B4, the priority of B4 is 5, the priority of B4 is 4, the priority of B4 is 7, the priority of B4 is 4, when B4 and B4 are provided by different gateway devices 200, the time-to-live T4 of B4 is recorded in the domain name list option to which B4 belongs, if T4> T4, the priority of B4 is higher than that of B4, at this time, the selection order of the four domain name server addresses is B4, and B4 is greater than that of T4, if T4> T4, the priority of B4 is higher than that of the four domain name server addresses are selected in order of B4, B4; when B2 is provided by the gateway device 200 and B4 is provided by the dhcp server 300, the lifetime of B4 is set to be indefinite, that is, the priority of B4 is highest among B2 and B4, and the four domain name server addresses are selected in the order of B3, B1, B4 and B2.
It should be noted that, in practical applications, when configuring the domain name system parameters for the external devices (i.e., the gateway device 200 and the dynamic host configuration protocol server 300), the priority may be configured for only one of the domain name server address and the domain name suffix, or may be configured for both the domain name server address and the domain name suffix. Thus, the domain name system configuration message received by the terminal device 100 includes a domain name server option and a domain name list option, and when only the domain name server option records the priority of the domain name server address, the terminal device 100 determines the selection order of the domain name server addresses in the domain name system configuration message sent by the at least two external devices according to the high-low order of the priority of the at least two domain name server addresses; when only the domain name list option records the priority of the domain name suffix, the terminal device 100 determines the selection sequence of the domain name suffixes in the domain name system configuration message sent by the at least two gateway devices 200 according to the high-low sequence of the priority of the at least two domain name suffixes; when the domain name system configuration message received by the terminal device 100 has the priority of the domain name server address recorded in the domain name server address option and the priority of the domain name suffix recorded in the domain name list option, the terminal device 100 may determine the selection order of the domain name server addresses in the domain name system configuration message sent by the at least two external devices according to the high-low order of the priority of the at least two domain name server addresses, and may determine the selection order of the domain name suffixes in the domain name system configuration message sent by the at least two external devices according to the high-low order of the priority of the at least two domain name suffixes.
Referring to fig. 8, a block diagram of a terminal device 100 according to the present disclosure is shown. The terminal device 100 may include a memory 110, a processor 120, and a communication interface 130, the memory 110, the processor 120, and the communication interface 130 being electrically connected to each other, directly or indirectly, to enable transmission or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 110 may be used for storing software programs and modules, such as program instructions/modules corresponding to the domain name system parameter selection method provided in the foregoing method embodiments, and the processor 120 executes the software programs and modules stored in the memory 110, thereby executing various functional applications and data processing. The communication interface 130 may be used for communicating signaling or data with other node devices.
The Memory 110 may be, but is not limited to, a Random Access Memory 110 (RAM), a Read Only Memory 110 (ROM), a Programmable Read Only Memory 110 (PROM), an Erasable Read Only Memory 110 (EPROM), an electrically Erasable Read Only Memory 110 (EEPROM), and the like.
The processor 120 may be an integrated circuit chip having signal processing capabilities. The Processor 120 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
It is to be understood that the structure shown in fig. 8 is merely illustrative, and the terminal device 100 may include more or fewer components than shown in fig. 8, or have a different configuration than shown in fig. 8. The components shown in fig. 8 may be implemented in hardware, software, or a combination thereof.
The present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by the processor 120, implements the domain name system parameter selection method disclosed by the present disclosure.
Fig. 9 is a functional block diagram of a domain name system parameter selection apparatus 400 according to the present disclosure. It should be noted that the basic principle and the generated technical effect of the domain name system parameter selection apparatus 400 provided in the present embodiment are the same as those of the foregoing method embodiments, and for a brief description, reference may be made to corresponding contents in the foregoing method embodiments for a part not mentioned in the present embodiment. The domain name system parameter selection apparatus 400 is applied to the terminal device 100, and includes a message receiving module 410 and a selection module 420.
The message receiving module 410 is configured to receive a domain name system configuration message sent by the at least two external devices, where the domain name system configuration message carries domain name system parameters, the domain name system parameters include a domain name server address, the domain name system configuration message includes a domain name server address option, and the domain name server option records the domain name server address and a priority of a preconfigured domain name server address.
The message receiving module 410 is further configured to receive a domain name system configuration message sent by the at least two external devices, where the domain name system configuration message carries domain name system parameters, the domain name system parameters include a domain name suffix, the domain name system configuration message includes a domain name list option, and the domain name list option records the domain name suffix and a priority of the domain name suffix configured in advance.
It is understood that the message receiving module 410 can execute the steps S101 and S201.
The selecting module 420 is configured to determine a selection order of domain name server addresses in domain name system configuration messages sent by the at least two external devices according to a high-low order of priorities of the at least two domain name server addresses.
In this embodiment, the selecting module 420 is specifically configured to, when the priorities of the at least two domain name server addresses are the same, if the lifetime of the domain name server address is recorded in the domain name server address option, determine the selection order of the at least two domain name server addresses with the same priority according to the respective lifetimes of the at least two domain name server addresses with the same priority; if the survival time of the domain name server address is not recorded in the domain name server address options, determining that the priority of the domain name server address in the domain name server address options which are not recorded with the survival time is the highest.
The selecting module 420 is further configured to determine, when the domain name system parameters carried in the at least two domain name system configuration messages received by the message receiving module 410 include domain name suffixes, a selection order of the domain name suffixes in the domain name system configuration messages sent by the at least two external devices according to a high-low order of priorities of the at least two domain name suffixes.
In this embodiment, the selecting module 420 is specifically configured to, when the priorities of the at least two domain name suffixes are the same, if the time-to-live of the domain name suffixes is recorded in the domain name list option, determine the selection order of the at least two domain name suffixes with the same priority according to the time-to-live of the at least two domain name suffixes with the same priority; if the survival time of the domain name suffix is not recorded in the domain name list option, determining that the priority of the domain name suffix in the domain name list option which is not recorded with the survival time is highest.
It is understood that the selection module 420 can execute the steps S102 and S202.
It is to be understood that, in this embodiment, the selecting module 420 may determine the selection order of the domain name server addresses according to the priority of the domain name server addresses, and may determine the selection order of the domain name suffixes according to the priority of the domain name suffixes. When only the domain name server address option records in the domain name system configuration message received by the message receiving module 410 have a priority, the selecting module 420 only determines the selection sequence of the domain name server addresses in the domain name system configuration messages sent by at least two external devices; when only the domain name list option records in the domain name system configuration message received by the message receiving module 410 have priority, the selecting module 420 determines only the selection order of the domain name suffixes in the domain name system configuration message sent by at least two external devices; when the domain name server address option and the domain name list option in the domain name system configuration message received by the message receiving module 410 both record priorities, the selecting module 420 may respectively determine a selection order of domain name server addresses and a selection order of domain name suffixes in the domain name system configuration messages sent by at least two external devices.
In summary, in the method for selecting domain name system parameters and the related apparatus provided by the present disclosure, a terminal device receives domain name system configuration messages sent by at least two external devices, each domain name system configuration message carries domain name system parameters, the domain name system parameters include a domain name server address and a domain name suffix, each domain name system configuration message includes a domain name server address option and a domain name list option, the domain name server address and a priority of a preconfigured domain name server address are recorded in the domain name server option, a selection order of the domain name server addresses in the domain name system configuration messages sent by the at least two external devices is determined according to a high-low order of the priorities of the at least two domain name server addresses, and a selection order of the domain name system configuration messages sent by the at least two external devices is determined according to a high-low order of the priorities of the at least two domain name suffixes The selection order of domain name suffixes in (1). Therefore, when the terminal equipment acquires the domain name server addresses and the domain name suffixes provided by the plurality of external equipment, the terminal equipment can determine the selection sequence of the plurality of domain name server addresses and the plurality of domain name suffixes according to the priority information, so that the proper domain name server addresses and the domain name suffixes are selected.
As will be appreciated by one skilled in the art, the present disclosure may be provided as a method, apparatus, device or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, devices and computer program products according to the present disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present disclosure may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, 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 process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is illustrative of only alternative embodiments of the present disclosure and is not intended to limit the disclosure, which may be modified and varied by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Claims (6)

1. A method for selecting domain name system parameters, which is applied to a terminal device in an IPv6 network, wherein the IPv6 network further comprises at least two external devices, and the method comprises the following steps:
receiving domain name system configuration messages sent by the at least two external devices, wherein the domain name system configuration messages carry domain name system parameters, the domain name system parameters comprise domain name server addresses, the domain name system configuration messages comprise domain name server address options, and the domain name server address options record the domain name server addresses and the priorities of the domain name server addresses configured in advance;
determining the selection sequence of the domain name server addresses in the domain name system configuration messages sent by the at least two pieces of external equipment according to the high-low sequence of the priority of the at least two domain name server addresses; the step of determining the selection order of the domain name server addresses in the domain name system configuration messages sent by the at least two external devices according to the high-low order of the priority of the at least two domain name server addresses includes: when the priorities of at least two domain name server addresses are the same, if the survival time of the domain name server addresses is recorded in the domain name server address options, determining the selection sequence of the at least two domain name server addresses with the same priority according to the respective survival time of the at least two domain name server addresses with the same priority; if the survival time of the domain name server address is not recorded in the domain name server address options, determining that the priority of the domain name server address in the domain name server address options which are not recorded with the survival time is the highest.
2. A method for selecting domain name system parameters, which is applied to a terminal device in an IPv6 network, wherein the IPv6 network further comprises at least two external devices, and the method comprises the following steps:
receiving domain name system configuration messages sent by the at least two external devices, wherein the domain name system configuration messages carry domain name system parameters, the domain name system parameters comprise domain name suffixes, the domain name system configuration messages comprise domain name list options, and the domain name list options record the domain name suffixes and the priorities of the domain name suffixes configured in advance;
determining the selection sequence of domain name suffixes in domain name system configuration messages sent by the at least two pieces of external equipment according to the high-low sequence of the priority of the at least two domain name suffixes; the step of determining the selection sequence of the domain name suffixes in the domain name system configuration message sent by the at least two external devices according to the high-low sequence of the priority of the at least two domain name suffixes includes: when the priorities of at least two domain name suffixes are the same, if the survival time of the domain name suffixes is recorded in the domain name list option, determining the selection sequence of the at least two domain name suffixes with the same priority according to the respective survival time of the at least two domain name suffixes with the same priority; if the survival time of the domain name suffix is not recorded in the domain name list option, determining that the priority of the domain name suffix in the domain name list option which is not recorded with the survival time is highest.
3. A domain name system parameter selection apparatus, applied to a terminal device in an IPv6 network, wherein the IPv6 network further includes at least two external devices, the apparatus comprising:
a message receiving module, configured to receive a domain name system configuration message sent by the at least two external devices, where the domain name system configuration message carries domain name system parameters, the domain name system parameters include a domain name server address, the domain name system configuration message includes a domain name server address option, and the domain name server address option records the domain name server address and a priority of a preconfigured domain name server address;
the selection module is used for determining the selection sequence of the domain name server addresses in the domain name system configuration messages sent by the at least two pieces of external equipment according to the high-low sequence of the priorities of the at least two domain name server addresses; the selection module is used for determining the selection sequence of the at least two domain name server addresses with the same priority according to the respective survival times of the at least two domain name server addresses with the same priority if the survival times of the domain name server addresses are recorded in the domain name server address options when the priorities of the at least two domain name server addresses are the same; if the survival time of the domain name server address is not recorded in the domain name server address options, determining that the priority of the domain name server address in the domain name server address options which are not recorded with the survival time is the highest.
4. A domain name system parameter selection apparatus, applied to a terminal device in an IPv6 network, wherein the IPv6 network further includes at least two external devices, the apparatus comprising:
a message receiving module, configured to receive domain name system configuration messages sent by the at least two external devices, where the domain name system configuration messages carry domain name system parameters, the domain name system parameters include domain name suffixes, the domain name system configuration messages include domain name list options, and the domain name list options record priorities of the domain name suffixes and preconfigured domain name suffixes;
the selection module is used for determining the selection sequence of the domain name suffixes in the domain name system configuration messages sent by the at least two pieces of external equipment according to the priority sequence of the at least two domain name suffixes; the selection module is used for determining the selection sequence of the at least two domain name suffixes with the same priority according to the respective survival time of the at least two domain name suffixes with the same priority if the survival time of the domain name suffixes is recorded in the domain name list option when the priorities of the at least two domain name suffixes are the same; if the survival time of the domain name suffix is not recorded in the domain name list option, determining that the priority of the domain name suffix in the domain name list option which is not recorded with the survival time is highest.
5. A computer-readable storage medium, on which a computer program is stored which, when read and executed by a processor, implements the method of any one of claims 1-2.
6. A terminal device, comprising a computer-readable storage medium storing a computer program and a processor, the computer program being read and executed by the processor to implement the method according to any one of claims 1-2.
CN201811281554.8A 2018-10-23 2018-10-23 Domain name system parameter selection method and related device Active CN109495598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811281554.8A CN109495598B (en) 2018-10-23 2018-10-23 Domain name system parameter selection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811281554.8A CN109495598B (en) 2018-10-23 2018-10-23 Domain name system parameter selection method and related device

Publications (2)

Publication Number Publication Date
CN109495598A CN109495598A (en) 2019-03-19
CN109495598B true CN109495598B (en) 2022-02-11

Family

ID=65693321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811281554.8A Active CN109495598B (en) 2018-10-23 2018-10-23 Domain name system parameter selection method and related device

Country Status (1)

Country Link
CN (1) CN109495598B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866203B (en) * 2019-04-29 2022-04-19 贵州白山云科技股份有限公司 Domain name resolution method and device, readable storage medium and equipment
CN111414208B (en) * 2020-03-13 2023-08-01 百度在线网络技术(北京)有限公司 Application program starting method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984155A (en) * 2005-12-15 2007-06-20 上海贝尔阿尔卡特股份有限公司 Method for configuring domain name in IPv6 access network and its network equipment
CN103561122A (en) * 2013-10-23 2014-02-05 华为终端有限公司 IPv6 address collocation method, IPv6 client and server
CN106790746A (en) * 2016-12-09 2017-05-31 互联网域名系统北京市工程研究中心有限公司 A kind of distributed domain name storage and parsing method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9445354B2 (en) * 2013-02-05 2016-09-13 Mediatek Inc. Apparatus and method for acquiring IPv6 domain name system server and SIP server address
CN106412000B (en) * 2016-07-27 2019-05-31 厦门易名科技股份有限公司 A kind of processing method of inquiry of the domain name

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984155A (en) * 2005-12-15 2007-06-20 上海贝尔阿尔卡特股份有限公司 Method for configuring domain name in IPv6 access network and its network equipment
CN103561122A (en) * 2013-10-23 2014-02-05 华为终端有限公司 IPv6 address collocation method, IPv6 client and server
CN106790746A (en) * 2016-12-09 2017-05-31 互联网域名系统北京市工程研究中心有限公司 A kind of distributed domain name storage and parsing method and system

Also Published As

Publication number Publication date
CN109495598A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US10476942B2 (en) DNS resolution of overlapping domains in a multi-tenant computing environment
CN111182089B (en) Container cluster system, method and device for accessing big data assembly and server
CN110740162B (en) Communication link establishing method, device, electronic equipment and medium
CN111212134A (en) Request message processing method and device, edge computing system and electronic equipment
CN109495598B (en) Domain name system parameter selection method and related device
CN109120746B (en) Network address translation method and device and address translation equipment
JP4699530B2 (en) Methods, systems, and applications for service addressing
WO2017161965A1 (en) Method, device, and system for dynamic domain name system (dns) redirection
CN103916484A (en) IP-address configuring method and device
ES2594007T3 (en) Service, device and system data processing method
US10303502B2 (en) Creating a virtual machine for an IP device using information requested from a lookup service
CN113973026A (en) Site interconnection method, central controller and route reflector
CN113315848A (en) Access control method, device and equipment
JP6509367B2 (en) Data processing method, apparatus and device
US20230300215A1 (en) Proxy-Mediated Service Request Handling between Network Functions
CN104092751A (en) Service access method and device
CN107547684B (en) IPv6 address allocation method and device
CN109005122B (en) Message sending method and device and network equipment
CN108632400B (en) IPv6 address allocation method and Leaf node equipment
CN108429822B (en) Communication system, IPv6 address allocation method and device and distributed gateway
WO2017145971A1 (en) Communication system, control device, relay device, control method, and storage medium in which program is stored
CN109462667B (en) Domain name list acquisition method and related device
WO2022022907A1 (en) Network functionality (nf) aware service provision based on service communication proxy (scp)
US20150350079A1 (en) Method of message routing for a distributed computing system
CN110661655A (en) Cluster deployment method and system, electronic device and storage medium

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