WO2015100566A1 - 一种处理域名请求的方法及设备 - Google Patents
一种处理域名请求的方法及设备 Download PDFInfo
- Publication number
- WO2015100566A1 WO2015100566A1 PCT/CN2013/090975 CN2013090975W WO2015100566A1 WO 2015100566 A1 WO2015100566 A1 WO 2015100566A1 CN 2013090975 W CN2013090975 W CN 2013090975W WO 2015100566 A1 WO2015100566 A1 WO 2015100566A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- record
- domain name
- request
- dns server
- aaaa
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
Definitions
- the present invention belongs to the field of communications, and in particular, to a method and a device for processing a domain name request.
- IPv4 Internet Protocol version 4 4
- IPv6 Internet Protocol version 6, Internet Protocol version 6
- the user equipment accessing the network may be an IPv4 device with an IPv4 address, an IPv6 device with an IPv6 address, or a dual-stack device with both an IPv4 address and an IPv6 address.
- the network side includes both IPv6 servers with IPv6 addresses and a large number of IPv4 servers with only IPv4 addresses and no IPv6 addresses.
- NAT64 can be deployed in the network (Network Address Translation: IPv6 to IPv4, IPv6 to IPv4 network address translation) Server and DNS64 (Domain Name System for NAT64, NAT64 domain name system) server, DNS64 server and NAT64 server are configured with IPv6 prefix.
- the domain name request is sent to the DNS64 server to request the IPv6 address of the IPv4 server, and the domain name request is an AAAA record request; the DNS64 server queries the domain name according to the domain name included in the received AAAA record request.
- AAAA record that is, IPv6 address
- the DNS64 server cannot query the AAAA record, and then queries the A record corresponding to the above domain name (that is, the IPv4 address), according to the queried A record.
- IPv6 device And generating an AAAA record with the pre-configured IPv6 prefix, and returning the AAAA record to the IPv6 device; the IPv6 device generates an IPv6 packet according to the received AAAA record, and sends the IPv6 packet to the NAT64 server; the NAT64 server is pre-configured according to the pre-configured The IPv6 prefix converts the received IPv6 packet into the corresponding IPv4 packet, and forwards the converted IPv4 packet to the IPv4 server. After receiving the IPv4 packet from the IPv4 server, the IPv4 packet is translated into the IPv4 packet. IPv6 packets are forwarded and forwarded to IPv6 devices. This implements IPv6 devices to IPv4 servers. Access.
- NAT46 can be deployed in the network. Address Translation: IPv4 to IPv6, IPv4 to IPv6 network address translation) Server and DNS46 (Domain Name System) For NAT46, NAT46 domain name system) server, DNS46 server and NAT46 server are configured with IPv6 prefix.
- the domain name request is sent to the DNS46 server to request the IPv4 address of the IPv6 server, and the domain name request is an A record request; the DNS46 server queries the domain name according to the domain name included in the received A record request. The corresponding A record; because the IPv6 server accessed by the IPv4 device does not have an IPv4 address, the DNS46 server can not query the A record, and then query the AAAA record corresponding to the domain name, and generate an A according to the queried AAAA record and the pre-configured IPv6 prefix.
- the IPv4 device Recording and returning the A record to the IPv4 device; the IPv4 device generates an IPv4 message according to the received A record, and sends the IPv4 message to the NAT46 server; the NAT46 server receives the received IPv4 message according to the pre-configured IPv6 prefix.
- the file is converted to the corresponding IPv6 packet, and the converted IPv6 packet is forwarded to the IPv6 server.
- the IPv6 packet After receiving the IPv6 packet from the IPv6 server, the IPv6 packet is converted into an IPv4 packet, and the packet is converted into an IPv4 packet.
- the packet is forwarded to the IPv4 device, so that the IPv4 device accesses the IPv6 server.
- the functions of the DNS64 server and the DNS46 server can be integrated into a common DNS server, and a separate DNS server, a DNS64 server, and a DNS46 server can be deployed in the network.
- the domain name request initiated by the user equipment in the access process only includes the A record request or the AAAA record request.
- the DNS64 server can only determine the query result corresponding to the domain name in the domain name request and the local configuration. Returning the original AAAA record or the generated AAAA record, the DNS46 server can only return the original A record or the generated A record according to the query result corresponding to the domain name in the domain name request and the local configuration.
- the DNS64 server When the user equipment that has both the IPv4 address and the IPv6 address initiates an AAAA record request for the IPv4 server, the DNS64 server returns an AAAA record generated according to the IPv6 prefix to the user equipment, and the user equipment uses the AAAA record to access the network, causing the DNS64 server to blindly Performing unnecessary operations, querying and generating AAAA records, and NAT64 servers blindly performing unnecessary network address translation operations impose higher performance requirements on DNS64 servers and NAT64 servers.
- the DNS 46 server returns an A record generated according to the IPv6 prefix to the user equipment, and the user equipment uses the A record to access the network, resulting in
- the DNS46 server blindly performs unnecessary operations of querying and generating A records, and the NAT46 server blindly performs unnecessary network address translation operations, placing higher performance requirements on the DNS46 server and the NAT46 server.
- An object of the embodiments of the present invention is to provide a method and a device for processing a domain name request, which solve the defects of blindly querying and generating A records and AAAA records in the prior art, and blindly performing unnecessary network address translation.
- An embodiment of the present invention provides an access gateway, including:
- a storage module configured to store configuration information
- a receiving module configured to receive a domain name request from the user equipment and a response message from the domain name system DNS server;
- a modifying module configured to modify, according to the device type of the user equipment and configuration information stored by the storage module, a domain name request received by the receiving module;
- a sending module configured to send the modified domain name request to the DNS server, and send the response message to the user equipment.
- the storage module includes:
- a first storage submodule configured to store first configuration information
- the modification module includes:
- a first modification submodule configured to: when the device type of the user equipment is an Internet Protocol version IPv4 device, according to the first configuration information stored by the first storage submodule, the type of the domain name request is preferentially recorded by the AAAA Request or AAAA record request, modified to A record request or A record priority request.
- the storage module includes:
- a second storage submodule configured to store second configuration information
- the modification module includes:
- a second modification submodule configured to: when the device type of the user equipment is an IPv4 device, according to the second configuration information stored by the second storage submodule, the type of the domain name request is recorded by the AAAA priority request or AAAA Record the request and modify it to A record priority request.
- the storage module includes:
- a third storage submodule configured to store third configuration information
- the modification module includes:
- a third modification submodule configured to: when the device type of the user equipment is a dual stack device, according to the third configuration information stored by the third storage submodule, the type of the domain name request is preferentially requested by the A record or A record request, modified to AAAA record priority request;
- the domain name request is modified by the AAAA record priority request into an AAAA record request according to the third configuration information stored by the third storage submodule.
- the storage module includes:
- a fourth storage submodule configured to store fourth configuration information
- the modification module includes:
- a fourth modification submodule configured to: when the device type of the user equipment is a dual stack device, according to the fourth configuration information stored by the fourth storage submodule, the type of the domain name request is preferentially requested by the A record or
- the A record request is modified to an AAAA record priority request or a dual stack record request, or the type of the domain name request is modified from an AAAA record request to an AAAA record priority request.
- the receiving module is further configured to receive an access request from the user equipment
- the access gateway further includes:
- An allocating module configured to allocate a network address to the user equipment, and record a network address type of the user equipment
- a determining module configured to determine, according to the network address type recorded by the allocation module, a device type of the user equipment
- the sending module is further configured to return, to the user equipment, a network address that is allocated by the allocation module to the user equipment.
- the determining module is configured to: when the network address type of the user equipment is an IPv4 address, determine that the device type of the user equipment is an IPv4 device;
- the network address type of the user equipment is an IPv6 address
- the network address type of the user equipment is a dual stack address
- determining that the device type of the user equipment is a dual stack device determining that the device type of the user equipment is a dual stack device.
- An embodiment of the present invention further provides an access gateway, including a processor, a communication interface, a memory, and a bus, where the processor, the communication interface, and the memory complete communication with each other through the bus;
- the communication interface is configured to communicate with a user equipment and a domain name system DNS server;
- the processor is configured to execute a program
- the memory is configured to store the program
- the program is configured to receive a domain name request from the user equipment and a response message from a domain name system DNS server, and according to the device type of the user equipment and configuration information preset in the access gateway, The domain name request is modified, and the modified domain name request is sent to the DNS server, and the response message is sent to the user equipment.
- An embodiment of the present invention further provides a domain name system DNS server, including:
- a storage module configured to store configuration information
- a receiving module configured to receive a domain name request from an access gateway
- a processing module configured to process the domain name request according to the type of the domain name request received by the receiving module and the configuration information.
- the processing module is configured to: respond to the domain name request according to the type of the domain name request received by the receiving module, and the configuration information, and generate a response message according to the processing result;
- the DNS server further includes:
- a sending module configured to send the response message generated by the processing module to the user equipment.
- the storage module includes:
- a first storage submodule configured to store sixth configuration information
- the receiving module includes:
- a first receiving submodule configured to receive an A record request from the access gateway
- the processing module includes:
- a first query sub-module configured to: according to the A record corresponding to the domain name query included in the A record request received by the first receiving sub-module;
- a first determining sub-module configured to determine, according to the sixth configuration information, whether the DNS server has a function of generating an A record according to the AAAA record, when the first query sub-module does not query the A record;
- a second query sub-module configured to: when the first determining sub-module determines that the DNS server has the function of generating an A record according to the AAAA record, querying the AAAA record corresponding to the domain name included in the A record request;
- a first generating submodule configured to: when the first query submodule queries the A record, generate a response message including the queried A record; and the first determining submodule determines that the DNS server does not have a basis
- the AAAA records the function of generating the A record, or when the second query submodule does not query the AAAA record, generates a response message including the query failure information; when the second query submodule queries the AAAA record, according to the query
- the AAAA record generates a corresponding A record and generates a response message containing the generated A record.
- the storage module includes:
- a second storage submodule configured to store fifth configuration information
- the receiving module includes:
- a second receiving submodule configured to receive an AAAA record request from the access gateway
- the processing module includes:
- a third query sub-module configured to query, according to the AAAA record corresponding to the domain name included in the AAAA record request received by the second receiving sub-module;
- a second determining sub-module configured to determine, according to the fifth configuration information, whether the DNS server has a function of generating an AAAA record according to the A record, when the third query sub-module does not query the AAAA record;
- a fourth query sub-module configured to: when the second determining sub-module determines that the DNS server has the function of generating an AAAA record according to the A record, querying the A record corresponding to the domain name included in the AAAA record request;
- a second generation submodule configured to: when the third query submodule queries the AAAA record, generate a response message including the queried AAAA record; and the second determining submodule determines that the DNS server does not have a basis A records the function of generating the AAAA record, or the fourth query sub-module does not query the A record, generates a response message containing the query failure information; when the fourth query sub-module queries the A record, according to the query The A record generates a corresponding AAAA record and generates a response message containing the generated AAAA record.
- the receiving module includes:
- a third receiving submodule configured to receive an A record priority request from the access gateway
- the processing module includes:
- the fifth query sub-module is configured to query the A-record corresponding to the domain name included in the A-record priority request, and query the AAAA record corresponding to the domain name included in the A-record priority request when the A record is not queried;
- a third generation submodule configured to: when the fifth query submodule queries the A record, generate a response message including the queried A record; and when the fifth query submodule queries the AAAA record, generate a query including A response message to the AAAA record; when the fifth query sub-module does not query the AAAA record, generate a response message including the query failure information.
- the receiving module includes:
- a fourth receiving submodule configured to receive an AAAA record priority request from the access gateway
- the processing module includes:
- a sixth query sub-module configured to: according to the AAAA record corresponding to the domain name query included in the AAAA record priority request received by the fourth receiving sub-module, when the AAAA record is not queried, the priority request is recorded according to the AAAA The A record corresponding to the domain name query included in the query;
- a fourth generation submodule configured to: when the sixth query submodule queries the AAAA record, generate a response message including the queried AAAA record; and when the sixth query submodule queries the A record, generate a query including A response message to the A record; when the sixth query sub-module does not query the A record, generate a response message including the query failure information.
- the storage module includes:
- a third storage submodule configured to store seventh configuration information
- the receiving module includes:
- a fifth receiving submodule configured to receive a dual stack recording request from the access gateway
- the processing module includes:
- a seventh query sub-module configured to: according to the AAAA record and the A record corresponding to the domain name query included in the double-stack record request received by the fifth receiving sub-module;
- a third determining sub-module configured to: when the seventh query sub-module queries the AAAA record and the A record, determine, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment;
- a fifth generation submodule configured to: when the seventh query submodule only queries the AAAA record, generate a response message including the queried AAAA record; and when the seventh query submodule only queries the A record, generate a response message including the queried A record; when the seventh query sub-module does not query the AAAA record or the A record, generating a response message including the query failure information; and determining, in the third determining sub-module, the priority return A
- the queried A record is set in the resource record in the response message
- the queried AAAA record is set in the resource record in the response message
- the third judgment sub-module determines the priority Return the AAAA record, set the queried AAAA record to the resource record in the response message, and set the queried A record to the resource record in the response message.
- An embodiment of the present invention further provides a domain name system DNS server, including a processor, a communication interface, a memory, and a bus, where the processor, the communication interface, and the memory complete communication with each other through the bus;
- the communication interface is configured to communicate with a user equipment and an access gateway;
- the processor is configured to execute a program
- the memory is configured to store the program
- the program is configured to receive a domain name request from the access gateway, and process the domain name request according to the type of the domain name request and the configuration information preset in the DNS server.
- the embodiment of the invention further provides a method for processing a domain name request, comprising the following steps:
- the user equipment initiates a domain name request to the access gateway
- the access gateway modifies the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, and sends the modified domain name request to the domain name system DNS server;
- the DNS server processes the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server.
- the DNS server processes the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, specifically:
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result;
- the DNS server After the DNS server processes the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, the DNS server further includes:
- the DNS server sends the response message to the user equipment.
- the method further includes:
- the user equipment sets preferred configuration information
- the user equipment After receiving the response message returned by the DNS server, the user equipment further includes:
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message.
- the preferred configuration information is A record preference information
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message, specifically:
- the user equipment initiates an access request to the application server according to the A record included in the response message.
- the preferred configuration information is AAAA record preference information
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message, specifically:
- the user equipment initiates an access request to the application server according to the AAAA record included in the response message.
- the preferred configuration information is any preferred information
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message, specifically:
- the user equipment initiates an access request to the application server according to the A record or the AAAA record included in the response message.
- the configuration information preset in the access gateway is the first configuration information
- the access gateway modifies the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, specifically:
- the access gateway modifies the type of the domain name request by an AAAA record priority request or an AAAA record request to an A record request or an A record priority request.
- the configuration information preset in the access gateway is second configuration information
- the access gateway modifies the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, specifically:
- the access gateway modifies the type of the domain name request by an AAAA record priority request or an AAAA record request to the A record priority request.
- the configuration information preset in the access gateway is third configuration information
- the access gateway modifies the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, specifically:
- the access gateway changes the type of the domain name request by the A record priority request or the A record request to the AAAA record priority request;
- the access gateway modifies the domain name request by the AAAA record priority request to an AAAA record request.
- the configuration information preset in the access gateway is fourth configuration information
- the access gateway modifies the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, specifically:
- the access gateway modifies the type of the domain name request from an A record priority request or an A record request to an AAAA record priority request or a dual stack record request, or The type of the domain name request is modified by the AAAA record request to the AAAA record priority request.
- the type of the domain name request received by the DNS server is an A record request
- the configuration information preset in the DNS server is the sixth configuration information
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding A record according to the domain name included in the A record request, if the A record is queried, step A2 is performed; if the A record is not queried, step A3 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server determines, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record, if not, executing step 1604; if so, executing step A5;
- the DNS server generates a response message including query failure information.
- the DNS server queries the corresponding AAAA record according to the domain name included in the A record request, if the AAAA record is queried, step A6 is performed; if the AAAA record is not queried, step A7 is performed;
- the DNS server generates a corresponding A record according to the queried AAAA record, and generates a response message including the generated A record.
- the DNS server generates a response message including the query failure information.
- the type of the domain name request received by the DNS server is an AAAA record request
- the configuration information preset in the DNS server is the fifth configuration information
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record request, if the AAAA record is queried, step B2 is performed; if the AAAA record is not queried, step B3 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server determines, according to the fifth configuration information, whether it has the function of generating an AAAA record according to the A record, if not, executing step B4; if yes, executing step B5;
- the DNS server generates a response message that includes query failure information.
- the DNS server queries the corresponding A record according to the domain name included in the AAAA record request, if the A record is queried, step B6 is performed; if the A record is not queried, step B7 is performed;
- the DNS server generates a corresponding AAAA record according to the queried A record, and generates a response message including the generated AAAA record.
- the DNS server generates a response message that includes the query failure information.
- the type of the domain name request received by the DNS server is an A record priority request
- the DNS server responds to the received domain name request according to the type of the received domain name request, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding A record according to the domain name included in the A record priority request, if the A record is queried, step C2 is performed; if the A record is not queried, step C3 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server queries the corresponding AAAA record according to the domain name included in the A record priority request, if the AAAA record is queried, step C4 is performed; if the AAAA record is not queried, step C5 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server generates a response message including query failure information.
- the type of the domain name request received by the DNS server is an AAAA record priority request
- the DNS server responds to the received domain name request according to the type of the received domain name request, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record priority request, if the AAAA record is queried, step D2 is performed; if the AAAA record is not queried, step D3 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server queries the corresponding A record according to the domain name included in the AAAA record priority request. If the A record is queried, step D4 is performed; if the A record is not queried, step 1625 is performed.
- the DNS server generates a response message including the queried A record.
- the DNS server generates a response message including query failure information.
- the type of the domain name request received by the DNS server is a dual stack record request, and the configuration information preset in the DNS server is the seventh configuration information;
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result, which specifically includes:
- step E1 The DNS server queries the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request. If only the AAAA record is queried, step E2 is performed; if only the A record is queried, step E3 is performed; If the AAAA record or the A record is queried, step E4 is performed; if the AAAA record and the A record are queried, step E5 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server generates a response message that includes the queried A record.
- the DNS server generates a response message that includes query failure information.
- the DNS server determines, according to the seventh configuration information, preferentially return an A record or an AAAA record to the user equipment, if the A record is returned in priority, step E6 is performed; if the AAAA record is returned in priority, step E7 is performed;
- the DNS server sets the queried A record to the resource record in the response message, and sets the queried AAAA record to the resource record in the response message;
- the DNS server sets the queried AAAA record to the resource record in the response message, and sets the queried A record to the resource record in the response message.
- the method further includes:
- the user equipment initiates an access request to the access gateway
- the access gateway allocates a network address to the user equipment, records a network address type of the user equipment, determines a device type of the user equipment according to the network address type, and returns a distribution to the user equipment The network address of the user device.
- the access gateway determines the device type of the user equipment according to the network address type, specifically:
- the access gateway determines that the device type of the user equipment is an IPv4 device
- the access gateway determines that the device type of the user equipment is an IPv6 device
- the access gateway determines that the device type of the user equipment is a dual stack device.
- An embodiment of the present invention further provides a domain name system DNS server, including:
- a storage module configured to store configuration information
- a receiving module configured to receive a domain name request from the access gateway, where the domain name request includes a device type of the user equipment that initiates the domain name request;
- the processing module performs the domain name request according to the type of the domain name request received by the receiving module, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request. deal with.
- the processing module is configured to perform the domain name request according to the type of the domain name request received by the receiving module, the configuration information, and the device type of the user equipment included in the domain name request.
- Response processing generating a response message according to the processing result;
- the DNS server further includes:
- a sending module configured to send the response message generated by the processing module to the user equipment.
- the device type of the user equipment included in the domain name request is an IPv4 device
- the storage module includes:
- a first storage submodule configured to store sixth configuration information
- the processing module includes:
- a first query sub-module configured to query, according to the domain name included in the domain name request, a corresponding A record
- a first determining sub-module configured to determine, according to the sixth configuration information, whether the DNS server has a function of generating an A record according to the AAAA record, when the first query sub-module does not query the A record;
- a second query sub-module configured to: when the first determining sub-module determines that the DNS server has the function of generating an A record according to the AAAA record, querying the corresponding AAAA record according to the domain name included in the domain name request;
- a first generating submodule configured to: when the first query submodule queries the A record, generate a response message including the queried A record; and the first determining submodule determines that the DNS server does not have a basis
- the AAAA records the function of generating the A record, or when the second query submodule does not query the AAAA record, generates a response message including the query failure information; when the second query submodule queries the AAAA record, according to the query
- the AAAA record generates a corresponding A record and generates a response message containing the generated A record.
- the device type of the user equipment included in the domain name request is an IPv6 device
- the storage module includes:
- a second storage submodule configured to store fifth configuration information
- the processing module includes:
- a third query sub-module configured to query, according to the domain name included in the domain name request, a corresponding AAAA record
- a second determining sub-module configured to determine, according to the fifth configuration information, whether the DNS server has a function of generating an AAAA record according to the A record, when the third query sub-module does not query the AAAA record;
- a fourth query sub-module configured to: when the second determining sub-module determines that the DNS server has the function of generating an AAAA record according to the A record, querying the corresponding A record according to the domain name included in the domain name request;
- a second generation submodule configured to: when the third query submodule queries the AAAA record, generate a response message including the queried AAAA record; and the second determining submodule determines that the DNS server does not have a basis A records the function of generating the AAAA record, or the fourth query sub-module does not query the A record, generates a response message containing the query failure information; when the fourth query sub-module queries the A record, according to the query The A record generates a corresponding AAAA record and generates a response message containing the generated AAAA record.
- the device type of the user equipment included in the domain name request is a dual stack device
- the storage module includes:
- a third storage submodule configured to store seventh configuration information
- the processing module includes:
- a third determining submodule configured to determine a type of the domain name request
- a fifth query sub-module configured to: when the third determining sub-module determines that the type of the domain name request is an A-record request, query the corresponding A record according to the domain name included in the A-record request; When A records, the corresponding AAAA record is queried according to the domain name included in the A record request;
- a sixth query sub-module configured to: when the third determining sub-module determines that the type of the domain name request is an AAAA record request, query the corresponding AAAA record according to the domain name included in the AAAA record request; When the AAAA records, the A record corresponding to the domain name included in the AAAA record request is queried;
- a seventh query sub-module configured to: when the third determining sub-module determines that the type of the domain name request is a dual-stack recording request, query the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request;
- a fourth determining sub-module configured to: when the seventh query sub-module queries the AAAA record and the A record, determine, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment;
- a third generation submodule configured to: when the fifth query submodule queries the A record, generate a response message including the queried A record; and when the fifth query submodule queries the AAAA record, generate a query including a response message to the AAAA record; when the fifth query sub-module does not query the AAAA record, generate a response message including the query failure information;
- the sixth query sub-module queries the AAAA record, generates a response message including the queried AAAA record; when the sixth query sub-module queries the A record, generates a response message including the queried A record; When the sixth query sub-module does not query the A record, generate a response message including the query failure information;
- the seventh query sub-module When the seventh query sub-module only queries the AAAA record, generates a response message including the queried AAAA record; when the seventh query sub-module only queries the A record, generates a response including the queried A record. a message; when the seventh query sub-module does not query the AAAA record or the A record, generate a response message including the query failure information; and when the fourth determining sub-module determines that the A record is preferentially returned, the query is The A record is set to the resource record in the top of the response message, and the queried AAAA record is set to the resource record in the later of the response message; the fourth judgment sub-module determines that the AAAA is returned preferentially. When recording, the queried AAAA record is set to the resource record in the top of the response message, and the queried A record is set to the later resource record in the response message.
- An embodiment of the present invention further provides a domain name system DNS server, including a processor, a communication interface, a memory, and a bus, where the processor, the communication interface, and the memory complete communication with each other through the bus;
- the communication interface is configured to communicate with a user equipment and an access gateway;
- the processor is configured to execute a program
- the memory is configured to store a program
- the program is configured to receive a domain name request from the access gateway, according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request.
- the domain name request is processed.
- the embodiment of the invention further provides a method for processing a domain name request, comprising the following steps:
- the user equipment initiates a domain name request to the access gateway according to the device type of the device, where the domain name request includes the device type of the user equipment;
- the access gateway forwards the domain name request to a domain name system DNS server;
- the DNS server processes the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request.
- the DNS server processes the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, specifically for:
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, according to the processing result. Generate a response message;
- the DNS server After the DNS server processes the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, the DNS server further includes:
- the DNS server sends the response message to the user equipment.
- the device type of the user equipment is an IPv4 device
- configuration information preset in the DNS server is sixth configuration information.
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, according to the processing result.
- Generate a response message including:
- the DNS server queries the corresponding A record according to the domain name included in the domain name request, if the A record is queried, step F2 is performed; if the A record is not queried, step F3 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server determines, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record, if not, executing step F4; if yes, executing step F5;
- the DNS server generates a response message including query failure information.
- the DNS server queries the corresponding AAAA record according to the domain name included in the domain name request, if the AAAA record is queried, step F6 is performed; if the AAAA record is not queried, step F7 is performed;
- the DNS server generates a corresponding A record according to the queried AAAA record, and generates a response message including the generated A record.
- the DNS server generates a response message including query failure information.
- the device type of the user equipment is an IPv6 device, and configuration information preset in the DNS server is fifth configuration information;
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, according to the processing result.
- Generate a response message including:
- the DNS server queries the corresponding AAAA record according to the domain name included in the domain name request, if the AAAA record is queried, step G2 is performed; if the AAAA record is not queried, step G3 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server determines, according to the fifth configuration information, whether it has the function of generating an AAAA record according to the A record, if not, executing step G4; if so, executing step G5;
- the DNS server generates a response message including query failure information.
- the DNS server queries the corresponding A record according to the domain name included in the domain name request, if the A record is queried, step G6 is performed; if the A record is not queried, step G7 is performed;
- the DNS server generates a corresponding AAAA record according to the queried A record, and generates a response message including the generated AAAA record.
- the DNS server generates a response message including the query failure information.
- the device type of the user equipment is a dual-stack device, and configuration information preset in the DNS server is seventh configuration information;
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, according to the processing result.
- Generate a response message including:
- the DNS server determines the type of the domain name request, if it is an A record request, step H2; if it is an AAAA record request, step H7; if it is a double stack record request, step H12;
- the DNS server queries the corresponding A record according to the domain name included in the A record request, if the A record is queried, step H3 is performed; if the A record is not queried, step H4 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server queries the corresponding AAAA record according to the domain name included in the A record request, if the AAAA record is queried, step H5 is performed; if the AAAA record is not queried, step H6 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server generates a response message that includes query failure information.
- the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record request, if the AAAA record is queried, step H8 is performed; if the AAAA record is not queried, step H9 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server queries the corresponding A record according to the domain name included in the AAAA record request, if the A record is queried, step H10 is performed; if the A record is not queried, step H11 is performed;
- the DNS server generates a response message that includes the queried A record.
- the DNS server generates a response message that includes query failure information.
- the DNS server queries the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request. If only the AAAA record is queried, step H13 is performed; if only the A record is queried, step H14 is performed; If the AAAA record or the A record is queried, step H15 is performed; if the AAAA record and the A record are queried, step H16 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server generates a response message including the queried A record.
- the DNS server generates a response message that includes the query failure information.
- the DNS server determines, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, if the A record is returned preferentially, step H17 is performed; if the AAAA record is returned preferentially, step H18 is performed;
- the DNS server sets the queried A record to the resource record in the response message, and sets the queried AAAA record to the later resource record in the response message.
- the DNS server sets the queried AAAA record to the resource record in the top of the response message, and sets the queried A record to the later resource record in the response message.
- the method further includes:
- the user equipment initiates an access request to the access gateway
- the access gateway allocates a network address to the user equipment, and returns a network address allocated to the user equipment to the user equipment;
- the user equipment determines its own device type according to the network address.
- the user equipment determines its own device type according to the network address, specifically:
- the user equipment determines that its own device type is an IPv4 device
- the user equipment determines that its own device type is an IPv6 device
- the user equipment determines that its own device type is a dual stack device.
- the method further includes:
- the user equipment sets preferred configuration information
- the user equipment After receiving the response message returned by the DNS server, the user equipment further includes:
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message.
- the preferred configuration information is A record preference information
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message, specifically:
- the user equipment initiates an access request to the application server according to the A record included in the response message.
- the preferred configuration information is AAAA record preference information
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message, specifically:
- the user equipment initiates an access request to the application server according to the AAAA record included in the response message.
- the preferred configuration information is any preferred information
- the user equipment initiates an access request to the application server according to the preferred configuration information and the response message, specifically:
- the user equipment initiates an access request to the application server according to the A record or the AAAA record included in the response message.
- the device type of the user equipment is included in a new field of the domain name request.
- the embodiment of the invention further provides a user equipment, including:
- a first sending module configured to initiate a domain name request to the access gateway
- a first receiving module configured to receive a response message returned by the domain name system DNS server
- the second sending module is configured to initiate an access request to the application server according to the preferred configuration information set by the setting module and the response message received by the first receiving module.
- the preferred configuration information is A record preference information
- the setting module is specifically configured to configure the A record preference information
- the second sending module is specifically configured to initiate an access request to the application server according to the A record included in the response message.
- the preferred configuration information is AAAA record preference information
- the setting module is specifically configured to configure the AAAA record preference information
- the second sending module is specifically configured to initiate an access request to the application server according to the AAAA record included in the response message.
- the preferred configuration information is any preferred information
- the setting module is specifically configured to configure the any preferred information
- the second sending module is specifically configured to initiate an access request to the application server according to the A record or the AAAA record included in the response message.
- the user equipment further includes:
- a third sending module configured to initiate an access request to the access gateway
- the second receiving module is configured to receive a network address that is allocated by the access gateway to the user equipment.
- the user equipment further includes:
- a determining module configured to determine, according to the network address type received by the second receiving module, a device type of the user equipment.
- the embodiment of the present invention further includes a user equipment, including a processor, a communication interface, a memory, and a bus, where the processor, the communication interface, and the memory complete communication with each other through the bus;
- the communication interface is configured to communicate with an access gateway, a domain name system DNS server, and an application server;
- the processor is configured to execute a program
- the memory is configured to store the program
- the program is configured to set a preferred configuration information, initiate a domain name request to the access gateway, receive a response message returned by the DNS server, and initiate the message to the application server according to the preferred configuration information and the response message. Access request.
- the embodiment of the present invention provides a method and a device for processing a domain name request.
- the DNS server can sense the requesting intention or device type of the user equipment by expanding the type of the domain name request or configuring the device type of the user equipment in the domain name request.
- the user equipment returns an A record and/or an AAAA record that is required by the user equipment to adapt to the network condition, and the user equipment initiates an access request by using the A record or the AAAA record according to the preset configuration information set in advance, thereby reducing the blindness of the DNS response and avoiding the blindness of the DNS response.
- Unnecessary queries and operations to generate A records or AAAA records avoid unnecessary network address translation operations and reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 1 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 1 of the present invention
- FIG. 2 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 2 of the present invention.
- FIG. 3 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 3 of the present invention.
- FIG. 4 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 4 of the present invention.
- FIG. 5 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 5 of the present invention.
- FIG. 6 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 6 of the present invention.
- FIG. 7 is a structural diagram of a device of a DNS server according to Embodiment 7 of the present invention.
- FIG. 8 is a structural diagram of a device of a DNS server according to Embodiment 8 of the present invention.
- FIG. 9 is a structural diagram of a device of a DNS server according to Embodiment 9 of the present invention.
- FIG. 10 is a structural diagram of a device of a DNS server according to Embodiment 10 of the present invention.
- FIG. 11 is a structural diagram of a device of a DNS server according to Embodiment 11 of the present invention.
- FIG. 12 is a structural diagram of a device of a DNS server according to Embodiment 12 of the present invention.
- FIG. 13 is a structural diagram of a device of a DNS server according to Embodiment 13 of the present invention.
- FIG. 14 is a flowchart of a method for processing a domain name request according to Embodiment 14 of the present invention.
- Embodiment 15 is a flowchart of a method for processing a domain name request according to Embodiment 15 of the present invention.
- FIG. 16 is a flowchart of a method for processing a domain name request by a DNS server according to Embodiment 15 of the present invention.
- FIG. 17 is a structural diagram of a device of a DNS server according to Embodiment 16 of the present invention.
- FIG. 18 is a structural diagram of a device of a DNS server according to Embodiment 17 of the present invention.
- FIG. 19 is a structural diagram of a device of a DNS server according to Embodiment 18 of the present invention.
- FIG. 20 is a structural diagram of a device of a DNS server according to Embodiment 19 of the present invention.
- FIG. 21 is a structural diagram of a device of a DNS server according to Embodiment 20 of the present invention.
- FIG. 22 is a flowchart of a method for processing a domain name request according to Embodiment 21 of the present invention.
- FIG. 23 is a flowchart of a method for processing a domain name request according to Embodiment 22 of the present invention.
- FIG. 24 is a flowchart of a method for processing a domain name request by a DNS server according to Embodiment 22 of the present invention.
- FIG. 25 is a structural diagram of a device of a user equipment according to Embodiment 23 of the present invention.
- FIG. 26 is a structural diagram of a device of a user equipment according to Embodiment 24 of the present invention.
- FIG. 27 is a structural diagram of a device of a user equipment according to a twenty-fifth embodiment of the present invention.
- FIG. 1 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 1 of the present invention, including:
- the storage module 110 is configured to store configuration information.
- the receiving module 120 is configured to receive a domain name request from the user equipment and from the DNS (Domain Name System, Domain Name System) The response message from the server.
- DNS Domain Name System, Domain Name System
- the modification module 130 is configured to modify the domain name request received by the receiving module 120 according to the device type of the user equipment and the configuration information stored by the storage module 110.
- the sending module 140 is configured to send the modified domain name request to the DNS server, and send the response message received by the receiving module 120 to the user equipment.
- the receiving module 120 is further configured to receive an access request from the user equipment.
- the foregoing access gateway further includes:
- the distribution module 150 is configured to allocate a network address to the user equipment, and record a network address type of the user equipment.
- the determining module 160 is configured to determine a device type of the user equipment according to the network address type recorded by the allocating module 150.
- the determining module 160 is specifically configured to determine that the device type of the user equipment is an IPv4 device when the network address type of the user equipment is an IPv4 address, and determine the device of the user equipment when the network address type of the user equipment is an IPv6 address.
- the type is an IPv6 device.
- the network address type of the user equipment is a dual stack address, it is determined that the device type of the user equipment is a dual stack device.
- the sending module 140 is further configured to return, to the user equipment, a network address assigned by the allocation module 150 to the user equipment.
- the embodiment of the present invention provides an access gateway, which can modify the type of the domain name request according to the device type of the user equipment and the preset configuration information on the access gateway, so that the DNS server can sense the requesting intention of the user equipment, and
- the user equipment returns the A record and/or AAAA record required by the user equipment to adapt to the network condition, which reduces the blindness of the DNS response, avoids unnecessary query and operation of generating A record or AAAA record, and avoids unnecessary Network address translation operations reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 2 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 2 of the present invention, including:
- the storage module 210 is configured to store configuration information.
- the receiving module 220 is configured to receive a domain name request from the user equipment and a response message from the DNS server.
- the modification module 230 is configured to modify the domain name request received by the receiving module 220 according to the device type of the user equipment and the configuration information stored by the storage module 210.
- the sending module 240 is configured to send the modified domain name request to the DNS server, and send the response message received by the receiving module 220 to the user equipment.
- the storage module 210 includes:
- the first storage submodule 211 is configured to store first configuration information.
- the above modification module 230 includes:
- the first modification sub-module 231 is configured to: when the device type of the user equipment is an IPv4 device, according to the first configuration information stored by the first storage sub-module 211, the type of the domain name request is changed by the AAAA record priority request or the AAAA record request, and is modified. Request a priority for A record request or A record.
- the embodiment of the present invention provides an access gateway.
- the access gateway modifies the type of the domain name request according to the first configuration information, so that the DNS server can sense the requesting intention of the user equipment, and
- the user equipment returns the A record and/or AAAA record required by the user equipment to adapt to the network condition, which reduces the blindness of the DNS response, avoids unnecessary query and operation of generating A record or AAAA record, and avoids unnecessary Network address translation operations reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 3 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 3 of the present invention, including:
- the storage module 310 is configured to store configuration information.
- the receiving module 320 is configured to receive a domain name request from the user equipment.
- the modification module 330 is configured to modify the domain name request received by the receiving module 320 according to the device type of the user equipment and the configuration information stored by the storage module 310.
- the sending module 340 is configured to send the modified domain name request of the modifying module 330 to the DNS server.
- the storage module 310 includes:
- the second storage submodule 311 is configured to store second configuration information.
- the above modification module 330 includes:
- the second modification sub-module 331 is configured to: when the device type of the user equipment is an IPv4 device, according to the second configuration information stored by the second storage sub-module 321 , the type of the domain name request is recorded by the AAAA priority request or the AAAA record request. , modified to A record priority request.
- the embodiment of the present invention provides an access gateway.
- the access gateway modifies the type of the domain name request according to the second configuration information, so that the DNS server can sense the requesting intention of the user equipment, and
- the user equipment returns the A record and/or AAAA record required by the user equipment to adapt to the network condition, which reduces the blindness of the DNS response, avoids unnecessary query and operation of generating A record or AAAA record, and avoids unnecessary Network address translation operations reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 4 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 4 of the present invention, including:
- the storage module 410 is configured to store configuration information.
- the receiving module 420 is configured to receive a domain name request from the user equipment.
- the modification module 430 is configured to modify the domain name request received by the receiving module 420 according to the device type of the user equipment and the configuration information stored by the storage module 410.
- the sending module 440 is configured to send the modified domain name request of the modifying module 430 to the DNS server.
- the storage module 410 includes:
- a third storage submodule 411 configured to store third configuration information
- the above modification module 430 includes:
- the third modification sub-module 431 is configured to: when the device type of the user equipment is a dual-stack device, according to the third configuration information stored by the third storage sub-module 411, the type of the domain name request is requested by the A record priority request or the A record request, The AAAA record priority request is modified.
- the device type of the user equipment is an IPv6 device
- the domain name request is modified from the AAAA record priority request to the AAAA record request according to the third configuration information stored by the third storage submodule 411.
- the embodiment of the present invention provides an access gateway.
- the access gateway modifies the type of the domain name request according to the third configuration information, so that the DNS server can sense the requesting intention of the user equipment, and
- the user equipment returns the A record and/or AAAA record required by the user equipment to adapt to the network condition, which reduces the blindness of the DNS response, avoids unnecessary query and operation of generating A record or AAAA record, and avoids unnecessary Network address translation operations reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 5 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 5 of the present invention, including:
- the storage module 510 is configured to store configuration information.
- the receiving module 520 is configured to receive a domain name request from the user equipment.
- the modification module 530 is configured to modify the domain name request received by the receiving module 520 according to the device type of the user equipment and the configuration information stored by the storage module 510.
- the sending module 540 is configured to send the modified domain name request of the modifying module 530 to the DNS server.
- the storage module 510 includes:
- the fourth storage submodule 511 is configured to store fourth configuration information.
- the above modification module 530 includes:
- the fourth modification sub-module 531 is configured to: when the device type of the user equipment is a dual-stack device, modify the type of the domain name request by the A record priority request or the A record request according to the fourth configuration information stored by the fourth storage sub-module 511
- the priority request or the dual stack record request is recorded for the AAAA, or the type of the domain name request is modified from the AAAA record request to the AAAA record priority request.
- the embodiment of the present invention provides an access gateway.
- the access gateway modifies the type of the domain name request according to the fourth configuration information, so that the DNS server can sense the requesting intention of the user equipment, and thus can Returning the A record and/or AAAA record of the network condition required by the user equipment to the user equipment, reducing the blindness of the DNS response, avoiding unnecessary query and generating A record or AAAA record operation, avoiding unnecessary Network address translation operations reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 6 is a structural diagram of an apparatus for accessing a gateway according to Embodiment 6 of the present invention, which includes a processor 610, a communication interface 620, a memory 630, and a bus 640.
- the processor 610, the communication interface 620, and the memory 630 pass The bus 640 completes communication with each other;
- a communication interface 620 configured to communicate with a user equipment and a DNS server;
- a processor 610 configured to execute a program
- a memory 630 configured to store a program
- the program is configured to receive a domain name request from the user equipment and a response message from the DNS server, and modify the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, and modify the domain name request.
- the domain name request is sent to the DNS server, and the received response message is sent to the user equipment.
- the configuration information preset in the access gateway may be the first configuration information.
- the device type of the user equipment is an Internet Protocol version IPv4 device
- the above procedure is used to modify the type of the domain name request by an AAAA record priority request or an AAAA record request, to an A record request or an A record priority request.
- the configuration information preset in the access gateway may also be the second configuration information.
- the device type of the user equipment is an IPv4 device
- the above procedure is used to modify the type of the domain name request by an AAAA record priority request or an AAAA record request, to be an A record priority request.
- the configuration information preset in the access gateway may also be the third configuration information.
- the access gateway modifies the domain name request from an AAAA record priority request to an AAAA record request.
- the configuration information preset in the access gateway may also be the fourth configuration information.
- the foregoing program is configured to modify the type of the domain name request from an A record priority request or an A record request to an AAAA record priority request or a dual stack record request, or The type of the domain name request is modified from an AAAA record request to an AAAA record priority request.
- the embodiment of the present invention provides an access gateway, which can modify the type of the domain name request according to the device type of the user equipment and the preset configuration information on the access gateway, so that the DNS server can sense the requesting intention of the user equipment, and can
- the device returns the A record and/or AAAA record required by the user equipment to adapt to the network condition, which reduces the blindness of the DNS response, avoids unnecessary query and generates A record or AAAA record operation, and avoids unnecessary network.
- Address translation operations reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 7 is a structural diagram of a device of a DNS server according to Embodiment 7 of the present invention, including:
- the storage module 710 is configured to store configuration information.
- the receiving module 720 is configured to receive a domain name request from the access gateway.
- the processing module 730 is configured to respond to the domain name request according to the type of the domain name request received by the receiving module 720 and the configuration information stored by the storage module 710, and generate a response message according to the processing result;
- the sending module 740 is configured to send the response message generated by the processing module 730 to the user equipment.
- the type of the domain name request received by the receiving module 720 may be an A record request, and the storage module 710 may store the sixth configuration information.
- processing module 730 is specifically configured to perform the following operations:
- step A1 according to the A record corresponding to the domain name query included in the A record request, if the A record is queried, step A2 is performed; if the A record is not queried, step A3 is performed;
- A3 determining, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record, if not, executing step 1604; if so, executing step A5;
- A4. Generate a response message including the query failure information.
- step A5 according to the AAAA record corresponding to the domain name query included in the A record request, if the AAAA record is queried, step A6 is performed; if the AAAA record is not queried, step A7 is performed;
- A6 Generate a corresponding A record according to the queried AAAA record, and generate a response message including the generated A record.
- A7 Generate a response message containing the query failure information.
- the type of the domain name request received by the receiving module 720 may also be an AAAA record request, and the configuration information stored by the storage module 710 may also be the fifth configuration information.
- processing module 730 is specifically configured to perform the following operations:
- step B1 according to the AAAA record corresponding to the domain name query included in the AAAA record request, if the AAAA record is queried, step B2 is performed; if the AAAA record is not queried, step B3 is performed;
- step B5 according to the AAAA record request corresponding to the domain name query corresponding A record, if the A record is queried, step B6 is performed; if the A record is not queried, step B7 is performed;
- the type of the domain name request received by the receiving module 720 may also be an A record priority request
- processing module 730 is specifically configured to perform the following operations:
- step C1 according to the A record corresponding to the domain name query included in the priority request, if the A record is queried, step C2 is performed; if the A record is not queried, step C3 is performed;
- step C3 according to the AAAA record corresponding to the domain name query included in the A record priority request, if the AAAA record is queried, step C4 is performed; if the AAAA record is not queried, step C5 is performed;
- the type of the domain name request received by the receiving module 720 may also be an AAAA record priority request;
- processing module 730 is specifically configured to perform the following operations:
- step D1 according to the AAAA record corresponding to the domain name query included in the AAAA record, if the AAAA record is queried, step D2 is performed; if the AAAA record is not queried, step D3 is performed;
- step D4 is performed; if the A record is not queried, step D5 is performed.
- the type of the domain name request received by the receiving module 720 may also be a dual-stack recording request, and the configuration information stored by the storage module 710 may also be the seventh configuration information.
- processing module 730 is specifically configured to perform the following operations:
- step E1 Query the corresponding AAAA record and the A record according to the domain name included in the double-stack record request. If only the AAAA record is queried, step E2 is performed; if only the A record is queried, step E3 is performed; if no AAAA record is queried Or A record, step E4 is performed; if the AAAA record and the A record are queried, step E5 is performed;
- step E5 determining, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, if the A record is returned preferentially, step E6 is performed; if the AAAA record is returned preferentially, step E7 is performed;
- E7 Set the AAAA record that is queried to the resource record in the response message, and set the queried A record to the resource record in the response message.
- the embodiment of the present invention provides a DNS server, which can generate a response message according to the type of the domain name request and the configuration information on the DNS server, so that the user equipment can flexibly initiate different types of domain name requests, so that the DNS server can perceive the request of the user equipment.
- the willingness in turn, can return to the user equipment the A record and/or AAAA record required by the user equipment to adapt to the network condition, thereby reducing the blindness of the DNS response, avoiding unnecessary queries and generating A record or AAAA record operation. It avoids unnecessary network address translation operations and reduces the performance requirements for DNS servers and NAT servers.
- FIG. 8 is a structural diagram of a device of a DNS server according to Embodiment 8 of the present invention, including:
- a storage module 810 configured to store configuration information
- the receiving module 820 is configured to receive a domain name request from the access gateway.
- the processing module 830 is configured to respond to the domain name request according to the type of the domain name request received by the receiving module 820 and the configuration information stored by the storage module 810, and generate a response message according to the processing result;
- the sending module 840 is configured to send a response message generated by the processing module 830 to the user equipment.
- the storage module 810 includes:
- the first storage submodule 811 is configured to store sixth configuration information.
- the receiving module 820 includes:
- a first receiving submodule 821 configured to receive an A record request from the access gateway
- the processing module 830 includes:
- the first query sub-module 831 is configured to query the A record corresponding to the domain name query included in the A record request received by the first receiving submodule 821;
- the first determining sub-module 832 is configured to determine, according to the sixth configuration information, whether the DNS server has the function of generating an A record according to the AAAA record, when the first query sub-module 831 does not query the A record;
- the second query sub-module 833 is configured to: when the first determining sub-module 832 determines that the DNS server has the function of generating the A record according to the AAAA record, query the corresponding AAAA record according to the domain name included in the A record request;
- the first generating sub-module 834 is configured to generate a response message including the queried A record when the first query sub-module 831 queries the A record; and the first determining sub-module 832 determines that the DNS server does not have the AAAA record generated.
- the function of the A record, or the second query sub-module 833 does not query the AAAA record generates a response message containing the query failure information; when the second query sub-module 833 queries the AAAA record, generates a corresponding according to the queried AAAA record.
- the embodiment of the present invention provides a DNS server, which can generate a response message according to the type of the domain name request and the sixth configuration information on the DNS server, so that the user equipment can flexibly initiate different types of domain name requests, so that the user equipment can flexibly initiate the request.
- Different types of domain name requests enable the DNS server to sense the requesting intention of the user equipment, and thus can return the A record and/or the AAAA record required by the user equipment to the user equipment, thereby reducing the blindness of the DNS response and avoiding Unnecessary queries and operations to generate A records or AAAA records avoid unnecessary network address translation operations and reduce the performance requirements for DNS servers and NAT servers.
- FIG. 9 is a structural diagram of a device of a DNS server according to Embodiment 9 of the present invention, including:
- the storage module 910 is configured to store configuration information.
- the receiving module 920 is configured to receive a domain name request from the access gateway.
- the processing module 930 is configured to respond to the domain name request according to the type of the domain name request received by the receiving module 920 and the configuration information stored by the storage module 910, and generate a response message according to the processing result;
- the sending module 940 is configured to send the response message generated by the processing module 930 to the user equipment.
- the storage module 910 includes:
- a second storage submodule 911 configured to store fifth configuration information
- the receiving module 920 includes:
- a second receiving submodule 921 configured to receive an AAAA record request from the access gateway
- the processing module 930 includes:
- the third query sub-module 931 is configured to query, according to the AAAA record corresponding to the domain name included in the AAAA record request received by the second receiving sub-module 921;
- the second determining sub-module 932 is configured to determine, according to the fifth configuration information, whether the DNS server has the function of generating an AAAA record according to the A record, when the third query sub-module 931 does not query the AAAA record;
- the fourth query sub-module 933 is configured to: when the second determining sub-module 932 determines that the DNS server has the function of generating an AAAA record according to the A record, querying the A record corresponding to the domain name included in the AAAA record request;
- the second generation sub-module 934 is configured to: when the third query sub-module 931 queries the AAAA record, generate a response message including the queried AAAA record; and in the second determination sub-module 932, determine that the DNS server does not have the The function of generating the AAAA record is recorded, or the fourth query sub-module 933 does not query the A record, and generates a response message including the query failure information; when the fourth query sub-module 933 queries the A record, generates the A record according to the query. Corresponding AAAA records, and generate a response message containing the generated AAAA record.
- the embodiment of the present invention provides a DNS server, which can generate a response message according to the type of the domain name request and the fifth configuration information on the DNS server, so that the user equipment can flexibly initiate different types of domain name requests, so that the DNS server can sense the user equipment.
- the willingness to request in turn, can return to the user equipment the A record and/or AAAA record required by the user equipment to adapt to the network condition, reduce the blindness of the DNS response, avoid unnecessary query and generate A record or AAAA record.
- the operation avoids unnecessary network address translation operations and reduces the performance requirements for the DNS server and the NAT server.
- FIG. 10 is a structural diagram of a device for a DNS server according to Embodiment 10 of the present invention, including:
- the storage module 1010 is configured to store configuration information.
- the receiving module 1020 is configured to receive a domain name request from the access gateway.
- the processing module 1030 is configured to respond to the domain name request according to the type of the domain name request received by the receiving module 1020 and the configuration information stored by the storage module 1010, and generate a response message according to the processing result;
- the sending module 1040 is configured to send a response message generated by the processing module 1030 to the user equipment.
- the receiving module 1020 includes:
- a third receiving submodule 1021 configured to receive an A record priority request from the access gateway
- the processing module 1030 includes:
- the fifth query sub-module 1031 is configured to query, according to the A-record corresponding to the domain name query included in the A-record priority request, the AAAA record corresponding to the domain name included in the A-record priority request when the A record is not queried. ;
- the third generation sub-module 1032 is configured to: when the fifth query sub-module 1031 queries the A record, generate a response message including the queried A record; when the fifth query sub-module 1031 queries the AAAA record, A response message including the queried AAAA record is generated. When the fifth query sub-module 1031 does not query the AAAA record, a response message including the query failure information is generated.
- the embodiment of the present invention provides a DNS server, which enables the user equipment to flexibly initiate different types of domain name requests by using the type of the domain name request, so that the DNS server can sense the requesting intention of the user equipment, and thus can return the user equipment to the user equipment.
- a record and/or AAAA record adapted to network conditions, reducing the blindness of the DNS response, avoiding unnecessary queries and generating A records or AAAA records, avoiding unnecessary network address translation operations, and reducing Performance requirements for DNS servers and NAT servers.
- FIG. 11 is a structural diagram of a device of a DNS server according to Embodiment 11 of the present invention, which includes:
- the storage module 1110 is configured to store configuration information.
- the receiving module 1120 is configured to receive a domain name request from the access gateway.
- the processing module 1130 is configured to respond to the domain name request according to the type of the domain name request received by the receiving module 1120 and the configuration information stored by the storage module 1110, and generate a response message according to the processing result;
- the sending module 1140 is configured to send a response message generated by the processing module 1130 to the user equipment.
- the receiving module 1120 includes:
- a fourth receiving submodule 1121 configured to receive an AAAA record priority request from the access gateway
- the processing module 1130 includes:
- the sixth query sub-module 1131 is configured to: according to the AAAA record corresponding to the domain name query included in the AAAA record priority request received by the fourth receiving sub-module 1121, according to the AAAA record when no AAAA record is queried The A record corresponding to the domain name query included in the priority request;
- the fourth generation sub-module 1132 is configured to: when the sixth query sub-module 1131 queries the AAAA record, generate a response message including the queried AAAA record; when the sixth query sub-module 1131 queries the A record, A response message including the queried A record is generated; when the sixth query sub-module 1131 does not query the A record, a response message including the query failure information is generated.
- the embodiment of the present invention provides a DNS server, which can enable the user equipment to initiate different types of domain name requests flexibly by using the type of the domain name request, so that the user equipment can flexibly initiate different types of domain name requests, so that the DNS server can perceive the user equipment.
- the request will, in turn, be able to return to the user equipment the A record and/or AAAA record required by the user equipment to adapt to the network condition, reduce the blindness of the DNS response, avoid unnecessary query and generate A record or AAAA record operation. , avoid unnecessary network address translation operations, and reduce the performance requirements for DNS servers and NAT servers.
- FIG. 12 is a structural diagram of a device for a DNS server according to Embodiment 12 of the present invention, including:
- the storage module 1210 is configured to store configuration information.
- the receiving module 1220 is configured to receive a domain name request from the access gateway.
- the processing module 1230 is configured to respond to the domain name request according to the type of the domain name request received by the receiving module 1220 and the configuration information stored by the storage module 1210, and generate a response message according to the processing result;
- the sending module 1240 is configured to send the response message generated by the processing module 1230 to the user equipment.
- the storage module 1210 includes:
- the third storage submodule 1211 is configured to store seventh configuration information.
- the receiving module 1220 includes:
- a fifth receiving submodule 1221 configured to receive a dual stack recording request from the access gateway
- the processing module 1230 includes:
- the seventh query sub-module 1231 is configured to: according to the AAAA record and the A record corresponding to the domain name query included in the double-stack record request received by the fifth receiving sub-module 1221.
- the third determining sub-module 1232 is configured to determine, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, when the seventh query sub-module 1231 queries the AAAA record and the A record;
- the fifth generation sub-module 1233 is configured to generate a response message including the queried AAAA record when the seventh query sub-module 1231 only queries the AAAA record; and only query the A record in the seventh query sub-module 1231. And generating a response message including the queried A record; when the seventh query sub-module 1231 does not query the AAAA record or the A record, generating a response message including the query failure information; and in the third determining sub-module 1232
- the queried A record is set in the resource record in the response message, and the queried AAAA record is set in the resource record in the response message; in the third judgment
- the sub-module 1232 determines to return the AAAA record preferentially, sets the queried AAAA record to the resource record in the top of the response message, and sets the queried A record to the resource record in the response message.
- the embodiment of the present invention provides a DNS server, which can generate a response message according to the type of the domain name request and the seventh configuration information on the DNS server, so that the user equipment can flexibly initiate different types of domain name requests, so that the user equipment can flexibly initiate.
- Different types of domain name requests enable the DNS server to sense the requesting intention of the user equipment, and thus can return the A record and/or the AAAA record required by the user equipment to the user equipment, thereby reducing the blindness of the DNS response and avoiding Unnecessary queries and operations to generate A records or AAAA records avoid unnecessary network address translation operations and reduce the performance requirements for DNS servers and NAT servers.
- FIG. 13 is a structural diagram of a device for a DNS server according to Embodiment 13 of the present invention, which includes a processor 1310, a communication interface 1320, a memory 1330, and a bus 1340.
- the processor 1310 and the communication interface 1320 are provided.
- the memory 1330 completes communication with each other through the bus 1340;
- the communication interface 1320 is configured to communicate with a user equipment and an access gateway;
- the processor 1310 is configured to execute a program
- the memory 1330 is configured to store the program
- the program is configured to receive a domain name request from the access gateway, and respond to the domain name request according to the type of the domain name request and the configuration information preset in the DNS server, and generate a response according to the processing result.
- the response message is sent to the user equipment.
- the type of the domain name request received by the program may be an A record request, and the configuration information preset in the DNS server may be the sixth configuration information.
- the program is specifically configured to perform the following operations:
- step A1 according to the A record corresponding to the domain name query included in the A record request, if the A record is queried, step A2 is performed; if the A record is not queried, step A3 is performed;
- A3 determining, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record, if not, executing step 1604; if so, executing step A5;
- A4. Generate a response message including the query failure information.
- step A5 according to the AAAA record corresponding to the domain name query included in the A record request, if the AAAA record is queried, step A6 is performed; if the AAAA record is not queried, step A7 is performed;
- A6 Generate a corresponding A record according to the queried AAAA record, and generate a response message including the generated A record.
- A7 Generate a response message containing the query failure information.
- the type of the domain name request received by the program may also be an AAAA record request, and the configuration information preset in the DNS server may also be the fifth configuration information;
- the program is specifically configured to perform the following operations:
- step B1 according to the AAAA record corresponding to the domain name query included in the AAAA record request, if the AAAA record is queried, step B2 is performed; if the AAAA record is not queried, step B3 is performed;
- step B5 according to the AAAA record request corresponding to the domain name query corresponding A record, if the A record is queried, step B6 is performed; if the A record is not queried, step B7 is performed;
- the type of the domain name request received by the program may also be an A record priority request
- the program is specifically configured to perform the following operations:
- step C1 according to the A record corresponding to the domain name query included in the priority request, if the A record is queried, step C2 is performed; if the A record is not queried, step C3 is performed;
- step C3 according to the AAAA record corresponding to the domain name query included in the A record priority request, if the AAAA record is queried, step C4 is performed; if the AAAA record is not queried, step C5 is performed;
- the type of the domain name request received by the program may also be an AAAA record priority request;
- the program is specifically configured to perform the following operations:
- step D1 according to the AAAA record corresponding to the domain name query included in the AAAA record, if the AAAA record is queried, step D2 is performed; if the AAAA record is not queried, step D3 is performed;
- step D4 is performed; if the A record is not queried, step D5 is performed.
- the type of the domain name request received by the program may also be a dual-stack record request, and the configuration information preset in the DNS server may also be the seventh configuration information;
- the program is specifically configured to perform the following operations:
- step E1 Query the corresponding AAAA record and the A record according to the domain name included in the double-stack record request. If only the AAAA record is queried, step E2 is performed; if only the A record is queried, step E3 is performed; if no AAAA record is queried Or A record, step E4 is performed; if the AAAA record and the A record are queried, step E5 is performed;
- step E5 determining, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, if the A record is returned preferentially, step E6 is performed; if the AAAA record is returned preferentially, step E7 is performed;
- E7 Set the AAAA record that is queried to the resource record in the response message, and set the queried A record to the resource record in the response message.
- the embodiment of the present invention provides a DNS server, which can generate a response message according to the type of the domain name request and the configuration information on the DNS server, so that the user equipment can flexibly initiate different types of domain name requests, so that the DNS server can perceive the request of the user equipment.
- the willingness in turn, can return to the user equipment the A record and/or AAAA record required by the user equipment to adapt to the network condition, thereby reducing the blindness of the DNS response, avoiding unnecessary queries and generating A record or AAAA record operation. It avoids unnecessary network address translation operations and reduces the performance requirements for DNS servers and NAT servers.
- FIG. 14 is a flowchart of a method for processing a domain name request according to Embodiment 14 of the present invention, which includes the following steps:
- Step 1401 The user equipment initiates a domain name request to the access gateway.
- Step 1402 The access gateway modifies the domain name request according to the device type of the user equipment and the configuration information preset in the access gateway, and sends the modified domain name request to the domain name system DNS server.
- Step 1403 The DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, generates a response message according to the processing result, and sends the response message. To the user equipment.
- the configuration information preset in the access gateway may be the first configuration information.
- the access gateway changes the type of the domain name request by an AAAA record priority request or an AAAA record request to an A record request or an A record priority request. .
- the configuration information preset in the access gateway may also be the second configuration information.
- the access gateway modifies the type of the domain name request by an AAAA record priority request or an AAAA record request to the A record priority request.
- the configuration information preset in the access gateway may also be the third configuration information.
- the access gateway changes the type of the domain name request by an A record priority request or an A record request to an AAAA record priority request; if the user equipment device The type is an IPv6 device, and the access gateway modifies the domain name request from an AAAA record priority request to an AAAA record request.
- the configuration information preset in the access gateway may also be the fourth configuration information.
- the access gateway modifies the type of the domain name request from an A record priority request or an A record request to an AAAA record priority request or a dual stack record request, or And modifying the type of the domain name request from the AAAA record request to the AAAA record priority request.
- the type of the domain name request received by the DNS server may be an A record request, and the configuration information preset in the DNS server may be the sixth configuration information.
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding A record according to the domain name included in the A record request, if the A record is queried, step A2 is performed; if the A record is not queried, step A3 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server determines, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record, if not, executing step 1604; if so, executing step A5;
- the DNS server generates a response message including query failure information.
- the DNS server queries the corresponding AAAA record according to the domain name included in the A record request, if the AAAA record is queried, step A6 is performed; if the AAAA record is not queried, step A7 is performed;
- the DNS server generates a corresponding A record according to the queried AAAA record, and generates a response message including the generated A record.
- the DNS server generates a response message including the query failure information.
- the type of the domain name request received by the DNS server may also be an AAAA record request, and the configuration information preset in the DNS server may also be the fifth configuration information;
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record request, if the AAAA record is queried, step B2 is performed; if the AAAA record is not queried, step B3 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server determines, according to the fifth configuration information, whether it has the function of generating an AAAA record according to the A record, if not, executing step B4; if yes, executing step B5;
- the DNS server generates a response message that includes query failure information.
- the DNS server queries the corresponding A record according to the domain name included in the AAAA record request, if the A record is queried, step B6 is performed; if the A record is not queried, step B7 is performed;
- the DNS server generates a corresponding AAAA record according to the queried A record, and generates a response message including the generated AAAA record.
- the DNS server generates a response message that includes the query failure information.
- the type of the domain name request received by the DNS server may also be a priority request for the A record
- the DNS server responds to the received domain name request according to the type of the received domain name request, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding A record according to the domain name included in the A record priority request, if the A record is queried, step C2 is performed; if the A record is not queried, step C3 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server queries the corresponding AAAA record according to the domain name included in the A record priority request, if the AAAA record is queried, step C4 is performed; if the AAAA record is not queried, step C5 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server generates a response message including query failure information.
- the type of the domain name request received by the DNS server may also be a priority request for the AAAA record;
- the DNS server responds to the received domain name request according to the type of the received domain name request, and generates a response message according to the processing result, which specifically includes:
- the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record priority request, if the AAAA record is queried, step D2 is performed; if the AAAA record is not queried, step D3 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server queries the corresponding A record according to the domain name included in the AAAA record priority request. If the A record is queried, step D4 is performed; if the A record is not queried, step D5 is performed.
- the DNS server generates a response message including the queried A record.
- the DNS server generates a response message including query failure information.
- the type of the domain name request received by the DNS server may also be a dual-stack record request, and the configuration information preset in the DNS server may also be the seventh configuration information.
- the DNS server responds to the received domain name request according to the type of the received domain name request and the configuration information preset in the DNS server, and generates a response message according to the processing result, which specifically includes:
- step E1 The DNS server queries the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request. If only the AAAA record is queried, step E2 is performed; if only the A record is queried, step E3 is performed; If the AAAA record or the A record is queried, step E4 is performed; if the AAAA record and the A record are queried, step E5 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server generates a response message that includes the queried A record.
- the DNS server generates a response message that includes query failure information.
- the DNS server determines, according to the seventh configuration information, preferentially return an A record or an AAAA record to the user equipment, if the A record is returned in priority, step E6 is performed; if the AAAA record is returned in priority, step E7 is performed;
- the DNS server sets the queried A record to the resource record in the response message, and sets the queried AAAA record to the resource record in the response message;
- the DNS server sets the queried AAAA record to the resource record in the response message, and sets the queried A record to the resource record in the response message.
- the method further includes:
- the user equipment initiates an access request to the access gateway
- the access gateway allocates a network address to the user equipment, records a network address type of the user equipment, determines a device type of the user equipment according to the network address type, and returns a distribution to the user equipment The network address of the user device.
- the access gateway determines that the device type of the user equipment is an IPv4 device; when the network address type of the user equipment is an IPv6 address, The access gateway determines that the device type of the user equipment is an IPv6 device. When the network address type of the user equipment is a dual stack address, the access gateway determines that the device type of the user equipment is a dual stack device.
- the embodiment of the invention provides a method for processing a domain name request, which can modify the type of the domain name request and modify the type of the domain name request according to the device type of the user equipment and the preset configuration information on the access gateway, so that the user equipment can flexibly initiate the request.
- Different types of domain name requests enable the DNS server to sense the requesting intention of the user equipment, and thus can return the A record and/or the AAAA record required by the user equipment to the user equipment, thereby reducing the blindness of the DNS response and avoiding Unnecessary queries and operations to generate A records or AAAA records avoid unnecessary network address translation operations and reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 15 is a flowchart of a method for processing a domain name request according to Embodiment 15 of the present invention, which includes the following steps:
- Step 1500 The user equipment sets preferred configuration information.
- the preferred configuration information may be A record preference information, AAAA record preference information, or any preferred information.
- Step 1501 The user equipment initiates an access request to the access gateway.
- the user equipment is a device with network access capability, for example, a computer, a mobile phone, or the like, which can access the network;
- the access gateway may be a router, a firewall, or a BRAS (Broadband) Remote Access Server, Broadband Remote Access Server, Firewall, GGSN (Gateway GPRS Support) Node, Gateway GPRS Support Node), P-GW (Packet Data Network Gateway), PDSN (Packet Data) Serving Node, packet data service node) or S-GW (Serving GateWay, service gateway) and other devices.
- Step 1502 The access gateway allocates a network address to the user equipment, records a network address type of the user equipment, and determines a device type of the user equipment according to the network address type.
- the access gateway may directly allocate a network address to the user equipment, or may be used as a proxy of the user equipment to access a server having a network address allocation function, and obtain a network address allocated by the server to the user equipment.
- the network address type of the user equipment may be an IPv4 address, an IPv6 address, or a dual-stack address (ie, an IPv4 address + an IPv6 address).
- the access gateway determines the user equipment.
- the device type is an IPv4 device.
- the access gateway determines that the device type of the user device is an IPv6 device.
- the access gateway determines the user.
- the device type of the device is a dual stack device.
- Step 1503 The access gateway returns a network address assigned to the user equipment to the user equipment.
- step 1504 the user equipment determines its own device type according to the network address assigned to itself.
- Step 1505 The user equipment initiates a domain name request to the access gateway.
- the domain name request initiated by the user equipment may include the domain name of the application server that the user equipment needs to access, and the application server has an IPv4 address or an IPv6 address corresponding to the domain name.
- the type of the domain name request initiated by the user equipment may be any one of an A record request, an AAAA record request, an A record priority request, an AAAA record priority request, or a dual stack record request, and the dual stack record request is used to simultaneously request from the DNS server.
- a record and AAAA record may be any one of an A record request, an AAAA record request, an A record priority request, an AAAA record priority request, or a dual stack record request, and the dual stack record request is used to simultaneously request from the DNS server.
- Step 1506 The access gateway modifies the received domain name request according to the device type of the user equipment that initiates the domain name request and the configuration information preset in the access gateway.
- the configuration information preset in the access gateway is configured according to actual network conditions, and may include one or more of the first configuration information, the second configuration information, the third configuration information, and the fourth configuration information.
- the first configuration configuration information is used to restrict the IPv4 address from being accessed by the IPv4 device
- the second configuration information is applicable to the case where the IPv4 address is dominant, and the server in the network does not have an IPv6 address
- the third configuration information is applicable to the IPv6 address. If the server in the network does not have an IPv4 address, the fourth configuration information is applicable to the case where the IPv6 address is dominant, and a small number of servers in the network have an IPv4 address.
- the access gateway modifies the AAAA record priority request or the AAAA record request initiated by the user equipment to the A record request or A records priority requests;
- the access gateway modifies the AAAA record priority request or the AAAA record request initiated by the user equipment to the A record priority request.
- the access gateway modifies the A record priority request or the A record request initiated by the user equipment to the AAAA record priority request;
- the device type of the user equipment is an IPv6 device, and the access gateway modifies the AAAA record priority request initiated by the user equipment to an AAAA record request.
- the access gateway modifies the A record priority request or the A record request initiated by the user equipment to the AAAA record priority request or the dual stack. The request is recorded, and the AAAA record request initiated by the user equipment is modified to an AAAA record priority request.
- Step 1507 The access gateway sends the modified domain name request to the DNS server.
- Step 1508 The DNS server responds to the received domain name request according to the type of the received domain name request and the pre-configured configuration information, and generates a response message according to the processing result.
- the configuration information preset in the DNS server may include the fifth configuration information, the sixth configuration information, and the seventh configuration information, where the fifth configuration information is used to identify whether the DNS server has the AAAA record generated according to the A record, and the sixth configuration information is used.
- the seventh configuration information is used to identify that the A-record or the AAAA record is preferentially returned to the dual-stack device when receiving the dual-stack request from the dual-stack device.
- the response message may include an A record, or may include an AAAA record, or may include both an A record and an AAAA record, and may also include query failure information.
- Step 1509 The DNS server sends a response message to the user equipment.
- Step 1510 The user equipment initiates an access request to the application server according to the preferred configuration information and the response message.
- the user equipment may initiate an access request to the application server according to the A record included in the response message.
- the configuration information is AAAA record preference information
- the user equipment may include the response message.
- the AAAA record is used to initiate an access request to the application server.
- the configuration information is any preferred information
- the user equipment can initiate an access request to the application server according to the A record or the AAAA record included in the response message.
- the NAT server in the network can The packets between the application servers are translated between the IPv4 packets and the IPv6 packets.
- the NAT server can be deployed independently or on the same device as the access gateway.
- step 1508 can be refined into a flowchart as shown in FIG. 16, and includes the following steps:
- Step 1601 the DNS server determines the type of the received domain name request, if it is an A record request, step 1602 is performed; if it is an AAAA record request, step 1609 is performed; if it is an A record priority request, step 1616 is performed; If it is an AAAA record priority request, step 1621 is performed; if it is a double stack record request, step 1626 is performed.
- Step 1602 the DNS server queries the corresponding A record according to the domain name included in the A record request, if the A record is queried, step 1603 is performed; if the A record is not queried, step 1604 is performed;
- step 1603 the DNS server generates a response message including the queried A record.
- Step 1604 the DNS server determines, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record. If not, step 1605 is performed; if yes, step 1606 is performed.
- step 1605 the DNS server generates a response message including the query failure information.
- step 1606 the DNS server queries the corresponding AAAA record according to the domain name included in the A record request. If the AAAA record is queried, step 1607 is performed. If the AAAA record is not queried, step 1608 is performed.
- Step 1607 The DNS server generates a corresponding A record according to the queried AAAA record, and generates a response message including the generated A record.
- Step 1608 the DNS server generates a response message containing the query failure information.
- Step 1609 the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record request, if the AAAA record is queried, step 1610 is performed; if the AAAA record is not queried, step 1611 is performed;
- step 1610 the DNS server generates a response message including the queried AAAA record.
- Step 1611 The DNS server determines, according to the fifth configuration information, whether it has the function of generating an AAAA record according to the A record. If not, executing step 1612; if yes, executing step 1613.
- step 1612 the DNS server generates a response message containing the query failure information.
- step 1613 the DNS server queries the corresponding A record according to the domain name included in the AAAA record request. If the A record is queried, step 1614 is performed. If the A record is not queried, step 1615 is performed.
- Step 1614 The DNS server generates a corresponding AAAA record according to the queried A record, and generates a response message including the generated AAAA record.
- step 1615 the DNS server generates a response message containing the query failure information.
- Step 1616 the DNS server queries the corresponding A record according to the domain name included in the A record priority request, if the A record is queried, step 1617 is performed; if the A record is not queried, step 1618 is performed;
- step 1617 the DNS server generates a response message including the queried A record.
- step 1618 the DNS server queries the corresponding AAAA record according to the domain name included in the A record priority request. If the AAAA record is queried, step 1619 is performed. If the AAAA record is not queried, step 1620 is performed.
- step 1619 the DNS server generates a response message containing the queried AAAA record.
- step 1620 the DNS server generates a response message containing the query failure information.
- Step 1621 the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record priority request, if the AAAA record is queried, step 1622 is performed; if the AAAA record is not queried, step 1623 is performed;
- step 1622 the DNS server generates a response message containing the queried AAAA record.
- step 1623 the DNS server queries the corresponding A record according to the domain name included in the AAAA record priority request. If the A record is queried, step 1624 is performed. If the A record is not queried, step 1625 is performed.
- step 1624 the DNS server generates a response message containing the queried A record.
- step 1625 the DNS server generates a response message containing the query failure information.
- step 1626 the DNS server queries the corresponding AAAA record and the A record according to the domain name included in the double stack record request. If only the AAAA record is queried, step 1627 is performed; if only the A record is queried, step 1628 is performed; if there is no query To the AAAA record or the A record, step 1629 is performed; if the AAAA record and the A record are queried, step 1630 is performed.
- step 1627 the DNS server generates a response message containing the queried AAAA record.
- step 1628 the DNS server generates a response message containing the queried A record.
- step 1629 the DNS server generates a response message containing the query failure information.
- step 1630 the DNS server determines whether to return the A record or the AAAA record preferentially to the user equipment according to the seventh configuration information. If the A record is returned preferentially, step 1631 is performed. If the AAAA record is returned preferentially, step 1632 is performed.
- step 1631 the DNS server sets the queried A record to the resource record in the response message, and sets the queried AAAA record to the resource record in the response message.
- step 1632 the DNS server sets the queried AAAA record to the resource record in the response message, and sets the queried A record to the resource record in the response message.
- the embodiment of the invention provides a method for processing a domain name request, which can modify the type of the domain name request and modify the type of the domain name request according to the device type of the user equipment and the preset configuration information on the access gateway, so that the user equipment can flexibly initiate the request.
- Different types of domain name requests enable the DNS server to sense the requesting intention of the user equipment, and thus can return the A record and/or the AAAA record required by the user equipment to the user equipment, thereby reducing the blindness of the DNS response and avoiding Unnecessary queries and operations to generate A records or AAAA records avoid unnecessary network address translation operations and reduce the performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 17 is a structural diagram of a device for a DNS server according to Embodiment 16 of the present invention, including:
- the storage module 1710 is configured to store configuration information.
- the receiving module 1720 is configured to receive a domain name request from the access gateway, where the domain name request includes a device type of the user equipment that initiates the domain name request;
- the processing module 1730 according to the type of the domain name request received by the receiving module 1720, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, the domain name Requesting a response processing, and generating a response message according to the processing result;
- the sending module 1740 is configured to send the response message generated by the processing module 1730 to the user equipment.
- the device type of the user equipment may be an IPv4 device, and the configuration information stored by the storage module 1710 may be the sixth configuration information.
- processing module 1730 is specifically configured to perform the following operations:
- step F1 according to the domain name request in the domain name request corresponding A record, if the A record is queried, step F2 is performed; if the A record is not queried, step F3 is performed;
- step F5 if the AAAA record is queried, step F6 is performed; if the AAAA record is not queried, step F7 is performed;
- the device type of the user equipment may also be an IPv6 device, and the configuration information stored by the storage module 1710 may also be the fifth configuration information.
- processing module 1730 is specifically configured to perform the following operations:
- step G1 according to the domain name request included in the domain name query corresponding AAAA record, if the AAAA record is queried, step G2 is performed; if the AAAA record is not queried, step G3 is performed;
- step G5 according to the domain name request in the domain name request corresponding to the A record, if the A record is queried, step G6 is performed; if the A record is not queried, step G7 is performed;
- G6 Generate a corresponding AAAA record according to the queried A record, and generate a response message including the generated AAAA record.
- G7 Generate a response message including the query failure information.
- the device type of the user equipment may also be a dual-stack device, and the configuration information stored by the storage module 1710 may also be the seventh configuration information.
- processing module 1730 is specifically configured to perform the following operations:
- step H1 the type of the domain name request is judged, if it is an A record request, step H2 is performed; if it is an AAAA record request, step H7 is performed; if it is a double stack record request, step H12 is performed;
- step H2 according to the A record corresponding to the domain name query included in the A record request, if the A record is queried, step H3 is performed; if the A record is not queried, step H4 is performed;
- step H4 according to the AAAA record corresponding to the domain name query included in the A record request, if the AAAA record is queried, step H5 is performed; if the AAAA record is not queried, step H6 is performed;
- step H7 according to the AAAA record corresponding to the domain name query included in the AAAA record request, if the AAAA record is queried, step H8 is performed; if the AAAA record is not queried, step H9 is performed;
- step H9 according to the AAAA record request corresponding domain name query corresponding A record, if the A record is queried, step H10 is performed; if the A record is not queried, step H11 is performed;
- step H12 Query the corresponding AAAA record and the A record according to the domain name included in the double-stack record request. If only the AAAA record is queried, step H13 is performed; if only the A record is queried, step H14 is performed; if the AAAA record is not queried Or A record, step H15 is performed; if the AAAA record and the A record are queried, step H16 is performed;
- step H16 determining, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, if the A record is returned preferentially, step H17 is performed; if the AAAA record is returned preferentially, step H18 is performed;
- H18 Set the AAAA record that is queried to the resource record in the top of the response message, and set the queried A record to the resource record in the response message.
- the embodiment of the present invention provides a DNS server, which can configure the device type of the user equipment in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment and adapt to the network.
- the A record and/or AAAA record of the situation reduces the blindness of the DNS response, avoids unnecessary queries and generates A records or AAAA records, avoids unnecessary network address translation operations, and reduces the DNS server and Performance requirements of the NAT server.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 18 is a structural diagram of a device for a DNS server according to Embodiment 17 of the present invention, including:
- the storage module 1810 is configured to store configuration information.
- the receiving module 1820 is configured to receive a domain name request from the access gateway, where the domain name request includes a device type of the user equipment that initiates the domain name request;
- the processing module 1830 according to the type of the domain name request received by the receiving module 1820, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, the domain name Requesting a response processing, and generating a response message according to the processing result;
- the sending module 1840 is configured to send the response message generated by the processing module 1830 to the user equipment.
- the device type of the user equipment included in the domain name request is an IPv4 device
- the foregoing storage module 1810 includes:
- the first storage submodule 1811 is configured to store sixth configuration information.
- the processing module 1830 includes:
- the first query sub-module 1831 is configured to query the corresponding A record according to the domain name included in the domain name request;
- the first determining sub-module 1832 is configured to determine, according to the sixth configuration information, whether the DNS server has a function of generating an A record according to the AAAA record, when the first query sub-module 1831 does not query the A record;
- the second query sub-module 1833 is configured to: when the first determining sub-module 1832 determines that the DNS server has the function of generating an A record according to the AAAA record, querying the corresponding AAAA record according to the domain name included in the domain name request;
- the first generating sub-module 1834 is configured to: when the first query sub-module 1831 queries the A record, generate a response message including the queried A record; and determine, at the first determining sub-module 1832, the DNS server If there is no function of generating an A record according to the AAAA record, or the second query sub-module 1833 does not query the AAAA record, generate a response message including the query failure information; when the second query sub-module 1833 queries the AAAA record And generating a corresponding A record according to the queried AAAA record, and generating a response message including the generated A record.
- the embodiment of the present invention provides a DNS server, which can configure the device type of the user equipment in the domain name request, so that the DNS server can sense the requesting intention of the IPv4 device, and then can return to the user equipment the A that is required by the user equipment to adapt to the network condition.
- Recording and/or AAAA records reduce the blindness of DNS responses, avoid unnecessary queries and generate A records or AAAA records, avoid unnecessary network address translation operations, and reduce the need for DNS servers and NAT servers. Performance requirements.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 19 is a structural diagram of a device for a DNS server according to Embodiment 18 of the present invention, including:
- the storage module 1910 is configured to store configuration information.
- the receiving module 1920 is configured to receive a domain name request from the access gateway, where the domain name request includes a device type of the user equipment that initiates the domain name request;
- the processing module 1930 according to the type of the domain name request received by the receiving module 1920, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, the domain name Requesting a response processing, and generating a response message according to the processing result;
- the sending module 1940 is configured to send the response message generated by the processing module 1930 to the user equipment.
- the device type of the user equipment included in the domain name request is an IPv6 device
- the storage module 1910 includes:
- a second storage submodule 1911 configured to store fifth configuration information
- the processing module 1930 includes:
- the third query sub-module 1931 is configured to query the corresponding AAAA record according to the domain name included in the domain name request;
- the second determining sub-module 1932 is configured to determine, according to the fifth configuration information, whether the DNS server has the function of generating an AAAA record according to the A record, when the third query sub-module 1931 does not query the AAAA record;
- the fourth query sub-module 1933 is configured to: when the second determining sub-module 1932 determines that the DNS server has the function of generating an AAAA record according to the A record, querying the corresponding A record according to the domain name included in the domain name request;
- a second generation sub-module 1934 configured to: when the third query sub-module 1931 queries the AAAA record, generate a response message including the queried AAAA record; and determine, at the second determination sub-module 1932, the DNS server When the AAAA record is not generated according to the A record, or the fourth query sub-module 1933 does not query the A record, a response message including the query failure information is generated; when the fourth query sub-module 1933 queries the A record And generating a corresponding AAAA record according to the queried A record, and generating a response message including the generated AAAA record.
- the embodiment of the present invention provides a DNS server, which can configure the device type of the user equipment in the domain name request, so that the DNS server can sense the requesting intention of the IPv6 device, and then can return to the user equipment the A required for the user equipment to adapt to the network condition.
- Recording and/or AAAA records reduce the blindness of DNS responses, avoid unnecessary queries and generate A records or AAAA records, avoid unnecessary network address translation operations, and reduce the need for DNS servers and NAT servers. Performance requirements.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 20 is a structural diagram of a device of a DNS server according to Embodiment 19 of the present invention, which includes:
- the receiving module 2020 is configured to receive a domain name request from the access gateway, where the domain name request includes a device type of the user equipment that initiates the domain name request;
- the processing module 2030 according to the type of the domain name request received by the receiving module 2020, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, the domain name Requesting a response processing, and generating a response message according to the processing result;
- the sending module 2040 is configured to send the response message generated by the processing module 2030 to the user equipment.
- the device type of the user equipment included in the domain name request is a dual stack device
- the storage module 2010 includes:
- the processing module 2030 includes:
- the third determining sub-module 2031 is configured to determine a type of the domain name request
- the fifth query sub-module 2032 is configured to: when the third determining sub-module 2031 determines that the type of the domain name request is an A-record request, query the corresponding A record according to the domain name included in the A-record request; When the A record is queried, the corresponding AAAA record is queried according to the domain name included in the A record request.
- the sixth query sub-module 2033 is configured to: when the third determining sub-module 2031 determines that the type of the domain name request is an AAAA record request, query the corresponding AAAA record according to the domain name included in the AAAA record request; When the AAAA record is queried, the corresponding A record is queried according to the domain name included in the AAAA record request.
- the seventh query sub-module 2034 is configured to: when the third determining sub-module 2031 determines that the type of the domain name request is a dual-stack recording request, query the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request. ;
- the fourth judging sub-module 2035 is configured to: when the seventh query sub-module 2034 queries the AAAA record and the A record, determine, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment;
- the third generation sub-module 2036 is configured to: when the fifth query sub-module 2032 queries the A record, generate a response message including the queried A record; when the fifth query sub-module 2032 queries the AAAA record, Generating a response message including the queried AAAA record; when the fifth query sub-module 2032 does not query the AAAA record, generating a response message including the query failure information;
- the sixth query sub-module 2033 queries the AAAA record, generates a response message including the queried AAAA record; when the sixth query sub-module queries the A record, generates a response message including the queried A record. And generating, when the sixth query submodule does not query the A record, generating a response message including the query failure information;
- the seventh query sub-module 2034 queries only the AAAA record, generates a response message including the queried AAAA record; when the seventh query sub-module 2034 only queries the A record, generates the A record that includes the query. a response message; when the seventh query sub-module 2034 does not query the AAAA record or the A record, generate a response message including the query failure information; and when the fourth determining sub-module 2035 determines to return the A record preferentially Setting the queried A record to the resource record in the top of the response message, and setting the queried AAAA record to the later resource record in the response message; in the fourth determining submodule 2035 When it is determined that the AAAA record is returned preferentially, the queried AAAA record is set to the resource record in the top of the response message, and the queried A record is set to the later resource record in the response message.
- the embodiment of the present invention provides a DNS server, which can configure the device type of the user equipment in the domain name request, so that the DNS server can sense the requesting intention of the dual-stack device, and then can return the user equipment to the user equipment and adapt to the network condition.
- a record and / or AAAA record reducing the blindness of DNS response, avoiding unnecessary queries and generating A record or AAAA record operation, avoiding unnecessary network address translation operations, reducing the DNS server and NAT server Performance requirements.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 21 is a structural diagram of a device for a DNS server according to Embodiment 20 of the present invention, which includes a processor 2110, a communication interface 2120, a memory 2130, and a bus 2140.
- the processor 2110 and the communication interface 2120 are provided.
- the memory 2130 completes communication with each other through the bus 2140;
- the communication interface 2120 is configured to communicate with a user equipment and an access gateway;
- the processor 2110 is configured to execute a program
- the memory 2130 is configured to store a program
- the program is configured to receive a domain name request from the access gateway, according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request. And responding to the domain name request, generating a response message according to the processing result, and sending the response message to the user equipment.
- the device type of the user equipment may be an IPv4 device
- the configuration information preset in the DNS server may be the sixth configuration information.
- the program is specifically configured to perform the following operations:
- step F1 according to the domain name request in the domain name request corresponding A record, if the A record is queried, step F2 is performed; if the A record is not queried, step F3 is performed;
- step F5 if the AAAA record is queried, step F6 is performed; if the AAAA record is not queried, step F7 is performed;
- the device type of the user equipment may also be an IPv6 device, and the configuration information preset in the DNS server may also be the fifth configuration information.
- the program is specifically configured to perform the following operations:
- step G1 according to the domain name request included in the domain name query corresponding AAAA record, if the AAAA record is queried, step G2 is performed; if the AAAA record is not queried, step G3 is performed;
- step G5 according to the domain name request in the domain name request corresponding to the A record, if the A record is queried, step G6 is performed; if the A record is not queried, step G7 is performed;
- G6 Generate a corresponding AAAA record according to the queried A record, and generate a response message including the generated AAAA record.
- G7 Generate a response message including the query failure information.
- the device type of the user equipment may also be a dual-stack device, and the configuration information preset in the DNS server may also be the seventh configuration information.
- the program is specifically configured to perform the following operations:
- step H1 the type of the domain name request is judged, if it is an A record request, step H2 is performed; if it is an AAAA record request, step H7 is performed; if it is a double stack record request, step H12 is performed;
- step H2 according to the A record corresponding to the domain name query included in the A record request, if the A record is queried, step H3 is performed; if the A record is not queried, step H4 is performed;
- step H4 according to the AAAA record corresponding to the domain name query included in the A record request, if the AAAA record is queried, step H5 is performed; if the AAAA record is not queried, step H6 is performed;
- step H7 according to the AAAA record corresponding to the domain name query included in the AAAA record request, if the AAAA record is queried, step H8 is performed; if the AAAA record is not queried, step H9 is performed;
- step H9 according to the AAAA record request corresponding domain name query corresponding A record, if the A record is queried, step H10 is performed; if the A record is not queried, step H11 is performed;
- step H12 Query the corresponding AAAA record and the A record according to the domain name included in the double-stack record request. If only the AAAA record is queried, step H13 is performed; if only the A record is queried, step H14 is performed; if the AAAA record is not queried Or A record, step H15 is performed; if the AAAA record and the A record are queried, step H16 is performed;
- step H16 determining, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, if the A record is returned preferentially, step H17 is performed; if the AAAA record is returned preferentially, step H18 is performed;
- H18 Set the AAAA record that is queried to the resource record in the top of the response message, and set the queried A record to the resource record in the response message.
- the embodiment of the present invention provides a DNS server, which can configure the device type of the user equipment in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment and adapt to the network.
- the A record and/or AAAA record of the situation reduces the blindness of the DNS response, avoids unnecessary queries and generates A records or AAAA records, avoids unnecessary network address translation operations, and reduces the DNS server and Performance requirements of the NAT server.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 22 is a flowchart of a method for processing a domain name request according to a twenty-first embodiment of the present invention, which includes the following steps:
- Step 2201 The user equipment initiates a domain name request to the access gateway according to its own device type.
- the domain name request includes the device type of the user equipment, and the device type of the user equipment may be included in the newly added field of the domain name request.
- step 2202 the access gateway forwards the domain name request to the DNS server.
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, generates a response message according to the processing result, and sends a response message. Give the user device.
- the device type of the user equipment may be an IPv4 device, and the configuration information preset in the DNS server may be the sixth configuration information.
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request, according to the processing.
- the result generates a response message, which specifically includes:
- the DNS server queries the corresponding A record according to the domain name included in the domain name request, if the A record is queried, step F2 is performed; if the A record is not queried, step F3 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server determines, according to the sixth configuration information, whether it has the function of generating an A record according to the AAAA record, if not, executing step F4; if yes, executing step F5;
- the DNS server generates a response message including query failure information.
- the DNS server queries the corresponding AAAA record according to the domain name included in the domain name request, if the AAAA record is queried, step F6 is performed; if the AAAA record is not queried, step F7 is performed;
- the DNS server generates a corresponding A record according to the queried AAAA record, and generates a response message including the generated A record.
- the DNS server generates a response message including query failure information.
- the device type of the user equipment may also be an IPv6 device, and the configuration information preset in the DNS server may also be the fifth configuration information.
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request.
- a response message is generated according to the processing result, and specifically includes:
- the DNS server queries the corresponding AAAA record according to the domain name included in the domain name request, if the AAAA record is queried, step G2 is performed; if the AAAA record is not queried, step G3 is performed;
- the DNS server generates a response message including the queried AAAA record.
- the DNS server determines, according to the fifth configuration information, whether it has the function of generating an AAAA record according to the A record, if not, executing step G4; if so, executing step G5;
- the DNS server generates a response message including query failure information.
- the DNS server queries the corresponding A record according to the domain name included in the domain name request, if the A record is queried, step G6 is performed; if the A record is not queried, step G7 is performed;
- the DNS server generates a corresponding AAAA record according to the queried A record, and generates a response message including the generated AAAA record.
- the DNS server generates a response message including the query failure information.
- the device type of the foregoing user equipment may also be a dual-stack device, and the configuration information preset in the DNS server may also be the seventh configuration information;
- the DNS server responds to the domain name request according to the type of the domain name request, the configuration information preset in the DNS server, and the device type of the user equipment included in the domain name request.
- a response message is generated according to the processing result, and specifically includes:
- the DNS server determines the type of the domain name request, if it is an A record request, step H2; if it is an AAAA record request, step H7; if it is a double stack record request, step H12;
- the DNS server queries the corresponding A record according to the domain name included in the A record request, if the A record is queried, step H3 is performed; if the A record is not queried, step H4 is performed;
- the DNS server generates a response message including the queried A record.
- the DNS server queries the corresponding AAAA record according to the domain name included in the A record request, if the AAAA record is queried, step H5 is performed; if the AAAA record is not queried, step H6 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server generates a response message that includes query failure information.
- the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record request, if the AAAA record is queried, step H8 is performed; if the AAAA record is not queried, step H9 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server queries the corresponding A record according to the domain name included in the AAAA record request, if the A record is queried, step H10 is performed; if the A record is not queried, step H11 is performed;
- the DNS server generates a response message that includes the queried A record.
- the DNS server generates a response message that includes query failure information.
- the DNS server queries the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request. If only the AAAA record is queried, step H13 is performed; if only the A record is queried, step H14 is performed; If the AAAA record or the A record is queried, step H15 is performed; if the AAAA record and the A record are queried, step H16 is performed;
- the DNS server generates a response message that includes the queried AAAA record.
- the DNS server generates a response message including the queried A record.
- the DNS server generates a response message that includes the query failure information.
- the DNS server determines, according to the seventh configuration information, preferentially returning the A record or the AAAA record to the user equipment, if the A record is returned preferentially, step H17 is performed; if the AAAA record is returned preferentially, step H18 is performed;
- the DNS server sets the queried A record to the resource record in the response message, and sets the queried AAAA record to the later resource record in the response message.
- the DNS server sets the queried AAAA record to the resource record in the top of the response message, and sets the queried A record to the later resource record in the response message.
- the method further includes:
- the user equipment initiates an access request to the access gateway
- the access gateway allocates a network address to the user equipment, and returns a network address allocated to the user equipment to the user equipment;
- the user equipment determines its own device type according to the network address.
- the user equipment determines its own device type according to the network address, specifically:
- the user equipment determines that its own device type is an IPv4 device; when the network address type is an IPv6 address, the user equipment determines that its own device type is an IPv6 device; When the network address type is a dual stack address, the user equipment determines that its own device type is a dual stack device.
- the embodiment of the present invention provides a method for processing a domain name request.
- the device type of the user equipment is configured in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment.
- a record and/or AAAA record adapted to the network condition reduces the blindness of the DNS response, avoids unnecessary query and operation of generating A record or AAAA record, avoids unnecessary network address translation operation, and reduces the pair. Performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 23 is a flowchart of a method for processing a domain name request according to Embodiment 22 of the present invention, which includes the following steps:
- step 2300 the user equipment sets preferred configuration information.
- the preferred configuration information may be A record preference information, AAAA record preference information, or any preferred information.
- Step 2301 The user equipment initiates an access request to the access gateway.
- the access gateway allocates a network address to the user equipment, records the network address type of the user equipment, and determines the device type of the user equipment according to the network address type.
- the access gateway may directly allocate a network address to the user equipment, or may be used as a proxy of the user equipment to access a server having a network address allocation function, and obtain a network address allocated by the server to the user equipment.
- the network address type of the user equipment may be an IPv4 address, an IPv6 address, or a dual-stack address (ie, an IPv4 address + an IPv6 address).
- the access gateway determines the user equipment.
- the device type is an IPv4 device.
- the access gateway determines that the device type of the user device is an IPv6 device.
- the access gateway determines the user.
- the device type of the device is a dual stack device.
- Step 2303 The access gateway returns a network address assigned to the user equipment to the user equipment.
- step 2304 the user equipment determines its own device type according to the network address assigned to itself.
- Step 2305 The user equipment initiates a domain name request to the access gateway according to its own device type.
- the domain name request initiated by the user equipment may include the device type of the user equipment and the domain name of the application server that the user equipment needs to access, and the application server has an IPv4 address or an IPv6 address corresponding to the domain name.
- the device type of the user equipment may be included in the newly added field of the domain name request by using the domain name extension tag.
- the type of the domain name request initiated by the user equipment may be any one of an A record request, an AAAA record request, or a dual stack record request.
- the dual stack record request is used to simultaneously request A records and AAAA records from the DNS server.
- Step 2306 The access gateway forwards the received domain name request to the DNS server.
- Step 2307 The DNS server responds to the received domain name request according to the type of the received domain name request and the pre-configured configuration information, and generates a response message according to the processing result.
- the configuration information preset in the DNS server may include the fifth configuration information, the sixth configuration information, and the seventh configuration information, where the fifth configuration information is used to identify whether the DNS server has the AAAA record generated according to the A record, and the sixth configuration information is used.
- the seventh configuration information is used to identify that the A-record or the AAAA record is preferentially returned to the dual-stack device when receiving the dual-stack request from the dual-stack device.
- the response message may include an A record, or may include an AAAA record, or may include both an A record and an AAAA record, and may also include query failure information.
- step 2308 the DNS server sends a response message to the user equipment.
- Step 2309 The user equipment initiates an access request to the application server according to the preferred configuration information and the response message.
- the user equipment may initiate an access request to the application server according to the A record included in the response message.
- the configuration information is AAAA record preference information
- the user equipment may include the response message.
- the AAAA record is used to initiate an access request to the application server.
- the configuration information is any preferred information
- the user equipment can initiate an access request to the application server according to the A record or the AAAA record included in the response message.
- the NAT server in the network can The packets between the application servers are translated between the IPv4 packets and the IPv6 packets.
- the NAT server can be deployed independently or on the same device as the access gateway.
- step 2307 can be refined into a flowchart as shown in FIG. 24, including the following steps:
- step 2401 the DNS server determines the device type included in the received domain name request. If it is an IPv4 device, step 2402 is performed; if it is an IPv6 device, step 2409 is performed; if it is a dual-stack device, step 2416 is performed.
- Step 2402 the DNS server queries the corresponding A record according to the domain name included in the domain name request, if the A record is queried, step 2403 is performed; if the A record is not queried, step 2404 is performed;
- Step 2403 The DNS server generates a response message including the queried A record.
- Step 2404 the DNS server determines, according to the sixth configuration information, whether it has the function of generating the A record according to the AAAA record. If not, the process proceeds to step 2405; if yes, the process proceeds to step 2406.
- step 2405 the DNS server generates a response message including the query failure information.
- step 2406 the DNS server queries the corresponding AAAA record according to the domain name included in the domain name request. If the AAAA record is queried, step 2407 is performed. If the AAAA record is not queried, step 2408 is performed.
- Step 2407 The DNS server generates a corresponding A record according to the queried AAAA record, and generates a response message including the generated A record.
- step 2408 the DNS server generates a response message including the query failure information.
- Step 2409 the DNS server queries the corresponding AAAA record according to the domain name included in the domain name request, if the AAAA record is queried, step 2410 is performed; if the AAAA record is not queried, step 2411 is performed;
- step 2410 the DNS server generates a response message including the queried AAAA record.
- Step 2411 The DNS server determines, according to the fifth configuration information, whether it has the function of generating an AAAA record according to the A record. If not, executing step 2412; if yes, executing step 2413.
- step 2412 the DNS server generates a response message containing the query failure information.
- step 2413 the DNS server queries the corresponding A record according to the domain name included in the domain name request. If the A record is queried, step 2414 is performed. If the A record is not queried, step 2415 is performed.
- Step 2414 The DNS server generates a corresponding AAAA record according to the queried A record, and generates a response message including the generated AAAA record.
- step 2415 the DNS server generates a response message containing the query failure information.
- step 2416 the DNS server determines the type of the domain name request. If it is an A record request, step 2417 is performed; if it is an AAAA record request, step 2422 is performed; if it is a double stack record request, step 2427 is performed.
- Step 2417 the DNS server queries the corresponding A record according to the domain name included in the A record request, if the A record is queried, step 2418 is performed; if the A record is not queried, step 2419 is performed;
- step 2418 the DNS server generates a response message including the queried A record.
- step 2419 the DNS server queries the corresponding AAAA record according to the domain name included in the A record request. If the AAAA record is queried, step 2420 is performed. If the AAAA record is not queried, step 2421 is performed.
- step 2420 the DNS server generates a response message including the queried AAAA record.
- step 2421 the DNS server generates a response message including the query failure information.
- Step 2422 the DNS server queries the corresponding AAAA record according to the domain name included in the AAAA record request, if the AAAA record is queried, step 2423 is performed; if the AAAA record is not queried, step 2424 is performed;
- step 2423 the DNS server generates a response message including the queried AAAA record.
- step 2424 the DNS server queries the corresponding A record according to the domain name included in the AAAA record request. If the A record is queried, step 2425 is performed. If the A record is not queried, step 2426 is performed.
- step 2425 the DNS server generates a response message including the queried A record.
- step 2426 the DNS server generates a response message containing the query failure information.
- step 2427 the DNS server queries the corresponding AAAA record and the A record according to the domain name included in the dual-stack record request. If only the AAAA record is queried, step 2428 is performed; if only the A record is queried, step 2429 is performed; To the AAAA record or the A record, step 2430 is performed; if the AAAA record and the A record are queried, step 2431 is performed.
- step 2428 the DNS server generates a response message containing the queried AAAA record.
- step 2429 the DNS server generates a response message including the queried A record.
- step 2430 the DNS server generates a response message containing the query failure information.
- Step 2431 The DNS server determines, according to the seventh configuration information, that the A record or the AAAA record is preferentially returned to the user equipment. If the A record is returned preferentially, step 2432 is performed; otherwise, step 2433 is performed.
- step 2432 the DNS server sets the queried A record to the resource record in the response message, and sets the queried AAAA record to the resource record in the response message.
- step 2433 the DNS server sets the queried AAAA record to the resource record in the response message, and sets the queried A record to the resource record in the response message.
- the embodiment of the present invention provides a method for processing a domain name request.
- the device type of the user equipment is configured in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment.
- a record and/or AAAA record adapted to the network condition reduces the blindness of the DNS response, avoids unnecessary query and operation of generating A record or AAAA record, avoids unnecessary network address translation operation, and reduces the pair. Performance requirements for DNS servers and NAT servers.
- the access gateway does not need to allocate domain name requests to different DNS servers for different types of user equipments, which reduces the configuration complexity and allocation processing complexity of the access gateway to allocate DNS servers, and facilitates network deployment.
- FIG. 25 is a structural diagram of a device of a user equipment according to a twenty-third embodiment of the present invention, including:
- the setting module 2510 is configured to set preferred configuration information.
- the first sending module 2520 is configured to initiate a domain name request to the access gateway.
- the domain name request initiated by the first sending module 2520 may include the device type of the user equipment and the domain name of the application server that the user equipment needs to access, and the application server has an IPv4 address or an IPv6 address corresponding to the domain name.
- the device type of the user equipment may be included in the newly added field of the domain name request by using the domain name extension tag.
- the type of the domain name request initiated by the first sending module 2520 may be an A record request, an AAAA record request, an A record priority request, and an AAAA record. Any one of a priority request or a dual stack record request for simultaneously requesting an A record and an AAAA record from a DNS server.
- the first receiving module 2530 is configured to receive a response message returned by the DNS server.
- the second sending module 2540 is configured to initiate an access request to the application server according to the preferred configuration information set by the setting module 2510 and the response message received by the first receiving module 2530.
- the above preferred configuration information may be A record preference information
- the setting module 2510 is configured to configure A record preference information.
- the second sending module 2540 is specifically configured to initiate an access request to the application server according to the A record included in the response message.
- the above preferred configuration information may also be AAAA record preference information
- the setting module 2510 is configured to configure AAAA record preference information.
- the second sending module 2540 is specifically configured to initiate an access request to the application server according to the AAAA record included in the response message.
- the above preferred configuration information may also be any preferred information
- the setting module 2510 is configured to configure any preferred information.
- the second sending module 2540 is specifically configured to initiate an access request to the application server according to the A record or the AAAA record included in the response message.
- the embodiment of the present invention provides a method for processing a domain name request.
- the device type of the user equipment is configured in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment.
- the A record and/or the AAAA record adapted to the network condition the user equipment initiates the access request by using the A record or the AAAA record according to the preset preferred configuration information, thereby reducing the blindness of the DNS response, avoiding unnecessary query and generating the A record.
- AAAA recorded operations avoiding unnecessary network address translation operations, reducing the performance requirements for DNS servers and NAT servers.
- FIG. 26 is a structural diagram of a device of a user equipment according to Embodiment 24 of the present invention, including:
- the setting module 2610 is configured to set preferred configuration information.
- the first sending module 2620 is configured to initiate a domain name request to the access gateway.
- the domain name request initiated by the first sending module 2620 may include the device type of the user equipment and the domain name of the application server that the user equipment needs to access, and the application server has an IPv4 address or an IPv6 address corresponding to the domain name.
- the device type of the user equipment may be included in the newly added field of the domain name request by using the domain name extension tag.
- the type of the domain name request initiated by the first sending module 2620 may be an A record request, an AAAA record request, an A record priority request, and an AAAA record. Any one of a priority request or a dual stack record request for simultaneously requesting an A record and an AAAA record from a DNS server.
- the first receiving module 2630 is configured to receive a response message returned by the DNS server.
- the second sending module 2640 is configured to initiate an access request to the application server according to the preferred configuration information set by the setting module 2610 and the response message received by the first receiving module 2630.
- the third sending module 2650 is configured to initiate an access request to the access gateway.
- the second receiving module 2660 is configured to receive a network address that is allocated by the access gateway to the user equipment.
- the determining module 2670 is configured to determine a device type of the user equipment according to the network address type received by the second receiving module 2660.
- the foregoing first sending module 2620 is specifically configured to initiate a domain name request to the access gateway according to the device type of the user equipment determined by the determining module 2680.
- the above preferred configuration information may be A record preference information
- the setting module 2610 is configured to configure the A record preference information.
- the second sending module 2640 is specifically configured to initiate an access request to the application server according to the A record included in the response message.
- the above preferred configuration information may also be AAAA record preference information
- the setting module 2610 is configured to configure AAAA record preference information.
- the second sending module 2640 is specifically configured to initiate an access request to the application server according to the AAAA record included in the response message.
- the above preferred configuration information may also be any preferred information
- the setting module 2610 is configured to configure any preferred information.
- the second sending module 2640 is specifically configured to initiate an access request to the application server according to the A record or the AAAA record included in the response message.
- the embodiment of the present invention provides a method for processing a domain name request.
- the device type of the user equipment is configured in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment.
- the A record and/or the AAAA record adapted to the network status the user equipment determines the device type according to the type of the network address allocated by the access gateway, and uses the A record or the AAAA record to initiate an access request according to the preset configuration information, which is reduced.
- the failure rate of DNS requests and the blindness of DNS responses avoid unnecessary queries and operations for generating A records or AAAA records, avoid unnecessary network address translation operations, and reduce the performance requirements for DNS servers and NAT servers.
- FIG. 27 is a structural diagram of a device of a user equipment according to Embodiment 25 of the present invention, which includes a processor 2710, a communication interface 2720, a memory 2730, and a bus 2740.
- the processor 2710 and the communication interface 2720 are provided.
- the memory 2730 completes communication with each other through the bus 2740;
- the communication interface 2720 is configured to communicate with an access gateway, a DNS server, and an application server;
- the processor 2710 is configured to execute a program
- the memory 2730 is configured to store the program
- the program is configured to set a preferred configuration information, initiate a domain name request to the access gateway, receive a response message returned by the DNS server, and initiate the message to the application server according to the preferred configuration information and the response message. Access request.
- the program may initiate an access request to the application server according to the A record included in the response message; when the configuration information is AAAA record preference information, the program may be based on the response message.
- the AAAA record included in the AAAA record is used to initiate an access request to the application server.
- the configuration information is any preferred information, the program may initiate an access request to the application server according to the A record or the AAAA record included in the response message.
- the program may further initiate an access request to the access gateway, receive a network address allocated by the access gateway to the user equipment, and determine a device type of the user equipment according to the network address type.
- the embodiment of the present invention provides a method for processing a domain name request.
- the device type of the user equipment is configured in the domain name request, so that the DNS server can sense the requesting intention and the device type of the user equipment, and then can return the user equipment to the user equipment.
- the A record and/or the AAAA record adapted to the network condition the user equipment initiates the access request by using the A record or the AAAA record according to the preset preferred configuration information, thereby reducing the blindness of the DNS response, avoiding unnecessary query and generating the A record.
- AAAA recorded operations avoiding unnecessary network address translation operations, reducing the performance requirements for DNS servers and NAT servers.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种处理域名请求的方法及设备,通过扩展域名请求的类型或者在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿或设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
Description
本发明属于通信领域,尤其涉及一种处理域名请求的方法及设备。
随着互联网技术的发展,IPv4(Internet Protocol version
4,互联网协议版本4)地址已经耗尽,越来越多的用户迁移到IPv6(Internet Protocol version
6,互联网协议版本6)网络中。然而,由于历史原因,接入到网络中的用户设备可能是具备IPv4地址的IPv4设备,也可能是具备IPv6地址的IPv6设备,还可能是同时具备IPv4地址和IPv6地址的双栈设备;同时地,网络侧既包含具备IPv6地址的IPv6服务器,也存在大量的、仅具备IPv4地址而没有IPv6地址的IPv4服务器。
为了实现IPv6设备对IPv4服务器的访问,可在网络中部署NAT64(Network Address
Translation:IPv6 to IPv4,IPv6到IPv4的网络地址转换)服务器和DNS64(Domain Name System for
NAT64,NAT64的域名系统)服务器,DNS64服务器和NAT64服务器上均配置有IPv6前缀。
相应地,IPv6设备访问IPv4服务器时,发送域名请求到DNS64服务器,请求IPv4服务器的IPv6地址,该域名请求为AAAA记录请求;DNS64服务器根据接收到的AAAA记录请求中包含的域名,查询与该域名对应的AAAA记录(即IPv6地址);由于IPv6设备访问的IPv4服务器没有IPv6地址,DNS64服务器查询不到AAAA记录,接着查询与上述域名对应的A记录(即IPv4地址),根据查询到的A记录和预先配置的IPv6前缀生成一个AAAA记录,并将该AAAA记录返回给IPv6设备;IPv6设备根据接收到的AAAA记录生成IPv6报文,并将该IPv6报文发送给NAT64服务器;NAT64服务器根据预先配置的IPv6前缀将接收到的IPv6报文转换为对应的IPv4报文,将转换得到的IPv4报文转发给IPv4服务器,并在接收到来自IPv4服务器的IPv4报文后,将该IPv4报文转换为IPv6报文,并将转换得到IPv6报文转发给IPv6设备,从而实现IPv6设备对IPv4服务器的访问。
同样地,为了实现IPv4设备对IPv6服务器的访问,可在网络中部署NAT46(Network
Address Translation:IPv4 to IPv6,IPv4到IPv6的网络地址转换)服务器和DNS46(Domain Name System
for NAT46,NAT46的域名系统)服务器,DNS46服务器和NAT46服务器上均配置有IPv6前缀。
相应地,IPv4设备访问IPv6服务器时,发送域名请求到DNS46服务器,请求IPv6服务器的IPv4地址,该域名请求为A记录请求;DNS46服务器根据接收到的A记录请求中包含的域名,查询与该域名对应的A记录;由于IPv4设备访问的IPv6服务器没有IPv4地址,DNS46服务器查询不到A记录后,接着查询与上述域名对应的AAAA记录,根据查询到的AAAA记录和预先配置的IPv6前缀生成一个A记录,并将该A记录返回给IPv4设备;IPv4设备根据接收到的A记录生成IPv4报文,并将该IPv4报文发送给NAT46服务器;NAT46服务器根据预先配置的IPv6前缀将接收到的IPv4报文转换为对应的IPv6报文,将转换得到的IPv6报文转发给IPv6服务器,并在接收到来自IPv6服务器的IPv6报文后,将该IPv6报文转换为IPv4报文,并将转换得到IPv4报文转发给IPv4设备,从而实现IPv4设备对IPv6服务器的访问。
现有技术中,可以将DNS64服务器和DNS46服务器的功能集成到普通的DNS服务器中,也可以在网络中部署独立的DNS服务器、DNS64服务器和DNS46服务器。
由于DNS协议的限制,用户设备在接入过程中发起的域名请求仅包含A记录请求或AAAA记录请求两种该类型,DNS64服务器只能根据与域名请求中的域名对应的查询结果以及本地配置确定返回原始的AAAA记录或生成的AAAA记录,DNS46服务器只能根据与域名请求中的域名对应的查询结果以及本地配置确定返回原始的A记录或生成的A记录。
当同时具备IPv4地址和IPv6地址的用户设备针对IPv4服务器发起AAAA记录请求时,DNS64服务器会向该用户设备返回根据IPv6前缀生成的AAAA记录,用户设备使用该AAAA记录访问网络,导致DNS64服务器盲目地执行不必要的、查询和生成AAAA记录的操作,以及NAT64服务器盲目地执行不必要的网络地址转换操作,对DNS64服务器和NAT64服务器的提出了更高的性能需求。
类似地,当同时具备IPv4地址和IPv6地址的用户设备针对IPv6服务器发起A记录请求时,DNS46服务器会向该用户设备返回根据IPv6前缀生成的A记录,用户设备使用该A记录访问网络时,导致DNS46服务器盲目地执行不必要的、查询和生成A记录的操作,以及NAT46服务器盲目地执行不必要的网络地址转换操作,对DNS46服务器和NAT46服务器的提出了更高的性能需求。
本发明实施例的目的在于提供一种处理域名请求的方法及设备,以解决现有技术中盲目查询和生成A记录和AAAA记录,以及盲目地执行不必要的网络地址转换的缺陷。
本发明实施例提供了一种接入网关,包括:
存储模块,用于存储配置信息;
接收模块,用于接收来自用户设备的域名请求和来自域名系统DNS服务器的应答消息;
修改模块,用于根据所述用户设备的设备类型以及所述存储模块存储的配置信息,对所述接收模块接收到的域名请求进行修改;
发送模块,用于将所述修改模块修改后的域名请求发送给所述DNS服务器,将所述应答消息发送给所述用户设备。
优选地,所述存储模块,包括:
第一存储子模块,用于存储第一配置信息;
所述修改模块,包括:
第一修改子模块,用于当所述用户设备的设备类型为互联网协议版本IPv4设备时,根据所述第一存储子模块存储的第一配置信息,将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
优选地,所述存储模块,包括:
第二存储子模块,用于存储第二配置信息;
所述修改模块,包括:
第二修改子模块,用于当所述用户设备的设备类型为IPv4设备时,根据所述第二存储子模块存储的第二配置信息,将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
优选地,所述存储模块,包括:
第三存储子模块,用于存储第三配置信息;
所述修改模块,包括:
第三修改子模块,用于当所述用户设备的设备类型为双栈设备时,根据所述第三存储子模块存储的第三配置信息,将所述域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;
当所述用户设备的设备类型为IPv6设备时,根据所述第三存储子模块存储的第三配置信息,将所述域名请求由AAAA记录优先请求修改为AAAA记录请求。
优选地,所述存储模块,包括:
第四存储子模块,用于存储第四配置信息;
所述修改模块,包括:
第四修改子模块,用于当所述用户设备的设备类型为双栈设备时,根据所述第四存储子模块存储的第四配置信息,将所述域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将所述域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
优选地,所述接收模块,还用于接收来自所述用户设备的接入请求;
所述接入网关,还包括:
分配模块,用于为所述用户设备分配网络地址,记录所述用户设备的网络地址类型;
确定模块,用于根据所述分配模块记录的所述网络地址类型确定所述用户设备的设备类型;
所述发送模块,还用于向所述用户设备返回所述分配模块分配给所述用户设备的网络地址。
优选地,所述确定模块,具体用于当所述用户设备的网络地址类型为IPv4地址时,确定所述用户设备的设备类型为IPv4设备;
当所述用户设备的网络地址类型为IPv6地址时,确定所述用户设备的设备类型为IPv6设备;
当所述用户设备的网络地址类型为双栈地址时,确定所述用户设备的设备类型为双栈设备。
本发明实施例还提供了一种接入网关,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;
所述通信接口,用于与用户设备和域名系统DNS服务器进行通信;
所述处理器,用于执行程序;
所述存储器,用于存放所述程序;
其中,所述程序用于接收来自所述用户设备的域名请求和来自域名系统DNS服务器的应答消息,根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,并将修改后的域名请求发送给所述DNS服务器,将所述应答消息发送给所述用户设备。
本发明实施例还提供了一种域名系统DNS服务器,包括:
存储模块,用于存储配置信息;
接收模块,用于接收来自接入网关的域名请求;
处理模块,用于根据所述接收模块接收到的域名请求的类型和所述配置信息,对所述域名请求进行处理。
优选地,所述处理模块,具体用于根据所述接收模块接收到的域名请求的类型和所述配置信息,对所述域名请求进行应答处理,根据处理结果生成应答消息;
所述DNS服务器,还包括:
发送模块,用于将所述处理模块生成的所述应答消息发送给用户设备。
优选地,所述存储模块,包括:
第一存储子模块,用于存储第六配置信息;
所述接收模块,包括:
第一接收子模块,用于接收来自所述接入网关的A记录请求;
所述处理模块,包括:
第一查询子模块,用于根据所述第一接收子模块接收到的所述A记录请求中包含的域名查询对应的A记录;
第一判断子模块,用于在所述第一查询子模块没有查询到A记录时,根据所述第六配置信息判断所述DNS服务器是否具备根据AAAA记录生成A记录的功能;
第二查询子模块,用于在所述第一判断子模块判断出所述DNS服务器具备根据AAAA记录生成A记录的功能时,根据所述A记录请求中包含的域名查询对应的AAAA记录;
第一生成子模块,用于在所述第一查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第一判断子模块判断出所述DNS服务器不具备根据AAAA记录生成A记录的功能,或者所述第二查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在所述第二查询子模块查询到AAAA记录时,根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息。
优选地,所述存储模块,包括:
第二存储子模块,用于存储第五配置信息;
所述接收模块,包括:
第二接收子模块,用于接收来自所述接入网关的AAAA记录请求;
所述处理模块,包括:
第三查询子模块,用于根据所述第二接收子模块接收到的所述AAAA记录请求中包含的域名查询对应的AAAA记录;
第二判断子模块,用于在所述第三查询子模块没有查询到AAAA记录时,根据所述第五配置信息判断所述DNS服务器是否具备根据A记录生成AAAA记录的功能;
第四查询子模块,用于在所述第二判断子模块判断出所述DNS服务器具备根据A记录生成AAAA记录的功能时,根据所述AAAA记录请求中包含的域名查询对应的A记录;
第二生成子模块,用于在所述第三查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第二判断子模块判断出所述DNS服务器不具备根据A记录生成AAAA记录的功能,或者所述第四查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;在所述第四查询子模块查询到A记录时,根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息。
优选地,所述接收模块,包括:
第三接收子模块,用于接收来自所述接入网关的A记录优先请求;
所述处理模块,包括:
第五查询子模块,用于根据所述A记录优先请求中包含的域名查询对应的A记录,在没有查询到A记录时,根据所述A记录优先请求中包含的域名查询对应的AAAA记录;
第三生成子模块,用于在所述第五查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第五查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第五查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息。
优选地,所述接收模块,包括:
第四接收子模块,用于接收来自所述接入网关的AAAA记录优先请求;
所述处理模块,包括:
第六查询子模块,用于根据所述第四接收子模块接收到的所述AAAA记录优先请求中包含的域名查询对应的AAAA记录,在没有查询到AAAA记录时,根据所述AAAA记录优先请求中包含的域名查询对应的A记录;
第四生成子模块,用于在所述第六查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第六查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第六查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息。
优选地,所述存储模块,包括:
第三存储子模块,用于存储第七配置信息;
所述接收模块,包括:
第五接收子模块,用于接收来自所述接入网关的双栈记录请求;
所述处理模块,包括:
第七查询子模块,用于根据所述第五接收子模块接收到的所述双栈记录请求中包含的域名查询对应的AAAA记录和A记录;
第三判断子模块,用于在所述第七查询子模块查询到AAAA记录和A记录时,根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录;
第五生成子模块,用于在所述第七查询子模块仅查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第七查询子模块仅查询到A记录时,生成包含查询到的A记录的应答消息;在所述第七查询子模块没有查询到AAAA记录或A记录时,生成包含查询失败信息的应答消息;在所述第三判断子模块判断出优先返回A记录时,将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;在所述第三判断子模块判断出优先返回AAAA记录,将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
本发明实施例还提供了一种域名系统DNS服务器,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;
所述通信接口,用于与用户设备和接入网关进行通信;
所述处理器,用于执行程序;
所述存储器,用于存放所述程序;
其中,所述程序用于接收来自所述接入网关的域名请求,根据所述域名请求的类型以及所述DNS服务器中预置的配置信息,对所述域名请求进行处理。
本发明实施例还提供了一种处理域名请求的方法,包括以下步骤:
用户设备向接入网关发起域名请求;
所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,并将修改后的域名请求发送给域名系统DNS服务器;
所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行处理。
优选地,所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行处理,具体为:
所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息;
所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行处理之后,还包括:
所述DNS服务器将所述应答消息发送给所述用户设备。
优选地,所述用户设备向接入网关发起域名请求之前,还包括:
所述用户设备设置优选配置信息;
所述用户设备接收所述DNS服务器返回的应答消息之后,还包括:
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求。
优选地,所述优选配置信息为A记录优选信息;
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:
所述用户设备根据所述应答消息中包含的A记录,向所述应用服务器发起访问请求。
优选地,所述优选配置信息为AAAA记录优选信息;
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:
所述用户设备根据所述应答消息中包含的AAAA记录,向所述应用服务器发起访问请求。
优选地,所述优选配置信息为任意优选信息;
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:
所述用户设备根据所述应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
优选地,所述接入网关中预置的配置信息为第一配置信息;
所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:
如果所述用户设备的设备类型为互联网协议版本IPv4设备,所述接入网关将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
优选地,所述接入网关中预置的配置信息为第二配置信息;
所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:
如果所述用户设备的设备类型为IPv4设备,所述接入网关将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
优选地,所述接入网关中预置的配置信息为第三配置信息;
所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:
如果所述用户设备的设备类型为双栈设备,所述接入网关将所述域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;
如果用户设备的设备类型为IPv6设备,所述接入网关将所述域名请求由AAAA记录优先请求修改为AAAA记录请求。
优选地,所述接入网关中预置的配置信息为第四配置信息;
所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:
如果所述用户设备的设备类型为双栈设备,所述接入网关将所述域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将所述域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
优选地,所述DNS服务器接收到的域名请求的类型为A记录请求,所述DNS服务器中预置的配置信息为第六配置信息;
所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
A1、所述DNS服务器根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤A2;如果没有查询到A记录,则执行步骤A3;
A2、所述DNS服务器生成包含查询到的A记录的应答消息;
A3、所述DNS服务器根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤1604;如果具备,则执行步骤A5;
A4、所述DNS服务器生成包含查询失败信息的应答消息;
A5、所述DNS服务器根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤A6;如果没有查询到AAAA记录,则执行步骤A7;
A6、所述DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含该生成的A记录的应答消息;
A7、所述DNS服务器生成包含所述查询失败信息的应答消息。
优选地,所述DNS服务器接收到的域名请求的类型为AAAA记录请求,所述DNS服务器中预置的配置信息为第五配置信息;
所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
B1、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤B2;如果没有查询到AAAA记录,则执行步骤B3;
B2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
B3、所述DNS服务器根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤B4;如果具备,则执行步骤B5;
B4、所述DNS服务器生成包含查询失败信息的应答消息;
B5、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤B6;如果没有查询到A记录,则执行步骤B7;
B6、所述DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息;
B7、所述DNS服务器生成包含所述查询失败信息的应答消息。
优选地,所述DNS服务器接收到的域名请求的类型为A记录优先请求;
所述DNS服务器根据接收到的域名请求的类型对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
C1、所述DNS服务器根据所述A记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤C2;如果没有查询到A记录,则执行步骤C3;
C2、所述DNS服务器生成包含查询到的A记录的应答消息;
C3、所述DNS服务器根据A记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤C4;如果没有查询到AAAA记录,则执行步骤C5;
C4、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
C5、所述DNS服务器生成包含查询失败信息的应答消息。
优选地,所述DNS服务器接收到的域名请求的类型为AAAA记录优先请求;
所述DNS服务器根据接收到的域名请求的类型对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
D1、所述DNS服务器根据AAAA记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤D2;如果没有查询到AAAA记录,则执行步骤D3;
D2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
D3、所述DNS服务器根据AAAA记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤D4;如果没有查询到A记录,则执行步骤1625。
D4、所述DNS服务器生成包含查询到的A记录的应答消息;
D5、所述DNS服务器生成包含查询失败信息的应答消息。
优选地,所述DNS服务器接收到的域名请求的类型为双栈记录请求,所述DNS服务器中预置的配置信息为第七配置信息;
所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
E1、所述DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤E2;如果仅查询到A记录,则执行步骤E3;如果没有查询到AAAA记录或A记录,则执行步骤E4;如果查询到AAAA记录和A记录,则执行步骤E5;
E2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
E3、所述DNS服务器生成包含查询到的A记录的应答消息;
E4、所述DNS服务器生成包含查询失败信息的应答消息;
E5、所述DNS服务器根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤E6;如果优先返回AAAA记录,执行步骤E7;
E6、所述DNS服务器将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;
E7、所述DNS服务器将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
优选地,所述用户设备向接入网关发起域名请求之前,还包括:
所述用户设备向所述接入网关发起接入请求;
所述接入网关为所述用户设备分配网络地址,记录所述用户设备的网络地址类型,根据所述网络地址类型确定所述用户设备的设备类型,并向所述用户设备返回分配给所述用户设备的网络地址。
优选地,所述接入网关根据所述网络地址类型确定所述用户设备的设备类型,具体为:
当所述用户设备的网络地址类型为IPv4地址时,所述接入网关确定所述用户设备的设备类型为IPv4设备;
当所述用户设备的网络地址类型为IPv6地址时,所述接入网关确定所述用户设备的设备类型为IPv6设备;
当所述用户设备的网络地址类型为双栈地址时,所述接入网关确定所述用户设备的设备类型为双栈设备。
本发明实施例还提供了一种域名系统DNS服务器,包括:
存储模块,用于存储配置信息;
接收模块,用于接收来自接入网关的域名请求,所述域名请求中包含发起所述域名请求的用户设备的设备类型;
处理模块,根据所述接收模块接收到的所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理。
优选地,所述处理模块,具体用于根据所述接收模块接收到的域名请求的类型、所述配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;
所述DNS服务器,还包括:
发送模块,用于将所述处理模块生成的所述应答消息发送给用户设备。
优选地,所述域名请求中包含的所述用户设备的设备类型为IPv4设备;
所述存储模块,包括:
第一存储子模块,用于存储第六配置信息;
所述处理模块,包括:
第一查询子模块,用于根据所述域名请求中包含的域名查询对应的A记录;
第一判断子模块,用于在所述第一查询子模块没有查询到A记录时,根据所述第六配置信息判断所述DNS服务器是否具备根据AAAA记录生成A记录的功能;
第二查询子模块,用于在所述第一判断子模块判断出所述DNS服务器具备根据AAAA记录生成A记录的功能时,根据所述域名请求中包含的域名查询对应的AAAA记录;
第一生成子模块,用于在所述第一查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第一判断子模块判断出所述DNS服务器不具备根据AAAA记录生成A记录的功能,或者所述第二查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在所述第二查询子模块查询到AAAA记录时,根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息。
优选地,所述域名请求中包含的所述用户设备的设备类型为IPv6设备;
所述存储模块,包括:
第二存储子模块,用于存储第五配置信息;
所述处理模块,包括:
第三查询子模块,用于根据所述域名请求中包含的域名查询对应的AAAA记录;
第二判断子模块,用于在所述第三查询子模块没有查询到AAAA记录时,根据所述第五配置信息判断所述DNS服务器是否具备根据A记录生成AAAA记录的功能;
第四查询子模块,用于在所述第二判断子模块判断出所述DNS服务器具备根据A记录生成AAAA记录的功能时,根据所述域名请求中包含的域名查询对应的A记录;
第二生成子模块,用于在所述第三查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第二判断子模块判断出所述DNS服务器不具备根据A记录生成AAAA记录的功能,或者所述第四查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;在所述第四查询子模块查询到A记录时,根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息。
优选地,所述域名请求中包含的所述用户设备的设备类型为双栈设备;
所述存储模块,包括:
第三存储子模块,用于存储第七配置信息;
所述处理模块,包括:
第三判断子模块,用于对所述域名请求的类型进行判断;
第五查询子模块,用于在所述第三判断子模块判断出所述域名请求的类型为A记录请求时,根据所述A记录请求中包含的域名查询对应的A记录;在没有查询到A记录时,根据所述A记录请求中包含的域名查询对应的AAAA记录;
第六查询子模块,用于在所述第三判断子模块判断出所述域名请求的类型为AAAA记录请求时,根据所述AAAA记录请求中包含的域名查询对应的AAAA记录;在没有查询到AAAA记录时,根据所述AAAA记录请求中包含的域名查询对应的A记录;
第七查询子模块,用于在所述第三判断子模块判断出所述域名请求的类型为双栈记录请求时,根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录;
第四判断子模块,用于在所述第七查询子模块查询到AAAA记录和A记录时,根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录;
第三生成子模块,用于在所述第五查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第五查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第五查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息;
在所述第六查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第六查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第六查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;
在所述第七查询子模块仅查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第七查询子模块仅查询到A记录时,生成包含查询到的A记录的应答消息;在所述第七查询子模块没有查询到AAAA记录或A记录时,生成包含所述查询失败信息的应答消息;在所述第四判断子模块判断出优先返回A记录时,将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;在所述第四判断子模块判断出优先返回AAAA记录时,将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
本发明实施例还提供了一种域名系统DNS服务器,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;
所述通信接口,用于与用户设备和接入网关进行通信;
所述处理器,用于执行程序;
所述存储器,用于存放程序;
其中,所述程序用于接收来自所述接入网关的域名请求,根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的用户设备的设备类型,对所述域名请求进行处理。
本发明实施例还提供了一种处理域名请求的方法,包括以下步骤:
用户设备根据自身的设备类型向接入网关发起域名请求,所述域名请求中包含所述用户设备的设备类型;
所述接入网关将所述域名请求转发给域名系统DNS服务器;
所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理。
优选地,所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理,具体为:
所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;
所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理之后,还包括:
所述DNS服务器将所述应答消息发送给所述用户设备。
优选地,所述用户设备的设备类型为IPv4设备,所述DNS服务器中预置的配置信息为第六配置信息;
所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
F1、所述DNS服务器根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤F2;如果没有查询到A记录,则执行步骤F3;
F2、所述DNS服务器生成包含查询到的A记录的应答消息;
F3、所述DNS服务器根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤F4;如果具备,则执行步骤F5;
F4、所述DNS服务器生成包含查询失败信息的应答消息;
F5、所述DNS服务器根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤F6;如果没有查询到AAAA记录,则执行步骤F7;
F6、所述DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息;
F7、所述DNS服务器生成包含查询失败信息的应答消息。
优选地,所述用户设备的设备类型为IPv6设备,所述DNS服务器中预置的配置信息为第五配置信息;
所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
G1、所述DNS服务器根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤G2;如果没有查询到AAAA记录,则执行步骤G3;
G2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
G3、所述DNS服务器根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤G4;如果具备,则执行步骤G5;
G4、所述DNS服务器生成包含查询失败信息的应答消息;
G5、所述DNS服务器根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤G6;如果没有查询到A记录,则执行步骤G7;
G6、所述DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含生成的AAAA记录的应答消息;
G7、所述DNS服务器生成包含所述查询失败信息的应答消息。
优选地,所述用户设备的设备类型为双栈设备,所述DNS服务器中预置的配置信息为第七配置信息;
所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
H1、所述DNS服务器对所述域名请求的类型进行判断,如果是A记录请求,则执行步骤H2;如果是AAAA记录请求,则执行步骤H7;如果是双栈记录请求,则执行步骤H12;
H2、所述DNS服务器根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H3;如果没有查询到A记录,则执行步骤H4;
H3、所述DNS服务器生成包含查询到的A记录的应答消息;
H4、所述DNS服务器根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H5;如果没有查询到AAAA记录,则执行步骤H6;
H5、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
H6、所述DNS服务器生成包含查询失败信息的应答消息;
H7、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H8;如果没有查询到AAAA记录,则执行步骤H9;
H8、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
H9、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H10;如果没有查询到A记录,则执行步骤H11;
H10、所述DNS服务器生成包含查询到的A记录的应答消息;
H11、所述DNS服务器生成包含查询失败信息的应答消息;
H12、所述DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤H13;如果仅查询到A记录,则执行步骤H14;如果没有查询到AAAA记录或A记录,则执行步骤H15;如果查询到AAAA记录和A记录,则执行步骤H16;
H13、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
H14、所述DNS服务器生成包含查询到的A记录的应答消息;
H15、所述DNS服务器生成包含所述查询失败信息的应答消息;
H16、所述DNS服务器根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤H17;如果优先返回AAAA记录,执行步骤H18;
H17、所述DNS服务器将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;
H18、所述DNS服务器将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
优选地,所述用户设备向接入网关发起域名请求之前,还包括:
所述用户设备向所述接入网关发起接入请求;
所述接入网关为所述用户设备分配网络地址,向所述用户设备返回分配给所述用户设备的网络地址;
所述用户设备根据所述网络地址确定自身的设备类型。
优选地,所述用户设备根据所述网络地址确定自身的设备类型,具体为:
当所述网络地址类型为IPv4地址时,所述用户设备确定自身的设备类型为IPv4设备;
当所述网络地址类型为IPv6地址时,所述用户设备确定自身的设备类型为IPv6设备;
当所述网络地址类型为双栈地址时,所述用户设备确定自身的设备类型为双栈设备。
优选地,所述用户设备向接入网关发起域名请求之前,还包括:
所述用户设备设置优选配置信息;
所述用户设备接收所述DNS服务器返回的应答消息之后,还包括:
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求。
优选地,所述优选配置信息为A记录优选信息;
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:
所述用户设备根据所述应答消息中包含的A记录,向所述应用服务器发起访问请求。
优选地,所述优选配置信息为AAAA记录优选信息;
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:
所述用户设备根据所述应答消息中包含的AAAA记录,向所述应用服务器发起访问请求。
优选地,所述优选配置信息为任意优选信息;
所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:
所述用户设备根据所述应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
优选地,所述用户设备的设备类型包含在所述域名请求的新增字段中。
本发明实施例还提供了一种用户设备,包括:
设置模块,用于设置优选配置信息;
第一发送模块,用于向接入网关发起域名请求;
第一接收模块,用于接收域名系统DNS服务器返回的应答消息;
第二发送模块,用于根据所述设置模块设置的所述优选配置信息和所述第一接收模块接收到的所述应答消息,向应用服务器发起访问请求。
优选地,所述优选配置信息为A记录优选信息;
所述设置模块,具体用于配置所述A记录优选信息;
所述第二发送模块,具体用于根据所述应答消息中包含的A记录,向所述应用服务器发起访问请求。
优选地,所述优选配置信息为AAAA记录优选信息;
所述设置模块,具体用于配置所述AAAA记录优选信息;
所述第二发送模块,具体用于根据所述应答消息中包含的AAAA记录,向所述应用服务器发起访问请求。
优选地,所述优选配置信息为任意优选信息;
所述设置模块,具体用于配置所述任意优选信息;
所述第二发送模块,具体用于根据所述应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
优选地,所述的用户设备,还包括:
第三发送模块,用于向所述接入网关发起接入请求;
第二接收模块,用于接收所述接入网关分配给所述用户设备的网络地址。
优选地,所述的用户设备,还包括:
确定模块,用于根据所述第二接收模块接收到的所述网络地址类型确定所述用户设备的设备类型。
本发明实施例还一种用户设备,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;
所述通信接口,用于与接入网关、域名系统DNS服务器和应用服务器进行通信;
所述处理器,用于执行程序;
所述存储器,用于存放所述程序;
其中,所述程序用于设置优选配置信息,向所述接入网关发起域名请求,接收所述DNS服务器返回的应答消息,根据所述优选配置信息和所述应答消息,向所述应用服务器发起访问请求。
本发明实施例提供一种处理域名请求的方法及设备,通过扩展域名请求的类型或者在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿或设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,用户设备根据预先设置的优选配置信息使用A记录或AAAA记录发起访问请求,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例一提供的一种接入网关的装置结构图;
图2是本发明实施例二提供的一种接入网关的装置结构图;
图3是本发明实施例三提供的一种接入网关的装置结构图;
图4是本发明实施例四提供的一种接入网关的装置结构图;
图5是本发明实施例五提供的一种接入网关的装置结构图;
图6是本发明实施例六提供的一种接入网关的装置结构图;
图7是本发明实施例七提供的一种DNS服务器的装置结构图;
图8是本发明实施例八提供的一种DNS服务器的装置结构图;
图9是本发明实施例九提供的一种DNS服务器的装置结构图;
图10是本发明实施例十提供的一种DNS服务器的装置结构图;
图11是本发明实施例十一提供的一种DNS服务器的装置结构图;
图12是本发明实施例十二提供的一种DNS服务器的装置结构图;
图13是本发明实施例十三提供的一种DNS服务器的装置结构图;
图14是本发明实施例十四提供的一种处理域名请求的方法流程图;
图15是本发明实施例十五提供的一种处理域名请求的方法流程图;
图16是本发明实施例十五提供的一种DNS服务器处理域名请求的方法流程图;
图17是本发明实施例十六提供的一种DNS服务器的装置结构图;
图18是本发明实施例十七提供的一种DNS服务器的装置结构图;
图19是本发明实施例十八提供的一种DNS服务器的装置结构图;
图20是本发明实施例十九提供的一种DNS服务器的装置结构图;
图21是本发明实施例二十提供的一种DNS服务器的装置结构图;
图22是本发明实施例二十一提供的一种处理域名请求的方法流程图;
图23是本发明实施例二十二提供的一种处理域名请求的方法流程图;
图24是本发明实施例二十二提供的一种DNS服务器处理域名请求的方法流程图;
图25为本发明实施例二十三提供的一种用户设备的装置结构图;
图26为本发明实施例二十四提供的一种用户设备的装置结构图;
图27为本发明实施例二十五提供的一种用户设备的装置结构图。
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
实施例一
参考图1,图1是本发明实施例一提供的一种接入网关的装置结构图,包括:
存储模块110,用于存储配置信息。
接收模块120,用于接收来自用户设备的域名请求和来自DNS(Domain Name
System,域名系统)服务器的应答消息。
修改模块130,用于根据用户设备的设备类型以及存储模块110存储的配置信息,对接收模块120接收到的域名请求进行修改。
发送模块140,用于将修改模块130修改后的域名请求发送给DNS服务器,将接收模块120接收到的应答消息发送给用户设备。
进一步地,
上述接收模块120,还用于接收来自用户设备的接入请求。
相应地,上述接入网关,还包括:
分配模块150,用于为用户设备分配网络地址,记录用户设备的网络地址类型。
确定模块160,用于根据分配模块150记录的网络地址类型确定用户设备的设备类型。
具体地,上述确定模块160,具体用于当用户设备的网络地址类型为IPv4地址时,确定用户设备的设备类型为IPv4设备;当用户设备的网络地址类型为IPv6地址时,确定用户设备的设备类型为IPv6设备;当用户设备的网络地址类型为双栈地址时,确定用户设备的设备类型为双栈设备。
上述发送模块140,还用于向所述用户设备返回分配模块150分配给用户设备的网络地址。
本发明实施例提供一种接入网关,通过在该接入网关上根据用户设备的设备类型以及预置的配置信息修改域名请求的类型,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例二
参考图2,图2是本发明实施例二提供的一种接入网关的装置结构图,包括:
存储模块210,用于存储配置信息。
接收模块220,用于接收来自用户设备的域名请求和来自DNS服务器的应答消息。
修改模块230,用于根据用户设备的设备类型以及存储模块210存储的配置信息,对接收模块220接收到的域名请求进行修改。
发送模块240,用于将修改模块230修改后的域名请求发送给DNS服务器,将接收模块220接收到的应答消息发送给用户设备。
其中,上述存储模块210,包括:
第一存储子模块211,用于存储第一配置信息。
上述修改模块230,包括:
第一修改子模块231,用于当用户设备的设备类型为IPv4设备时,根据第一存储子模块211存储的第一配置信息,将域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
本发明实施例提供一种接入网关,当用户设备的设备类型为IPv4设备时,接入网关根据第一配置信息修改域名请求的类型,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例三
参考图3,图3是本发明实施例三提供的一种接入网关的装置结构图,包括:
存储模块310,用于存储配置信息。
接收模块320,用于接收来自用户设备的域名请求。
修改模块330,用于根据用户设备的设备类型以及存储模块310存储的配置信息,对接收模块320接收到的域名请求进行修改。
发送模块340,用于将修改模块330修改后的域名请求发送给DNS服务器。
其中,上述存储模块310,包括:
第二存储子模块311,用于存储第二配置信息。
上述修改模块330,包括:
第二修改子模块331,用于当用户设备的设备类型为IPv4设备时,根据第二存储子模块321存储的第二配置信息,将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
本发明实施例提供一种接入网关,当用户设备的设备类型为IPv4设备时,接入网关根据第二配置信息修改域名请求的类型,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例四
参考图4,图4是本发明实施例四提供的一种接入网关的装置结构图,包括:
存储模块410,用于存储配置信息。
接收模块420,用于接收来自用户设备的域名请求。
修改模块430,用于根据用户设备的设备类型以及存储模块410存储的配置信息,对接收模块420接收到的域名请求进行修改。
发送模块440,用于将修改模块430修改后的域名请求发送给DNS服务器。
其中,上述存储模块410,包括:
第三存储子模块411,用于存储第三配置信息;
上述修改模块430,包括:
第三修改子模块431,用于当用户设备的设备类型为双栈设备时,根据第三存储子模块411存储的第三配置信息,将域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;当用户设备的设备类型为IPv6设备时,根据第三存储子模块411存储的第三配置信息,将域名请求由AAAA记录优先请求修改为AAAA记录请求。
本发明实施例提供一种接入网关,当用户设备的设备类型为IPv6设备时,接入网关根据第三配置信息修改域名请求的类型,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例五
参考图5,图5是本发明实施例五提供的一种接入网关的装置结构图,包括:
存储模块510,用于存储配置信息。
接收模块520,用于接收来自用户设备的域名请求。
修改模块530,用于根据用户设备的设备类型以及存储模块510存储的配置信息,对接收模块520接收到的域名请求进行修改。
发送模块540,用于将修改模块530修改后的域名请求发送给DNS服务器。
其中,上述存储模块510,包括:
第四存储子模块511,用于存储第四配置信息。
上述修改模块530,包括:
第四修改子模块531,用于当用户设备的设备类型为双栈设备时,根据第四存储子模块511存储的第四配置信息,将域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
本发明实施例提供一种接入网关,当用户设备的设备类型为双栈设备时,接入网关根据第四配置信息修改域名请求的类型,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例六
参考图6,图6是本发明实施例六提供的一种接入网关的装置结构图,包括处理器610、通信接口620、存储器630和总线640,处理器610、通信接口620和存储器630通过总线640完成相互之间的通信;
通信接口620,用于与用户设备和DNS服务器进行通信;
处理器610,用于执行程序;
存储器630,用于存放程序;
其中,上述程序用于接收来自用户设备的域名请求和来自DNS服务器的应答消息,根据用户设备的设备类型以及接入网关中预置的配置信息,对所述域名请求进行修改,并将修改后的域名请求发送给DNS服务器,将接收到的应答消息发送给用户设备。
具体地,接入网关中预置的配置信息可以为第一配置信息;
相应地,如果所述用户设备的设备类型为互联网协议版本IPv4设备,上述程序用于将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
接入网关中预置的配置信息还可以为第二配置信息;
相应地,如果所述用户设备的设备类型为IPv4设备,上述程序用于将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
接入网关中预置的配置信息还可以为第三配置信息;
相应地,如果所述用户设备的设备类型为双栈设备,上述程序用于将所述域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;如果用户设备的设备类型为IPv6设备,所述接入网关将所述域名请求由AAAA记录优先请求修改为AAAA记录请求。
接入网关中预置的配置信息还可以为第四配置信息;
相应地,如果所述用户设备的设备类型为双栈设备,上述程序用于将所述域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将所述域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
本发明实施例提供一种接入网关,通过在接入网关上根据用户设备的设备类型以及预置的配置信息修改域名请求的类型,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例七
参考图7,图7是本发明实施例七提供的一种DNS服务器的装置结构图,包括:
存储模块710,用于存储配置信息;
接收模块720,用于接收来自接入网关的域名请求;
处理模块730,用于根据接收模块720接收到的域名请求的类型和存储模块710存储的配置信息,对域名请求进行应答处理,根据处理结果生成应答消息;
发送模块740,用于将处理模块730生成的应答消息发送给用户设备。
其中,接收模块720接收到的域名请求的类型可以为A记录请求,存储模块710存储的可以为第六配置信息;
相应地,处理模块730具体用于执行以下操作:
A1、根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤A2;如果没有查询到A记录,则执行步骤A3;
A2、生成包含查询到的A记录的应答消息;
A3、根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤1604;如果具备,则执行步骤A5;
A4、生成包含查询失败信息的应答消息;
A5、根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤A6;如果没有查询到AAAA记录,则执行步骤A7;
A6、根据查询到的AAAA记录生成对应的A记录,并生成包含该生成的A记录的应答消息;
A7、生成包含所述查询失败信息的应答消息。
接收模块720接收到的域名请求的类型还可以为AAAA记录请求,存储模块710存储的配置信息还可以为第五配置信息;
相应地,处理模块730具体用于执行以下操作:
B1、根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤B2;如果没有查询到AAAA记录,则执行步骤B3;
B2、生成包含查询到的AAAA记录的应答消息;
B3、根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤B4;如果具备,则执行步骤B5;
B4、生成包含查询失败信息的应答消息;
B5、根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤B6;如果没有查询到A记录,则执行步骤B7;
B6、根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息;
B7、生成包含所述查询失败信息的应答消息。
接收模块720接收到的域名请求的类型还可以为A记录优先请求;
相应地,处理模块730具体用于执行以下操作:
C1、根据所述A记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤C2;如果没有查询到A记录,则执行步骤C3;
C2、生成包含查询到的A记录的应答消息;
C3、根据A记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤C4;如果没有查询到AAAA记录,则执行步骤C5;
C4、生成包含查询到的AAAA记录的应答消息;
C5、生成包含查询失败信息的应答消息。
接收模块720接收到的域名请求的类型还可以为AAAA记录优先请求;
相应地,处理模块730具体用于执行以下操作:
D1、根据AAAA记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤D2;如果没有查询到AAAA记录,则执行步骤D3;
D2、生成包含查询到的AAAA记录的应答消息;
D3、根据AAAA记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤D4;如果没有查询到A记录,则执行步骤D5。
D4、生成包含查询到的A记录的应答消息;
D5、生成包含查询失败信息的应答消息。
接收模块720接收到的域名请求的类型还可以为双栈记录请求,存储模块710存储的配置信息还可以为第七配置信息;
相应地,处理模块730具体用于执行以下操作:
E1、根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤E2;如果仅查询到A记录,则执行步骤E3;如果没有查询到AAAA记录或A记录,则执行步骤E4;如果查询到AAAA记录和A记录,则执行步骤E5;
E2、生成包含查询到的AAAA记录的应答消息;
E3、生成包含查询到的A记录的应答消息;
E4、生成包含查询失败信息的应答消息;
E5、根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤E6;如果优先返回AAAA记录,执行步骤E7;
E6、将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;
E7、将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型以及在DNS服务器上根据配置信息生成应答消息,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例八
参考图8,图8是本发明实施例八提供的一种DNS服务器的装置结构图,包括:
存储模块810,用于存储配置信息;
接收模块820,用于接收来自接入网关的域名请求;
处理模块830,用于根据接收模块820接收到的域名请求的类型和存储模块810存储的配置信息,对域名请求进行应答处理,根据处理结果生成应答消息;
发送模块840,用于将处理模块830生成的应答消息发送给用户设备。
其中,上述存储模块810,包括:
第一存储子模块811,用于存储第六配置信息;
上述接收模块820,包括:
第一接收子模块821,用于接收来自接入网关的A记录请求;
上述处理模块830,包括:
第一查询子模块831,用于根据第一接收子模块821接收到的A记录请求中包含的域名查询对应的A记录;
第一判断子模块832,用于在所述第一查询子模块831没有查询到A记录时,根据第六配置信息判断DNS服务器是否具备根据AAAA记录生成A记录的功能;
第二查询子模块833,用于在第一判断子模块832判断出DNS服务器具备根据AAAA记录生成A记录的功能时,根据A记录请求中包含的域名查询对应的AAAA记录;
第一生成子模块834,用于在第一查询子模块831查询到A记录时,生成包含查询到的A记录的应答消息;在第一判断子模块832判断出DNS服务器不具备根据AAAA记录生成A记录的功能,或者第二查询子模块833没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在第二查询子模块833查询到AAAA记录时,根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型以及在DNS服务器上根据第六配置信息生成应答消息,使得用户设备能够灵活地发起不同类型的域名请求,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例九
参考图9,图9是本发明实施例九提供的一种DNS服务器的装置结构图,包括:
存储模块910,用于存储配置信息;
接收模块920,用于接收来自接入网关的域名请求;
处理模块930,用于根据接收模块920接收到的域名请求的类型和存储模块910存储的配置信息,对域名请求进行应答处理,根据处理结果生成应答消息;
发送模块940,用于将处理模块930生成的应答消息发送给用户设备。
其中,上述存储模块910,包括:
第二存储子模块911,用于存储第五配置信息;
上述接收模块920,包括:
第二接收子模块921,用于接收来自接入网关的AAAA记录请求;
上述处理模块930,包括:
第三查询子模块931,用于根据第二接收子模块921接收到的AAAA记录请求中包含的域名查询对应的AAAA记录;
第二判断子模块932,用于在所述第三查询子模块931没有查询到AAAA记录时,根据第五配置信息判断DNS服务器是否具备根据A记录生成AAAA记录的功能;
第四查询子模块933,用于在第二判断子模块932判断出DNS服务器具备根据A记录生成AAAA记录的功能时,根据所述AAAA记录请求中包含的域名查询对应的A记录;
第二生成子模块934,用于在第三查询子模块931查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在第二判断子模块932判断出所述DNS服务器不具备根据A记录生成AAAA记录的功能,或者第四查询子模块933没有查询到A记录时,生成包含查询失败信息的应答消息;在第四查询子模块933查询到A记录时,根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型以及在DNS服务器上根据第五配置信息生成应答消息,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例十
参考图10,图10是本发明实施例十提供的一种DNS服务器的装置结构图,包括:
存储模块1010,用于存储配置信息;
接收模块1020,用于接收来自接入网关的域名请求;
处理模块1030,用于根据接收模块1020接收到的域名请求的类型和存储模块1010存储的配置信息,对域名请求进行应答处理,根据处理结果生成应答消息;
发送模块1040,用于将处理模块1030生成的应答消息发送给用户设备。
其中,上述接收模块1020,包括:
第三接收子模块1021,用于接收来自所述接入网关的A记录优先请求;
所述处理模块1030,包括:
第五查询子模块1031,用于根据所述A记录优先请求中包含的域名查询对应的A记录,在没有查询到A记录时,根据所述A记录优先请求中包含的域名查询对应的AAAA记录;
第三生成子模块1032,用于在所述第五查询子模块1031查询到A记录时,生成包含查询到的A记录的应答消息;在所述第五查询子模块1031查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第五查询子模块1031没有查询到AAAA记录时,生成包含查询失败信息的应答消息。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例十一
参考图11,图11是本发明实施例十一提供的一种DNS服务器的装置结构图,包括:
存储模块1110,用于存储配置信息;
接收模块1120,用于接收来自接入网关的域名请求;
处理模块1130,用于根据接收模块1120接收到的域名请求的类型和存储模块1110存储的配置信息,对域名请求进行应答处理,根据处理结果生成应答消息;
发送模块1140,用于将处理模块1130生成的应答消息发送给用户设备。
其中,上述接收模块1120,包括:
第四接收子模块1121,用于接收来自所述接入网关的AAAA记录优先请求;
上述处理模块1130,包括:
第六查询子模块1131,用于根据所述第四接收子模块1121接收到的所述AAAA记录优先请求中包含的域名查询对应的AAAA记录,在没有查询到AAAA记录时,根据所述AAAA记录优先请求中包含的域名查询对应的A记录;
第四生成子模块1132,用于在所述第六查询子模块1131查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第六查询子模块1131查询到A记录时,生成包含查询到的A记录的应答消息;在所述第六查询子模块1131没有查询到A记录时,生成包含查询失败信息的应答消息。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型使得用户设备能够灵活地发起不同类型的域名请求,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例十二
参考图12,图12是本发明实施例十二提供的一种DNS服务器的装置结构图,包括:
存储模块1210,用于存储配置信息;
接收模块1220,用于接收来自接入网关的域名请求;
处理模块1230,用于根据接收模块1220接收到的域名请求的类型和存储模块1210存储的配置信息,对域名请求进行应答处理,根据处理结果生成应答消息;
发送模块1240,用于将处理模块1230生成的应答消息发送给用户设备。
其中,上述存储模块1210,包括:
第三存储子模块1211,用于存储第七配置信息;
上述接收模块1220,包括:
第五接收子模块1221,用于接收来自所述接入网关的双栈记录请求;
上述处理模块1230,包括:
第七查询子模块1231,用于根据所述第五接收子模块1221接收到的所述双栈记录请求中包含的域名查询对应的AAAA记录和A记录;
第三判断子模块1232,用于在所述第七查询子模块1231查询到AAAA记录和A记录时,根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录;
第五生成子模块1233,用于在所述第七查询子模块1231仅查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第七查询子模块1231仅查询到A记录时,生成包含查询到的A记录的应答消息;在所述第七查询子模块1231没有查询到AAAA记录或A记录时,生成包含查询失败信息的应答消息;在所述第三判断子模块1232判断出优先返回A记录时,将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;在所述第三判断子模块1232判断出优先返回AAAA记录,将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型以及在DNS服务器上根据第七配置信息生成应答消息,使得用户设备能够灵活地发起不同类型的域名请求,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例十三
参考图13,图13是本发明实施例十三提供的一种DNS服务器的装置结构图,包括处理器1310、通信接口1320、存储器1330和总线1340,所述处理器1310、所述通信接口1320、所述存储器1330通过所述总线1340完成相互之间的通信;
所述通信接口1320,用于与用户设备和接入网关进行通信;
所述处理器1310,用于执行程序;
所述存储器1330,用于存放所述程序;
其中,所述程序用于接收来自所述接入网关的域名请求,根据所述域名请求的类型以及所述DNS服务器中预置的配置信息,对所述域名请求进行应答处理,根据处理结果生成应答消息,将所述应答消息发送给所述用户设备。
具体地,
其中,所述程序接收到的域名请求的类型可以为A记录请求,DNS服务器中预置的配置信息可以为第六配置信息;
相应地,所述程序具体用于执行以下操作:
A1、根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤A2;如果没有查询到A记录,则执行步骤A3;
A2、生成包含查询到的A记录的应答消息;
A3、根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤1604;如果具备,则执行步骤A5;
A4、生成包含查询失败信息的应答消息;
A5、根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤A6;如果没有查询到AAAA记录,则执行步骤A7;
A6、根据查询到的AAAA记录生成对应的A记录,并生成包含该生成的A记录的应答消息;
A7、生成包含所述查询失败信息的应答消息。
所述程序接收到的域名请求的类型还可以为AAAA记录请求,DNS服务器中预置的配置信息还可以为第五配置信息;
相应地,所述程序具体用于执行以下操作:
B1、根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤B2;如果没有查询到AAAA记录,则执行步骤B3;
B2、生成包含查询到的AAAA记录的应答消息;
B3、根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤B4;如果具备,则执行步骤B5;
B4、生成包含查询失败信息的应答消息;
B5、根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤B6;如果没有查询到A记录,则执行步骤B7;
B6、根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息;
B7、生成包含所述查询失败信息的应答消息。
所述程序接收到的域名请求的类型还可以为A记录优先请求;
相应地,所述程序具体用于执行以下操作:
C1、根据所述A记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤C2;如果没有查询到A记录,则执行步骤C3;
C2、生成包含查询到的A记录的应答消息;
C3、根据A记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤C4;如果没有查询到AAAA记录,则执行步骤C5;
C4、生成包含查询到的AAAA记录的应答消息;
C5、生成包含查询失败信息的应答消息。
所述程序接收到的域名请求的类型还可以为AAAA记录优先请求;
相应地,所述程序具体用于执行以下操作:
D1、根据AAAA记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤D2;如果没有查询到AAAA记录,则执行步骤D3;
D2、生成包含查询到的AAAA记录的应答消息;
D3、根据AAAA记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤D4;如果没有查询到A记录,则执行步骤D5。
D4、生成包含查询到的A记录的应答消息;
D5、生成包含查询失败信息的应答消息。
所述程序接收到的域名请求的类型还可以为双栈记录请求,DNS服务器中预置的配置信息还可以为第七配置信息;
相应地,所述程序具体用于执行以下操作:
E1、根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤E2;如果仅查询到A记录,则执行步骤E3;如果没有查询到AAAA记录或A记录,则执行步骤E4;如果查询到AAAA记录和A记录,则执行步骤E5;
E2、生成包含查询到的AAAA记录的应答消息;
E3、生成包含查询到的A记录的应答消息;
E4、生成包含查询失败信息的应答消息;
E5、根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤E6;如果优先返回AAAA记录,执行步骤E7;
E6、将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;
E7、将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
本发明实施例提供一种DNS服务器,通过扩展域名请求的类型以及在DNS服务器上根据配置信息生成应答消息,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例十四
参考图14,图14是本发明实施例十四提供的一种处理域名请求的方法流程图,包括以下步骤:
步骤1401,用户设备向接入网关发起域名请求。
步骤1402,接入网关根据用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,并将修改后的域名请求发送给域名系统DNS服务器。
步骤1403,DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,将所述应答消息发送给所述用户设备。
其中,接入网关中预置的配置信息可以为第一配置信息;
相应地,如果所述用户设备的设备类型为互联网协议版本IPv4设备,所述接入网关将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
接入网关中预置的配置信息还可以为第二配置信息;
相应地,如果所述用户设备的设备类型为IPv4设备,所述接入网关将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
接入网关中预置的配置信息还可以为第三配置信息;
相应地,如果所述用户设备的设备类型为双栈设备,所述接入网关将所述域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;如果用户设备的设备类型为IPv6设备,所述接入网关将所述域名请求由AAAA记录优先请求修改为AAAA记录请求。
接入网关中预置的配置信息还可以为第四配置信息;
相应地,如果所述用户设备的设备类型为双栈设备,所述接入网关将所述域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将所述域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
其中,DNS服务器接收到的域名请求的类型可以为A记录请求,所述DNS服务器中预置的配置信息可以为第六配置信息;
相应地,所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
A1、所述DNS服务器根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤A2;如果没有查询到A记录,则执行步骤A3;
A2、所述DNS服务器生成包含查询到的A记录的应答消息;
A3、所述DNS服务器根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤1604;如果具备,则执行步骤A5;
A4、所述DNS服务器生成包含查询失败信息的应答消息;
A5、所述DNS服务器根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤A6;如果没有查询到AAAA记录,则执行步骤A7;
A6、所述DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含该生成的A记录的应答消息;
A7、所述DNS服务器生成包含所述查询失败信息的应答消息。
DNS服务器接收到的域名请求的类型还可以为AAAA记录请求,所述DNS服务器中预置的配置信息还可以为第五配置信息;
相应地,所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
B1、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤B2;如果没有查询到AAAA记录,则执行步骤B3;
B2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
B3、所述DNS服务器根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤B4;如果具备,则执行步骤B5;
B4、所述DNS服务器生成包含查询失败信息的应答消息;
B5、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤B6;如果没有查询到A记录,则执行步骤B7;
B6、所述DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息;
B7、所述DNS服务器生成包含所述查询失败信息的应答消息。
DNS服务器接收到的域名请求的类型还可以为A记录优先请求;
相应地,所述DNS服务器根据接收到的域名请求的类型对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
C1、所述DNS服务器根据所述A记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤C2;如果没有查询到A记录,则执行步骤C3;
C2、所述DNS服务器生成包含查询到的A记录的应答消息;
C3、所述DNS服务器根据A记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤C4;如果没有查询到AAAA记录,则执行步骤C5;
C4、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
C5、所述DNS服务器生成包含查询失败信息的应答消息。
DNS服务器接收到的域名请求的类型还可以为AAAA记录优先请求;
相应地,DNS服务器根据接收到的域名请求的类型对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
D1、所述DNS服务器根据AAAA记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤D2;如果没有查询到AAAA记录,则执行步骤D3;
D2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
D3、所述DNS服务器根据AAAA记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤D4;如果没有查询到A记录,则执行步骤D5。
D4、所述DNS服务器生成包含查询到的A记录的应答消息;
D5、所述DNS服务器生成包含查询失败信息的应答消息。
DNS服务器接收到的域名请求的类型还可以为双栈记录请求,DNS服务器中预置的配置信息还可以为第七配置信息;
相应地,DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
E1、所述DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤E2;如果仅查询到A记录,则执行步骤E3;如果没有查询到AAAA记录或A记录,则执行步骤E4;如果查询到AAAA记录和A记录,则执行步骤E5;
E2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
E3、所述DNS服务器生成包含查询到的A记录的应答消息;
E4、所述DNS服务器生成包含查询失败信息的应答消息;
E5、所述DNS服务器根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤E6;如果优先返回AAAA记录,执行步骤E7;
E6、所述DNS服务器将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;
E7、所述DNS服务器将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
上述用户设备向接入网关发起域名请求之前,还包括:
所述用户设备向所述接入网关发起接入请求;
所述接入网关为所述用户设备分配网络地址,记录所述用户设备的网络地址类型,根据所述网络地址类型确定所述用户设备的设备类型,并向所述用户设备返回分配给所述用户设备的网络地址。
具体地,当所述用户设备的网络地址类型为IPv4地址时,所述接入网关确定所述用户设备的设备类型为IPv4设备;当所述用户设备的网络地址类型为IPv6地址时,所述接入网关确定所述用户设备的设备类型为IPv6设备;当所述用户设备的网络地址类型为双栈地址时,所述接入网关确定所述用户设备的设备类型为双栈设备。
本发明实施例提供一种处理域名请求的方法,通过扩展域名请求的类型以及在接入网关上根据用户设备的设备类型以及预置的配置信息修改域名请求的类型,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例十五
参考图15,图15是本发明实施例十五提供的一种处理域名请求的方法流程图,包括以下步骤:
步骤1500,用户设备设置优选配置信息。
其中,优选配置信息可以为A记录优选信息,也可以为AAAA记录优选信息,还可以为任意优选信息。
步骤1501,用户设备向接入网关发起接入请求。
其中,用户设备是具有网络访问能力的设备,例如,计算机、手机等能够接入网络的设备;接入网关可以是路由器、防火墙、BRAS(Broadband
Remote Access Server,宽带远程接入服务器)、Firewall(防火墙)、GGSN(Gateway GPRS Support
Node,网关GPRS支持节点)、P-GW(Packet Data Network Gateway,分组数据网网关)、PDSN(Packet Data
Serving Node,分组数据服务节点)或S-GW(Serving GateWay,服务网关)等设备。
步骤1502,接入网关为用户设备分配网络地址,记录用户设备的网络地址类型,并根据该网络地址类型确定用户设备的设备类型。
具体地,接入网关可以直接为用户设备分配网络地址,也可以作为用户设备的代理接入到具有网络地址分配功能的服务器,获取该服务器分配给用户设备的网络地址。
其中,用户设备的网络地址类型可以为IPv4地址、IPv6地址或双栈地址(即,IPv4地址+IPv6地址),相应地,当用户设备的网络地址类型为IPv4地址时,接入网关确定用户设备的设备类型为IPv4设备;当用户设备的网络地址类型为IPv6地址时,接入网关确定用户设备的设备类型为IPv6设备;当用户设备的网络地址类型为双栈地址时,接入网关确定用户设备的设备类型为双栈设备。
步骤1503,接入网关向用户设备返回分配给该用户设备的网络地址。
步骤1504,用户设备根据分配给自身的网络地址确定自身的设备类型。
步骤1505,用户设备向接入网关发起域名请求。
其中,用户设备发起的域名请求中可以包含用户设备需要访问的应用服务器的域名,该应用服务器具有与该域名对应的IPv4地址或IPv6地址。用户设备发起的域名请求的类型可以是A记录请求、AAAA记录请求、A记录优先请求、AAAA记录优先请求或双栈记录请求中的任意一种,该双栈记录请求用于同时向DNS服务器请求A记录和AAAA记录。
步骤1506,接入网关根据发起域名请求的用户设备的设备类型以及接入网关中预置的配置信息,对接收到的域名请求进行修改。
其中,接入网关中预置的配置信息是根据实际网络情况配置的信息,可以包含第一配置信息、第二配置信息、第三配置信息和第四配置信息中的一种或多种。第一配置配置信息用于限制IPv4设备采用IPv4地址访问网络,第二配置信息适用于IPv4地址占主导地位,且网络中的服务器没有IPv6地址的情况,第三配置信息适用于IPv6地址占主导地位,且网络中的服务器没有IPv4地址的情况,第四配置信息适用于IPv6地址占主导地位,且网络中的少量服务器具备IPv4地址的情况。
相应地,当接入网关中预先设置有第一配置信息时,如果用户设备的设备类型为IPv4设备,接入网关将用户设备发起的AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求;
当接入网关中预先设置有第二配置信息时,如果用户设备的设备类型为IPv4设备,接入网关将用户设备发起的AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求;
当接入网关中预先设置有第三配置信息时,如果用户设备的设备类型为双栈设备,接入网关将用户设备发起的A记录优先请求或A记录请求,修改为AAAA记录优先请求;如果用户设备的设备类型为IPv6设备,接入网关将用户设备发起的AAAA记录优先请求修改为AAAA记录请求;
当接入网关中预先设置有第四配置信息时,如果用户设备的设备类型为双栈设备,接入网关将用户设备发起的A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,将用户设备发起的AAAA记录请求修改为AAAA记录优先请求。
步骤1507,接入网关向DNS服务器发送修改后的域名请求。
步骤1508,DNS服务器根据接收到的域名请求的类型和预先配置的配置信息,对接收到的域名请求进行应答处理,并根据处理结果生成应答消息。
其中,DNS服务器中预先设置的配置信息可以包括第五配置信息、第六配置信息和第七配置信息,第五配置信息用于标识DNS服务器是否具备根据A记录生成AAAA记录,第六配置信息用于标识DNS服务器是否具备根据AAAA记录生成A记录的功能,第七配置信息用于标识在接收到来自双栈设备的双栈请求时,向双栈设备优先返回A记录或AAAA记录。应答消息可以包含A记录,也可以包含AAAA记录,也可以同时包含A记录和AAAA记录,还可以包含查询失败信息。
步骤1509,DNS服务器向用户设备发送应答消息。
步骤1510,用户设备根据优选配置信息和应答消息,向应用服务器发起访问请求。
具体地,优选配置信息为A记录优选信息时,用户设备可以根据应答消息中包含的A记录,向应用服务器发起访问请求;优选配置信息为AAAA记录优选信息时,用户设备可以根据应答消息中包含的AAAA记录,向应用服务器发起访问请求;优选配置信息为任意优选信息时,用户设备可以根据应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
需要说明的是,当用户设备使用A记录向具有IPv6地址的应用服务器发起访问请求,或者用户设备使用AAAA记录向具有IPv4地址的应用服务器发起访问请求时,网络中的NAT服务器可对用户设备与应用服务器之间的报文进行IPv4报文和IPv6报文之间的转换,该NAT服务器可以独立部署,也可以和接入网关是同一设备。
此外,上述步骤1508,可细化为如图16所示的流程图,包括以下步骤:
步骤1601,DNS服务器对接收到的域名请求的类型进行判断,如果是A记录请求,则执行步骤1602;如果是AAAA记录请求,则执行步骤1609;如果是A记录优先请求,则执行步骤1616;如果是AAAA记录优先请求,则执行步骤1621;如果是双栈记录请求,则执行步骤1626。
步骤1602,DNS服务器根据A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤1603;如果没有查询到A记录,则执行步骤1604;
步骤1603,DNS服务器生成包含查询到的A记录的应答消息。
步骤1604,DNS服务器根据第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤1605;如果具备,则执行步骤1606。
步骤1605,DNS服务器生成包含查询失败信息的应答消息。
步骤1606,DNS服务器根据A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤1607;如果没有查询到AAAA记录,则执行步骤1608。
步骤1607,DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含上述生成的A记录的应答消息。
步骤1608,DNS服务器生成包含查询失败信息的应答消息。
步骤1609,DNS服务器根据AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤1610;如果没有查询到AAAA记录,则执行步骤1611;
步骤1610,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤1611,DNS服务器根据第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤1612;如果具备,则执行步骤1613。
步骤1612,DNS服务器生成包含查询失败信息的应答消息。
步骤1613,DNS服务器根据AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤1614;如果没有查询到A记录,则执行步骤1615。
步骤1614,DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含上述生成的AAAA记录的应答消息。
步骤1615,DNS服务器生成包含查询失败信息的应答消息。
步骤1616,DNS服务器根据A记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤1617;如果没有查询到A记录,则执行步骤1618;
步骤1617,DNS服务器生成包含查询到的A记录的应答消息。
步骤1618,DNS服务器根据A记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤1619;如果没有查询到AAAA记录,则执行步骤1620。
步骤1619,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤1620,DNS服务器生成包含查询失败信息的应答消息。
步骤1621,DNS服务器根据AAAA记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤1622;如果没有查询到AAAA记录,则执行步骤1623;
步骤1622,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤1623,DNS服务器根据AAAA记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤1624;如果没有查询到A记录,则执行步骤1625。
步骤1624,DNS服务器生成包含查询到的A记录的应答消息。
步骤1625,DNS服务器生成包含查询失败信息的应答消息。
步骤1626,DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤1627;如果仅查询到A记录,则执行步骤1628;如果没有查询到AAAA记录或A记录,则执行步骤1629;如果查询到AAAA记录和A记录,则执行步骤1630。
步骤1627,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤1628,DNS服务器生成包含查询到的A记录的应答消息。
步骤1629,DNS服务器生成包含查询失败信息的应答消息。
步骤1630,DNS服务器根据第七配置信息判断向用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤1631;如果优先返回AAAA记录,执行步骤1632。
步骤1631,DNS服务器将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中。
步骤1632,DNS服务器将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
本发明实施例提供一种处理域名请求的方法,通过扩展域名请求的类型以及在接入网关上根据用户设备的设备类型以及预置的配置信息修改域名请求的类型,使得用户设备能够灵活地发起不同类型的域名请求,使得DNS服务器能够感知用户设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例十六
参考图17,图17是本发明实施例十六提供的一种DNS服务器的装置结构图,包括:
存储模块1710,用于存储配置信息;
接收模块1720,用于接收来自接入网关的域名请求,所述域名请求中包含发起所述域名请求的用户设备的设备类型;
处理模块1730,根据所述接收模块1720接收到的所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;
发送模块1740,用于将所述处理模块1730生成的所述应答消息发送给用户设备。
其中,用户设备的设备类型可以为IPv4设备,存储模块1710存储的配置信息可以为第六配置信息;
相应地,处理模块1730具体用于执行以下操作:
F1、根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤F2;如果没有查询到A记录,则执行步骤F3;
F2、生成包含查询到的A记录的应答消息;
F3、根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤F4;如果具备,则执行步骤F5;
F4、生成包含查询失败信息的应答消息;
F5、根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤F6;如果没有查询到AAAA记录,则执行步骤F7;
F6、根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息;
F7、生成包含查询失败信息的应答消息。
用户设备的设备类型还可以为IPv6设备,存储模块1710存储的配置信息还可以为第五配置信息;
相应地,处理模块1730具体用于执行以下操作:
G1、根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤G2;如果没有查询到AAAA记录,则执行步骤G3;
G2、生成包含查询到的AAAA记录的应答消息;
G3、根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤G4;如果具备,则执行步骤G5;
G4、生成包含查询失败信息的应答消息;
G5、根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤G6;如果没有查询到A记录,则执行步骤G7;
G6、根据查询到的A记录生成对应的AAAA记录,并生成包含生成的AAAA记录的应答消息;
G7、生成包含所述查询失败信息的应答消息。
上述用户设备的设备类型还可以为双栈设备,存储模块1710存储的配置信息还可以为第七配置信息;
相应地,处理模块1730具体用于执行以下操作:
H1、对所述域名请求的类型进行判断,如果是A记录请求,则执行步骤H2;如果是AAAA记录请求,则执行步骤H7;如果是双栈记录请求,则执行步骤H12;
H2、根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H3;如果没有查询到A记录,则执行步骤H4;
H3、生成包含查询到的A记录的应答消息;
H4、根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H5;如果没有查询到AAAA记录,则执行步骤H6;
H5、生成包含查询到的AAAA记录的应答消息;
H6、生成包含查询失败信息的应答消息;
H7、根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H8;如果没有查询到AAAA记录,则执行步骤H9;
H8、生成包含查询到的AAAA记录的应答消息;
H9、根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H10;如果没有查询到A记录,则执行步骤H11;
H10、生成包含查询到的A记录的应答消息;
H11、生成包含查询失败信息的应答消息;
H12、根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤H13;如果仅查询到A记录,则执行步骤H14;如果没有查询到AAAA记录或A记录,则执行步骤H15;如果查询到AAAA记录和A记录,则执行步骤H16;
H13、生成包含查询到的AAAA记录的应答消息;
H14、生成包含查询到的A记录的应答消息;
H15、生成包含所述查询失败信息的应答消息;
H16、根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤H17;如果优先返回AAAA记录,执行步骤H18;
H17、将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;
H18、将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
本发明实施例提供一种DNS服务器,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例十七
参考图18,图18是本发明实施例十七提供的一种DNS服务器的装置结构图,包括:
存储模块1810,用于存储配置信息;
接收模块1820,用于接收来自接入网关的域名请求,所述域名请求中包含发起所述域名请求的用户设备的设备类型;
处理模块1830,根据所述接收模块1820接收到的所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;
发送模块1840,用于将所述处理模块1830生成的所述应答消息发送给用户设备。
其中,域名请求中包含的所述用户设备的设备类型为IPv4设备;
相应地,上述存储模块1810,包括:
第一存储子模块1811,用于存储第六配置信息;
所述处理模块1830,包括:
第一查询子模块1831,用于根据所述域名请求中包含的域名查询对应的A记录;
第一判断子模块1832,用于在所述第一查询子模块1831没有查询到A记录时,根据所述第六配置信息判断所述DNS服务器是否具备根据AAAA记录生成A记录的功能;
第二查询子模块1833,用于在所述第一判断子模块1832判断出所述DNS服务器具备根据AAAA记录生成A记录的功能时,根据所述域名请求中包含的域名查询对应的AAAA记录;
第一生成子模块1834,用于在所述第一查询子模块1831查询到A记录时,生成包含查询到的A记录的应答消息;在所述第一判断子模块1832判断出所述DNS服务器不具备根据AAAA记录生成A记录的功能,或者所述第二查询子模块1833没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在所述第二查询子模块1833查询到AAAA记录时,根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息。
本发明实施例提供一种DNS服务器,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知IPv4设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例十八
参考图19,图19是本发明实施例十八提供的一种DNS服务器的装置结构图,包括:
存储模块1910,用于存储配置信息;
接收模块1920,用于接收来自接入网关的域名请求,所述域名请求中包含发起所述域名请求的用户设备的设备类型;
处理模块1930,根据所述接收模块1920接收到的所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;
发送模块1940,用于将所述处理模块1930生成的所述应答消息发送给用户设备。
其中,所述域名请求中包含的所述用户设备的设备类型为IPv6设备;
相应地,所述存储模块1910,包括:
第二存储子模块1911,用于存储第五配置信息;
所述处理模块1930,包括:
第三查询子模块1931,用于根据所述域名请求中包含的域名查询对应的AAAA记录;
第二判断子模块1932,用于在所述第三查询子模块1931没有查询到AAAA记录时,根据所述第五配置信息判断所述DNS服务器是否具备根据A记录生成AAAA记录的功能;
第四查询子模块1933,用于在所述第二判断子模块1932判断出所述DNS服务器具备根据A记录生成AAAA记录的功能时,根据所述域名请求中包含的域名查询对应的A记录;
第二生成子模块1934,用于在所述第三查询子模块1931查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第二判断子模块1932判断出所述DNS服务器不具备根据A记录生成AAAA记录的功能,或者所述第四查询子模块1933没有查询到A记录时,生成包含查询失败信息的应答消息;在所述第四查询子模块1933查询到A记录时,根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息。
本发明实施例提供一种DNS服务器,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知IPv6设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例十九
参考图20,图20是本发明实施例十九提供的一种DNS服务器的装置结构图,包括:
存储模块2010,用于存储配置信息;
接收模块2020,用于接收来自接入网关的域名请求,所述域名请求中包含发起所述域名请求的用户设备的设备类型;
处理模块2030,根据所述接收模块2020接收到的所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;
发送模块2040,用于将所述处理模块2030生成的所述应答消息发送给用户设备。
其中,所述域名请求中包含的所述用户设备的设备类型为双栈设备;
相应地,所述存储模块2010,包括:
第三存储子模块2011,用于存储第七配置信息;
所述处理模块2030,包括:
第三判断子模块2031,用于对所述域名请求的类型进行判断;
第五查询子模块2032,用于在所述第三判断子模块2031判断出所述域名请求的类型为A记录请求时,根据所述A记录请求中包含的域名查询对应的A记录;在没有查询到A记录时,根据所述A记录请求中包含的域名查询对应的AAAA记录;
第六查询子模块2033,用于在所述第三判断子模块2031判断出所述域名请求的类型为AAAA记录请求时,根据所述AAAA记录请求中包含的域名查询对应的AAAA记录;在没有查询到AAAA记录时,根据所述AAAA记录请求中包含的域名查询对应的A记录;
第七查询子模块2034,用于在所述第三判断子模块2031判断出所述域名请求的类型为双栈记录请求时,根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录;
第四判断子模块2035,用于在所述第七查询子模块2034查询到AAAA记录和A记录时,根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录;
第三生成子模块2036,用于在所述第五查询子模块2032查询到A记录时,生成包含查询到的A记录的应答消息;在所述第五查询子模块2032查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第五查询子模块2032没有查询到AAAA记录时,生成包含查询失败信息的应答消息;
在所述第六查询子模块2033查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第六查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第六查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;
在所述第七查询子模块2034仅查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第七查询子模块2034仅查询到A记录时,生成包含查询到的A记录的应答消息;在所述第七查询子模块2034没有查询到AAAA记录或A记录时,生成包含所述查询失败信息的应答消息;在所述第四判断子模块2035判断出优先返回A记录时,将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;在所述第四判断子模块2035判断出优先返回AAAA记录时,将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
本发明实施例提供一种DNS服务器,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知双栈设备的请求意愿,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例二十
参考图21,图21是本发明实施例二十提供的一种DNS服务器的装置结构图,包括处理器2110、通信接口2120、存储器2130和总线2140,所述处理器2110、所述通信接口2120、所述存储器2130通过所述总线2140完成相互之间的通信;
所述通信接口2120,用于与用户设备和接入网关进行通信;
所述处理器2110,用于执行程序;
所述存储器2130,用于存放程序;
其中,所述程序用于接收来自所述接入网关的域名请求,根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,将所述应答消息发送给所述用户设备。
具体地,用户设备的设备类型可以为IPv4设备,DNS服务器中预置的配置信息可以为第六配置信息;
相应地,所述程序具体用于执行以下操作:
F1、根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤F2;如果没有查询到A记录,则执行步骤F3;
F2、生成包含查询到的A记录的应答消息;
F3、根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤F4;如果具备,则执行步骤F5;
F4、生成包含查询失败信息的应答消息;
F5、根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤F6;如果没有查询到AAAA记录,则执行步骤F7;
F6、根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息;
F7、生成包含查询失败信息的应答消息。
用户设备的设备类型还可以为IPv6设备,DNS服务器中预置的配置信息还可以为第五配置信息;
相应地,所述程序具体用于执行以下操作:
G1、根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤G2;如果没有查询到AAAA记录,则执行步骤G3;
G2、生成包含查询到的AAAA记录的应答消息;
G3、根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤G4;如果具备,则执行步骤G5;
G4、生成包含查询失败信息的应答消息;
G5、根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤G6;如果没有查询到A记录,则执行步骤G7;
G6、根据查询到的A记录生成对应的AAAA记录,并生成包含生成的AAAA记录的应答消息;
G7、生成包含所述查询失败信息的应答消息。
上述用户设备的设备类型还可以为双栈设备,DNS服务器中预置的配置信息还可以为第七配置信息;
相应地,所述程序具体用于执行以下操作:
H1、对所述域名请求的类型进行判断,如果是A记录请求,则执行步骤H2;如果是AAAA记录请求,则执行步骤H7;如果是双栈记录请求,则执行步骤H12;
H2、根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H3;如果没有查询到A记录,则执行步骤H4;
H3、生成包含查询到的A记录的应答消息;
H4、根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H5;如果没有查询到AAAA记录,则执行步骤H6;
H5、生成包含查询到的AAAA记录的应答消息;
H6、生成包含查询失败信息的应答消息;
H7、根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H8;如果没有查询到AAAA记录,则执行步骤H9;
H8、生成包含查询到的AAAA记录的应答消息;
H9、根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H10;如果没有查询到A记录,则执行步骤H11;
H10、生成包含查询到的A记录的应答消息;
H11、生成包含查询失败信息的应答消息;
H12、根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤H13;如果仅查询到A记录,则执行步骤H14;如果没有查询到AAAA记录或A记录,则执行步骤H15;如果查询到AAAA记录和A记录,则执行步骤H16;
H13、生成包含查询到的AAAA记录的应答消息;
H14、生成包含查询到的A记录的应答消息;
H15、生成包含所述查询失败信息的应答消息;
H16、根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤H17;如果优先返回AAAA记录,执行步骤H18;
H17、将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;
H18、将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
本发明实施例提供一种DNS服务器,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例二十一
参考图22,图22是本发明实施例二十一提供的一种处理域名请求的方法流程图,包括以下步骤:
步骤2201,用户设备根据自身的设备类型向接入网关发起域名请求。
其中,域名请求中包含用户设备的设备类型,用户设备的设备类型可以包含在域名请求的新增字段中。
步骤2202,接入网关将域名请求转发给DNS服务器。
步骤2203,DNS服务器根据域名请求的类型、DNS服务器中预置的配置信息以及域名请求中包含的用户设备的设备类型,对域名请求进行应答处理,根据处理结果生成应答消息,并将应答消息发送给用户设备。
其中,用户设备的设备类型可以为IPv4设备,DNS服务器中预置的配置信息可以为第六配置信息;
相应地,DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
F1、所述DNS服务器根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤F2;如果没有查询到A记录,则执行步骤F3;
F2、所述DNS服务器生成包含查询到的A记录的应答消息;
F3、所述DNS服务器根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤F4;如果具备,则执行步骤F5;
F4、所述DNS服务器生成包含查询失败信息的应答消息;
F5、所述DNS服务器根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤F6;如果没有查询到AAAA记录,则执行步骤F7;
F6、所述DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息;
F7、所述DNS服务器生成包含查询失败信息的应答消息。
用户设备的设备类型还可以为IPv6设备,所述DNS服务器中预置的配置信息还可以为第五配置信息;
相应地,所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
G1、所述DNS服务器根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤G2;如果没有查询到AAAA记录,则执行步骤G3;
G2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
G3、所述DNS服务器根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤G4;如果具备,则执行步骤G5;
G4、所述DNS服务器生成包含查询失败信息的应答消息;
G5、所述DNS服务器根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤G6;如果没有查询到A记录,则执行步骤G7;
G6、所述DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含生成的AAAA记录的应答消息;
G7、所述DNS服务器生成包含所述查询失败信息的应答消息。
上述用户设备的设备类型还可以为双栈设备,所述DNS服务器中预置的配置信息还可以为第七配置信息;
相应地,所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:
H1、所述DNS服务器对所述域名请求的类型进行判断,如果是A记录请求,则执行步骤H2;如果是AAAA记录请求,则执行步骤H7;如果是双栈记录请求,则执行步骤H12;
H2、所述DNS服务器根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H3;如果没有查询到A记录,则执行步骤H4;
H3、所述DNS服务器生成包含查询到的A记录的应答消息;
H4、所述DNS服务器根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H5;如果没有查询到AAAA记录,则执行步骤H6;
H5、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
H6、所述DNS服务器生成包含查询失败信息的应答消息;
H7、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H8;如果没有查询到AAAA记录,则执行步骤H9;
H8、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
H9、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H10;如果没有查询到A记录,则执行步骤H11;
H10、所述DNS服务器生成包含查询到的A记录的应答消息;
H11、所述DNS服务器生成包含查询失败信息的应答消息;
H12、所述DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤H13;如果仅查询到A记录,则执行步骤H14;如果没有查询到AAAA记录或A记录,则执行步骤H15;如果查询到AAAA记录和A记录,则执行步骤H16;
H13、所述DNS服务器生成包含查询到的AAAA记录的应答消息;
H14、所述DNS服务器生成包含查询到的A记录的应答消息;
H15、所述DNS服务器生成包含所述查询失败信息的应答消息;
H16、所述DNS服务器根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤H17;如果优先返回AAAA记录,执行步骤H18;
H17、所述DNS服务器将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;
H18、所述DNS服务器将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
进一步地,所述用户设备向接入网关发起域名请求之前,还包括:
所述用户设备向所述接入网关发起接入请求;
所述接入网关为所述用户设备分配网络地址,向所述用户设备返回分配给所述用户设备的网络地址;
所述用户设备根据所述网络地址确定自身的设备类型。
具体地,所述用户设备根据所述网络地址确定自身的设备类型,具体为:
当所述网络地址类型为IPv4地址时,所述用户设备确定自身的设备类型为IPv4设备;当所述网络地址类型为IPv6地址时,所述用户设备确定自身的设备类型为IPv6设备;当所述网络地址类型为双栈地址时,所述用户设备确定自身的设备类型为双栈设备。
本发明实施例提供一种处理域名请求的方法,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例二十二
参考图23,图23是本发明实施例二十二提供的一种处理域名请求的方法流程图,包括以下步骤:
步骤2300,用户设备设置优选配置信息。
其中,优选配置信息可以为A记录优选信息,也可以为AAAA记录优选信息,还可以为任意优选信息。
步骤2301,用户设备向接入网关发起接入请求。
步骤2302,接入网关为用户设备分配网络地址,记录用户设备的网络地址类型,并根据该网络地址类型确定用户设备的设备类型。
具体地,接入网关可以直接为用户设备分配网络地址,也可以作为用户设备的代理接入到具有网络地址分配功能的服务器,获取该服务器分配给用户设备的网络地址。
其中,用户设备的网络地址类型可以为IPv4地址、IPv6地址或双栈地址(即,IPv4地址+IPv6地址),相应地,当用户设备的网络地址类型为IPv4地址时,接入网关确定用户设备的设备类型为IPv4设备;当用户设备的网络地址类型为IPv6地址时,接入网关确定用户设备的设备类型为IPv6设备;当用户设备的网络地址类型为双栈地址时,接入网关确定用户设备的设备类型为双栈设备。
步骤2303,接入网关向用户设备返回分配给该用户设备的网络地址。
步骤2304,用户设备根据分配给自身的网络地址确定自身的设备类型。
步骤2305,用户设备根据自身的设备类型向接入网关发起域名请求。
其中,用户设备发起的域名请求中可以包含用户设备的设备类型和用户设备需要访问的应用服务器的域名,该应用服务器具有与该域名对应的IPv4地址或IPv6地址。用户设备的设备类型可通过域名扩展标记的方式包含在域名请求的新增字段中,用户设备发起的域名请求的类型可以是A记录请求、AAAA记录请求或双栈记录请求中的任意一种,该双栈记录请求用于同时向DNS服务器请求A记录和AAAA记录。
步骤2306,接入网关将接收到的域名请求转发给DNS服务器。
步骤2307,DNS服务器根据接收到的域名请求的类型和预先配置的配置信息,对接收到的域名请求进行应答处理,并根据处理结果生成应答消息。
其中,DNS服务器中预先设置的配置信息可以包括第五配置信息、第六配置信息和第七配置信息,第五配置信息用于标识DNS服务器是否具备根据A记录生成AAAA记录,第六配置信息用于标识DNS服务器是否具备根据AAAA记录生成A记录的功能,第七配置信息用于标识在接收到来自双栈设备的双栈请求时,向双栈设备优先返回A记录或AAAA记录。应答消息可以包含A记录,也可以包含AAAA记录,也可以同时包含A记录和AAAA记录,还可以包含查询失败信息。
步骤2308,DNS服务器向用户设备发送应答消息。
步骤2309,用户设备根据优选配置信息和应答消息,向应用服务器发起访问请求。
具体地,优选配置信息为A记录优选信息时,用户设备可以根据应答消息中包含的A记录,向应用服务器发起访问请求;优选配置信息为AAAA记录优选信息时,用户设备可以根据应答消息中包含的AAAA记录,向应用服务器发起访问请求;优选配置信息为任意优选信息时,用户设备可以根据应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
需要说明的是,当用户设备使用A记录向具有IPv6地址的应用服务器发起访问请求,或者用户设备使用AAAA记录向具有IPv4地址的应用服务器发起访问请求时,网络中的NAT服务器可对用户设备与应用服务器之间的报文进行IPv4报文和IPv6报文之间的转换,该NAT服务器可以独立部署,也可以和接入网关是同一设备。
此外,上述步骤2307,可细化为如图24所示的流程图,包括以下步骤:
步骤2401,DNS服务器对接收到的域名请求中包含的设备类型进行判断,如果是IPv4设备,则执行步骤2402;如果是IPv6设备,则执行步骤2409;如果是双栈设备,则执行步骤2416。
步骤2402,DNS服务器根据域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤2403;如果没有查询到A记录,则执行步骤2404;
步骤2403,DNS服务器生成包含查询到的A记录的应答消息。
步骤2404,DNS服务器根据第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤2405;如果具备,则执行步骤2406。
步骤2405,DNS服务器生成包含查询失败信息的应答消息。
步骤2406,DNS服务器根据域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤2407;如果没有查询到AAAA记录,则执行步骤2408。
步骤2407,DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含上述生成的A记录的应答消息。
步骤2408,DNS服务器生成包含查询失败信息的应答消息。
步骤2409,DNS服务器根据域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤2410;如果没有查询到AAAA记录,则执行步骤2411;
步骤2410,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤2411,DNS服务器根据第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤2412;如果具备,则执行步骤2413。
步骤2412,DNS服务器生成包含查询失败信息的应答消息。
步骤2413,DNS服务器根据域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤2414;如果没有查询到A记录,则执行步骤2415。
步骤2414,DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含上述生成的AAAA记录的应答消息。
步骤2415,DNS服务器生成包含查询失败信息的应答消息。
步骤2416,DNS服务器对域名请求的类型进行判断,如果是A记录请求,则执行步骤2417;如果是AAAA记录请求,则执行步骤2422;如果是双栈记录请求,则执行步骤2427。
步骤2417,DNS服务器根据A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤2418;如果没有查询到A记录,则执行步骤2419;
步骤2418,DNS服务器生成包含查询到的A记录的应答消息。
步骤2419,DNS服务器根据A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤2420;如果没有查询到AAAA记录,则执行步骤2421。
步骤2420,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤2421,DNS服务器生成包含查询失败信息的应答消息。
步骤2422,DNS服务器根据AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤2423;如果没有查询到AAAA记录,则执行步骤2424;
步骤2423,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤2424,DNS服务器根据AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤2425;如果没有查询到A记录,则执行步骤2426。
步骤2425,DNS服务器生成包含查询到的A记录的应答消息。
步骤2426,DNS服务器生成包含查询失败信息的应答消息。
步骤2427,DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤2428;如果仅查询到A记录,则执行步骤2429;如果没有查询到AAAA记录或A记录,则执行步骤2430;如果查询到AAAA记录和A记录,则执行步骤2431。
步骤2428,DNS服务器生成包含查询到的AAAA记录的应答消息。
步骤2429,DNS服务器生成包含查询到的A记录的应答消息。
步骤2430,DNS服务器生成包含查询失败信息的应答消息。
步骤2431,DNS服务器根据第七配置信息判断向用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤2432;否则,执行步骤2433。
步骤2432,DNS服务器将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中。
步骤2433,DNS服务器将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
本发明实施例提供一种处理域名请求的方法,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。此外,接入网关不需要针对不同类型的用户设备将域名请求分配给不同的DNS服务器,降低了接入网关分配DNS服务器的配置复杂度和分配处理复杂度,便于网络部署。
实施例二十三
参考图25,图25是本发明实施例二十三提供的一种用户设备的装置结构图,包括:
设置模块2510,用于设置优选配置信息。
第一发送模块2520,用于向接入网关发起域名请求。
其中,第一发送模块2520发起的域名请求中可以包含用户设备的设备类型和用户设备需要访问的应用服务器的域名,该应用服务器具有与该域名对应的IPv4地址或IPv6地址。用户设备的设备类型可通过域名扩展标记的方式包含在域名请求的新增字段中,第一发送模块2520发起的域名请求的类型可以是A记录请求、AAAA记录请求、A记录优先请求、AAAA记录优先请求或双栈记录请求中的任意一种,该双栈记录请求用于同时向DNS服务器请求A记录和AAAA记录。
第一接收模块2530,用于接收DNS服务器返回的应答消息。
第二发送模块2540,用于根据设置模块2510设置的优选配置信息和第一接收模块2530接收到的应答消息,向应用服务器发起访问请求。
其中,上述优选配置信息可以为A记录优选信息;
相应地,上述设置模块2510,具体用于配置A记录优选信息;上述第二发送模块2540,具体用于根据应答消息中包含的A记录,向应用服务器发起访问请求。
上述优选配置信息也可以为AAAA记录优选信息;
相应地,上述设置模块2510,具体用于配置AAAA记录优选信息;上述第二发送模块2540,具体用于根据应答消息中包含的AAAA记录,向应用服务器发起访问请求。
上述优选配置信息还可以为任意优选信息;
相应地,上述设置模块2510,具体用于配置任意优选信息;上述第二发送模块2540,具体用于根据应答消息中包含的A记录或AAAA记录,向应用服务器发起访问请求。
本发明实施例提供一种处理域名请求的方法,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,用户设备根据预先设置的优选配置信息使用A记录或AAAA记录发起访问请求,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例二十四
参考图26,图26是本发明实施例二十四提供的一种用户设备的装置结构图,包括:
设置模块2610,用于设置优选配置信息。
第一发送模块2620,用于向接入网关发起域名请求。
其中,第一发送模块2620发起的域名请求中可以包含用户设备的设备类型和用户设备需要访问的应用服务器的域名,该应用服务器具有与该域名对应的IPv4地址或IPv6地址。用户设备的设备类型可通过域名扩展标记的方式包含在域名请求的新增字段中,第一发送模块2620发起的域名请求的类型可以是A记录请求、AAAA记录请求、A记录优先请求、AAAA记录优先请求或双栈记录请求中的任意一种,该双栈记录请求用于同时向DNS服务器请求A记录和AAAA记录。
第一接收模块2630,用于接收DNS服务器返回的应答消息。
第二发送模块2640,用于根据设置模块2610设置的优选配置信息和第一接收模块2630接收到的应答消息,向应用服务器发起访问请求。
第三发送模块2650,用于向所述接入网关发起接入请求;
第二接收模块2660,用于接收所述接入网关分配给所述用户设备的网络地址。
确定模块2670,用于根据所述第二接收模块2660接收到的所述网络地址类型确定所述用户设备的设备类型。
相应地,上述第一发送模块2620,具体用于根据确定模块2680确定出的用户设备的设备类型,向接入网关发起域名请求。
其中,上述优选配置信息可以为A记录优选信息;
相应地,上述设置模块2610,具体用于配置A记录优选信息;上述第二发送模块2640,具体用于根据应答消息中包含的A记录,向应用服务器发起访问请求。
上述优选配置信息也可以为AAAA记录优选信息;
相应地,上述设置模块2610,具体用于配置AAAA记录优选信息;上述第二发送模块2640,具体用于根据应答消息中包含的AAAA记录,向应用服务器发起访问请求。
上述优选配置信息还可以为任意优选信息;
相应地,上述设置模块2610,具体用于配置任意优选信息;上述第二发送模块2640,具体用于根据应答消息中包含的A记录或AAAA记录,向应用服务器发起访问请求。
本发明实施例提供一种处理域名请求的方法,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,用户设备根据接入网关分配的网络地址的类型确定自身的设备类型,根据预先设置的优选配置信息使用A记录或AAAA记录发起访问请求,降低了DNS请求的失败率以及DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
实施例二十五
参考图27,图27本发明实施例二十五提供的一种用户设备的装置结构图,包括处理器2710、通信接口2720、存储器2730和总线2740,所述处理器2710、所述通信接口2720、所述存储器2730通过所述总线2740完成相互之间的通信;
所述通信接口2720,用于与接入网关、DNS服务器和应用服务器进行通信;
所述处理器2710,用于执行程序;
所述存储器2730,用于存放所述程序;
其中,所述程序用于设置优选配置信息,向所述接入网关发起域名请求,接收所述DNS服务器返回的应答消息,根据所述优选配置信息和所述应答消息,向所述应用服务器发起访问请求。
具体地,优选配置信息为A记录优选信息时,所述程序可以根据应答消息中包含的A记录,向应用服务器发起访问请求;优选配置信息为AAAA记录优选信息时,所述程序可以根据应答消息中包含的AAAA记录,向应用服务器发起访问请求;优选配置信息为任意优选信息时,所述程序可以根据应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
优选地,所述程序还可以向所述接入网关发起接入请求,接收所述接入网关分配给所述用户设备的网络地址,根据所述网络地址类型确定所述用户设备的设备类型。
本发明实施例提供一种处理域名请求的方法,通过在域名请求中配置用户设备的设备类型,使得DNS服务器能够感知用户设备的请求意愿和设备类型,进而能够向用户设备返回用户设备所需要的、适应网络状况的A记录和/或AAAA记录,用户设备根据预先设置的优选配置信息使用A记录或AAAA记录发起访问请求,降低了DNS应答的盲目性,避免了不必要的查询和生成A记录或AAAA记录的操作,避免了不必要的网络地址转换操作,降低了对DNS服务器和NAT服务器的性能需求。
以上所述仅为本发明的优选实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明要求包含范围之内。
Claims (58)
- 一种接入网关,其特征在于,包括:存储模块,用于存储配置信息;接收模块,用于接收来自用户设备的域名请求和来自域名系统DNS服务器的应答消息;修改模块,用于根据所述用户设备的设备类型以及所述存储模块存储的配置信息,对所述接收模块接收到的域名请求进行修改;发送模块,用于将所述修改模块修改后的域名请求发送给所述DNS服务器,将所述应答消息发送给所述用户设备。
- 根据权利要求1所述的接入网关,其特征在于,所述存储模块,包括:第一存储子模块,用于存储第一配置信息;所述修改模块,包括:第一修改子模块,用于当所述用户设备的设备类型为互联网协议版本IPv4设备时,根据所述第一存储子模块存储的第一配置信息,将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
- 根据权利要求1所述的接入网关,其特征在于,所述存储模块,包括:第二存储子模块,用于存储第二配置信息;所述修改模块,包括:第二修改子模块,用于当所述用户设备的设备类型为IPv4设备时,根据所述第二存储子模块存储的第二配置信息,将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
- 根据权利要求1所述的接入网关,其特征在于,所述存储模块,包括:第三存储子模块,用于存储第三配置信息;所述修改模块,包括:第三修改子模块,用于当所述用户设备的设备类型为双栈设备时,根据所述第三存储子模块存储的第三配置信息,将所述域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;当所述用户设备的设备类型为IPv6设备时,根据所述第三存储子模块存储的第三配置信息,将所述域名请求由AAAA记录优先请求修改为AAAA记录请求。
- 根据权利要求1所述的接入网关,其特征在于,所述存储模块,包括:第四存储子模块,用于存储第四配置信息;所述修改模块,包括:第四修改子模块,用于当所述用户设备的设备类型为双栈设备时,根据所述第四存储子模块存储的第四配置信息,将所述域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将所述域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
- 根据权利要求1所述的接入网关,其特征在于,所述接收模块,还用于接收来自所述用户设备的接入请求;所述接入网关,还包括:分配模块,用于为所述用户设备分配网络地址,记录所述用户设备的网络地址类型;确定模块,用于根据所述分配模块记录的所述网络地址类型确定所述用户设备的设备类型;所述发送模块,还用于向所述用户设备返回所述分配模块分配给所述用户设备的网络地址。
- 根据权利要求6所述的接入网关,其特征在于,所述确定模块,具体用于当所述用户设备的网络地址类型为IPv4地址时,确定所述用户设备的设备类型为IPv4设备;当所述用户设备的网络地址类型为IPv6地址时,确定所述用户设备的设备类型为IPv6设备;当所述用户设备的网络地址类型为双栈地址时,确定所述用户设备的设备类型为双栈设备。
- 一种接入网关,其特征在于,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;所述通信接口,用于与用户设备和域名系统DNS服务器进行通信;所述处理器,用于执行程序;所述存储器,用于存放所述程序;其中,所述程序用于接收来自所述用户设备的域名请求和来自域名系统DNS服务器的应答消息,根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,并将修改后的域名请求发送给所述DNS服务器,将所述应答消息发送给所述用户设备。
- 一种域名系统DNS服务器,其特征在于,包括:存储模块,用于存储配置信息;接收模块,用于接收来自接入网关的域名请求;处理模块,用于根据所述接收模块接收到的域名请求的类型和所述配置信息,对所述域名请求进行处理。
- 根据权利要求9所述的DNS服务器,其特征在于,所述处理模块,具体用于根据所述接收模块接收到的域名请求的类型和所述配置信息,对所述域名请求进行应答处理,根据处理结果生成应答消息;所述DNS服务器,还包括:发送模块,用于将所述处理模块生成的所述应答消息发送给用户设备。
- 根据权利要求10所述的DNS服务器,其特征在于,所述存储模块,包括:第一存储子模块,用于存储第六配置信息;所述接收模块,包括:第一接收子模块,用于接收来自所述接入网关的A记录请求;所述处理模块,包括:第一查询子模块,用于根据所述第一接收子模块接收到的所述A记录请求中包含的域名查询对应的A记录;第一判断子模块,用于在所述第一查询子模块没有查询到A记录时,根据所述第六配置信息判断所述DNS服务器是否具备根据AAAA记录生成A记录的功能;第二查询子模块,用于在所述第一判断子模块判断出所述DNS服务器具备根据AAAA记录生成A记录的功能时,根据所述A记录请求中包含的域名查询对应的AAAA记录;第一生成子模块,用于在所述第一查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第一判断子模块判断出所述DNS服务器不具备根据AAAA记录生成A记录的功能,或者所述第二查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在所述第二查询子模块查询到AAAA记录时,根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息。
- 根据权利要求10所述的DNS服务器,其特征在于,所述存储模块,包括:第二存储子模块,用于存储第五配置信息;所述接收模块,包括:第二接收子模块,用于接收来自所述接入网关的AAAA记录请求;所述处理模块,包括:第三查询子模块,用于根据所述第二接收子模块接收到的所述AAAA记录请求中包含的域名查询对应的AAAA记录;第二判断子模块,用于在所述第三查询子模块没有查询到AAAA记录时,根据所述第五配置信息判断所述DNS服务器是否具备根据A记录生成AAAA记录的功能;第四查询子模块,用于在所述第二判断子模块判断出所述DNS服务器具备根据A记录生成AAAA记录的功能时,根据所述AAAA记录请求中包含的域名查询对应的A记录;第二生成子模块,用于在所述第三查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第二判断子模块判断出所述DNS服务器不具备根据A记录生成AAAA记录的功能,或者所述第四查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;在所述第四查询子模块查询到A记录时,根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息。
- 根据权利要求10所述的DNS服务器,其特征在于,所述接收模块,包括:第三接收子模块,用于接收来自所述接入网关的A记录优先请求;所述处理模块,包括:第五查询子模块,用于根据所述A记录优先请求中包含的域名查询对应的A记录,在没有查询到A记录时,根据所述A记录优先请求中包含的域名查询对应的AAAA记录;第三生成子模块,用于在所述第五查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第五查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第五查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息。
- 根据权利要求10所述的DNS服务器,其特征在于,所述接收模块,包括:第四接收子模块,用于接收来自所述接入网关的AAAA记录优先请求;所述处理模块,包括:第六查询子模块,用于根据所述第四接收子模块接收到的所述AAAA记录优先请求中包含的域名查询对应的AAAA记录,在没有查询到AAAA记录时,根据所述AAAA记录优先请求中包含的域名查询对应的A记录;第四生成子模块,用于在所述第六查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第六查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第六查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息。
- 根据权利要求10所述的DNS服务器,其特征在于,所述存储模块,包括:第三存储子模块,用于存储第七配置信息;所述接收模块,包括:第五接收子模块,用于接收来自所述接入网关的双栈记录请求;所述处理模块,包括:第七查询子模块,用于根据所述第五接收子模块接收到的所述双栈记录请求中包含的域名查询对应的AAAA记录和A记录;第三判断子模块,用于在所述第七查询子模块查询到AAAA记录和A记录时,根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录;第五生成子模块,用于在所述第七查询子模块仅查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第七查询子模块仅查询到A记录时,生成包含查询到的A记录的应答消息;在所述第七查询子模块没有查询到AAAA记录或A记录时,生成包含查询失败信息的应答消息;在所述第三判断子模块判断出优先返回A记录时,将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;在所述第三判断子模块判断出优先返回AAAA记录,将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
- 一种域名系统DNS服务器,其特征在于,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;所述通信接口,用于与用户设备和接入网关进行通信;所述处理器,用于执行程序;所述存储器,用于存放所述程序;其中,所述程序用于接收来自所述接入网关的域名请求,根据所述域名请求的类型以及所述DNS服务器中预置的配置信息,对所述域名请求进行处理。
- 一种用户设备,其特征在于,包括:设置模块,用于设置优选配置信息;第一发送模块,用于向接入网关发起域名请求;第一接收模块,用于接收域名系统DNS服务器返回的应答消息;第二发送模块,用于根据所述设置模块设置的所述优选配置信息和所述第一接收模块接收到的所述应答消息,向应用服务器发起访问请求。
- 根据权利要求17所述的用户设备,其特征在于,所述优选配置信息为A记录优选信息;所述设置模块,具体用于配置所述A记录优选信息;所述第二发送模块,具体用于根据所述应答消息中包含的A记录,向所述应用服务器发起访问请求。
- 根据权利要求17所述的用户设备,其特征在于,所述优选配置信息为AAAA记录优选信息;所述设置模块,具体用于配置所述AAAA记录优选信息;所述第二发送模块,具体用于根据所述应答消息中包含的AAAA记录,向所述应用服务器发起访问请求。
- 根据权利要求17所述的用户设备,其特征在于,所述优选配置信息为任意优选信息;所述设置模块,具体用于配置所述任意优选信息;所述第二发送模块,具体用于根据所述应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
- 根据权利要求17所述的用户设备,其特征在于,还包括:第三发送模块,用于向所述接入网关发起接入请求;第二接收模块,用于接收所述接入网关分配给所述用户设备的网络地址。
- 根据权利要求21所述的用户设备,其特征在于,还包括:确定模块,用于根据所述第二接收模块接收到的所述网络地址类型确定所述用户设备的设备类型。
- 一种用户设备,其特征在于,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;所述通信接口,用于与接入网关、域名系统DNS服务器和应用服务器进行通信;所述处理器,用于执行程序;所述存储器,用于存放所述程序;其中,所述程序用于设置优选配置信息,向所述接入网关发起域名请求,接收所述DNS服务器返回的应答消息,根据所述优选配置信息和所述应答消息,向所述应用服务器发起访问请求。
- 一种处理域名请求的方法,其特征在于,包括以下步骤:用户设备向接入网关发起域名请求;所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,并将修改后的域名请求发送给域名系统DNS服务器;所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行处理。
- 根据权利要求24所述的方法,其特征在于,所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行处理,具体为:所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息;所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行处理之后,还包括:所述DNS服务器将所述应答消息发送给所述用户设备。
- 根据权利要求25所述的方法,其特征在于,所述用户设备向接入网关发起域名请求之前,还包括:所述用户设备设置优选配置信息;所述用户设备接收所述DNS服务器返回的应答消息之后,还包括:所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求。
- 根据权利要求26所述的方法,其特征在于,所述优选配置信息为A记录优选信息;所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:所述用户设备根据所述应答消息中包含的A记录,向所述应用服务器发起访问请求。
- 根据权利要求26所述的方法,其特征在于,所述优选配置信息为AAAA记录优选信息;所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:所述用户设备根据所述应答消息中包含的AAAA记录,向所述应用服务器发起访问请求。
- 根据权利要求26所述的方法,其特征在于,所述优选配置信息为任意优选信息;所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:所述用户设备根据所述应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
- 根据权利要求24所述的方法,其特征在于,所述接入网关中预置的配置信息为第一配置信息;所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:如果所述用户设备的设备类型为互联网协议版本IPv4设备,所述接入网关将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录请求或A记录优先请求。
- 根据权利要求24所述的方法,其特征在于,所述接入网关中预置的配置信息为第二配置信息;所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:如果所述用户设备的设备类型为IPv4设备,所述接入网关将所述域名请求的类型由AAAA记录优先请求或AAAA记录请求,修改为A记录优先请求。
- 根据权利要求24所述的方法,其特征在于,所述接入网关中预置的配置信息为第三配置信息;所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:如果所述用户设备的设备类型为双栈设备,所述接入网关将所述域名请求的类型由A记录优先请求或A记录请求,修改为AAAA记录优先请求;如果用户设备的设备类型为IPv6设备,所述接入网关将所述域名请求由AAAA记录优先请求修改为AAAA记录请求。
- 根据权利要求24所述的方法,其特征在于,所述接入网关中预置的配置信息为第四配置信息;所述接入网关根据所述用户设备的设备类型以及所述接入网关中预置的配置信息,对所述域名请求进行修改,具体为:如果所述用户设备的设备类型为双栈设备,所述接入网关将所述域名请求的类型由A记录优先请求或A记录请求修改为AAAA记录优先请求或双栈记录请求,或者,将所述域名请求的类型由AAAA记录请求修改为AAAA记录优先请求。
- 根据权利要求25所述的方法,其特征在于,所述DNS服务器接收到的域名请求的类型为A记录请求,所述DNS服务器中预置的配置信息为第六配置信息;所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:A1、所述DNS服务器根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤A2;如果没有查询到A记录,则执行步骤A3;A2、所述DNS服务器生成包含查询到的A记录的应答消息;A3、所述DNS服务器根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤1604;如果具备,则执行步骤A5;A4、所述DNS服务器生成包含查询失败信息的应答消息;A5、所述DNS服务器根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤A6;如果没有查询到AAAA记录,则执行步骤A7;A6、所述DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含该生成的A记录的应答消息;A7、所述DNS服务器生成包含所述查询失败信息的应答消息。
- 根据权利要求25所述的方法,其特征在于,所述DNS服务器接收到的域名请求的类型为AAAA记录请求,所述DNS服务器中预置的配置信息为第五配置信息;所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:B1、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤B2;如果没有查询到AAAA记录,则执行步骤B3;B2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;B3、所述DNS服务器根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤B4;如果具备,则执行步骤B5;B4、所述DNS服务器生成包含查询失败信息的应答消息;B5、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤B6;如果没有查询到A记录,则执行步骤B7;B6、所述DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息;B7、所述DNS服务器生成包含所述查询失败信息的应答消息。
- 根据权利要求25所述的方法,其特征在于,所述DNS服务器接收到的域名请求的类型为A记录优先请求;所述DNS服务器根据接收到的域名请求的类型对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:C1、所述DNS服务器根据所述A记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤C2;如果没有查询到A记录,则执行步骤C3;C2、所述DNS服务器生成包含查询到的A记录的应答消息;C3、所述DNS服务器根据A记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤C4;如果没有查询到AAAA记录,则执行步骤C5;C4、所述DNS服务器生成包含查询到的AAAA记录的应答消息;C5、所述DNS服务器生成包含查询失败信息的应答消息。
- 根据权利要求25所述的方法,其特征在于,所述DNS服务器接收到的域名请求的类型为AAAA记录优先请求;所述DNS服务器根据接收到的域名请求的类型对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:D1、所述DNS服务器根据AAAA记录优先请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤D2;如果没有查询到AAAA记录,则执行步骤D3;D2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;D3、所述DNS服务器根据AAAA记录优先请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤D4;如果没有查询到A记录,则执行步骤1625。D4、所述DNS服务器生成包含查询到的A记录的应答消息;D5、所述DNS服务器生成包含查询失败信息的应答消息。
- 根据权利要求25所述的方法,其特征在于,所述DNS服务器接收到的域名请求的类型为双栈记录请求,所述DNS服务器中预置的配置信息为第七配置信息;所述DNS服务器根据接收到的域名请求的类型和所述DNS服务器中预置的配置信息,对所述接收到的域名请求进行应答处理,根据处理结果生成应答消息,具体包括:E1、所述DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤E2;如果仅查询到A记录,则执行步骤E3;如果没有查询到AAAA记录或A记录,则执行步骤E4;如果查询到AAAA记录和A记录,则执行步骤E5;E2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;E3、所述DNS服务器生成包含查询到的A记录的应答消息;E4、所述DNS服务器生成包含查询失败信息的应答消息;E5、所述DNS服务器根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤E6;如果优先返回AAAA记录,执行步骤E7;E6、所述DNS服务器将查询到的A记录设置到应答消息中靠前的资源记录中,将查询到的AAAA记录设置到应答消息中靠后的资源记录中;E7、所述DNS服务器将查询到的AAAA记录设置到应答消息中靠前的资源记录中,将查询到的A记录设置到应答消息中靠后的资源记录中。
- 根据权利要求24所述的方法,其特征在于,所述用户设备向接入网关发起域名请求之前,还包括:所述用户设备向所述接入网关发起接入请求;所述接入网关为所述用户设备分配网络地址,记录所述用户设备的网络地址类型,根据所述网络地址类型确定所述用户设备的设备类型,并向所述用户设备返回分配给所述用户设备的网络地址。
- 根据权利要求39所述的方法,其特征在于,所述接入网关根据所述网络地址类型确定所述用户设备的设备类型,具体为:当所述用户设备的网络地址类型为IPv4地址时,所述接入网关确定所述用户设备的设备类型为IPv4设备;当所述用户设备的网络地址类型为IPv6地址时,所述接入网关确定所述用户设备的设备类型为IPv6设备;当所述用户设备的网络地址类型为双栈地址时,所述接入网关确定所述用户设备的设备类型为双栈设备。
- 一种域名系统DNS服务器,其特征在于,包括:存储模块,用于存储配置信息;接收模块,用于接收来自接入网关的域名请求,所述域名请求中包含发起所述域名请求的用户设备的设备类型;处理模块,根据所述接收模块接收到的所述域名请求的类型、所述配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理;
- 根据权利要求41所述的DNS服务器,其特征在于,所述处理模块,具体用于根据所述接收模块接收到的域名请求的类型、所述配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;所述DNS服务器,还包括:发送模块,用于将所述处理模块生成的所述应答消息发送给用户设备。
- 根据权利要求42所述的DNS服务器,其特征在于,所述域名请求中包含的所述用户设备的设备类型为IPv4设备;所述存储模块,包括:第一存储子模块,用于存储第六配置信息;所述处理模块,包括:第一查询子模块,用于根据所述域名请求中包含的域名查询对应的A记录;第一判断子模块,用于在所述第一查询子模块没有查询到A记录时,根据所述第六配置信息判断所述DNS服务器是否具备根据AAAA记录生成A记录的功能;第二查询子模块,用于在所述第一判断子模块判断出所述DNS服务器具备根据AAAA记录生成A记录的功能时,根据所述域名请求中包含的域名查询对应的AAAA记录;第一生成子模块,用于在所述第一查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第一判断子模块判断出所述DNS服务器不具备根据AAAA记录生成A记录的功能,或者所述第二查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在所述第二查询子模块查询到AAAA记录时,根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息。
- 根据权利要求42所述的DNS服务器,其特征在于,所述域名请求中包含的所述用户设备的设备类型为IPv6设备;所述存储模块,包括:第二存储子模块,用于存储第五配置信息;所述处理模块,包括:第三查询子模块,用于根据所述域名请求中包含的域名查询对应的AAAA记录;第二判断子模块,用于在所述第三查询子模块没有查询到AAAA记录时,根据所述第五配置信息判断所述DNS服务器是否具备根据A记录生成AAAA记录的功能;第四查询子模块,用于在所述第二判断子模块判断出所述DNS服务器具备根据A记录生成AAAA记录的功能时,根据所述域名请求中包含的域名查询对应的A记录;第二生成子模块,用于在所述第三查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第二判断子模块判断出所述DNS服务器不具备根据A记录生成AAAA记录的功能,或者所述第四查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;在所述第四查询子模块查询到A记录时,根据查询到的A记录生成对应的AAAA记录,并生成包含该生成的AAAA记录的应答消息。
- 根据权利要求42所述的DNS服务器,其特征在于,所述域名请求中包含的所述用户设备的设备类型为双栈设备;所述存储模块,包括:第三存储子模块,用于存储第七配置信息;所述处理模块,包括:第三判断子模块,用于对所述域名请求的类型进行判断;第五查询子模块,用于在所述第三判断子模块判断出所述域名请求的类型为A记录请求时,根据所述A记录请求中包含的域名查询对应的A记录;在没有查询到A记录时,根据所述A记录请求中包含的域名查询对应的AAAA记录;第六查询子模块,用于在所述第三判断子模块判断出所述域名请求的类型为AAAA记录请求时,根据所述AAAA记录请求中包含的域名查询对应的AAAA记录;在没有查询到AAAA记录时,根据所述AAAA记录请求中包含的域名查询对应的A记录;第七查询子模块,用于在所述第三判断子模块判断出所述域名请求的类型为双栈记录请求时,根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录;第四判断子模块,用于在所述第七查询子模块查询到AAAA记录和A记录时,根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录;第三生成子模块,用于在所述第五查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第五查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第五查询子模块没有查询到AAAA记录时,生成包含查询失败信息的应答消息;在所述第六查询子模块查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第六查询子模块查询到A记录时,生成包含查询到的A记录的应答消息;在所述第六查询子模块没有查询到A记录时,生成包含查询失败信息的应答消息;在所述第七查询子模块仅查询到AAAA记录时,生成包含查询到的AAAA记录的应答消息;在所述第七查询子模块仅查询到A记录时,生成包含查询到的A记录的应答消息;在所述第七查询子模块没有查询到AAAA记录或A记录时,生成包含所述查询失败信息的应答消息;在所述第四判断子模块判断出优先返回A记录时,将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;在所述第四判断子模块判断出优先返回AAAA记录时,将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
- 一种域名系统DNS服务器,其特征在于,包括处理器、通信接口、存储器和总线,所述处理器、所述通信接口、所述存储器通过所述总线完成相互之间的通信;所述通信接口,用于与用户设备和接入网关进行通信;所述处理器,用于执行程序;所述存储器,用于存放程序;其中,所述程序用于接收来自所述接入网关的域名请求,根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的用户设备的设备类型,对所述域名请求进行处理。
- 一种处理域名请求的方法,其特征在于,包括以下步骤:用户设备根据自身的设备类型向接入网关发起域名请求,所述域名请求中包含所述用户设备的设备类型;所述接入网关将所述域名请求转发给域名系统DNS服务器;所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理。
- 根据权利要求47所述的方法,其特征在于,所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理,具体为:所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息;所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行处理之后,还包括:所述DNS服务器将所述应答消息发送给所述用户设备。
- 根据权利要求48所述的方法,其特征在于,所述用户设备的设备类型为IPv4设备,所述DNS服务器中预置的配置信息为第六配置信息;所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:F1、所述DNS服务器根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤F2;如果没有查询到A记录,则执行步骤F3;F2、所述DNS服务器生成包含查询到的A记录的应答消息;F3、所述DNS服务器根据所述第六配置信息判断自身是否具备根据AAAA记录生成A记录的功能,如果不具备,则执行步骤F4;如果具备,则执行步骤F5;F4、所述DNS服务器生成包含查询失败信息的应答消息;F5、所述DNS服务器根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤F6;如果没有查询到AAAA记录,则执行步骤F7;F6、所述DNS服务器根据查询到的AAAA记录生成对应的A记录,并生成包含生成的A记录的应答消息;F7、所述DNS服务器生成包含查询失败信息的应答消息。
- 根据权利要求48所述的方法,其特征在于,所述用户设备的设备类型为IPv6设备,所述DNS服务器中预置的配置信息为第五配置信息;所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:G1、所述DNS服务器根据所述域名请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤G2;如果没有查询到AAAA记录,则执行步骤G3;G2、所述DNS服务器生成包含查询到的AAAA记录的应答消息;G3、所述DNS服务器根据所述第五配置信息判断自身是否具备根据A记录生成AAAA记录的功能,如果不具备,则执行步骤G4;如果具备,则执行步骤G5;G4、所述DNS服务器生成包含查询失败信息的应答消息;G5、所述DNS服务器根据所述域名请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤G6;如果没有查询到A记录,则执行步骤G7;G6、所述DNS服务器根据查询到的A记录生成对应的AAAA记录,并生成包含生成的AAAA记录的应答消息;G7、所述DNS服务器生成包含所述查询失败信息的应答消息。
- 根据权利要求48所述的方法,其特征在于,所述用户设备的设备类型为双栈设备,所述DNS服务器中预置的配置信息为第七配置信息;所述DNS服务器根据所述域名请求的类型、所述DNS服务器中预置的配置信息以及所述域名请求中包含的所述用户设备的设备类型,对所述域名请求进行应答处理,根据处理结果生成应答消息,具体包括:H1、所述DNS服务器对所述域名请求的类型进行判断,如果是A记录请求,则执行步骤H2;如果是AAAA记录请求,则执行步骤H7;如果是双栈记录请求,则执行步骤H12;H2、所述DNS服务器根据所述A记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H3;如果没有查询到A记录,则执行步骤H4;H3、所述DNS服务器生成包含查询到的A记录的应答消息;H4、所述DNS服务器根据所述A记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H5;如果没有查询到AAAA记录,则执行步骤H6;H5、所述DNS服务器生成包含查询到的AAAA记录的应答消息;H6、所述DNS服务器生成包含查询失败信息的应答消息;H7、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的AAAA记录,如果查询到AAAA记录,则执行步骤H8;如果没有查询到AAAA记录,则执行步骤H9;H8、所述DNS服务器生成包含查询到的AAAA记录的应答消息;H9、所述DNS服务器根据所述AAAA记录请求中包含的域名查询对应的A记录,如果查询到A记录,则执行步骤H10;如果没有查询到A记录,则执行步骤H11;H10、所述DNS服务器生成包含查询到的A记录的应答消息;H11、所述DNS服务器生成包含查询失败信息的应答消息;H12、所述DNS服务器根据双栈记录请求中包含的域名查询对应的AAAA记录和A记录,如果仅查询到AAAA记录,则执行步骤H13;如果仅查询到A记录,则执行步骤H14;如果没有查询到AAAA记录或A记录,则执行步骤H15;如果查询到AAAA记录和A记录,则执行步骤H16;H13、所述DNS服务器生成包含查询到的AAAA记录的应答消息;H14、所述DNS服务器生成包含查询到的A记录的应答消息;H15、所述DNS服务器生成包含所述查询失败信息的应答消息;H16、所述DNS服务器根据所述第七配置信息判断向所述用户设备优先返回A记录还是AAAA记录,如果优先返回A记录,则执行步骤H17;如果优先返回AAAA记录,执行步骤H18;H17、所述DNS服务器将查询到的A记录设置到所述应答消息中靠前的资源记录中,将查询到的AAAA记录设置到所述应答消息中靠后的资源记录中;H18、所述DNS服务器将查询到的AAAA记录设置到所述应答消息中靠前的资源记录中,将查询到的A记录设置到所述应答消息中靠后的资源记录中。
- 根据权利要求47所述的方法,其特征在于,所述用户设备向接入网关发起域名请求之前,还包括:所述用户设备向所述接入网关发起接入请求;所述接入网关为所述用户设备分配网络地址,向所述用户设备返回分配给所述用户设备的网络地址;所述用户设备根据所述网络地址确定自身的设备类型。
- 根据权利要求52所述的方法,其特征在于,所述用户设备根据所述网络地址确定自身的设备类型,具体为:当所述网络地址类型为IPv4地址时,所述用户设备确定自身的设备类型为IPv4设备;当所述网络地址类型为IPv6地址时,所述用户设备确定自身的设备类型为IPv6设备;当所述网络地址类型为双栈地址时,所述用户设备确定自身的设备类型为双栈设备。
- 根据权利要求48所述的方法,其特征在于,所述用户设备向接入网关发起域名请求之前,还包括:所述用户设备设置优选配置信息;所述用户设备接收所述DNS服务器返回的应答消息之后,还包括:所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求。
- 根据权利要求54所述的方法,其特征在于,所述优选配置信息为A记录优选信息;所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:所述用户设备根据所述应答消息中包含的A记录,向所述应用服务器发起访问请求。
- 根据权利要求54所述的方法,其特征在于,所述优选配置信息为AAAA记录优选信息;所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:所述用户设备根据所述应答消息中包含的AAAA记录,向所述应用服务器发起访问请求。
- 根据权利要求54所述的方法,其特征在于,所述优选配置信息为任意优选信息;所述用户设备根据所述优选配置信息和所述应答消息,向应用服务器发起访问请求,具体为:所述用户设备根据所述应答消息中包含的A记录或AAAA记录,向所述应用服务器发起访问请求。
- 根据权利要求47所述的方法,其特征在于,所述用户设备的设备类型包含在所述域名请求的新增字段中。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2013/090975 WO2015100566A1 (zh) | 2013-12-30 | 2013-12-30 | 一种处理域名请求的方法及设备 |
CN201380004217.3A CN104170356B (zh) | 2013-12-30 | 2013-12-30 | 一种处理域名请求的方法及设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2013/090975 WO2015100566A1 (zh) | 2013-12-30 | 2013-12-30 | 一种处理域名请求的方法及设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015100566A1 true WO2015100566A1 (zh) | 2015-07-09 |
Family
ID=51912372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/090975 WO2015100566A1 (zh) | 2013-12-30 | 2013-12-30 | 一种处理域名请求的方法及设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104170356B (zh) |
WO (1) | WO2015100566A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105791450A (zh) * | 2014-12-19 | 2016-07-20 | 中兴通讯股份有限公司 | 一种域名系统dns重定向的方法、装置和系统 |
CN106302845B (zh) * | 2015-05-29 | 2020-07-17 | 西安中兴新软件有限责任公司 | 数据通道产品的域名系统地址配置方法及装置 |
CN105812503B (zh) * | 2016-03-15 | 2018-11-16 | 中国石油天然气股份有限公司华北油田分公司 | 根服务器地址更新方法和一种递归服务器 |
CN108881501B (zh) * | 2017-05-12 | 2021-07-06 | 阿里巴巴集团控股有限公司 | 一种实现网页应用域名跳转的方法及装置 |
CN115412531A (zh) * | 2022-08-31 | 2022-11-29 | 深圳市创维软件有限公司 | 网络查询方法、装置、设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1756263A (zh) * | 2004-09-27 | 2006-04-05 | 上海贝尔阿尔卡特股份有限公司 | 域名解析方法、域名服务器及域名系统 |
US7864780B1 (en) * | 2003-04-29 | 2011-01-04 | Cisco Technology, Inc. | Apparatus and methods for handling name resolution over IPV6 using NAT-PT and DNS-ALG |
CN102196053A (zh) * | 2010-03-04 | 2011-09-21 | 成都市华为赛门铁克科技有限公司 | 域名信息查询方法、设备及一种通信网络 |
CN102196051A (zh) * | 2010-03-03 | 2011-09-21 | 中国移动通信集团公司 | 一种实现终端通信的方法、系统及装置 |
CN102739809A (zh) * | 2011-04-07 | 2012-10-17 | 中国电信股份有限公司 | DNS64数据库、服务器、系统和IPv4/IPv6通信方法 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101499996B (zh) * | 2008-01-28 | 2012-05-23 | 中国电信股份有限公司 | 域名差异化解析方法和域名服务器 |
US20130290563A1 (en) * | 2011-10-19 | 2013-10-31 | Xerocole, Inc. | Answer augmentation system for authoritative dns servers |
-
2013
- 2013-12-30 WO PCT/CN2013/090975 patent/WO2015100566A1/zh active Application Filing
- 2013-12-30 CN CN201380004217.3A patent/CN104170356B/zh active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7864780B1 (en) * | 2003-04-29 | 2011-01-04 | Cisco Technology, Inc. | Apparatus and methods for handling name resolution over IPV6 using NAT-PT and DNS-ALG |
CN1756263A (zh) * | 2004-09-27 | 2006-04-05 | 上海贝尔阿尔卡特股份有限公司 | 域名解析方法、域名服务器及域名系统 |
CN102196051A (zh) * | 2010-03-03 | 2011-09-21 | 中国移动通信集团公司 | 一种实现终端通信的方法、系统及装置 |
CN102196053A (zh) * | 2010-03-04 | 2011-09-21 | 成都市华为赛门铁克科技有限公司 | 域名信息查询方法、设备及一种通信网络 |
CN102739809A (zh) * | 2011-04-07 | 2012-10-17 | 中国电信股份有限公司 | DNS64数据库、服务器、系统和IPv4/IPv6通信方法 |
Also Published As
Publication number | Publication date |
---|---|
CN104170356A (zh) | 2014-11-26 |
CN104170356B (zh) | 2017-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2014187037A1 (zh) | 流转发方法、设备及系统 | |
WO2020145718A1 (ko) | 디스플레이용 기판 | |
WO2020122676A1 (en) | Apparatus and method for initial access in wireless communication system | |
WO2015100566A1 (zh) | 一种处理域名请求的方法及设备 | |
WO2015139232A1 (zh) | 一种应用的推荐方法、系统及服务器 | |
WO2012165794A2 (ko) | 이기종 네트워크 기반 데이터 동시 전송 서비스 시스템 및 그 방법 | |
WO2011162473A2 (en) | Planar transformer | |
WO2015027485A1 (zh) | 远程变更签约方法及其装置 | |
WO2018230993A1 (en) | Method and apparatus for performing scheduling request to support plurality of services efficiently | |
WO2021150014A1 (en) | Self-optimization method and device | |
WO2020067715A1 (en) | Method and device for configuring node to transmit and receive data | |
WO2014063360A1 (zh) | 业务接入的控制方法及设备 | |
WO2017116034A1 (ko) | 전자 장치, 전자 장치의 통신 방법 및 이동 단말기의 통신 방법 | |
WO2012165809A2 (ko) | 이기종 네트워크 기반 데이터 동시 전송 서비스 방법 및 장치 | |
CN104322023A (zh) | 流转发方法、设备及系统 | |
WO2018000856A1 (zh) | 一种实现SDN Overlay网络报文转发的方法、终端、设备及计算机可读存储介质 | |
WO2022108393A1 (ko) | 프론트홀 인터페이스를 사용하는 통신을 위한 방법 및 장치 | |
WO2022015109A1 (en) | Method and node for communication in communication system supporting integrated access and backhaul (iab) | |
WO2015000117A1 (zh) | 一种模拟拨测用户侧和网络侧的方法及设备 | |
CN104509042A (zh) | 一种数据处理方法、基站和用户设备 | |
WO2020197205A1 (en) | Resource management method, control information transmission method and information configuration method | |
WO2013109063A1 (en) | Method for establishing user plane after relay node moves | |
WO2015106459A1 (zh) | 透传数据传输方法及公共服务实体 | |
WO2021150051A1 (en) | Nodes in communication network and methods thereof | |
WO2020209538A1 (ko) | 수직구간 및 수평구간이 형성된 연성회로기판 |
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: 13900730 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: 13900730 Country of ref document: EP Kind code of ref document: A1 |