WO2013082791A1 - Dns客户端地址、rr ttl更新的方法、装置及系统 - Google Patents

Dns客户端地址、rr ttl更新的方法、装置及系统 Download PDF

Info

Publication number
WO2013082791A1
WO2013082791A1 PCT/CN2011/083717 CN2011083717W WO2013082791A1 WO 2013082791 A1 WO2013082791 A1 WO 2013082791A1 CN 2011083717 W CN2011083717 W CN 2011083717W WO 2013082791 A1 WO2013082791 A1 WO 2013082791A1
Authority
WO
WIPO (PCT)
Prior art keywords
dns
client
ttl
ttl value
update
Prior art date
Application number
PCT/CN2011/083717
Other languages
English (en)
French (fr)
Inventor
刘冰
蒋胜
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201180003172.9A priority Critical patent/CN103380607B/zh
Priority to PCT/CN2011/083717 priority patent/WO2013082791A1/zh
Publication of WO2013082791A1 publication Critical patent/WO2013082791A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a domain name system (DNS) client address, a resource record (RR) time to live (TTL) update method, device, and system.
  • DNS domain name system
  • RR resource record
  • TTL time to live
  • DNS is a naming system distributed in a hierarchical structure.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • the domain name is used to locate the computer and provide The conversion between the domain name and the IP address.
  • the domain name-related information including the IP address can be provided by the database in the DNS server.
  • the entry formed by this information in the DNS server is called the DNS RR, and the RR also includes the TTL.
  • the DNS server includes a DNS authoritative server and a DNS cache server (or other types, such as a forwarding server, an iterative query server, etc., and has nothing to do with the present invention).
  • the DNS authoritative server provides authoritative data and stores RRs of all DNS clients.
  • the DNS cache server obtains the RR information from the DNS authoritative server and caches it. When a user queries, it returns the information required by the user according to the RR that is cached.
  • the TTL value of the RR is generated by the DNS authoritative server.
  • the TLL value remains unchanged in the DNS authoritative server and does not become smaller over time.
  • the DNS information obtained by the DNS cache server from the authoritative server contains the TTL.
  • the value of the RR becomes invalid. When the TTL of an RR becomes 0, the RR information is invalid. You need to re-obtain the RR information from the DNS authoritative server.
  • the IP address of the DNS client in the network will be reassigned due to the reorganization of the network and the Internet Service Provider (ISP).
  • ISP Internet Service Provider
  • DNS update Dynamic DNS Update update technology allows DNS clients to send to the DNS authoritative server The update message is sent, and the DNS authoritative server updates the RR corresponding to the DNS client after receiving the message. Since the DNS client updates the domain name and the IP correspondence is only sent to the DNS authoritative server, the DNS cache server will only actively query the DNS authoritative server when the TTL of the saved RR information is reduced to 0.
  • the embodiment of the present invention provides a method, a device, and a system for updating a DNS client address and an RR TTL.
  • the method of the present invention provides a method for updating a DNS client address, including:
  • the second DNS Update message is sent to the DNS authoritative server, where the second DNS Update message includes the updated address information of the DNS client.
  • the embodiment of the present invention provides a DNS client RR TTL update method, including: a DNS authoritative server receives a first DNS Update update message sent by a DNS client, where the first DNS Update message includes the DNS client a new TTL value of the RR information, where the new TTL value is used to replace the original TTL value of the DNS client;
  • the DNS authoritative server updates the original TTL value of the DNS client to the new TTL value.
  • An embodiment of the present invention provides an apparatus for updating a DNS client address, including: a first packet sending unit, configured to send a first DNS Update update packet to a DNS authoritative server, where the first DNS Update packet includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the original TTL value of the DNS client;
  • a timer unit configured to start a timer according to the original TTL value
  • a second packet sending unit configured to send, after the timer expires, a second DNS Update update message to the DNS authoritative server, where the second DNS Update message includes the updated address of the DNS client Information
  • an address update unit configured to update the address of the DNS client as the updated address information.
  • the embodiment of the invention provides a device for updating the TTL lifetime of the RR resource record of the client of the DNS domain name system, including:
  • a message receiving unit configured to receive, by the DNS authoritative server, a first DNS Update update message sent by the DNS client, where the first DNS Update message includes a new TTL value of the DNS client RR information, and the new TTL The value is used to replace the original TTL value of the DNS client;
  • a message processing unit configured to update, by the DNS authoritative server, the original TTL value of the DNS client to the new TTL value.
  • the embodiment of the invention provides a system for updating the TTL of the resource of the DNS domain name system resource record RR, including: a DNS client, configured to send a first DNS Update message, where the first DNS Update message includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the original DNS client TTL value;
  • the DNS authoritative server includes a device for updating the TTL lifetime of a DNS domain name system client RR resource record provided by the implementation of the present invention.
  • the embodiment of the present invention provides a DNS client address, RR TTL update method, device, and system.
  • the DNS client RR TTL update method provided by the embodiment of the present invention can implement dynamic customization of the DNS client.
  • the TTL function provides a necessary technology for the DNS client address update method in the embodiment of the present invention.
  • the DNS client address update method provided by the embodiment of the present invention is reorganized in the network. When the IP address of the DNS client is reassigned, the time that the querying user cannot access the DNS client can be effectively reduced, which is beneficial to improve network reliability.
  • FIG. 1 is a schematic flowchart of a method for updating an address of a DNS RR according to the first embodiment of the present invention
  • FIG. 2 is a schematic diagram of a DNS RR update process according to a first embodiment of the present invention
  • FIG. 3 is a schematic diagram of a DNS Update message format provided by an embodiment of the present invention
  • FIG. 4 is an extended embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for updating a TTL of a DNS RR according to a second embodiment of the present invention
  • FIG. 6 is a schematic diagram of an apparatus for updating an address of a DNS RR according to a third embodiment of the present invention
  • Figure ⁇ is a schematic diagram of a device for TTL update of a DNS RR according to a fourth embodiment of the present invention
  • FIG. 8 is a schematic diagram of a system for TTL update of a DNS RR according to a fifth embodiment of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 1 is a flowchart of a method according to an embodiment of the present invention, including:
  • the first DNS Update message includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the original of the DNS client. TTL value;
  • the IP address of the DNS client in the network will be reassigned.
  • the DNS authority message will be notified immediately to save the new DNS server. Domain name and IP correspondence, but the DNS cache server has not expired due to the TTL of the DNS client of the DNS client.
  • the DNS cache server still stores the old address and domain name of the DNS client. Then, when there is a user.
  • the DNS cache server When searching for the DNS client information, the DNS cache server is first queried first, and the DNS cache server returns the old address of the DNS client to the querying user, thereby causing the querying user to access the DNS client, in particular, when the DNS cache server If the TTL of the DNS information of the DNS client is large, the queried user may not be able to access the DNS client for a long time.
  • the domain name of the DNS client A is www.example.com. IP ground
  • the address of the DNS client A stored by the DNS authoritative server and the DNS cache server is 123.1.1.1, including: domain name, www.example.com; IP, 123.1.1.1; TTL, 36000 seconds.
  • the address of the DNS client A is updated to 234.1.1.1, and the DNS client A advertises the updated address to the DNS authoritative server through the DNS Update message, and the DNS authoritative server corresponds to the RR database.
  • the RR information of DNS client A is updated to: domain name, www.example.com; IP, 234.1.1.1; TTL, 36000 seconds.
  • the RR information corresponding to DNS client A saved by the DNS cache server is: domain name, www.example.com; IP, 123.1.1.1; TTL, assuming that the TTL is reduced to 30,000 seconds at this time, since TTL still does not expire
  • the DNS cache server does not go to the DNS authoritative server to obtain the updated RR information of the DNS client.
  • the DNS cache server returns the old IP address 123.1.1.1.
  • User B will not be able to access DNS client A, and the time that cannot be accessed will last for 30,000 seconds.
  • the typical value of DNS TTL is about 2 days, which will result in users not being able to access the domain name to be accessed for up to 2 days. , seriously affect user communication.
  • the main reason for the above problem is that when the DNS client address changes, the original TTL of the DNS client RR saved by the DNS cache server does not expire, and the DNS authoritative server is not queried for the DNS that has updated the address information.
  • the client RR information causes the DNS cache server to access the DNS client domain name within the period when the original TTL of the DNS client RR expires. Since the DNS authoritative server maintains a large number of DNS clients, it is impossible to implement real-time TTL adjustment for each DNS client.
  • the inventors of the present invention have found that before the network reorganizes or switches the ISP, that is, the IP address switching of the DNS client is performed.
  • the DNS client may send a first DNS Update update message to the DNS authoritative server, where the first DNS Update message includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the DNS The original TTL value of the client.
  • the DNS authoritative server queries the RR information of the DNS client that has updated the TTL, so that after the network reorganizes or switches the ISP, that is, the IP address of the DNS client is switched.
  • the DNS cache server After the DNS cache server After the new TTL expires after the update, the DNS server can be queried for the new DNS client RR information.
  • the user cannot process the DNS client for a long time, and the new TTL value corresponding to the DNS client is updated. The time, as long as the new TTL value is defined, can effectively reduce the time that the query user can not access the DNS client.
  • the dynamic DNS update technology allows the DNS client to send a DNS Update message to the DNS server. After receiving the DNS Update message, the DNS authoritative server updates the RR information corresponding to the DNS client.
  • the current dynamic DNS Update standard protocol defines The DNS Update message can be used in the following four types of operations (see (RFC2136):
  • the inventor of the present invention has found that the first DNS Update message may be a new operation type of the extended type of the existing DNS Update message.
  • the operation type of DNS Update 4 is a type of operation that dynamically updates the DNS RR TTL.
  • the operation type of the packet can dynamically update the DNS client RR TTL value stored in the DNS authoritative server.
  • the text includes a TTL Update update field for identifying a new TTL to be updated by the DNS client.
  • the format of the existing DNS Update message is shown in Figure 3.
  • the format of the extended DNS Update message is shown in Figure 4.
  • the TTL Update field can be 32 bytes in length.
  • the TTL Update field can also be placed in other locations of the DNS Update message.
  • the embodiment of the present invention does not impose restrictions. For example, the TTL Update message can be placed in the TTL Update additional data.
  • the packet of the operation type may include a TTL validity determination field, which is used to identify whether the new TTL value is valid, and the TTL validity determination field may be 1 bit.
  • TTL validity field is 0, the new The TTL value is invalid.
  • the TTL valid field is non-zero, the new TTL value is valid.
  • the DNS authoritative server After receiving the first DNS Update message, the DNS authoritative server extracts the new TTL value. When it is determined that the new TTL value is valid, the DNS authoritative server passes the DNS client domain name in the DNS Update message. The information finds the RR information corresponding to the DNS client in the local RR database, and then updates the original TTL value of the DNS client RR information to the new TTL value.
  • the DNS client After the first DNS Update update message is sent to the DNS authoritative server, the DNS client needs to start a timer, the timer length being equal to the original TTL value of the DNS client or greater than the original TTL of the DNS client.
  • a value of the value, and correspondingly, before the timer is started according to the original TTL, the original TTL value of the RR of the DNS client may be obtained by sending a DNS Query query message to the DNS authoritative server.
  • the timer is started, and the DNS Query message can be referred to RFC1035.
  • the DNS client After the timer expires, the DNS client sends a second DNS Update update message to the DNS authoritative server, where the second DNS Update message includes the updated address information of the DNS client, and updates the The address of the DNS client is the updated address information.
  • the purpose of starting the timer is to ensure that the original TTL of the DNS client RR saved by the DNS cache server expires, and the updated TTL value corresponding to the DNS client has been obtained from the DNS authoritative server.
  • the DNS authoritative server After receiving the second DNS Update message, the DNS authoritative server extracts the updated address information, and the DNS authoritative server finds a corresponding address in the local RR database by using the DNS client domain name information in the DNS Update message. And updating, by the RR information of the DNS client, the address information of the DNS client RR information to the updated address. Information.
  • the domain name of the DNS client A is www.example.com
  • the IP address is 123.1.1.1
  • the DNS authoritative server and the DNS cache server store the DNS client.
  • the RR information of the terminal A includes: domain name, www.example.com; IP, 123.1.1.1; TTL, 36000 seconds.
  • the DNS client A sends a DNS Query message to the DNS authoritative server. Obtaining the original TTL of the RR corresponding to the DNS client A stored in the DNS authoritative server. Further, the DNS authoritative server sends a first DNS Update update message, where the first DNS Update message includes the DNS client RR information.
  • the new TTL value is used to replace the original TTL value of the DNS client, and the update TTL value is a relatively small value, as this example can be set to 30 seconds.
  • the timer is started according to the original TTL, and the duration of the timer is the original TTL value of the DNS client RR.
  • the DNS authoritative server updates the RR corresponding to the DNS client A in the RR database to: domain name, www.example.com; IP, 123.1.1.1; TTL, 30 seconds.
  • the DNS authoritative server After the original TTL of the RR of the DNS client A stored in the DNS cache server expires, the DNS authoritative server is actively queried and updated the RR information of the DNS client A, and updated to: domain name, www.example.com; IP, 123.1.1.1 ; TTL, 30 seconds. In this way, the DNS cache server queries the DNS authoritative server for the RR information of the DSN client A every 30 seconds.
  • the DNS client A starts the address switch, and sends a second DNS update update report to the DNS authoritative server.
  • the second DNS Update message includes the updated address of the DNS client A.
  • the address of the switching client A is 234.1.1.1
  • the DNS authoritative server receives the second DNS Update message
  • the DNS The RR of the DNS client A stored by the authoritative server is also updated to: domain name, www.example.com; IP, 234.1.1.1; TTL, 30 seconds. Since the DNS of the DNS client A stored by the DNS cache server has a TTL of 30 seconds, the DNS cache server can update the RR of the DNS client A for up to 30: domain name, www.example.com; IP, 234.1.1.1 ; TTL, 30 seconds. Therefore, user B is the longest when the network is reorganized or the ISP is switched. The DNS client A domain name www.example.com can only be accessed within 30 seconds, which greatly shortens the time that user B cannot access DNS client A and improves network reliability.
  • the method provided by the implementation of the present invention can effectively reduce the time for the querying user to access the DNS client when the network is re-allocated due to re-organization or switching of the ISP, etc., which is beneficial to improving network reliability. .
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • FIG. 5 is a flowchart of a method according to an embodiment of the present invention, including:
  • the DNS authoritative server receives a first DNS Update update message sent by the DNS client, where the first DNS Update message includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the location.
  • the IP address of the DNS client in the network will be reassigned.
  • the DNS authority message will be notified immediately to save the new DNS server. Domain name and IP correspondence, but the DNS cache server has not expired due to the TTL of the DNS client of the DNS client.
  • the DNS cache server still stores the old address and domain name of the DNS client. Then, when there is a user.
  • the DNS cache server When searching for the DNS client information, the DNS cache server is first queried first, and the DNS cache server returns the old address of the DNS client to the querying user, thereby causing the querying user to access the DNS client, in particular, when the DNS cache server If the TTL of the DNS information of the DNS client is large, the queried user may not be able to access the DNS client for a long time.
  • the domain name of the DNS client A is www.example.com.
  • the IP address is 123.1.1.1.
  • the RR information of the DNS client A stored by the DNS authoritative server and the DNS cache server includes: domain name, www.example.com; IP , 123.1.1.1 ; TTL, 36000 seconds.
  • the address of the DNS client A is updated to 234.1.1.1, and the DNS client A advertises the updated address to the DNS authoritative server through the DNS Update message, and the DNS authoritative server corresponds to the RR database.
  • the RR information of DNS client A is updated to: Domain name, www.example.com; IP, 234.1.1.1; TTL, 36000 seconds.
  • the RR information corresponding to DNS client A saved by the DNS cache server is: domain name, www.example.com; IP, 123.1.1.1; TTL, assuming that the TTL is reduced to 30,000 seconds at this time, since TTL still does not expire
  • the DNS cache server does not go to the DNS authoritative server to obtain the updated RR information of the DNS client.
  • the DNS cache server returns the old IP address 123.1.1.1.
  • User B will not be able to access DNS client A, and the time that cannot be accessed will last for 30,000 seconds.
  • the typical value of DNS TTL is about 2 days, which will result in users not being able to access the domain name to be accessed for up to 2 days. , seriously affect user communication.
  • the main reason for the above problem is that when the DNS client address changes, the original TTL of the DNS client RR saved by the DNS cache server does not expire, and the DNS authoritative server is not queried for the DNS that has updated the address information.
  • the client RR information causes the DNS cache server to access the DNS client domain name within the period when the original TTL of the DNS client RR expires. Since the DNS authoritative server maintains a large number of DNS clients, it is impossible to implement real-time TTL adjustment for each DNS client.
  • the inventors of the present invention have found that the DNS authoritative server can receive the DNS client before the network reorganizes or switches the ISP. Sending a first DNS Update update message to update an original TTL value corresponding to the DNS client RR saved by the DNS authoritative server, where the first DNS Update message includes a new TTL value of the DNS client RR information The new TTL value is used to replace the original TTL value of the DNS client.
  • the first DNS update message includes a new TTL value of the DNS client RR information, and the new TTL value is used to replace the original TTL value of the DNS client.
  • the DNS authoritative server queries the RR information of the DNS client that has updated the TTL, so that after the network reorganizes or switches the ISP, that is, the IP address of the DNS client is switched.
  • the DNS cache server can query the DNS server for new DNS client RR information after the new TTL timeout after the update.
  • the new TTL value corresponds to the time, as long as 4 bar is changed to the new TTL value Well, it can effectively reduce the time that the query user can't access the DNS client.
  • the dynamic DNS update technology allows the DNS client to send a DNS Update message to the DNS server. After receiving the DNS Update message, the DNS authoritative server updates the RR information corresponding to the DNS client.
  • the current dynamic DNS Update standard protocol defines The DNS Update message can be used in the following four types of operations (see (RFC2136):
  • the inventor of the present invention has found that the first DNS Update message may be a new operation type of the extended type of the existing DNS Update message.
  • the operation type of DNS Update 4 is a type of operation that dynamically updates the DNS RR TTL.
  • the operation type of the packet can dynamically update the DNS client RR TTL value stored in the DNS authoritative server.
  • the text includes a TTL Update update field for identifying a new TTL to be updated by the DNS client.
  • the format of the existing DNS Update message is shown in Figure 3.
  • the format of the extended DNS Update message is shown in Figure 4.
  • the TTL Update field can be 32 bytes in length.
  • the TTL Update field can also be placed in other locations of the DNS Update message.
  • the embodiment of the present invention does not impose restrictions. For example, the TTL Update message can be placed in the TTL Update additional data.
  • the packet of the operation type may include a TTL validity determination field, which is used to identify whether the new TTL value is valid, and the TTL validity determination field may be 1 bit.
  • TTL validity field is 0, the new The TTL value is invalid.
  • the TTL valid field is non-zero, the new TTL value is valid.
  • the DNS authoritative server updates an original TTL value of the DNS client to the new TTL value.
  • the DNS authoritative server After the DNS authoritative server receives the first DNS Update message, extracting the The new TTL value, when it is determined that the new TTL value is valid, the DNS authoritative server finds the RR information corresponding to the DNS client in the local RR database through the DNS client domain name information in the DNS Update message, and then updates The original TTL value of the DNS client RR information is the new TTL value.
  • the DNS client dynamically updates the TTL value of the RR corresponding to the DNS client stored by the DNS cache server, and implements the function of dynamically customizing the TTL value of the DNS client, in particular,
  • the implementation of the first embodiment of the present invention provides the necessary technical means.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • FIG. 6 is a schematic diagram of an apparatus according to an embodiment of the present invention.
  • the device includes: a first packet sending unit 602, a timer unit 604, and a second report.
  • the text sending unit 606 is an address updating unit 608.
  • the first packet sending unit 602 is configured to send a first DNS Update update packet to the DNS authoritative server, where the first DNS Update packet includes a new TTL value of the DNS client RR information, where the new TTL value is used. Substituting the original TTL value of the DNS client;
  • the IP address of the DNS client in the network will be reassigned.
  • the DNS authority message will be notified immediately to save the new DNS server. Domain name and IP correspondence, but the DNS cache server has not expired due to the TTL of the DNS client of the DNS client.
  • the DNS cache server still stores the old address and domain name of the DNS client. Then, when there is a user.
  • the DNS cache server When searching for the DNS client information, the DNS cache server is first queried first, and the DNS cache server returns the old address of the DNS client to the querying user, thereby causing the querying user to access the DNS client, in particular, when the DNS cache server If the TTL of the DNS information of the DNS client is large, the queried user may not be able to access the DNS client for a long time.
  • the domain name of the DNS client A is www.example.com. IP address is 123.1.1.1
  • DNS client A and DNS cache server store DNS client A
  • the RR information includes: domain name, www.example.com; IP, 123.1.1.1; TTL, 36000 seconds.
  • the address of the DNS client A is updated to 234.1.1.1, and the DNS client A advertises the updated address to the DNS authoritative server through the DNS Update message, and the DNS authoritative server corresponds to the RR database.
  • the RR information of DNS client A is updated to: domain name, www.example.com; IP, 234.1.1.1; TTL, 36000 seconds.
  • the RR information corresponding to DNS client A saved by the DNS cache server is: domain name, www.example.com; IP, 123.1.1.1; TTL, assuming that the TTL is reduced to 30,000 seconds at this time, since TTL still does not expire
  • the DNS cache server does not go to the DNS authoritative server to obtain the updated RR information of the DNS client.
  • the DNS cache server returns the old IP address 123.1.1.1.
  • User B will not be able to access DNS client A, and the time that cannot be accessed will last for 30,000 seconds.
  • the typical value of DNS TTL is about 2 days, which will result in users not being able to access the domain name to be accessed for up to 2 days. , seriously affect user communication.
  • the main reason for the above problem is that when the DNS client address changes, the original TTL of the DNS client RR saved by the DNS cache server does not expire, and the DNS authoritative server is not queried for the DNS that has updated the address information.
  • the client RR information causes the DNS cache server to access the DNS client domain name within the period when the original TTL of the DNS client RR expires. Since the DNS authoritative server maintains a large number of DNS clients, it is impossible to implement real-time TTL adjustment for each DNS client.
  • the inventors of the present invention have found that before the network reorganizes or switches the ISP, that is, the IP address switching of the DNS client is performed.
  • the DNS client first sending unit 602 may send a first DNS Update message to the DNS authoritative server, where the first DNS Update message includes a new TTL value of the DNS client RR information, the new The TTL value is used to replace the original TTL value of the DNS client.
  • the DNS authoritative server queries the RR information of the DNS client that has updated the TTL, so that after the network reorganizes or switches the ISP, that is, the IP address of the DNS client is switched. After that, the DNS cache server can go to the DNS service after a small new TTL timeout after the update. The device queries the new DNS client RR information. At this time, the user cannot process the DNS client for a period of time corresponding to the smaller new TTL value of the DNS client after updating, as long as the new TTL value is qualified, which can be effective. Reduce the time that the query user access cannot access the DNS client.
  • the dynamic DNS update technology allows the DNS client to send a DNS Update message to the DNS server. After receiving the DNS Update message, the DNS authoritative server updates the RR information corresponding to the DNS client.
  • the current dynamic DNS Update standard protocol defines The DNS Update message can be used in the following four types of operations (see (RFC2136):
  • the inventor of the present invention has found that the first DNS Update message may be a new operation type of the extended type of the existing DNS Update message.
  • the operation type of DNS Update 4 is a type of operation that dynamically updates the DNS RR TTL.
  • the operation type of the packet can dynamically update the DNS client RR TTL value stored in the DNS authoritative server.
  • the text includes a TTL Update update field for identifying a new TTL to be updated by the DNS client.
  • the format of the existing DNS Update message is shown in Figure 3.
  • the format of the extended DNS Update message is shown in Figure 4.
  • the TTL Update field can be 32 bytes in length.
  • the TTL Update field can also be placed in other locations of the DNS Update message.
  • the embodiment of the present invention does not impose restrictions. For example, the TTL Update message can be placed in the TTL Update additional data.
  • the packet of the operation type may include a TTL validity determination field, which is used to identify whether the new TTL value is valid, and the TTL validity determination field may be 1 bit.
  • TTL validity field is 0, the new The TTL value is invalid.
  • the TTL valid field is non-zero, the new TTL value is valid.
  • the DNS authoritative server After the DNS authoritative server receives the first DNS Update message, extracting the The new TTL value, when it is determined that the new TTL value is valid, the DNS authoritative server finds the RR information corresponding to the DNS client in the local RR database through the DNS client domain name information in the DNS Update message, and then updates The original TTL value of the DNS client RR information is the new TTL value.
  • the timer unit 604 is configured to start a timer according to the original TTL value.
  • the timer unit 604 needs to start a timer, where the timer duration is equal to the original TTL value of the DNS client or is greater than the The value of the original TTL value of the DNS client, correspondingly, the first sending unit 602 may obtain the original TTL value of the RR of the DNS client by sending a DNS Query query message to the DNS authoritative server, where The timer is started, and the DNS Query message can be referred to RFC 1035.
  • the second packet sending unit 606 is configured to send, after the timer expires, a second DNS Update update message to the DNS authoritative server, where the second DNS Update message includes the updated DNS client Address information;
  • the timer started by the timer unit 604 expires, sending a second DNS Update update message to the DNS authoritative server, where the second DNS Update message includes the updated address information of the DNS client.
  • the purpose of the timer is to ensure that the original TTL of the DNS client RR saved by the DNS cache server expires, and the updated TTL value corresponding to the DNS client has been obtained from the DNS authoritative server.
  • the DNS authoritative server After receiving the second DNS Update message, the DNS authoritative server extracts the updated address information, and the DNS authoritative server finds a corresponding address in the local RR database by using the DNS client domain name information in the DNS Update message. And updating, by the RR information of the DNS client, the address information of the DNS client RR information to the updated address information.
  • the address update unit 608 is configured to update the address of the DNS client as the updated address information. After the timer started by the timer unit 604 expires, the address update unit 608 updates the address of the DNS client to the updated address information, and sends the second DNS Update update message to the DNS authoritative server. The address switching after the DNS client network reorganization or ISP switching is completed.
  • the device provided by the implementation of the present invention can effectively reduce the time for the querying user to access the DNS client when the network is re-allocated due to re-organization or switching of the ISP. .
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • FIG. 7 is a schematic diagram of an apparatus according to an embodiment of the present invention.
  • the device includes: a message receiving unit 702, and a message processing unit 704.
  • the message receiving unit 702 is configured to receive, by the DNS authoritative server, a first DNS Update update message sent by the DNS client, where the first DNS Update message includes a new TTL value of the DNS client RR information, where the new The TTL value is used to replace the original TTL value of the DNS client;
  • the IP address of the DNS client in the network will be reassigned.
  • the DNS authority message will be notified immediately to save the new DNS server. Domain name and IP correspondence, but the DNS cache server has not expired due to the TTL of the DNS client of the DNS client.
  • the DNS cache server still stores the old address and domain name of the DNS client. Then, when there is a user.
  • the DNS cache server When searching for the DNS client information, the DNS cache server is first queried first, and the DNS cache server returns the old address of the DNS client to the querying user, thereby causing the querying user to access the DNS client, in particular, when the DNS cache server If the TTL of the DNS information of the DNS client is large, the queried user may not be able to access the DNS client for a long time.
  • the domain name of the DNS client A is www.example.com. IP address is 123.1.1.1
  • DNS client A and DNS cache server store DNS client A
  • the RR information includes: domain name, www.example.com; IP, 123.1.1.1; TTL, 36000 seconds.
  • the address of the DNS client A is updated to 234.1.1.1, and the DNS client A advertises the updated address to the DNS authoritative server through the DNS Update message, and the DNS authoritative server corresponds to the RR database.
  • the RR information of DNS client A is updated to: domain name, www.example.com; IP, 234.1.1.1; TTL, 36000 seconds.
  • the RR information corresponding to DNS client A saved by the DNS cache server is: domain name, www.example.com; IP, 123.1.1.1; TTL, assuming that the TTL is reduced to 30,000 seconds at this time, since TTL still does not expire
  • the DNS cache server does not go to the DNS authoritative server to obtain the updated RR information of the DNS client.
  • the DNS cache server returns the old IP address 123.1.1.1.
  • User B will not be able to access DNS client A, and the time that cannot be accessed will last for 30,000 seconds.
  • the typical value of DNS TTL is about 2 days, which will result in users not being able to access the domain name to be accessed for up to 2 days. , seriously affect user communication.
  • the main reason for the above problem is that when the DNS client address changes, the original TTL of the DNS client RR saved by the DNS cache server does not expire, and the DNS authoritative server is not queried for the DNS that has updated the address information.
  • the client RR information causes the DNS cache server to access the DNS client domain name within the period when the original TTL of the DNS client RR expires. Since the DNS authoritative server maintains a large number of DNS clients, it is impossible to implement real-time TTL adjustment for each DNS client.
  • the inventors of the present invention have found through research that the packet receiving unit 702 can receive the DNS before the network reorganizes or switches the ISP.
  • the first DNS Update update message sent by the client is used to update the original TTL value corresponding to the DNS client RR saved by the DNS authoritative server, where the first DNS Update message includes the new information of the DNS client RR information. TTL value, the new TTL value is used to replace the original TTL value of the DNS client.
  • the first DNS update message includes a new TTL value of the DNS client RR information, and the new TTL value is used to replace the original TTL value of the DNS client.
  • the DNS authoritative server queries the RR information of the DNS client that has updated the TTL.
  • the DNS cache server can query the DNS server for the new DNS client RR information after the new TTL expires after the update.
  • the time that the user cannot process the DNS client is the longest time corresponding to the smaller new TTL value of the DNS client. As long as the new TTL value is limited to 4 bar, the query user can effectively reduce the access to the DNS client. time.
  • the dynamic DNS update technology allows the DNS client to send a DNS Update message to the DNS server. After receiving the DNS Update message, the DNS authoritative server updates the RR information corresponding to the DNS client.
  • the current dynamic DNS Update standard protocol defines The DNS Update message can be used in the following four types of operations (see (RFC2136):
  • the inventor of the present invention has found that the first DNS Update message may be a new operation type of the extended type of the existing DNS Update message.
  • the operation type of DNS Update 4 is a type of operation that dynamically updates the DNS RR TTL.
  • the operation type of the packet can dynamically update the DNS client RR TTL value stored in the DNS authoritative server.
  • the text includes a TTL Update update field for identifying a new TTL to be updated by the DNS client.
  • the format of the existing DNS Update message is shown in Figure 3.
  • the format of the extended DNS Update message is shown in Figure 4.
  • the TTL Update field can be 32 bytes in length.
  • the TTL Update field can also be placed in other locations of the DNS Update message.
  • the embodiment of the present invention does not impose restrictions. For example, the TTL Update message can be placed in the TTL Update additional data.
  • the packet of the operation type may include a TTL validity determination field, which is used to identify whether the new TTL value is valid, and the TTL validity determination field may be 1 bit.
  • TTL validity field is 0, the new The TTL value is invalid.
  • TTL valid field is non-zero, The new TTL value is valid.
  • the message processing 704 is used by the DNS authoritative server to update the original TTL value of the DNS client to the new TTL value.
  • the packet processing 704 parses the first DNS Update packet received by the packet receiving unit 702, and extracts the new TTL value. When it is determined that the new TTL value is valid, the DNS authoritative server passes the DNS Update message. The DNS client domain name information in the local RR database finds the RR information corresponding to the DNS client, and then updates the original TTL value of the DNS client RR information to the new TTL value.
  • the DNS client dynamically updates the TTL value of the RR corresponding to the DNS client stored by the DNS cache server, and implements the function of dynamically customizing the TTL value of the DNS client, in particular,
  • the implementation of the third embodiment of the present invention provides the necessary technical means.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • FIG. 8 is a schematic diagram of a system implemented by the present invention.
  • the system includes: a DNS client 802 and a DNS authority server 804.
  • the DNS client 802 is configured to send a first DNS Update update message, where the first DNS Update message includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the DNS client.
  • Original TTL value a new TTL value of the DNS client RR information
  • the IP address of the DNS client in the network will be reassigned.
  • the DNS authority message will be notified immediately to save the new DNS server. Domain name and IP correspondence, but the DNS cache server has not expired due to the TTL of the DNS client of the DNS client.
  • the DNS cache server still stores the old address and domain name of the DNS client. Then, when there is a user.
  • searching for the DNS client information the DNS cache server is first queried first, and the DNS cache server returns the old address of the DNS client to the query user, thereby causing the query user.
  • the DNS client cannot be accessed.
  • the query user may not be able to access the DNS client for a long time.
  • the DNS client A's domain name is www.example.com, and the IP address is 123.1.1.1.
  • the DNS information of the DNS client A stored by the DNS authoritative server and the DNS cache server includes: domain name, www.example.com; IP, 123.1 .1.1 ; TTL, 36000 seconds.
  • the network reorganizes or switches the ISP, the address of the DNS client A is updated to 234.1.1.1, and the DNS client A advertises the updated address to the DNS authoritative server through the DNS Update message, and the DNS authoritative server corresponds to the RR database.
  • the RR information of DNS client A is updated to: domain name, www.example.com; IP, 234.1.1.1; TTL, 36000 seconds.
  • the RR information corresponding to DNS client A saved by the DNS cache server is: domain name, www.example.com; IP, 123.1.1.1; TTL, assuming that the TTL is reduced to 30,000 seconds at this time, since TTL still does not expire
  • the DNS cache server does not go to the DNS authoritative server to obtain the updated RR information of the DNS client. Therefore, when user B accesses the domain name www.example.com of client A, the DNS cache server returns the old IP address 123.1.1.1. User B will not be able to access DNS client A, and the time that cannot be accessed will last for 30,000 seconds.
  • the typical value of DNS TTL is about 2 days, which will result in users not being able to access the domain name to be accessed for up to 2 days. , seriously affect user communication.
  • the main reason for the above problem is that when the DNS client address changes, the original TTL of the DNS client RR saved by the DNS cache server does not expire, and the DNS authoritative server is not queried for the DNS that has updated the address information.
  • the client RR information causes the DNS cache server to access the DNS client domain name within the period when the original TTL of the DNS client RR expires. Since the DNS authoritative server maintains a large number of DNS clients, it is impossible to implement real-time TTL adjustment for each DNS client.
  • the inventors of the present invention have found that before the network reorganizes or switches the ISP, that is, the IP address switching of the DNS client is performed.
  • the DNS client may send a first DNS Update update message to the DNS authoritative server, where the first DNS Update message includes a new TTL value of the DNS client RR information, where the new TTL value is used to replace the DNS Client's original TTL value.
  • the DNS authoritative server queries the RR information of the DNS client that has updated the TTL, so that after the network reorganizes or switches the ISP, that is, the IP address of the DNS client is switched.
  • the DNS cache server can query the DNS server for new DNS client RR information after the new TTL timeout after the update.
  • the user cannot process the DNS client for the longest time after the DNS client is updated.
  • the time corresponding to the new TTL value, as long as the new TTL value is defined, can effectively reduce the time that the query user cannot access the DNS client.
  • the dynamic DNS update technology allows the DNS client to send a DNS Update message to the DNS server. After receiving the DNS Update message, the DNS authoritative server updates the RR information corresponding to the DNS client.
  • the current dynamic DNS Update standard protocol defines The DNS Update message can be used in the following four types of operations (see (RFC2136):
  • the inventor of the present invention has found that the first DNS Update message may be a new operation type of the extended type of the existing DNS Update message.
  • the operation type of DNS Update 4 is a type of operation that dynamically updates the DNS RR TTL.
  • the operation type of the packet can dynamically update the DNS client RR TTL value stored in the DNS authoritative server.
  • the text includes a TTL Update update field for identifying a new TTL to be updated by the DNS client.
  • the format of the existing DNS Update message is shown in Figure 3.
  • the format of the extended DNS Update message is shown in Figure 4.
  • the TTL Update field can be 32 bytes in length.
  • the TTL Update field can also be placed in other locations of the DNS Update message.
  • the embodiment of the present invention does not impose restrictions. For example, the TTL Update message can be placed in the TTL Update additional data.
  • the packet of the operation type may include a TTL validity determination field, and is used to identify Whether the new TTL value is valid, the TTL validity determination field may be 1 bit, when the TTL valid field is 0, the new TTL value is invalid, and when the TTL valid field is non-zero, the new TTL The value is valid.
  • the DNS authoritative server 804 including the apparatus provided in the fourth embodiment of the present invention, can participate in the fourth embodiment of the present invention in detail.

Landscapes

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

Abstract

本发明实施例提供了一种DNS RR的TTL更新的方法,包括:DNS权威服务器接收DNS客户端发来的请求报文,所述请求报文用于更新所述DNS客户端RR的TTL值,所述请求报文为DNS更新Update消息,所述DNS Update消息包括TTL更新Update字段,用于标识所述请求报文的TTL值;提取所述请求报文中的TTL值,更新所述DNS权威服务器存储的对应于所述DNS客户端RR的TTL为所述提取的TTL。本发明实施例还提供了一种DNS RR的TTL更新的装置及系统,通过本发明实施例提供的方法、装置及系统在网络由于重组织或切换ISP等原因导致DNS客户端IP地址重新分配时,能够有利于减少查询用户无法访问该DNS客户端的时间,有利于提高网络可靠性。

Description

DNS客户端地址、 RR TTL更新的方法、 装置及系统
技术领域
本发明实施例涉及通信技术领域, 尤其涉及一种域名系统 (Domain Name System, DNS)客户端地址、 资源记录 ( Resource Record, RR ) 的存 活时间 (Time To Live, TTL ) 更新的方法、 装置及系统。
背景技术
DNS是一种以层次结构分布的命名系统, 在如互联网 Internet之类的 TCP/IP ( Transmission Control Protocol/Internet Protocol, 传输控制十办议 /网间 协议) 网络中, 使用域名来定位计算机, 提供域名和 IP地址之间的转换, 如果在应用程序中输入域名,就可以由 DNS 服务器中的数据库提供包括 IP 地址在内的与域名相关的信息。 这些信息在 DNS服务器中形成的条目称为 DNS RR, 该 RR还包括 TTL。 通常, DNS服务器包括 DNS权威服务器和 DNS緩存服务器 (或有其它种类, 如转发服务器、 迭代查询服务器等, 与 本发明无关不再赘述) , DNS权威服务器提供权威的数据, 存储全部 DNS 客户端的 RR信息, DNS緩存服务器从 DNS权威服务器获取 RR信息同时 緩存起来,当有用户来查询时会根据其緩存的 RR返回该用户所需要的信息。 RR的 TTL值是在 DNS权威服务器生成的, 该 TLL值在 DNS权威服务器 中是保持不变的, 不会随着时间变小, DNS緩存服务器从权威服务器获取 的 RR信息里包含 TTL, 这个 TTL值会随时间变小, 当某条 RR的 TTL变 为 0时这条 RR信息失效,需要从 DNS权威服务器重新获取这条 RR信息。
网络由于重组织、切换互联网服务提供商( Internet Service Provider, ISP) 等原因, 网络内的 DNS客户端 IP地址会重新分配, 当 DNS客户端域名和 IP地址的关系变动后, 相应的 RR信息也要随之改变, 这个过程称为 DNS 更新。动态 DNS Update更新技术允许 DNS客户端侧向 DNS权威服务器发 送更新消息, DNS权威服务器收到消息后对其中的对应于该 DNS客户端的 RR进行更新。 由于 DNS客户端更新域名和 IP对应关系只会发送给 DNS 权威服务器, DNS緩存服务器只有在其保存的 RR信息的 TTL减少为 0时 才会主动去 DNS权威服务器查询, 这样的话, 当某个 DNS客户端的 IP地 址变化后, DNS权威服务器会立刻感知到,但 DNS緩存服务器由于其緩存 的 DNS客户端的 RR的 TTL还没有到期, DNS緩存服务器仍然保存了该 客户端旧的地址信息, 那么, 当有用户来查找该客户端信息时, 则会还把 该 DNS客户端的旧地址返回给查询用户, 从而造成通信失败, 查询用户无 法访问该 DNS客户端的域名, 特别地, 当 DNS緩存服务器緩存的该 DNS 客户端 RR信息的 TTL很大时,会造成查询用户长时间无法访问该 DNS客 户端, 对于此问题, 当前的现有技术并没有有效的解决方法。 发明内容
本发明实施例提供了一种 DNS客户端地址、 RR TTL更新的方法、 装 置及系统,在网络重组或 ISP切换后 DNS客户端 IP地址变化时, 能够有效 地减少查询用户无法访问该 DNS客户端的时间, 有利于提高网络可靠性, 为达到上述目的, 本发明实施例提供了一种 DNS客户端地址更新的方法, 包括:
向 DNS权威服务器发送第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用 于替换所述 DNS客户端的原 TTL值;
根据所述原 TTL值启动定时器;
当所述定时器超时后, 向所述 DNS权威服务器发送第二 DNS Update 更新报文, 所述第二 DNS Update报文包含所述 DNS客户端更新后的地址 信息;
更新所述 DNS客户端的地址为所述更新后的地址信息。 本发明实施例提供了一种 DNS客户端 RR TTL更新的方法, 包括: DNS权威服务器接收 DNS客户端发送来的第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所 述新 TTL值用于替换所述 DNS客户端的原 TTL值;
所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL 值。
本发明实施例提供了一种 DNS客户端地址更新的装置, 包括: 第一报文发送单元, 用于向 DNS权威服务器发送第一 DNS Update更 新报文,所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL 值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值;
定时器单元, 用于根据所述原 TTL值启动定时器;
第二报文发送单元, 用于当所述定时器超时后, 向所述 DNS权威服务 器发送第二 DNS Update更新报文, 所述第二 DNS Update报文包含所述 DNS客户端更新后的地址信息;
地址更新单元, 用于更新所述 DNS客户端的地址为所述更新后的地址 信息。
本发明实施例提供了一种 DNS域名系统客户端 RR资源记录的 TTL存 活时间更新的装置, 包括:
报文接收单元, 用于 DNS权威服务器接收 DNS客户端发送来的第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL 值;
报文处理单元, 用于所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL值。
本发明实施例提供了一种 DNS域名系统资源记录 RR的存活时间 TTL 更新的系统, 包括: DNS 客户端, 用于发送第一 DNS Update 更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用 于替换所述 DNS客户端的原 TTL值;
DNS权威服务器, 包含本发明实施提供的一种 DNS 域名系统客户端 RR资源记录的 TTL存活时间更新的装置。
综上, 本发明实施例提供了一种 DNS客户端地址、 RR TTL更新的方 法、 装置及系统, 通过本发明实施例提供的一种 DNS客户端 RR TTL更新 方法, 能够实现 DNS客户端动态定制 TTL的功能, 同时, 为本发明实施例 提的一种 DNS客户端地址更新方法提供了必备的技术有段, 进一步, 本发 明实施例提供的 DNS客户端地址更新方法, 在网络由于重组织或切换 ISP 等原因导致 DNS客户端 IP地址重新分配时,能够有效地减少查询用户无法 访问该 DNS客户端的时间, 有利于提高网络可靠性。
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明第一实施例提供的一种 DNS RR的地址更新的方法的流 程示意图;
图 2是本发明第一实施例提供的一种 DNS RR更新流程示意图; 图 3是本发明实施例提供的一种 DNS Update消息格式示意图; 图 4是本发明实施例提供的一种扩展后的 DNS Update消息格式示意图; 图 5是本发明第二实施例提供的一种 DNS RR的 TTL更新的方法流程 示意图;
图 6是本发明第三实施例提供的一种 DNS RR的地址更新的装置示意 图; 图 Ί是本发明第四实施例提供的一种 DNS RR的 TTL更新的装置示意 图;
图 8是本发明第五实施例提供的一种 DNS RR的 TTL更新的系统的示 意图。
具体实 式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述,显然,所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
实施例一:
本发明实施例提供了一种 DNS客户端地址更新的方法, 参见图 1 , 图 1为本发明实施例的方法流程图, 包括:
102, 向 DNS权威服务器发送第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL 值用于替换所述 DNS客户端的原 TTL值;
在网络中由于重组织或切换 ISP等原因,网络内的 DNS客户端 IP地址 会重新分配,当某个 DNS客户端域名的 IP地址变化后,会通过 DNS Update 消息立刻通知 DNS权威服务器保存新的域名和 IP对应关系, 但 DNS緩存 服务器由于其緩存的该 DNS客户端的 RR的 TTL还没有到期, DNS緩存 服务器仍然保存了该 DNS客户端旧的地址和域名对应关系, 那么, 当有用 户来查找该 DNS客户端信息时, 首先会先查询 DNS緩存服务器, DNS緩 存服务器会把该 DNS客户端的旧地址返回给查询用户, 从而造成查询用户 无法访问该 DNS客户端, 特别地, 当 DNS緩存服务器緩存的该 DNS客户 端 RR信息的 TTL很大时,会造成查询用户长时间无法访问该 DNS客户端, 举例来说, 如图 2所示, DNS客户端 A的域名为 www.example.com, IP地 址为 123.1.1.1 , DNS权威服务器和 DNS緩存服务器存储的 DNS客户端 A 的 RR信息包括: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 36000秒。 当网络重组织或切换 ISP时, DNS客户端 A的地址更新为 234.1.1.1 , DNS 客户端 A通过 DNS Update消息把更新后的地址通告给 DNS权威服务器, DNS权威服务器对其 RR数据库中对应于 DNS客户端 A的 RR信息更新为: 域名, www.example.com; IP, 234.1.1.1 ; TTL, 36000秒。 由于 DNS緩 存服务器保存的对应于 DNS 客户端 A 的的 RR 信息为: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 假设此时 TTL减少到 30000秒, 由于 TTL任然没有到期, DNS緩存服务器不会去 DNS权威服务器获取该 DNS 客户端更新后的 RR 信息, 所以当用户 B 访问客户端 A 的域名 www.example.com时, DNS緩存服务器会返回旧的 IP地址 123.1.1.1 , 用户 B将无法访问 DNS客户端 A, 而且无法访问的时间将持续 30000秒, 在一 些场景下, DNS的 TTL的典型值是 2天左右, 则会导致用户最高 2天无法 访问所要访问的域名, 严重影响用户通信。 出现上述问题的主要原因在于 当 DNS客户端地址发生改变时, DNS緩存服务器保存的对应该 DNS客户 端 RR的原有 TTL并没有到期,不会去 DNS权威服务器查询更新过地址信 息的该 DNS客户端 RR信息, 导致 DNS緩存服务器在该 DNS客户端 RR 的原有 TTL到期这段时间内,用户无法访问该 DNS客户端域名。由于 DNS 权威服务器维护众多 DNS客户端, 不可能实现针对每个 DNS客户端进行 实时 TTL调整,本发明发明人经过研究发现,在网络重组织或切换 ISP前, 也就是在 DNS客户端 IP地址切换前, DNS客户端可以向 DNS权威服务器 发送第一 DNS Update更新报文,该第一 DNS Update报文包括所述 DNS客 户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值。 在 DNS緩存服务器旧的 RR的 TTL到期后, 到 DNS权威服务器 查询对应更新过 TTL的该 DNS客户端的 RR信息,从而在网络进行重组织 或切换 ISP后, 也就是 DNS客户端 IP地址发生切换后, DNS緩存服务器 能在更新后较小的新 TTL超时后到 DNS服务器查询新的 DNS客户端 RR 信息, 此时, 用户无法方法该 DNS客户端的时间最长为该 DNS客户端更 新后较小的新 TTL值对应的时间, 只要把改新 TTL值限定好, 能有效地减 少查询用户访无法访问该 DNS客户端的时间。
动态 DNS Update技术允许 DNS客户端向 DNS服务器发送 DNS Update 报文, DNS权威服务器收到该 DNS Update报文后对其保存的对应于该 DNS 客户端的 RR信息进行更新, 目前动态 DNS Update标准协议定义的 DNS Update报文可以进行以下 4种操作类型 (可参见( RFC2136 ):
1 )、 增加 DNS RR集合。
2 )、 删除 DNS RR集合。
3 )、 删除指定域名的所有 DNS RR集合。
4 )、 从一个 DNS RR集合中删除一条 RR。
本发明发明人经过研究发现所述第一 DNS Update报文可以是对现有 DNS Update报文操作类型扩充后的一种新操作类型的报文。 该操作类型的 DNS Update 4艮文是一种动态更新 DNS RR TTL的操作类型的 4艮文, 该操作 类型的报文可以动态更新保存在 DNS权威服务器的 DNS客户端 RR TTL 值, 该 4艮文包括 TTL Update更新字段, 用于标识该 DNS客户端要更新的 新 TTL。 现有 DNS Update报文消息格式如图 3 , 扩充后的 DNS Update报 文消息格式如图 4所示。所述 TTL Update字段长度可以为 32字节。该 TTL Update字段还可以放到 DNS Update消息的其他位置,本发明实施例不做强 制限制, 例如, 可以把 TTL Update 消息的放到 TTL Update 附加数据 Additional Data中。
进一步, 该操作类型的报文可以包括 TTL有效性判断字段, 用于标识 所述新 TTL值是否有效, 该 TTL有效性判断字段可以为 1比特, 当该 TTL 有效字段为 0时, 所述新 TTL值为无效, 当该 TTL有效字段为非 0时, 所 述新 TTL值有效。 所述 DNS权威服务器接收到所述第一 DNS Update报文后, 提取所述 新 TTL值, 当判断所述新 TTL值为有效时, DNS权威服务器通过 DNS Update消息中的所述 DNS客户端域名信息在本地的 RR数据库中找到对应 于所述 DNS客户端的 RR信息, 进而更新所述 DNS客户端 RR信息的原 TTL值为所述新 TTL值。
104, 根据所述原 TTL值启动定时器;
106, 当所述定时器超时后, 向所述 DNS 权威服务器发送第二 DNS Update更新报文, 所述第二 DNS Update报文包含所述 DNS客户端更新后 的地址信息,同时,更新所述 DNS客户端的地址为所述更新后的地址信息; 108, 更新所述 DNS客户端的地址为所述更新后的地址信息。
在所述向 DNS权威服务器发送第一 DNS Update更新报文后, 该 DNS 客户端需要启动一定时器, 该定时器时长等于所述 DNS 客户端的原 TTL 值或者为大于所述 DNS客户端的原 TTL值的某个值,相应地,在所述根据 所述原 TTL启动定时器之前, 可以通过向所述 DNS权威服务器发送 DNS Query查询报文来获取该 DNS客户端的 RR的原 TTL值, 用于所述定时器 启动,所述 DNS Query报文可以参见 RFC1035。该 DNS客户端在该定时器 超时后向所述 DNS权威服务器发送第二 DNS Update更新报文, 所述第二 DNS Update报文包含所述 DNS客户端更新后的地址信息, 同时, 更新所述 DNS客户端的地址为所述更新后的地址信息。 通过启动该定时器的目的是 确保所述 DNS緩存服务器保存的对应于该 DNS客户端 RR的原 TTL到期, 并已经从 DNS权威服务器获取到了更新过 TTL值对应于该 DNS客户端的 RR信息。
所述 DNS权威服务器接收到所述第二 DNS Update报文后, 提取所述 更新后的地址信息, DNS权威服务器通过 DNS Update消息中的所述 DNS 客户端域名信息在本地的 RR数据库中找到对应于所述 DNS客户端的 RR 信息, 进而更新所述 DNS客户端 RR信息的地址信息为所述更新后的地址 信息。
为进一步说明本发明实施例, 现举例来说明, 如图 2所示, DNS客户 端 A的域名为 www.example.com, IP地址为 123.1.1.1 , DNS权威服务器和 DNS 緩存服务器存储的 DNS 客户端 A 的 RR 信息包括: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 36000 秒, 在网络重组织或切换 ISP前, DNS客户端 A向 DNS权威服务器发送 DNS Query报文, 用于获 得保存在 DNS权威服务器中对应于 DNS客户端 A的 RR的原 TTL, 进一 步, DNS权威服务器发送第一 DNS Update更新报文,所述第一 DNS Update 艮文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换 所述 DNS客户端的原 TTL值, 该更新 TTL值为一个相对较小值, 如本例 子可以设置为 30秒。 同时, 根据所述原 TTL启动定时器, 该定时器的时长 为该 DNS客户端 RR的原 TTL值。 DNS权威服务器接收到该第一 DNS Update报文后将其 RR数据库中对应于 DNS客户端 A的 RR更新为:域名, www.example.com; IP, 123.1.1.1 ; TTL, 30秒。 在 DNS緩存服务器存储 的 DNS客户端 A的 RR的原 TTL到期后, 主动去 DNS权威服务器查询并 更新 DNS客户端 A的 RR信息, 将其更新为: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 30秒。 这样, DNS緩存服务器会每隔 30秒到 DNS 权威服务器查询 DSN客户端 A的 RR信息, 当所述定时器超时后, DNS 客户端 A开始地址切换, 向 DNS权威服务器发送第二 DNS Update更新报 文, 该第二 DNS Update报文包含 DNS客户端 A更新后的地址, 同时, 切 换 DNS客户端 A的地址为为 234.1.1.1 , DNS权威服务器收到所述第二 DNS Update报文后, DNS权威服务器存储的 DNS客户端 A的 RR也更新为: 域名, www.example.com; IP, 234.1.1.1 ; TTL, 30秒。 由于 DNS緩存服 务器保存的 DNS客户端 A的 RR的 TTL为 30秒, 因此, DNS緩存服务器 会在最长 30内即可更新 DNS客户端 A的 RR为:域名, www.example.com; IP, 234.1.1.1 ; TTL, 30秒。 因此, 在网络重组或切换 ISP时, 用户 B最长 也只会在 30秒内无法访问 DNS客户端 A域名 www.example.com, 从而大 大缩短了用户 B无法访问 DNS客户端 A的时间, 提高了网络可靠性。
可见,通过本发明实施提供的方法,在网络由于重组织或切换 ISP等原 因导致 DNS客户端 IP地址重新分配时,能够有效地减少查询用户无法访问 该 DNS客户端的时间, 有利于提高网络可靠性。
实施例二:
本发明实施例提供了一种 DNS客户端 RR的 TTL更新的方法,参见图 5 , 图 5为本发明实施例的方法流程图, 包括:
502, DNS权威服务器接收 DNS客户端发送来的第一 DNS Update更新 报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL 值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值;
在网络中由于重组织或切换 ISP等原因,网络内的 DNS客户端 IP地址 会重新分配,当某个 DNS客户端域名的 IP地址变化后,会通过 DNS Update 消息立刻通知 DNS权威服务器保存新的域名和 IP对应关系, 但 DNS緩存 服务器由于其緩存的该 DNS客户端的 RR的 TTL还没有到期, DNS緩存 服务器仍然保存了该 DNS客户端旧的地址和域名对应关系, 那么, 当有用 户来查找该 DNS客户端信息时, 首先会先查询 DNS緩存服务器, DNS緩 存服务器会把该 DNS客户端的旧地址返回给查询用户, 从而造成查询用户 无法访问该 DNS客户端, 特别地, 当 DNS緩存服务器緩存的该 DNS客户 端 RR信息的 TTL很大时,会造成查询用户长时间无法访问该 DNS客户端, 举例来说, 如图 2所示, DNS客户端 A的域名为 www.example.com, IP地 址为 123.1.1.1 , DNS权威服务器和 DNS緩存服务器存储的 DNS客户端 A 的 RR信息包括: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 36000秒。 当网络重组织或切换 ISP时, DNS客户端 A的地址更新为 234.1.1.1 , DNS 客户端 A通过 DNS Update消息把更新后的地址通告给 DNS权威服务器, DNS权威服务器对其 RR数据库中对应于 DNS客户端 A的 RR信息更新为: 域名, www.example.com; IP, 234.1.1.1 ; TTL, 36000秒。 由于 DNS緩 存服务器保存的对应于 DNS 客户端 A 的的 RR 信息为: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 假设此时 TTL减少到 30000秒, 由于 TTL任然没有到期, DNS緩存服务器不会去 DNS权威服务器获取该 DNS 客户端更新后的 RR 信息, 所以当用户 B 访问客户端 A 的域名 www.example.com时, DNS緩存服务器会返回旧的 IP地址 123.1.1.1 , 用户 B将无法访问 DNS客户端 A, 而且无法访问的时间将持续 30000秒, 在一 些场景下, DNS的 TTL的典型值是 2天左右, 则会导致用户最高 2天无法 访问所要访问的域名, 严重影响用户通信。 出现上述问题的主要原因在于 当 DNS客户端地址发生改变时, DNS緩存服务器保存的对应该 DNS客户 端 RR的原有 TTL并没有到期,不会去 DNS权威服务器查询更新过地址信 息的该 DNS客户端 RR信息, 导致 DNS緩存服务器在该 DNS客户端 RR 的原有 TTL到期这段时间内,用户无法访问该 DNS客户端域名。由于 DNS 权威服务器维护众多 DNS客户端, 不可能实现针对每个 DNS客户端进行 实时 TTL调整,本发明发明人经过研究发现,在网络重组织或切换 ISP前, DNS权威服务器可以通过接收 DNS客户端发送来的第一 DNS Update更新 报文来更新 DNS权威服务器保存的对应于所述 DNS客户端 RR的原 TTL 值,所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值。 该第一 DNS Update 艮文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换 所述 DNS客户端的原 TTL值。在 DNS緩存服务器旧的 RR的 TTL到期后, 到 DNS权威服务器查询对应更新过 TTL的该 DNS客户端的 RR信息, 从 而在网络进行重组织或切换 ISP后,也就是 DNS客户端 IP地址发生切换后, DNS緩存服务器能在更新后较小的新 TTL超时后到 DNS服务器查询新的 DNS客户端 RR信息, 此时, 用户无法方法该 DNS客户端的时间最长为该 DNS客户端更新后较小的新 TTL值对应的时间, 只要 4巴改新 TTL值限定 好, 能有效地减少查询用户访无法访问该 DNS客户端的时间。
动态 DNS Update技术允许 DNS客户端向 DNS服务器发送 DNS Update 报文, DNS权威服务器收到该 DNS Update报文后对其保存的对应于该 DNS 客户端的 RR信息进行更新, 目前动态 DNS Update标准协议定义的 DNS Update报文可以进行以下 4种操作类型 (可参见( RFC2136 ):
1 )、 增加 DNS RR集合。
2 )、 删除 DNS RR集合。
3 )、 删除指定域名的所有 DNS RR集合。
4 )、 从一个 DNS RR集合中删除一条 RR。
本发明发明人经过研究发现所述第一 DNS Update报文可以是对现有 DNS Update报文操作类型扩充后的一种新操作类型的报文。 该操作类型的 DNS Update 4艮文是一种动态更新 DNS RR TTL的操作类型的 4艮文, 该操作 类型的报文可以动态更新保存在 DNS权威服务器的 DNS客户端 RR TTL 值, 该 4艮文包括 TTL Update更新字段, 用于标识该 DNS客户端要更新的 新 TTL。 现有 DNS Update报文消息格式如图 3 , 扩充后的 DNS Update报 文消息格式如图 4所示。所述 TTL Update字段长度可以为 32字节。该 TTL Update字段还可以放到 DNS Update消息的其他位置,本发明实施例不做强 制限制, 例如, 可以把 TTL Update 消息的放到 TTL Update 附加数据 Additional Data中。
进一步, 该操作类型的报文可以包括 TTL有效性判断字段, 用于标识 所述新 TTL值是否有效, 该 TTL有效性判断字段可以为 1比特, 当该 TTL 有效字段为 0时, 所述新 TTL值为无效, 当该 TTL有效字段为非 0时, 所 述新 TTL值有效。
504,所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL值。
所述 DNS权威服务器接收到所述第一 DNS Update报文后, 提取所述 新 TTL值, 当判断所述新 TTL值为有效时, DNS权威服务器通过 DNS Update消息中的所述 DNS客户端域名信息在本地的 RR数据库中找到对应 于所述 DNS客户端的 RR信息, 进而更新所述 DNS客户端 RR信息的原 TTL值为所述新 TTL值。
可见,通过本发明实施提供的方法,能够实现 DNS客户端动态更新 DNS 緩存服务器存储的对应于所述 DNS客户端的 RR的 TTL值, 实现 DNS客 户端动态定制其 TTL值的功能, 特别地, 为实现本发明实施例一提供了必 备的技术手段。
实施例三:
本发明实施例提供了一种 DNS客户端地址更新的装置, 参见图 6, 图 6为本发明实施的装置示意图, 该装置包括: 第一报文发送单元 602, 定时 器单元 604, 第二报文发送单元 606, 地址更新单元 608。
第一报文发送单元 602,用于向 DNS权威服务器发送第一 DNS Update 更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值;
在网络中由于重组织或切换 ISP等原因,网络内的 DNS客户端 IP地址 会重新分配,当某个 DNS客户端域名的 IP地址变化后,会通过 DNS Update 消息立刻通知 DNS权威服务器保存新的域名和 IP对应关系, 但 DNS緩存 服务器由于其緩存的该 DNS客户端的 RR的 TTL还没有到期, DNS緩存 服务器仍然保存了该 DNS客户端旧的地址和域名对应关系, 那么, 当有用 户来查找该 DNS客户端信息时, 首先会先查询 DNS緩存服务器, DNS緩 存服务器会把该 DNS客户端的旧地址返回给查询用户, 从而造成查询用户 无法访问该 DNS客户端, 特别地, 当 DNS緩存服务器緩存的该 DNS客户 端 RR信息的 TTL很大时,会造成查询用户长时间无法访问该 DNS客户端, 举例来说, 如图 2所示, DNS客户端 A的域名为 www.example.com, IP地 址为 123.1.1.1 , DNS权威服务器和 DNS緩存服务器存储的 DNS客户端 A 的 RR信息包括: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 36000秒。 当网络重组织或切换 ISP时, DNS客户端 A的地址更新为 234.1.1.1 , DNS 客户端 A通过 DNS Update消息把更新后的地址通告给 DNS权威服务器, DNS权威服务器对其 RR数据库中对应于 DNS客户端 A的 RR信息更新为: 域名, www.example.com; IP, 234.1.1.1 ; TTL, 36000秒。 由于 DNS緩 存服务器保存的对应于 DNS 客户端 A 的的 RR 信息为: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 假设此时 TTL减少到 30000秒, 由于 TTL任然没有到期, DNS緩存服务器不会去 DNS权威服务器获取该 DNS 客户端更新后的 RR 信息, 所以当用户 B 访问客户端 A 的域名 www.example.com时, DNS緩存服务器会返回旧的 IP地址 123.1.1.1 , 用户 B将无法访问 DNS客户端 A, 而且无法访问的时间将持续 30000秒, 在一 些场景下, DNS的 TTL的典型值是 2天左右, 则会导致用户最高 2天无法 访问所要访问的域名, 严重影响用户通信。 出现上述问题的主要原因在于 当 DNS客户端地址发生改变时, DNS緩存服务器保存的对应该 DNS客户 端 RR的原有 TTL并没有到期,不会去 DNS权威服务器查询更新过地址信 息的该 DNS客户端 RR信息, 导致 DNS緩存服务器在该 DNS客户端 RR 的原有 TTL到期这段时间内,用户无法访问该 DNS客户端域名。由于 DNS 权威服务器维护众多 DNS客户端, 不可能实现针对每个 DNS客户端进行 实时 TTL调整,本发明发明人经过研究发现,在网络重组织或切换 ISP前, 也就是在 DNS客户端 IP地址切换前, DNS客户端第一 4艮文发送单元 602 可以向 DNS 权威服务器发送第一 DNS Update 更新报文, 该第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用 于替换所述 DNS客户端的原 TTL值。 在 DNS緩存服务器旧的 RR的 TTL 到期后, 到 DNS权威服务器查询对应更新过 TTL的该 DNS客户端的 RR 信息,从而在网络进行重组织或切换 ISP后,也就是 DNS客户端 IP地址发 生切换后, DNS緩存服务器能在更新后较小的新 TTL超时后到 DNS服务 器查询新的 DNS客户端 RR信息,此时,用户无法方法该 DNS客户端的时 间最长为该 DNS客户端更新后较小的新 TTL值对应的时间, 只要把改新 TTL值限定好, 能有效地减少查询用户访无法访问该 DNS客户端的时间。
动态 DNS Update技术允许 DNS客户端向 DNS服务器发送 DNS Update 报文, DNS权威服务器收到该 DNS Update报文后对其保存的对应于该 DNS 客户端的 RR信息进行更新, 目前动态 DNS Update标准协议定义的 DNS Update报文可以进行以下 4种操作类型 (可参见( RFC2136 ):
1 )、 增加 DNS RR集合。
2 )、 删除 DNS RR集合。
3 )、 删除指定域名的所有 DNS RR集合。
4 )、 从一个 DNS RR集合中删除一条 RR。
本发明发明人经过研究发现所述第一 DNS Update报文可以是对现有 DNS Update报文操作类型扩充后的一种新操作类型的报文。 该操作类型的 DNS Update 4艮文是一种动态更新 DNS RR TTL的操作类型的 4艮文, 该操作 类型的报文可以动态更新保存在 DNS权威服务器的 DNS客户端 RR TTL 值, 该 4艮文包括 TTL Update更新字段, 用于标识该 DNS客户端要更新的 新 TTL。 现有 DNS Update报文消息格式如图 3 , 扩充后的 DNS Update报 文消息格式如图 4所示。所述 TTL Update字段长度可以为 32字节。该 TTL Update字段还可以放到 DNS Update消息的其他位置,本发明实施例不做强 制限制, 例如, 可以把 TTL Update 消息的放到 TTL Update 附加数据 Additional Data中。
进一步, 该操作类型的报文可以包括 TTL有效性判断字段, 用于标识 所述新 TTL值是否有效, 该 TTL有效性判断字段可以为 1比特, 当该 TTL 有效字段为 0时, 所述新 TTL值为无效, 当该 TTL有效字段为非 0时, 所 述新 TTL值有效。
所述 DNS权威服务器接收到所述第一 DNS Update报文后, 提取所述 新 TTL值, 当判断所述新 TTL值为有效时, DNS权威服务器通过 DNS Update消息中的所述 DNS客户端域名信息在本地的 RR数据库中找到对应 于所述 DNS客户端的 RR信息, 进而更新所述 DNS客户端 RR信息的原 TTL值为所述新 TTL值。
定时器单元 604, 用于根据所述原 TTL值启动定时器;
在第一报文发送单元 602向 DNS权威服务器发送第一 DNS Update更 新报文后,定时器单元 604需要启动一定时器,该定时器时长等于所述 DNS 客户端的原 TTL值或者为大于所述 DNS客户端的原 TTL值的某个值, 相 应地, 第一 4艮文发送单元 602可以通过向所述 DNS权威服务器发送 DNS Query查询报文来获取该 DNS客户端的 RR的原 TTL值, 用于所述定时器 启动, 所述 DNS Query报文可以参见 RFC 1035。
第二报文发送单元 606, 用于当所述定时器超时后, 向所述 DNS权威 服务器发送第二 DNS Update更新报文, 所述第二 DNS Update报文包含所 述 DNS客户端更新后的地址信息;
在所述定时器单元 604启动的定时器超时后向所述 DNS权威服务器发 送第二 DNS Update更新报文,所述第二 DNS Update报文包含所述 DNS客 户端更新后的地址信息。 通过启动该定时器的目的是确保所述 DNS緩存服 务器保存的对应于该 DNS客户端 RR的原 TTL到期, 并已经从 DNS权威 服务器获取到了更新过 TTL值对应于该 DNS客户端的 RR信息。
所述 DNS权威服务器接收到所述第二 DNS Update报文后, 提取所述 更新后的地址信息, DNS权威服务器通过 DNS Update消息中的所述 DNS 客户端域名信息在本地的 RR数据库中找到对应于所述 DNS客户端的 RR 信息, 进而更新所述 DNS客户端 RR信息的地址信息为所述更新后的地址 信息。
地址更新单元 608, 用于更新所述 DNS客户端的地址为所述更新后的 地址信息。 在所述定时器单元 604启动的定时器超时后向所述 DNS权威服务器发 送第二 DNS Update更新报文的同时, 地址更新单元 608更新所述 DNS客 户端的地址为所述更新后的地址信息,完成所述 DNS客户端网络重组或 ISP 切换后的地址切换。
可见,通过本发明实施提供的装置,在网络由于重组织或切换 ISP等原 因导致 DNS客户端 IP地址重新分配时,能够有效地减少查询用户无法访问 该 DNS客户端的时间, 有利于提高网络可靠性。
实施例四:
本发明实施例提供了一种 DNS客户端 RR的 TTL更新的装置,参见图 7, 图 7为本发明实施的装置示意图, 该装置包括: 报文接收单元 702, 报 文处理单元 704。
报文接收单元 702,用于 DNS权威服务器接收 DNS客户端发送来的第 一 DNS Update更新报文,所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL 值;
在网络中由于重组织或切换 ISP等原因,网络内的 DNS客户端 IP地址 会重新分配,当某个 DNS客户端域名的 IP地址变化后,会通过 DNS Update 消息立刻通知 DNS权威服务器保存新的域名和 IP对应关系, 但 DNS緩存 服务器由于其緩存的该 DNS客户端的 RR的 TTL还没有到期, DNS緩存 服务器仍然保存了该 DNS客户端旧的地址和域名对应关系, 那么, 当有用 户来查找该 DNS客户端信息时, 首先会先查询 DNS緩存服务器, DNS緩 存服务器会把该 DNS客户端的旧地址返回给查询用户, 从而造成查询用户 无法访问该 DNS客户端, 特别地, 当 DNS緩存服务器緩存的该 DNS客户 端 RR信息的 TTL很大时,会造成查询用户长时间无法访问该 DNS客户端, 举例来说, 如图 2所示, DNS客户端 A的域名为 www.example.com, IP地 址为 123.1.1.1 , DNS权威服务器和 DNS緩存服务器存储的 DNS客户端 A 的 RR信息包括: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 36000秒。 当网络重组织或切换 ISP时, DNS客户端 A的地址更新为 234.1.1.1 , DNS 客户端 A通过 DNS Update消息把更新后的地址通告给 DNS权威服务器, DNS权威服务器对其 RR数据库中对应于 DNS客户端 A的 RR信息更新为: 域名, www.example.com; IP, 234.1.1.1 ; TTL, 36000秒。 由于 DNS緩 存服务器保存的对应于 DNS 客户端 A 的的 RR 信息为: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 假设此时 TTL减少到 30000秒, 由于 TTL任然没有到期, DNS緩存服务器不会去 DNS权威服务器获取该 DNS 客户端更新后的 RR 信息, 所以当用户 B 访问客户端 A 的域名 www.example.com时, DNS緩存服务器会返回旧的 IP地址 123.1.1.1 , 用户 B将无法访问 DNS客户端 A, 而且无法访问的时间将持续 30000秒, 在一 些场景下, DNS的 TTL的典型值是 2天左右, 则会导致用户最高 2天无法 访问所要访问的域名, 严重影响用户通信。 出现上述问题的主要原因在于 当 DNS客户端地址发生改变时, DNS緩存服务器保存的对应该 DNS客户 端 RR的原有 TTL并没有到期,不会去 DNS权威服务器查询更新过地址信 息的该 DNS客户端 RR信息, 导致 DNS緩存服务器在该 DNS客户端 RR 的原有 TTL到期这段时间内,用户无法访问该 DNS客户端域名。由于 DNS 权威服务器维护众多 DNS客户端, 不可能实现针对每个 DNS客户端进行 实时 TTL调整,本发明发明人经过研究发现,在网络重组织或切换 ISP前, 报文接收单元 702可以通过接收 DNS客户端发送来的第一 DNS Update更 新报文来更新 DNS权威服务器保存的对应于所述 DNS客户端 RR的原 TTL 值,所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值。 该第一 DNS Update 艮文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换 所述 DNS客户端的原 TTL值。在 DNS緩存服务器旧的 RR的 TTL到期后, 到 DNS权威服务器查询对应更新过 TTL的该 DNS客户端的 RR信息, 从 而在网络进行重组织或切换 ISP后,也就是 DNS客户端 IP地址发生切换后, DNS緩存服务器能在更新后较小的新 TTL超时后到 DNS服务器查询新的 DNS客户端 RR信息, 此时, 用户无法方法该 DNS客户端的时间最长为该 DNS客户端更新后较小的新 TTL值对应的时间, 只要 4巴改新 TTL值限定 好, 能有效地减少查询用户访无法访问该 DNS客户端的时间。
动态 DNS Update技术允许 DNS客户端向 DNS服务器发送 DNS Update 报文, DNS权威服务器收到该 DNS Update报文后对其保存的对应于该 DNS 客户端的 RR信息进行更新, 目前动态 DNS Update标准协议定义的 DNS Update报文可以进行以下 4种操作类型 (可参见( RFC2136 ):
1 )、 增加 DNS RR集合。
2 )、 删除 DNS RR集合。
3 )、 删除指定域名的所有 DNS RR集合。
4 )、 从一个 DNS RR集合中删除一条 RR。
本发明发明人经过研究发现所述第一 DNS Update报文可以是对现有 DNS Update报文操作类型扩充后的一种新操作类型的报文。 该操作类型的 DNS Update 4艮文是一种动态更新 DNS RR TTL的操作类型的 4艮文, 该操作 类型的报文可以动态更新保存在 DNS权威服务器的 DNS客户端 RR TTL 值, 该 4艮文包括 TTL Update更新字段, 用于标识该 DNS客户端要更新的 新 TTL。 现有 DNS Update报文消息格式如图 3 , 扩充后的 DNS Update报 文消息格式如图 4所示。所述 TTL Update字段长度可以为 32字节。该 TTL Update字段还可以放到 DNS Update消息的其他位置,本发明实施例不做强 制限制, 例如, 可以把 TTL Update 消息的放到 TTL Update 附加数据 Additional Data中。
进一步, 该操作类型的报文可以包括 TTL有效性判断字段, 用于标识 所述新 TTL值是否有效, 该 TTL有效性判断字段可以为 1比特, 当该 TTL 有效字段为 0时, 所述新 TTL值为无效, 当该 TTL有效字段为非 0时, 所 述新 TTL值有效。
报文处理 704, 用于所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL值
所述报文处理 704对报文接收单元 702接收的所述第一 DNS Update报 文进行解析, 提取所述新 TTL值, 当判断所述新 TTL值为有效时, DNS 权威服务器通过 DNS Update消息中的所述 DNS客户端域名信息在本地的 RR数据库中找到对应于所述 DNS客户端的 RR信息, 进而更新所述 DNS 客户端 RR信息的原 TTL值为所述新 TTL值。
可见,通过本发明实施提供的装置,能够实现 DNS客户端动态更新 DNS 緩存服务器存储的对应于所述 DNS客户端的 RR的 TTL值, 实现 DNS客 户端动态定制其 TTL值的功能, 特别地, 为实现本发明实施例三提供了必 备的技术手段。
实施例五:
本发明实施例提供了一种 DNS RR的 TTL更新的系统, 参见图 8 , 图 8为本发明实施的系统示意图, 该系统包括: DNS客户端 802, DNS权威 服务器 804。
DNS客户端 802,用于发送第一 DNS Update更新报文,所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用 于替换所述 DNS客户端的原 TTL值;
在网络中由于重组织或切换 ISP等原因,网络内的 DNS客户端 IP地址 会重新分配,当某个 DNS客户端域名的 IP地址变化后,会通过 DNS Update 消息立刻通知 DNS权威服务器保存新的域名和 IP对应关系, 但 DNS緩存 服务器由于其緩存的该 DNS客户端的 RR的 TTL还没有到期, DNS緩存 服务器仍然保存了该 DNS客户端旧的地址和域名对应关系, 那么, 当有用 户来查找该 DNS客户端信息时, 首先会先查询 DNS緩存服务器, DNS緩 存服务器会把该 DNS客户端的旧地址返回给查询用户, 从而造成查询用户 无法访问该 DNS客户端, 特别地, 当 DNS緩存服务器緩存的该 DNS客户 端 RR信息的 TTL很大时,会造成查询用户长时间无法访问该 DNS客户端, 举例来说, 如图 2所示, DNS客户端 A的域名为 www.example.com, IP地 址为 123.1.1.1 , DNS权威服务器和 DNS緩存服务器存储的 DNS客户端 A 的 RR信息包括: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 36000秒。 当网络重组织或切换 ISP时, DNS客户端 A的地址更新为 234.1.1.1 , DNS 客户端 A通过 DNS Update消息把更新后的地址通告给 DNS权威服务器, DNS权威服务器对其 RR数据库中对应于 DNS客户端 A的 RR信息更新为: 域名, www.example.com; IP, 234.1.1.1 ; TTL, 36000秒。 由于 DNS緩 存服务器保存的对应于 DNS 客户端 A 的的 RR 信息为: 域名, www.example.com; IP, 123.1.1.1 ; TTL, 假设此时 TTL减少到 30000秒, 由于 TTL任然没有到期, DNS緩存服务器不会去 DNS权威服务器获取该 DNS 客户端更新后的 RR 信息, 所以当用户 B 访问客户端 A 的域名 www.example.com时, DNS緩存服务器会返回旧的 IP地址 123.1.1.1 , 用户 B将无法访问 DNS客户端 A, 而且无法访问的时间将持续 30000秒, 在一 些场景下, DNS的 TTL的典型值是 2天左右, 则会导致用户最高 2天无法 访问所要访问的域名, 严重影响用户通信。 出现上述问题的主要原因在于 当 DNS客户端地址发生改变时, DNS緩存服务器保存的对应该 DNS客户 端 RR的原有 TTL并没有到期,不会去 DNS权威服务器查询更新过地址信 息的该 DNS客户端 RR信息, 导致 DNS緩存服务器在该 DNS客户端 RR 的原有 TTL到期这段时间内,用户无法访问该 DNS客户端域名。由于 DNS 权威服务器维护众多 DNS客户端, 不可能实现针对每个 DNS客户端进行 实时 TTL调整,本发明发明人经过研究发现,在网络重组织或切换 ISP前, 也就是在 DNS客户端 IP地址切换前, DNS客户端可以向 DNS权威服务器 发送第一 DNS Update更新报文,该第一 DNS Update报文包括所述 DNS客 户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值。 在 DNS緩存服务器旧的 RR的 TTL到期后, 到 DNS权威服务器 查询对应更新过 TTL的该 DNS客户端的 RR信息,从而在网络进行重组织 或切换 ISP后, 也就是 DNS客户端 IP地址发生切换后, DNS緩存服务器 能在更新后较小的新 TTL超时后到 DNS服务器查询新的 DNS客户端 RR 信息, 此时, 用户无法方法该 DNS客户端的时间最长为该 DNS客户端更 新后较小的新 TTL值对应的时间, 只要把改新 TTL值限定好, 能有效地减 少查询用户访无法访问该 DNS客户端的时间。
动态 DNS Update技术允许 DNS客户端向 DNS服务器发送 DNS Update 报文, DNS权威服务器收到该 DNS Update报文后对其保存的对应于该 DNS 客户端的 RR信息进行更新, 目前动态 DNS Update标准协议定义的 DNS Update报文可以进行以下 4种操作类型 (可参见( RFC2136 ):
1 )、 增加 DNS RR集合。
2 )、 删除 DNS RR集合。
3 )、 删除指定域名的所有 DNS RR集合。
4 )、 从一个 DNS RR集合中删除一条 RR。
本发明发明人经过研究发现所述第一 DNS Update报文可以是对现有 DNS Update报文操作类型扩充后的一种新操作类型的报文。 该操作类型的 DNS Update 4艮文是一种动态更新 DNS RR TTL的操作类型的 4艮文, 该操作 类型的报文可以动态更新保存在 DNS权威服务器的 DNS客户端 RR TTL 值, 该 4艮文包括 TTL Update更新字段, 用于标识该 DNS客户端要更新的 新 TTL。 现有 DNS Update报文消息格式如图 3 , 扩充后的 DNS Update报 文消息格式如图 4所示。所述 TTL Update字段长度可以为 32字节。该 TTL Update字段还可以放到 DNS Update消息的其他位置,本发明实施例不做强 制限制, 例如, 可以把 TTL Update 消息的放到 TTL Update 附加数据 Additional Data中。
进一步, 该操作类型的报文可以包括 TTL有效性判断字段, 用于标识 所述新 TTL值是否有效, 该 TTL有效性判断字段可以为 1比特, 当该 TTL 有效字段为 0时, 所述新 TTL值为无效, 当该 TTL有效字段为非 0时, 所 述新 TTL值有效。
DNS权威服务器 804, 包括本发明实施例四提供的装置, 详细可参加 本发明实施例四。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述程序可以存储于一计算机可 读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而 前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代 码的介质。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普 通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行 修改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims

权利要求
1、 一种 DNS域名系统客户端地址更新的方法, 其特征在于, 包括: 向 DNS权威服务器发送第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用 于替换所述 DNS客户端的原 TTL值;
根据所述原 TTL值启动定时器;
当所述定时器超时后, 向所述 DNS权威服务器发送第二 DNS Update 更新报文, 所述第二 DNS Update报文包含所述 DNS客户端更新后的地址 信息;
更新所述 DNS客户端的地址为所述更新后的地址信息。
2、 根据权利要求 1 所述的方法, 其特征在于, 所述根据所述原 TTL 值启动定时器之前, 进一步包括:
通过向所述 DNS权威服务器发送 DNS Query查询报文来获得原 TTL 值。
3、根据权利要求 1或 2所述的方法, 其特征在于, 所述新 TTL值承载 在所述 DNS Update报文中的 TTL Update更新字段。
4、 根据权利要求 1到 3任一权利要求所述的方法, 其特征在于, 所述 定时器的时长大于或等于所述原 TTL值。
5、 根据权利要求 1到 4任一权利要求所述的方法, 其特征在于, 所述 第一 DNS Update报文进一步包括 TTL有效性判断字段, 用于标识所述请 求报文的 TTL值是否有效。
6、 一种 DNS域名系统客户端 RR资源记录的 TTL存活时间更新的方 法, 其特征在于, 包括:
DNS权威服务器接收 DNS客户端发送来的第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所 述新 TTL值用于替换所述 DNS客户端的原 TTL值; 所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL 值。
7、 根据权利要求 6所述的方法, 其特征在于, 包括: 所述新 TTL值承 载在所述 DNS Update报文中的 TTL Update更新字段。
8、根据权利要求 6或 7所述的方法,其特征在于,所述第一 DNS Update 报文进一步包括 TTL有效性判断字段,用于标识所述请求报文的 TTL值是 有效; 相应地, 所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为 所述新 TTL值具体包括: 当所述 TTL有效性判断字段为非 0, 所述 DNS 权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL值。
9、 一种 DNS域名系统客户端地址更新的装置, 其特征在于, 包括: 第一报文发送单元, 用于向 DNS权威服务器发送第一 DNS Update更 新报文,所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL 值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL值;
定时器单元, 用于根据所述原 TTL值启动定时器;
第二报文发送单元, 用于当所述定时器超时后, 向所述 DNS权威服务 器发送第二 DNS Update更新报文, 所述第二 DNS Update报文包含所述 DNS客户端更新后的地址信息;
地址更新单元, 用于更新所述 DNS客户端的地址为所述更新后的地址 信息。
10、 根据权利要求 9 所述的装置, 其特征在于, 所述第一报文发送单 元进一步包括:
在通过向所述 DNS权威服务器发送 DNS Query查询报文获得原 TTL 值之后触发定时器单元。
11、 一种 DNS域名系统客户端 RR资源记录的 TTL存活时间更新的装 置, 其特征在于, 包括:
报文接收单元, 用于 DNS权威服务器接收 DNS客户端发送来的第一 DNS Update更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用于替换所述 DNS客户端的原 TTL 值;
报文处理单元, 用于所述 DNS权威服务器更新所述 DNS客户端的原 TTL值为所述新 TTL值。
12、 根据权利要求 11所述的装置, 其特征在于, 所述报文接收单元进 一步包括: 当所述 TTL有效性判断字段为非 0, 所述 DNS权威服务器更新 所述 DNS客户端的原 TTL值为所述新 TTL值。
13、 一种 DNS域名系统资源记录 RR的存活时间 TTL更新的系统, 其 特征在于, 所述系统包括:
DNS 客户端, 用于发送第一 DNS Update 更新报文, 所述第一 DNS Update报文包括所述 DNS客户端 RR信息的新 TTL值, 所述新 TTL值用 于替换所述 DNS客户端的原 TTL值;
DNS权威服务器, 包含权利要求 11或 12所述的装置。
PCT/CN2011/083717 2011-12-08 2011-12-08 Dns客户端地址、rr ttl更新的方法、装置及系统 WO2013082791A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201180003172.9A CN103380607B (zh) 2011-12-08 2011-12-08 Dns客户端地址、rr ttl更新的方法、装置及系统
PCT/CN2011/083717 WO2013082791A1 (zh) 2011-12-08 2011-12-08 Dns客户端地址、rr ttl更新的方法、装置及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/083717 WO2013082791A1 (zh) 2011-12-08 2011-12-08 Dns客户端地址、rr ttl更新的方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2013082791A1 true WO2013082791A1 (zh) 2013-06-13

Family

ID=48573508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/083717 WO2013082791A1 (zh) 2011-12-08 2011-12-08 Dns客户端地址、rr ttl更新的方法、装置及系统

Country Status (2)

Country Link
CN (1) CN103380607B (zh)
WO (1) WO2013082791A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331213A (zh) * 2016-08-29 2017-01-11 广东欧珀移动通信有限公司 一种域名系统dns处理方法及装置
CN110881064A (zh) * 2018-09-06 2020-03-13 阿里巴巴集团控股有限公司 一种域名配置方法及设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106612339A (zh) * 2015-10-27 2017-05-03 中国电信股份有限公司 域名更新方法、系统和主dns服务器
CN111901449B (zh) * 2020-07-01 2022-07-22 四川速宝网络科技有限公司 一种优化域名访问的方法及装置
CN114338604B (zh) * 2021-12-31 2024-04-12 北京奇艺世纪科技有限公司 一种dns配置更新方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030044526A (ko) * 2001-11-30 2003-06-09 엘지전자 주식회사 디엔에스에서 아이피 주소 할당 방법
US20050210150A1 (en) * 2004-03-19 2005-09-22 Microsoft Corporation Dynamic session maintenance for mobile computing devices
CN1694459A (zh) * 2005-04-13 2005-11-09 北京交通大学 一种IPv6网络中实现动态域名更新的方法
WO2009019321A1 (en) * 2007-08-08 2009-02-12 Teliasonera Finland Oyj A method and a communications network for updating the routing data of a domain name server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277257B (zh) * 2007-03-26 2012-02-01 华为技术有限公司 一种dns动态更新的方法、装置和系统
CN101483648B (zh) * 2009-02-20 2012-07-11 杭州华三通信技术有限公司 Dns缓存探测的方法、系统、装置和dns服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030044526A (ko) * 2001-11-30 2003-06-09 엘지전자 주식회사 디엔에스에서 아이피 주소 할당 방법
US20050210150A1 (en) * 2004-03-19 2005-09-22 Microsoft Corporation Dynamic session maintenance for mobile computing devices
CN1694459A (zh) * 2005-04-13 2005-11-09 北京交通大学 一种IPv6网络中实现动态域名更新的方法
WO2009019321A1 (en) * 2007-08-08 2009-02-12 Teliasonera Finland Oyj A method and a communications network for updating the routing data of a domain name server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331213A (zh) * 2016-08-29 2017-01-11 广东欧珀移动通信有限公司 一种域名系统dns处理方法及装置
CN106331213B (zh) * 2016-08-29 2017-11-24 广东欧珀移动通信有限公司 一种域名系统dns处理方法及装置
CN110881064A (zh) * 2018-09-06 2020-03-13 阿里巴巴集团控股有限公司 一种域名配置方法及设备
CN110881064B (zh) * 2018-09-06 2022-08-02 阿里巴巴集团控股有限公司 一种域名配置方法及设备

Also Published As

Publication number Publication date
CN103380607A (zh) 2013-10-30
CN103380607B (zh) 2015-11-25

Similar Documents

Publication Publication Date Title
US10148612B2 (en) Method and system for increasing speed of domain name system resolution within a computing device
US11606388B2 (en) Method for minimizing the risk and exposure duration of improper or hijacked DNS records
CN112217916B (zh) 一种新型的工业互联网标识解析递归服务器的缓存方法和系统
US7415536B2 (en) Address query response method, program, and apparatus, and address notification method, program, and apparatus
US7937471B2 (en) Creating a public identity for an entity on a network
JP4234482B2 (ja) 動的dns登録方法、ドメイン名解決方法、代理サーバ、及びアドレス変換装置
US20060031534A1 (en) Position identifier management apparatus and method, mobile computer, and position identifier processing method
CN101170585B (zh) 一种域名查询方法
WO2006072222A1 (fr) Procede permettant de mettre en oeuvre la synchronisation de donnees du serveur et du cote client dans le mecanisme du systeme de nom de domaine
JP2001519607A (ja) 静的な識別子を動的に割り当てられたネットワーク・アドレスに変形する方法および装置
US20130151725A1 (en) Method and System for Handling a Domain Name Service Request
CN106357839B (zh) 一种dns查询方法及装置
WO2013082791A1 (zh) Dns客户端地址、rr ttl更新的方法、装置及系统
WO2015039475A1 (zh) 一种域名解析方法、服务器及系统
WO2011131097A1 (zh) 数据报文处理方法、系统及接入服务节点
JP3692107B2 (ja) 名前解決装置及び名前解決方法
CN106878475B (zh) 域名寻址方法和系统
EP3288242B1 (en) Domain name system accessing method and device
US20180375818A1 (en) Dns-based method of transmitting data
Ballani et al. A simple approach to DNS DoS mitigation
CN117692173A (zh) 请求报文的处理方法、系统及相关设备
CN117294675A (zh) 一种基于标识dns查询请求查询ip的方法、装置及设备
WO2000001112A1 (en) Decentralized name services
Angel et al. A Location Management-aware Mapping System for ID/Locator Separation to Support Mobility

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11876963

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11876963

Country of ref document: EP

Kind code of ref document: A1