IP address processing method and device, electronic equipment and storage medium
By using the corresponding relationship between the IPv4 network segment and the NAT64 prefix in the DNS server to synthesize an IPv6 address, and removing the NAT64 prefix in the NAT64 gateway for IPv4 access, the problem that the IPv4 business server cannot be directly upgraded to IPv6 is solved, reducing the configuration workload and Operation and maintenance pressure is reduced, and the NAT64 gateway processing process is simplified.
Patent Information
- Application Number
- CN202311369976.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2024-10-18
AI Technical Summary
When the IPv4 business server cannot be directly upgraded to the IPv6 business server, IPv4 addresses and IPv6 addresses of massive sub-domain names need to be configured in the DNS server at the same time, resulting in a heavy configuration workload, and the NAT64 gateway needs to be pre-configured with IPv4 addresses and IPv6 addresses. Mapping relationships increase operation and maintenance pressure.
By querying the corresponding relationship between the IPv4 network segment and the NAT64 prefix in the DNS server using pre-established resource records, the IPv6 address is synthesized, and the NAT64 prefix is removed from the NAT64 gateway for IPv4 access, which reduces the information on the DNS server and NAT64 gateway. Configuration workload.
It reduces the information configuration workload of DNS server and NAT64 gateway, saves storage space, simplifies the processing process of NAT64 gateway, and reduces operation and maintenance pressure.
Smart Images

Figure CN118802835A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of transmission and Internet Protocol (IP), and in particular, relates to a method, device, electronic device and storage medium for processing an IP address. Background Art
[0002] With the continuous advancement of Internet Protocol Version 6 (IPv6) network infrastructure transformation and the continuous evolution of new IPv6 technologies, IPv6 traffic has increased significantly.
[0003] In some scenarios, it is difficult to directly upgrade the Internet Protocol version 4 (IPv4) service server to an IPv6 service server. In this case, it is necessary to configure both the IPv4 address and the IPv6 address of each subdomain in the Domain Name System (DNS) server, so that the DNS server has the function of providing the IPv4 address and the IPv6 address to the terminal. However, in actual scenarios, a DNS server needs to be configured with the IPv4 address and the IPv6 address of the multi-domain name, and the workload of information configuration in the DNS server is relatively large. Summary of the invention
[0004] Embodiments of the present application provide a method, device, electronic device, and storage medium for processing an IP address.
[0005] The embodiment of the present application provides a method for processing an IP address, which is applied in a DNS server and includes:
[0006] Receiving a first DNS request sent by a terminal; the first DNS request includes information of a first domain name;
[0007] Searching for the IPv4 address of the first domain name based on the first DNS request;
[0008] Based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located; query the Network Address Translation (NAT) 64 prefix corresponding to the IPv4 network segment in a pre-established resource record, wherein the resource record stores the correspondence between the IPv4 network segment and the NAT64 prefix;
[0009] The NAT64 prefix corresponding to the IPv4 network segment is synthesized with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name
[0010] Send the IPv6 address of the first domain name to the terminal.
[0011] In some embodiments, the resource record is located in a domain name configuration (zone) file.
[0012] It can be seen that after determining the IPv4 address of the first domain name, the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located can be found in the zone file of the DNS server. That is, the embodiment of the present application can use the zone file of the DNS server to implement the query of the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located, which has the characteristic of easy implementation.
[0013] In some embodiments, synthesizing the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name includes: adding the IPv4 address of the first domain name to the end of the NAT64 prefix corresponding to the IPv4 network segment to obtain the IPv6 address of the first domain name.
[0014] It can be seen that the embodiment of the present application can easily obtain the IPv6 address of the first domain name by adding the IPv4 address of the first domain name to the end of the NAT64 prefix corresponding to the IPv4 network segment.
[0015] The embodiment of the present application also provides another method for processing an IP address, which is applied to a NAT64 gateway and includes:
[0016] An IPv6 access message sent by a receiving terminal is sent, wherein the IPv6 access message carries a source address and a destination address, and the destination address is an IPv6 address obtained by synthesizing a NAT64 prefix and an IPv4 address;
[0017] Determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address;
[0018] Perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0019] In some embodiments, the destination address is the address obtained by the terminal from the DNS server after sending a first DNS request to the DNS server; the first DNS request includes information of the first domain name; the DNS server is used to search for the IPv4 address of the first domain name based on the first DNS request, and based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located, and according to a pre-established correspondence between the IPv4 network segment and the NAT64 prefix, query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the destination address.
[0020] It can be seen that when the DNS server receives the first DNS request, the first domain name can be determined according to the first DNS request, and the IPv6 address of the first domain name can be obtained according to the IPv4 address of the first domain name and the correspondence between the IPv4 network segment and the NAT64 prefix; the embodiment of the present application does not need to configure an IPv6 address for each domain name in the DNS server, but can use the same correspondence between the IPv4 network segment and the NAT64 prefix for different domain names in the same IPv4 network segment to determine the IPv6 addresses of different domain names; therefore, compared with the solution of configuring an IPv6 address for each domain name in the related art, the embodiment of the present application can reduce the workload of information configuration in the DNS server to a certain extent.
[0021] The embodiment of the present application further provides another method for processing an IP address, which is applied in a terminal and further includes:
[0022] Sending a first DNS request to a DNS server; the first DNS request includes information of a first domain name;
[0023] Receive the IPv6 address of the first domain name sent by the DNS server, the DNS server being used to search for the IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, and query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
[0024] In some embodiments, after receiving the IPv6 address of the first domain name, the method also includes: obtaining an IPv6 access message, the IPv6 access message carrying a source address and a destination address, the destination address being the IPv6 address of the first domain name; uploading the IPv6 access message to the network so that the NAT64 gateway receives the IPv6 access message; the NAT64 gateway is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address, and perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0025] It can be seen that when the NAT64 gateway receives the IPv6 access message sent by the terminal, it can remove the NAT64 prefix of the destination address of the IPv6 access message to obtain the IPv4 address corresponding to the destination address, so that the IPv4 access on the data plane can be performed based on the IPv4 address corresponding to the destination address. The NAT64 gateway only needs to configure its own NAT64 prefix to achieve the conversion from the IPv4 destination address to the IPv6 destination address. Since the NAT64 gateway does not need to pre-configure the mapping relationship between the IPv4 address and the IPv6 address, the workload of information configuration in the NAT64 gateway can be reduced. In addition, since there is no need to store the mapping relationship between the IPv4 address and the IPv6 address, the storage space of the NAT64 gateway can be saved.
[0026] The embodiment of the present application further provides an IP address processing device, which is applied in a DNS server, and includes:
[0027] A first receiving module, configured to receive a first DNS request sent by a terminal; the first DNS request includes information about a first domain name;
[0028] A first processing module is used to find the IPv4 address of the first domain name based on the first DNS request; based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located; query the NAT64 prefix corresponding to the IPv4 network segment in a pre-established resource record, synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name, and obtain the IPv6 address of the first domain name; the resource record stores the correspondence between the IPv4 network segment and the NAT64 prefix;
[0029] The first sending module is used to send the IPv6 address of the first domain name to the terminal.
[0030] The embodiment of the present application further provides an IP address processing device, which is applied to a NAT64 gateway, and includes:
[0031] A second receiving module is used to receive an IPv6 access message sent by a terminal, wherein the IPv6 access message carries a source address and a destination address, and the destination address is an IPv6 address obtained by synthesizing a NAT64 prefix and an IPv4 address;
[0032] The second processing module is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address; perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0033] The embodiment of the present application further provides an IP address processing device, which is applied in a terminal and includes:
[0034] A second sending module is used to send a first DNS request to a domain name system DNS server; the first DNS request includes information of a first domain name;
[0035] A third processing module is used to search for the IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, and query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to a pre-established correspondence between the IPv4 network segment and the NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
[0036] An embodiment of the present application also provides an electronic device, which is applied to a DNS server, a NAT64 gateway or a terminal, and the electronic device includes a processor and a memory for storing a computer program that can be run on the processor; wherein the processor is used to run the computer program to execute any one of the above-mentioned IP address processing methods.
[0037] An embodiment of the present application further provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned IP address processing methods is implemented.
[0038] It can be seen that when the DNS server receives the first DNS request, the first domain name can be determined according to the first DNS request, and the IPv6 address of the first domain name can be obtained according to the IPv4 address of the first domain name and the correspondence between the IPv4 network segment and the NAT64 prefix; the embodiment of the present application does not need to configure an IPv6 address for each domain name in the DNS server, but can use the same correspondence between the IPv4 network segment and the NAT64 prefix for different domain names in the same IPv4 network segment to determine the IPv6 addresses of different domain names; therefore, compared with the solution of configuring an IPv6 address for each domain name in the related art, the embodiment of the present application can reduce the workload of information configuration in the DNS server to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a schematic diagram of the architecture of using IPv4 service servers and NAT64 gateways to provide IPv6 services to the outside world in related technologies;
[0040] Figure 2 A schematic diagram of the IPv6 service access process provided for related technologies;
[0041] Figure 3 A schematic diagram of the IPv4 service access process provided for related technologies;
[0042] Figure 4 A flowchart of a method for processing an IP address of a DNS server according to an embodiment of the present application;
[0043] Figure 5 A schematic diagram of specific information on the format and type of resource records in the DNS protocol provided in an embodiment of the present application;
[0044] Figure 6 A flowchart of a method for processing an IP address applied to a NAT64 gateway according to an embodiment of the present application;
[0045] Figure 7 A flowchart of a method for processing an IP address of a terminal according to an embodiment of the present application;
[0046] Figure 8 A schematic diagram of an IPv6 service access process provided in an embodiment of the present application;
[0047] Fig. 9 A schematic diagram of the structure of a device for processing an IP address applied to a DNS server according to an embodiment of the present application;
[0048] Fig.10 A schematic diagram of the structure of an IP address processing device applied to a NAT64 gateway according to an embodiment of the present application;
[0049] Fig.11 This is a schematic diagram of the structure of a device for processing an IP address of a terminal according to an embodiment of the present application;
[0050] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] With the continuous advancement of IPv6 network infrastructure transformation and the continuous evolution of new IPv6 technologies, global IPv6 traffic has increased significantly. As the proportion of IPv6 traffic in network traffic continues to increase, IPv6 single stack technology is also constantly evolving.
[0052] In addition to the IPv6 single stack evolution process implemented by operators, Internet Content Providers (ICPs) are also continuously promoting the transformation of IPv6 network facilities. For some ICPs, it is difficult to directly upgrade the IPv4 service server to the IPv6 service server. In this case, it is necessary to add a NAT64 gateway corresponding to the IPv4 service server, and provide IPv6 services to the outside through the combination of the NAT64 gateway and the IPv4 service server. After adding the NAT64 gateway corresponding to the IPv4 service server, the IPv4 service server can provide an IPv6 address to the outside, and the terminal can access it with the IPv6 address. When the IPv6 message of the terminal reaches the NAT64 gateway, the NAT64 gateway can convert the IPv6 message into an IPv4 message, thereby realizing access to the IPv4 service server.
[0053] In the scenario of adding a NAT64 gateway, ICP needs to pre-plan the A record and AAAA record of each subdomain name, where the A record is an IPv4 address and the AAAA record is an IPv6 address. The IPv4 service server can include an IPv4 World Wide Web (WWW) server and an IPv4 File Transfer Protocol (FTP) server.
[0054] Reference Figure 1 , the dual-stack terminal 101 can access the dual-stack WAN 103 through the Customer Premise Equipment (CPE) 102; the dual-stack WAN 103 is provided with a DNS server 104, a NAT64 gateway 105, an IPv4 WWW server 106 and an IPv4 FTP server 107; the DNS server 104 is located in a DNS computer room of a certain ICP, and the NAT64 gateway 105, the IPv4 WWW server 106 and the IPv4 FTP server 107 are located in a business computer room of a certain ICP.
[0055] In one example, the IPv4 address of the IPv4 WWW server 106 is 200.1.1.101, the IPv4 address of the IPv4 FTP server 107 is 200.1.1.102, and the IPv6 prefix of the NAT64 gateway 105 is 2001:db8:: / 64. The IPv4 address and IPv6 address of the dual stack terminal 101 are Src_IPv4 and Src_IPv6 respectively.
[0056] In the zone file of the DNS server 104, it is necessary to configure the A record and AAAA record of each subdomain name respectively; for example, the A record of the abc.com domain includes "www.abc.com IN A200.1.1.101" and "www.abc.com INA200.1.1.102". The AAAA record of the abc.com domain includes "www.abc.com IN AAAA 2001:db8::101" and "www.abc.com IN AAAA 2001:db8::102".
[0057] The mapping relationship between the IPv4 address and the IPv6 address needs to be configured on the NAT64 gateway 105 for the NAT64 conversion of the subsequent data plane message. Exemplarily, the mapping relationship between the IPv4 address and the IPv6 address configured on the NAT64 gateway 105 may include: the mapping relationship between the IPv6 address 2001:db8::101 and the IPv4 address 200.1.1.101, and the mapping relationship between the IPv6 address 2001:db8::102 and the IPv4 address 200.1.1.102.
[0058] In the related art, in order to implement the IPv6 service access process, it is necessary to pre-configure the IPv4 address and IPv6 address of the subdomain name in the DNS server, and configure the mapping relationship between the IPv4 address and the IPv6 address in the NAT64 gateway.
[0059] Reference Figure 2In the IPv6 service access process provided by the related technology, the dual-stack terminal sends a DNS request to the DNS server for obtaining the AAAA record of the subdomain "www.abc.com"; after receiving the DNS request, the DNS server directly replies to the dual-stack terminal with a DNS response message according to the content in the zone file, and the DNS response message carries the AAAA record of the subdomain "www.abc.com". Here, the AAAA record of the subdomain "www.abc.com" is 2001:db8::101. After receiving the AAAA record of the subdomain "www.abc.com", the terminal sends an IPv6 message to the NAT64 gateway, the source address in the IPv6 message is Src_IPv6, and the destination address in the IPv6 message is 2001:db8::101. After receiving the IPv6 message, the NAT64 gateway performs the NAT64 operation; the NAT64 operation performed by the NAT64 gateway may include: for the source address, according to the configured IPv4 address pool, select an IPv4 address Xlat_IPv4 from it to perform stateful NAT64 conversion, that is, convert the source address Src_IPv6 into Xlat_IPv4; for the destination address, according to the mapping relationship between the IPv4 address and the IPv6 address configured in advance, perform NAT64 conversion, that is, convert the destination address 2001:db8::101 into 200.1.1.101. After performing the NAT64 operation, the NAT64 gateway sends an IPv4 message to the IPv4 WWW server, the source address in the IPv4 message is Xlat_IPv4, and the destination address in the IPv4 message is 200.1.1.101.
[0060] Reference Figure 3 In the IPv6 service access process provided by the related technology, the dual-stack terminal sends a DNS request to the DNS server for requesting the A record of the subdomain "www.abc.com"; after receiving the DNS request, the DNS server directly replies to the dual-stack terminal with a DNS response message according to the content in the zone file. The DNS response message carries the A record of the subdomain "www.abc.com". Here, the A record of the subdomain "www.abc.com" is 200.1.1.101. After receiving the A record of the subdomain "www.abc.com", the terminal sends an IPv4 message to the NAT64 gateway. The source address in the IPv6 message is Src_IPv4, and the destination address in the IPv4 message is 200.1.1.101. After receiving the IPv4 message, the NAT64 gateway does not perform the NAT64 operation, but can forward the IPv4 message to the IPv4 WWW server.
[0061] In actual scenarios, there are some situations where it is difficult for ICP to directly upgrade IPv4 business servers to IPv6 business servers. In this case, by deploying a NAT64 gateway, similar IPv6 services can be provided to the outside world. ICP will face huge operation and maintenance pressure, and the configuration workload is very large. First, there may be hundreds or thousands of subdomains in the zone file of the ICP domain, and each subdomain needs to be configured with both A records (IPv4 addresses) and AAAA records (IPv6 addresses) in the DNS server. Second, the NAT64 gateway needs to configure the mapping relationship between IPv4 addresses and IPv6 addresses for each subdomain. Third, when the address of the business server changes, the configuration information in the zone file and the NAT64 gateway needs to be modified, and the consistency of the zone file and the NAT64 gateway configuration data needs to be ensured.
[0062] In order to solve the above technical problems, a technical solution of the embodiment of the present application is proposed.
[0063] The following is a further detailed description of the embodiments of the present application in conjunction with the accompanying drawings and examples. It should be understood that the embodiments provided herein are only used to explain the embodiments of the present application and are not intended to limit the embodiments of the present application. In addition, the embodiments provided below are partial embodiments for implementing the present application, rather than providing all embodiments for implementing the present application. In the absence of conflict, the technical solutions recorded in the embodiments of the present application can be implemented in any combination.
[0064] It should be noted that, in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or device including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements (such as steps in a method or units in a device, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.) in the method or device including the element.
[0065] For example, the IP address processing method provided in the embodiment of the present application includes a series of steps, but the IP address processing method provided in the embodiment of the present application is not limited to the recorded steps. Similarly, the IP address processing device provided in the embodiment of the present application includes a series of modules, but the device provided in the embodiment of the present application is not limited to including the modules explicitly recorded, and may also include modules that need to be set up to obtain relevant information or perform processing based on information.
[0066] Figure 4Flow chart of a method for processing an IP address of a DNS server according to an embodiment of the present application, as shown in FIG. Figure 4 As shown, the process may include:
[0067] Step 401: Receive a first DNS request sent by a terminal; the first DNS request includes information of a first domain name.
[0068] Here, the first DNS request refers to a request for obtaining the IPv6 address of the first domain name.
[0069] Step 402: Look up the IPv4 address of the first domain name based on the first DNS request.
[0070] In an embodiment of the present application, the configuration information in the DNS server includes the IPv4 addresses of each domain name. After receiving the first DNS request, the DNS server can search for the IPv4 address of the first domain name in the configuration information.
[0071] Exemplarily, when the first domain name is "www.abc.com", the IPv4 address of the first domain name is 200.1.1.101.
[0072] Step 403: Based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located; query the NAT64 prefix corresponding to the IPv4 network segment in the pre-established resource record, and the resource record stores the correspondence between the IPv4 network segment and the NAT64 prefix.
[0073] In an embodiment of the present application, resource records (RR) may be pre-established in a DNS server; illustratively, the resource records pre-established by the DNS server are NAT64 resource records, which are a type of resource record extended in the DNS protocol, and which may store the correspondence between an IPv4 network segment and a NAT64 prefix.
[0074] All resource records in the DNS protocol have the same top-level field format definition, refer to Figure 5 The format of resource records in the DNS protocol can be reflected by name (NAME), resource record type (TYPE), class (CLASS), life cycle (Time To Live, TTL), resource data length (RDLENGTH) and resource record data (RDATA).
[0075] Reference Figure 5The type field used for resource records is a subset of the query type (QTYPE) in the DNS protocol. Among the various types of resource records in the DNS protocol, the values of A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL, WKS, PTR, HINFO, MINFO, MX, and TXT are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16, respectively. Type A means a host address, type NS means an authoritative name server, type MD means a mail destination (deprecated, use MX), type MF means a mail forwarder (deprecated, use MX), type CNAME means: regular name of an alias, type SOA means marking the start of an authoritative zone, type MB means a mailbox domain name (experimental), type MG means a mail group member (experimental), type MR means a mail renamed domain name (experimental), type NULL means empty RR (experimental), type WKS means a well-known business description, type PTR means a domain pointer, type HINFO means host information, type MINFO means mailbox or mailing list information, type MX means mail exchange, type TXT means text string
[0076] NAT64 resource records are new resource records in the DNS protocol. Figure 5 The type of NAT64 resource record is NAT64, the value of the type of NAT64 resource record is 20000, and the meaning of the type of NAT64 resource record is a list of correspondences between IPv4 network segments and corresponding NAT64 prefixes.
[0077] In some embodiments, the information of the NAT64 resource record may also be saved in the TXT resource record by extending the TXT resource record.
[0078] In an embodiment of the present application, after determining the IPv4 address of the first domain name, the IPv4 network segment where the first domain name is located can be determined, and then the NAT64 prefix of the IPv4 network segment where the first domain name is located can be queried in the pre-established resource record.
[0079] Step 404: synthesize the NAT64 prefix corresponding to the IPv4 network segment and the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
[0080] Exemplarily, the IPv4 address of the first domain name is 200.1.1.101, the IPv4 network segment where the first domain name is located is the 200.1.1.0 / 24 network segment, the NAT64 prefix of the IPv4 network segment where the first domain name is located is 2001:db8::0 / 64, and the IPv6 address of the first domain name is 2001:db8::200.1.1.101.
[0081] Step 405: Send the IPv6 address of the first domain name to the terminal.
[0082] In practical applications, steps 401 to 405 can be implemented based on a processor of a DNS server, and the processor can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor.
[0083] It can be seen that when the DNS server receives the first DNS request, the first domain name can be determined according to the first DNS request, and the IPv6 address of the first domain name can be obtained according to the IPv4 address of the first domain name and the correspondence between the IPv4 network segment and the NAT64 prefix; the embodiment of the present application does not need to configure an IPv6 address for each domain name in the DNS server, but can use the same correspondence between the IPv4 network segment and the NAT64 prefix for different domain names in the same IPv4 network segment to determine the IPv6 addresses of different domain names; therefore, compared with the solution of configuring an IPv6 address for each domain name in the related art, the embodiment of the present application can reduce the workload of information configuration in the DNS server to a certain extent.
[0084] In some embodiments of the present application, the resource record is located in a zone file.
[0085] Exemplarily, the NAT64 resource record in the zone file is: @IN NAT64 "200.1.1.0 / 24,2001:db8::0 / 64; 200.1.2.0 / 24,2002:db8::0 / 64." The NAT64 resource record in the zone file is used to indicate the NAT64 prefixes of two IPv4 network segments, where the NAT64 prefix of the 200.1.1.0 / 24 network segment is 2001:db8::0 / 64, and the prefix corresponding to the 200.1.2.0 / 24 network segment is 2002:db8::0 / 64.
[0086] For example, the A records in the zone file may include "www.abc.com IN A200.1.1.101" and "www.abc.com IN A200.1.1.102."
[0087] It can be seen that after determining the IPv4 address of the first domain name, the NAT64 prefix of the IPv4 network segment where the first domain name is located can be found in the zone file of the DNS server. That is, the embodiment of the present application can use the zone file of the DNS server to implement the query of the NAT64 prefix of the IPv4 network segment where the first domain name is located, which has the characteristic of easy implementation.
[0088] In some embodiments of the present application, the process of synthesizing the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name may include: adding the IPv4 address of the first domain name to the end of the NAT64 prefix corresponding to the IPv4 network segment to obtain the IPv6 address of the first domain name. It can be seen that the embodiments of the present application can easily obtain the IPv6 address of the first domain name by adding the IPv4 address of the first domain name to the end of the NAT64 prefix corresponding to the IPv4 network segment.
[0089] Figure 6 A flowchart of a method for processing an IP address of a NAT64 gateway according to an embodiment of the present application is shown in FIG. Figure 6 As shown, the process may include:
[0090] Step 601: Receive an IPv6 access message sent by a terminal. The IPv6 access message carries a source address and a destination address. The destination address is an IPv6 address obtained by synthesizing a NAT64 prefix and an IPv4 address.
[0091] Here, when requesting to access the first domain name, the terminal can obtain the IPv6 address of the first domain name from the DNS server, and then obtain an IPv6 access message, the destination address of the IPv6 access message being the IPv6 address of the first domain name.
[0092] Exemplarily, the source address carried in the IPv6 access message is Src_IPv6, and the destination address carried in the IPv6 access message is 2001:db8::200.1.1.101.
[0093] Step 602: Determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address.
[0094] In the embodiment of the present application, for the source address, an IPv4 address Xlat_IPv4 can be selected from the configured IPv4 address pool to perform stateful NAT64 conversion, that is, converting the source address Src_IPv6 into Xlat_IPv4. For the destination address, the NAT64 prefix in the destination address is directly removed to obtain the IPv4 address corresponding to the destination address: 200.1.1.101.
[0095] Step 603: Perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0096] In an embodiment of the present application, after determining the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address, the NAT64 gateway can achieve IPv4 access on the data plane by sending an IPv4 message to the IPv4 service server; exemplarily, the source address in the IPv4 message is Xlat_IPv4, and the destination address in the IPv4 message is 200.1.1.101.
[0097] In practical applications, steps 601 to 603 may be implemented based on a processor of a NAT64 gateway, and the processor may be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.
[0098] It can be seen that when the NAT64 gateway receives the IPv6 access message sent by the terminal, it can remove the NAT64 prefix of the destination address of the IPv6 access message to obtain the IPv4 address corresponding to the destination address, so that the IPv4 access on the data plane can be performed based on the IPv4 address corresponding to the destination address. The NAT64 gateway only needs to configure its own NAT64 prefix to achieve the conversion from the IPv4 destination address to the IPv6 destination address. Since the NAT64 gateway does not need to pre-configure the mapping relationship between the IPv4 address and the IPv6 address, the workload of information configuration in the NAT64 gateway can be reduced. In addition, since there is no need to store the mapping relationship between the IPv4 address and the IPv6 address, the storage space of the NAT64 gateway can be saved.
[0099] In summary, the embodiments of the present application can simplify the processing flow of the NAT64 gateway and reduce the performance requirements for the NAT64 gateway.
[0100] In some embodiments of the present application, the destination address is an address obtained by the terminal from the DNS server after sending a first DNS request to the DNS server; the first DNS request includes information of the first domain name; the DNS server is used to search for the IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, and query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the destination address.
[0101] It can be seen that when the DNS server receives the first DNS request, the first domain name can be determined according to the first DNS request, and the IPv6 address of the first domain name can be obtained according to the IPv4 address of the first domain name and the correspondence between the IPv4 network segment and the NAT64 prefix; the embodiment of the present application does not need to configure an IPv6 address for each domain name in the DNS server, but can use the same correspondence between the IPv4 network segment and the NAT64 prefix for different domain names in the same IPv4 network segment to determine the IPv6 addresses of different domain names; therefore, compared with the solution of configuring an IPv6 address for each domain name in the related art, the embodiment of the present application can reduce the workload of information configuration in the DNS server to a certain extent.
[0102] Figure 7 Flow chart of a method for processing an IP address of a terminal according to an embodiment of the present application, such as Figure 7 As shown, the process may include:
[0103] Step 701: Send a first DNS request to a DNS server; the first DNS request includes information of a first domain name.
[0104] Step 702: Receive the IPv6 address of the first domain name sent by the DNS server, the DNS server is used to search for the IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, and query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
[0105] In practical applications, steps 701 to 702 may be implemented based on a processor of the terminal, and the processor may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.
[0106] It can be seen that when the DNS server receives the first DNS request, the first domain name can be determined according to the first DNS request, and the IPv6 address of the first domain name can be obtained according to the IPv4 address of the first domain name and the correspondence between the IPv4 network segment and the NAT64 prefix; the embodiment of the present application does not need to configure an IPv6 address for each domain name in the DNS server, but can use the same correspondence between the IPv4 network segment and the NAT64 prefix for different domain names in the same IPv4 network segment to determine the IPv6 addresses of different domain names; therefore, compared with the solution of configuring an IPv6 address for each domain name in the related art, the embodiment of the present application can reduce the workload of information configuration in the DNS server to a certain extent.
[0107] In some embodiments of the present application, after receiving the IPv6 address of the first domain name, the terminal may also obtain an IPv6 access message, where the IPv6 access message carries a source address and a destination address, and the destination address is the IPv6 address of the first domain name;
[0108] Upload the IPv6 access message to the network so that the NAT64 gateway receives the IPv6 access message; the NAT64 gateway is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address, and perform IPv4 access on the data plane based on the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0109] It can be seen that when the NAT64 gateway receives the IPv6 access message sent by the terminal, it can remove the NAT64 prefix of the destination address of the IPv6 access message to obtain the IPv4 address corresponding to the destination address, so that the IPv4 access on the data plane can be performed based on the IPv4 address corresponding to the destination address. The NAT64 gateway only needs to configure its own NAT64 prefix to achieve the conversion from the IPv4 destination address to the IPv6 destination address. Since the NAT64 gateway does not need to pre-configure the mapping relationship between the IPv4 address and the IPv6 address, the workload of information configuration in the NAT64 gateway can be reduced. In addition, since there is no need to store the mapping relationship between the IPv4 address and the IPv6 address, the storage space of the NAT64 gateway can be saved.
[0110] Figure 8 A schematic diagram of the IPv6 service access process provided in the embodiment of the present application, such as Figure 8 As shown, in the IPv6 service access process provided in the embodiment of the present application, the terminal sends a DNS request to the DNS server for requesting the AAAA record of the subdomain name "www.abc.com"; after receiving the DNS request, the DNS server can obtain the AAAA record of the subdomain name "www.abc.com" according to the A record and the NAT64 prefix of the IPv4 network segment where the subdomain name "www.abc.com" is located; the DNS server replies with a DNS response message to the terminal, and the DNS response message carries the AAAA record of the subdomain name "www.abc.com".
[0111] After receiving the AAAA record of the subdomain "www.abc.com", the terminal sends an IPv6 message to the NAT64 gateway. The source address in the IPv6 message is Src_IPv6, and the destination address in the IPv6 message is 2001:db8::200.1.1.101. After receiving the IPv6 message, the NAT64 gateway performs the NAT64 operation; the NAT64 operation performed by the NAT64 gateway may include: for the source address, according to the configured IPv4 address pool, select an IPv4 address Xlat_IPv4 from it to perform stateful NAT64 conversion, that is, convert the source address Src_IPv6 into Xlat_IPv4; for the destination address, remove the NAT64 prefix to obtain the IPv4 address 200.1.1.101 corresponding to the destination address. After performing the NAT64 operation, the NAT64 gateway sends an IPv4 message to the IPv4 WWW server. The source address in the IPv4 message is Xlat_IPv4, and the destination address in the IPv4 message is 200.1.1.101.
[0112] The way in which the DNS server obtains the AAAA record of the subdomain "www.abc.com" has been explained in the aforementioned records.
[0113] The IPv4 service access process provided in the embodiment of the present application is the same as the IPv4 service access process provided in the related art. Compared with the IPv4 service access process provided in the related art, when the IPv4 service access process provided in the embodiment of the present application is adopted, the configuration information in the DNS server and the NAT64 gateway can be simplified.
[0114] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0115] Based on the IP address processing method proposed in the above-mentioned embodiment, the embodiment of the present application also proposes an IP address processing device.
[0116] Fig. 9 FIG. 1 is a schematic diagram of a structure of an IP address processing device applied to a DNS server according to an embodiment of the present application. Fig. 9 As shown, the device may include:
[0117] The first receiving module 901 is used to receive a first DNS request sent by a terminal; the first DNS request includes information of a first domain name;
[0118] The first processing module 902 is used to find the IPv4 address of the first domain name based on the first DNS request; based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located; query the NAT64 prefix corresponding to the IPv4 network segment in the pre-established resource record, synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name, and obtain the IPv6 address of the first domain name; the resource record stores the correspondence between the IPv4 network segment and the NAT64 prefix;
[0119] The first sending module 903 is configured to send the IPv6 address of the first domain name to the terminal.
[0120] In some embodiments, the resource record is located in a domain name configuration zone file.
[0121] In some embodiments, the first processing module 902 is configured to synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name, including:
[0122] The IPv4 address of the first domain name is added to the end of the NAT64 prefix corresponding to the IPv4 network segment to obtain the IPv6 address of the first domain name.
[0123] Fig.10 Schematic diagram of the structure of the IP address processing device applied to the NAT64 gateway in the embodiment of the present application. Fig.10 As shown, the device may include:
[0124] The second receiving module 1001 is used to receive an Internet Protocol version 6 IPv6 access message sent by a terminal, wherein the IPv6 access message carries a source address and a destination address, and the destination address is an IPv6 address obtained by synthesizing a NAT64 prefix and an Internet Protocol version 4 IPv4 address;
[0125] The second processing module 1002 is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address; perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0126] In some embodiments, the destination address is the address obtained by the terminal from the DNS server after sending a first DNS request to the DNS server; the first DNS request includes information of the first domain name; the DNS server is used to search for the IPv4 address of the first domain name based on the first DNS request, and based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located, and according to a pre-established correspondence between the IPv4 network segment and the NAT64 prefix, query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the destination address.
[0127] Fig.11 Schematic diagram of the structure of the device for processing the IP address of the terminal according to the embodiment of the present application. Fig.11 As shown, the device may include:
[0128] The second sending module 1101 is used to send a first DNS request to a domain name system DNS server; the first DNS request includes information of a first domain name;
[0129] The third processing module 1102 is used to receive the IPv6 address of the first domain name sent by the DNS server, and the DNS server is used to search for the IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, and query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
[0130] In some embodiments, the third processing module 1102 is further configured to obtain an IPv6 access message after receiving the IPv6 address of the first domain name, wherein the IPv6 access message carries a source address and a destination address, and the destination address is the IPv6 address of the first domain name;
[0131] The third processing module 1102 is also used to upload IPv6 access messages to the network, so that the NAT64 gateway receives the IPv6 access messages; the NAT64 gateway is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address, and perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
[0132] In practical applications, the first receiving module 901, the first processing module 902, the first sending module 903, the second receiving module 1001, the second processing module 1002, the second sending module 1101 and the third processing module 1002 can all be implemented based on a processor and a communication device.
[0133] It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0134] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a terminal, a server, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0135] Correspondingly, an embodiment of the present application further provides a computer program product, which includes computer executable instructions, and the computer executable instructions are used to implement any IP address processing method provided in the embodiment of the present application.
[0136] Correspondingly, an embodiment of the present application further provides a computer storage medium, on which computer executable instructions are stored, and the computer executable instructions are used to implement any one of the IP address processing methods provided in the above embodiments.
[0137] The present application also provides an electronic device, Fig.12A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the electronic device 120 may include:
[0138] A memory 121, used for storing executable instructions;
[0139] The processor 122 is used to implement any of the above-mentioned IP address processing methods when executing the executable instructions stored in the memory 121.
[0140] The above-mentioned computer-readable storage medium and memory 121 can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0141] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0142] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0143] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0144] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0145] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0147] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for processing an IP address, It is characterized in that Applied in a domain name system DNS server, the method comprises: Receiving a first DNS request sent by a terminal; the first DNS request includes information of a first domain name; Finding the Internet Protocol version 4 (IPv4) address of the first domain name based on the first DNS request; Based on the IPv4 address of the first domain name, determine the IPv4 network segment where the IPv4 address of the first domain name is located; query the network address translation NAT64 prefix corresponding to the IPv4 network segment in a pre-established resource record, wherein the resource record stores the correspondence between the IPv4 network segment and the NAT64 prefix; Synthesize the NAT64 prefix corresponding to the IPv4 network segment and the IPv4 address of the first domain name to obtain an Internet Protocol version 6 IPv6 address of the first domain name; Send the IPv6 address of the first domain name to the terminal.
2. The method according to claim 1, It is characterized in that The resource record is located in the domain name configuration file.
3. The method according to claim 1, It is characterized in that The synthesizing the NAT64 prefix corresponding to the IPv4 network segment and the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name includes: The IPv4 address of the first domain name is added to the end of the NAT64 prefix corresponding to the IPv4 network segment to obtain the IPv6 address of the first domain name.
4. A method for processing an IP address, It is characterized in that Applied to a network address translation NAT64 gateway, the method comprises: An Internet Protocol version 6 IPv6 access message sent by a receiving terminal, wherein the IPv6 access message carries a source address and a destination address, wherein the destination address is an IPv6 address obtained by synthesizing a NAT64 prefix and an Internet Protocol version 4 IPv4 address; Determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address; Perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
5. The method according to claim 4, It is characterized in that The destination address is the address obtained by the terminal from the domain name system DNS server after sending a first DNS request to the DNS server; the first DNS request includes information of the first domain name; the DNS server is used to search for the IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the network address translation NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the destination address.
6. A method for processing an IP address, It is characterized in that Applied in a terminal, the method further includes: Sending a first DNS request to a domain name system DNS server; the first DNS request includes information of a first domain name; Receive the IPv6 address of the first domain name sent by the DNS server, the DNS server being used to search for the Internet Protocol version 4 IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the network address translation NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
7. The method according to claim 6, It is characterized in that After receiving the IPv6 address of the first domain name, the method further includes: Obtain an IPv6 access message, where the IPv6 access message carries a source address and a destination address, and the destination address is the IPv6 address of the first domain name; Upload an IPv6 access message to the network so that the NAT64 gateway receives the IPv6 access message; the NAT64 gateway is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address, and perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
8. A device for processing an IP address, It is characterized in that Applied in a domain name system DNS server, the device comprises: A first receiving module, configured to receive a first DNS request sent by a terminal; the first DNS request includes information about a first domain name; a first processing module, configured to search for the fourth version of the Internet Protocol IPv4 address of the first domain name based on the first DNS request; determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name; query the network address translation NAT64 prefix corresponding to the IPv4 network segment in a pre-established resource record, synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name, and obtain the sixth version of the Internet Protocol IPv6 address of the first domain name; the resource record stores the correspondence between the IPv4 network segment and the NAT64 prefix; The first sending module is used to send the IPv6 address of the first domain name to the terminal.
9. A device for processing an IP address, It is characterized in that Applied to a network address translation NAT64 gateway, the device comprises: A second receiving module is used to receive an Internet Protocol version 6 IPv6 access message sent by a terminal, wherein the IPv6 access message carries a source address and a destination address, and the destination address is an IPv6 address obtained by synthesizing a NAT64 prefix and an Internet Protocol version 4 IPv4 address; The second processing module is used to determine the IPv4 address corresponding to the source address, and remove the NAT64 prefix in the destination address to obtain the IPv4 address corresponding to the destination address; perform IPv4 access on the data plane according to the IPv4 address corresponding to the source address and the IPv4 address corresponding to the destination address.
10. A device for processing an IP address, It is characterized in that Applied in a terminal, the device comprises: A second sending module is used to send a first DNS request to a domain name system DNS server; the first DNS request includes information of a first domain name; The third processing module is used to receive the IPv6 address of the first domain name sent by the DNS server, the DNS server is used to search for the Internet Protocol version 4 IPv4 address of the first domain name based on the first DNS request, determine the IPv4 network segment where the IPv4 address of the first domain name is located based on the IPv4 address of the first domain name, query the NAT64 prefix corresponding to the IPv4 network segment where the IPv4 address of the first domain name is located according to the pre-established correspondence between the IPv4 network segment and the network address translation NAT64 prefix, and synthesize the NAT64 prefix corresponding to the IPv4 network segment with the IPv4 address of the first domain name to obtain the IPv6 address of the first domain name.
11. An electronic device, It is characterized in that The electronic device comprises a processor and a memory for storing a computer program that can be run on the processor; wherein, The processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.
12. A computer storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Access method and device, communication equipment and storage medium
CN119676211A
An access method and apparatus, a communication device, and a storage medium
CN119676211B
Unified IPv4 / IPv6 address management method, device and equipment in IPv6 evolution environment
CN120602452A
