Abstract:
An apparatus and method are described for translating between IPv6 and IPv4 addresses on a computer network. For example, one embodiment of a method for generating an Internet Protocol Version 6 (IPv6) IPv6 address from an Internet Protocol Version 4 (IPv4) IPv4 address literal comprises: constructing a host name for a domain name query at a first host by combining the IPv4 address literal with a domain name of a first domain name server, the first domain name server configured to interpret the host name containing the IPv4 address literal to generate an A record including the IPv4 address; wherein the A record is usable to generate a synthetic IPv6 address, the synthetic IPv6 address including a first portion identifying a network address translation (NAT) 64 server and a second portion identifying an IPv4 host associated with the IPv4 address literal; and receiving the synthetic IPv6 address at the first host, the synthetic IPv6 address usable by the first host to connect to the IPv4 host through the NAT64 server.

Description:
BACKGROUND 
       [0001]    1. Field of the Invention 
         [0002]    This invention relates generally to the field of data processing systems. More particularly, the invention relates to an improved system and method for translating network addresses. 
         [0003]    2. Description of the Related Art 
         [0004]    There are currently two forms of the TCP/IP networking protocol, referred to as Internet Protocol Version 4 (IPv4) and Internet Protocol Version 6 (IPv6). IPv6 is designed to succeed Internet Protocol version 4 (IPv4), which is currently in widespread use across the Internet. IPv6 is also largely incompatible with IPv4, utilizing a different addressing space and connection protocol. Consequently, as illustrated in  FIG. 1 , a client  101  or server  102  configured with an IPv6 interface but not an IPv4 interface may communicate directly over IPV6 networks  110  but not IPv4 networks  111 . Similarly, a client  121  or server  122  configured with an IPv4 interface but not an IPv6 interface may communicate directly over IPv4 networks  111  but not IPv6 networks  110 . As illustrated, certain clients  100  and servers (not shown) equipped with both IPv4 and IPv6 interfaces may communicate over both the IPv4 and the IPv6 networks. 
         [0005]    Various IPv6 transition mechanisms have been specified to facilitate the transitioning of the Internet from its IPv4 infrastructure to the next generation addressing system of IPv6. Two such transition mechanisms are NAT64 (Network Address Translation 64) and DNS64 (Domain Name Service 64). NAT64 performs network address translation functions to allow an IPv6-only host to communicate with IPv4-only hosts. As illustrated in  FIG. 1 , a NAT64 server  115  acts as the endpoint for at least one IPv4 address and a IPv6 network segment of 32-bits. The IPv6 host embeds the IPv4 address it wishes to communicate with using these bits, and sends its packets to the resulting address. The NAT64 server then creates a NAT-mapping between the IPv6 address and the IPv4 address. A DNS64 server  116  converts an “A” record returned by most DNS servers that typically associate an IPv4 address with a hostname to an “AAAA” record comprising a synthetic IPv4-mapped IPv6 address. This synthetic address points to the IPv6 interface of the NAT64 translator, and a portion of this address encodes the actual IPv4 address (for use by the NAT64 translator to connect with the IPv4 destination). 
         [0006]    For example, in  FIG. 1 , IPV6 client  101  may communicate with IPV4 Server  122  by making a DNS query to the DNS64 service  116  using the network name associated with the IPv4 server  122  (e.g., www.skype.com). In response, the DNS64 service returns an IPv4-mapped IPv6 address to IPV6 client  122  identifying the NAT64 server  115 . The IPv6 client  101  then connects with the IPv4 server  122  via the NAT64 server  115 . 
         [0007]    However, the above mechanisms fail if the IPv6-only client has an “IPv4 address literal”—i.e., an IPv4 address that it received via a mechanism other than a DNS lookup. By way of example, certain peer-to-peer (P2P) clients such as Bittorrent™ clients and Skype™ clients may receive IPv4 address literals from other clients in response to queries. In these cases, the clients are unable to use the IPv4 address literals if they have no IPv4 interfaces. 
         [0008]    Several approaches have been proposed to address these problems but all are deficient on one way or another and may require changes to the NAT64/DNS64 (at a minimum) and/or changes to client operating system network stacks. For example, several proposals are described in  Analysis of Solution Proposals for Hosts to Learn NAT 64  Prefix, Behavior Engineering for Hindrance Avoidance  ( BEHAVE ) (Oct. 17, 2010). One proposal described in Section 4.3 of this document is of particular relevance to the present patent application. This section describes how an IPv6 host with an IPv4 literal may send a DNS query for an AAAA record of a Well-Known IPv4-only Fully Qualified Domain Name (FQDN). If the host receives a negative reply, then there are no DNS64 or NAT64 services on the network. If the host receives a reply, then the network must be utilizing IPv6 address synthesis. After receiving a synthesized AAAA Resource Record, the host examines the received IPv6 address and attempts to decipher the network specific prefix (NSP) used by the NAT64 and DNS64 (e.g., by “subtracting” the known IPv4 address out of synthesized IPv6 address). Once the NSP is known, the host may synthesize its own IPv6 addresses using its IPv4 addresses. 
         [0009]    Because various different encoding techniques may be used to embed the IPv4 address within the IPv6 address, however, it may not always be possible to “subtract” out the IPv4 address to determine the NSP. Consequently, additional techniques are needed to translate IPv4 literals to IPv6 addresses for certain clients and/or server. 
       SUMMARY 
       [0010]    An apparatus and method are described for translating between IPv6 and IPv4 addresses on a computer network. For example, one embodiment of a method for generating an Internet Protocol Version 6 (IPv6) IPv6 address from an Internet Protocol Version 4 (IPv4) IPv4 address literal comprises: constructing a host name for a domain name query at a first host by combining the IPv4 address literal with a domain name of a first domain name server, the first domain name server configured to interpret the host name containing the IPv4 address literal to generate an A record including the IPv4 address; wherein the A record is usable to generate a synthetic IPv6 address, the synthetic IPv6 address including a first portion identifying a network address translation (NAT) 64 server and a second portion identifying an IPv4 host associated with the IPv4 address literal; and receiving the synthetic IPv6 address at the first host, the synthetic IPv6 address usable by the first host to connect to the IPv4 host through the NAT64 server. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]    A better understanding of the present invention can be obtained from the following detailed description in conjunction with the following drawings, in which: 
           [0012]      FIG. 1  illustrates a prior art network architecture including a NAT64 service and a DNS64 service. 
           [0013]      FIG. 2  illustrates a system architecture according to one embodiment of the invention. 
           [0014]      FIG. 3  illustrates a software architecture for determining a synthetic IPv6 address coding scheme and using the coding scheme to generate synthetic IPv6 addresses. 
           [0015]      FIG. 4  illustrates one embodiment of a method for detecting if a host is in a NDS64/NAT64 environment. 
           [0016]      FIG. 5  illustrates one embodiment of a method for generating a synthetic IPv6 address using an IPv4 literal address. 
           [0017]      FIG. 6  illustrates one embodiment of a method for analyzing multiple DNS responses to determine a NAT64 address. 
           [0018]      FIG. 7  illustrates a system architecture of an exemplary host according to one embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0019]    In the following description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention described below. It will be apparent, however, to one skilled in the art that the embodiments of the invention may be practiced without some of these specific details. In other instances, well-known structures and devices are shown in block diagram form to avoid obscuring the underlying principles of the embodiments of the invention. 
         [0020]    One embodiment of the invention addresses the limitations discussed above by using specially-crafted DNS queries in conjunction with a specialized DNS translation server operated by an application provider (or other third party) to allow a NAT64/DNS64 to provide synthesized mappings for any IPv4 literal addresses that may be on hand as a result of other application functions. For example, in a peer-to-peer (P2P) implementation, these literal addresses may be returned in response to a query from other clients or servers on the P2P network. It should be noted, however, that the underlying principles of the invention are not limited to a P2P implementation. 
         [0021]    In one embodiment illustrated in  FIG. 2 , when an IPv4 address literal is on hand, an IPv4 literal address processing module  204  executed on a client  200  constructs a DNS query requesting the AAAA (IPv6 address) record associated with &lt;IPv4 address&gt;.&lt;server-name&gt;.&lt;application-provider&gt; where &lt;IPv4 address&gt; is the IPv4 literal and &lt;server-name&gt;.&lt;application-provider&gt; identifies a DNS translation server  201 . By way of example, if the IPv4 address literal is 172.16.254.1 and the DNS translation server  201  is nat64-discovery.example.com, then the DNS query will be to the 172.16.254.1.nat64-discovery.example.com. In this embodiment, the DNS translation server  201  responsible for “nat64-discovery.example.com” is a specialized server that for any query “w.x.y.z.nat64-discovery.example.com” returns the A (IPv4 address) record “w.x.y.z.” Consequently, in the above example it would return “172.16.254.1.” 
         [0022]    In operation, the query 172.16.254.1.nat64-discovery.example.com is initially received by the DNS64 server  202  which queries the specialized DNS translation server  201 . The DNS translation server  201  responds with the A record 172.16.254.1 which the DNS64 server uses to construct a synthetic IPv6 address (an AAAA record) which it then returns to the IPv4 literal address processing logic  204  on the client  200 . The client  200  may then open a connection to the remote client  220 - 221  or server  222  identified by the IPv4 address 172.16.254.1 through the NAT64 device  115  (i.e., identified by the synthesized IPv6 address). 
         [0023]    The IPv4 literal address processing module  204  may be implemented in a variety of ways while still complying with the underlying principles of the invention. For example, in one embodiment, the IPv4 literal address processing module  204  comprises a component of a larger peer-to-peer (P2P) application program (e.g., such as a Bittorrent client or Skype client) or other type of application. Alternatively, or in addition, the IPv4 literal address processing module  204  may be provided as a component of an operating system executed on the client  200  (e.g., as part of the networking stack provided with the operating system). It should be noted, however, that the underlying principles of the invention are not limited to any particular implementation of the IPv4 literal address processing module  204 . 
         [0024]    Note that the query generated by the IPv4 literal address processing module  204  may result in a failure if there is no NAT64/DNS64 present. Consequently, if a failure is detected (or if a specified number of failures are detected), then no further attempts may be made. A flag may be set noting that NAT64/DNS64 is not present and that IPv4 literal addresses cannot currently be used (assuming there is no IPv4 interface available). 
         [0025]    As discussed in the background section of the present application, it is not sufficient to attempt to extract a synthesized IPv6 prefix resulting from a single query because the exact mapping scheme cannot be determined based on a single response. For example, the mapping scheme may not be linear (in which case a simple bitwise substitution will not work) and/or multiple NAT64 devices may be in use with the DNS64 doing load balancing and/or other techniques may be in use to optimize which NAT64 is selected for a given IPv4 destination. 
         [0026]    However, it may be possible to decipher the mapping scheme by heuristically analyzing multiple responses to IPv4 literal address queries. Consequently, in one embodiment of the invention illustrated in  FIG. 3 , the IPv4 literal address processing module  204  performs queries as described above for all (or a subset of) the IPv4 literal addresses on hand and receives the corresponding synthetically-generated IPv6 addresses. Then, in one embodiment, a network specific prefix (NSP) analysis module  205  analyzes the results of the queries to attempt to determine the IPv6 coding scheme being used by the DNS64/NAT64 system. For example, if the IPv4 address is simply embedded within a particular 32-bit field of the IPv6 address (e.g., the upper/lower 32 bits), then the NSP analysis module  205  may identify the coding scheme by performing a correlation between the IPv4 literals and the resulting synthetic IPv6 addresses. Once the coding scheme is determined, a synthetic IPv6 address generator  206  executed on the client  200  may synthetically generate IPv6 addresses using any IPv4 literals (at least as long as the client is within the same DNS64/NAT64 environment). More advanced processing techniques may be employed to “subtract” out the known IPv4 address from the IPv6 address to arrive at the synthetic IPv6 coding scheme (e.g., such as described in  Analysis of Solution Proposals for Hosts to Learn NAT 64  Prefix, Behavior Engineering for Hindrance Avoidance  ( BEHAVE ) (Oct. 17, 2010)). 
         [0027]    One embodiment of a method for determining whether a host is within a NDS64/NAT64 environment is illustrated in  FIG. 4 . At  401 , the host connects to the IPv6 network and at  402 , the host generates a test query using a network name known to have an IPv4 address but not an IPv6 address. For example, in one embodiment, the test query may take the form of &lt;IPv4 address&gt;.&lt;server-name&gt;.&lt;application-provider&gt; as described above. Of course, various other known IPv4 host names may be used while still complying with the underlying principles of the invention. If a response to the test query is received, determined at  403 , then at  404 , a determination is made that the host is in a DNS64/NAT64 environment. The host may then attempt to determine the NSP mapping scheme as described above. If no response is received, then a determination is made at  405  that the host is not in a DNS64/NAT64 environment. 
         [0028]      FIG. 5  illustrates one embodiment of a method for connecting to an IPv4-only host over an IPv6 network using an IPv4 literal address. Certain aspects of this method were described above with respect to the system architecture shown in  FIG. 2 . However, the underlying principles of this embodiment of the invention are not limited to any particular system architecture. 
         [0029]    At  501 , a query is generated resulting in one or more IPv4 literal addresses. By way of example, a P2P client (e.g., a Bittorrent or Skype client) may receive one or more IPv4 literals in response to a query. At  502 , the IPv4 literal addresses are converted into a network name using a pre-specified coding scheme. Returning to the previous example, the network name may take the form &lt;IPv4 address&gt;.&lt;server-name&gt;.&lt;application-provider&gt; where &lt;IPv4 address&gt; is the IPv4 literal address and &lt;server-name&gt;.&lt;application-provider&gt; identifies a specialized DNS translation server. At  503 , a AAAA query is issued using the network name and, at  504 , the DNS64 forwards the query to the DNS translation server (e.g., identified by &lt;server-name&gt;.&lt;application-provider&gt; in one embodiment). At  505 , the DNS translation server generates an A record in response to the query (e.g., &lt;IPv4 address&gt; in one embodiment) and at  506 , the DNS64 uses the A record to synthesize an IPv6 address. At  507 , the IPv6 address is transmitted to the requesting host and, at  508 , the host uses the synthesized IPv6 address to open a connection through a NAT64 to the IPv4 host. 
         [0030]      FIG. 6  illustrates one embodiment of a method for detecting the IPv6 coding scheme used for synthetic IPv6 addresses using IPv4 literals. Certain aspects of this method were described above with respect to the system architecture shown in  FIG. 3 . However, the underlying principles of this embodiment of the invention are not limited to any particular system architecture. 
         [0031]    At  601  multiple test DNS queries are generated using the network names of hosts known to have IPv4 addresses but not IPv6 addresses. In one embodiment, for example, the application provider (i.e., the entity providing the client software) provides a plurality of known network names which meet this requirement (e.g., test1.nat64-discovery.example.com, test2.nat64-discovery.example.com, etc). Alternatively, various well known public host names may be used. At  602 , responses to the queries are received in the form of synthetically-generated IPv6 addresses that identify a particular NAT64 or group of NAT64 devices. At  603 , the responses are analyzed to determine the coding scheme used to generate the synthetic IPv6 addresses. By way of example, each IPv6 address may simply encode the IPv4 address in a specified 32-bit field of the IPv6 address and the remainder of the IPv6 address may be used to identify the NAT64 server. Alternatively, each host name may assigned a random or sequential addressing slot in the NAT64 mapping. In such a case, it may be difficult (or impossible) to determine the IPv6 coding scheme. Assuming that some form of heuristic analysis can be used to determine the coding scheme (e.g., by “subtracting” out the known IPv4 address from the IPv6 address) then, once determined, at  604 , the host may synthetically generate IPv6 addresses using any IPv4 literals (e.g., as part of a P2P application or other application type). 
         [0032]    In one embodiment, rather than transmitting a query from the DNS64 server  202  to the IPv4 DNS translator  201  as described above, the DNS64 server  202  may itself include the logic necessary for extracting the IPv4 address from the test query. Returning to the previous example, if the test query takes the form &lt;IPv4 address&gt;.&lt;server-name&gt;.&lt;application-provider&gt; where &lt;IPv4 address&gt; is the IPv4 literal and &lt;server-name&gt;.&lt;application-provider&gt; identifies a DNS translation server  201 , the DNS64 server may be configured with the knowledge of this mapping scheme and may pretend to be the translation server  201  without actually making the query, thereby reducing the overall load on the DNS64 server  202  and the DNS translator server  201 . Various additional modifications are contemplated to be within the scope of the underlying principles of the invention. 
         [0033]    Any one of the methods described herein can be implemented on a variety of different data processing devices, including general purpose computer systems, special purpose computer systems, and mobile computing devices. For example, the data processing systems which may execute the methods described herein may include a desktop computer, laptop computer, tablet computer, smart phone, cellular telephone, personal digital assistant (PDA), embedded electronic device or any form of consumer electronic device.  FIG. 7  shows one example of a typical data processing system which may be used with the present invention. Note that while  FIG. 7  illustrates the various components of a data processing system, such as a computer system, it is not intended to represent any particular architecture or manner of interconnecting the components as such details are not germane to the present invention. It will also be appreciated that other types of data processing systems which have fewer components than shown or more components than shown in  FIG. 7  may also be used with the present invention. The data processing system of  FIG. 7  may be a Macintosh computer or PC computer. As shown in  FIG. 7 , the data processing system  701  includes one or more buses  709  which serve to interconnect the various components of the system. One or more processors  703  are coupled to the one or more buses  709  as is known in the art. Memory  705  may be DRAM or non-volatile RAM or may be flash memory or other types of memory. This memory is coupled to the one or more buses  709  using techniques known in the art. The data processing system  701  can also include non-volatile memory  707  which may be a hard disk drive or a flash memory or a magnetic optical drive or magnetic memory or an optical drive or other types of memory systems which maintain data even after power is removed from the system. The non-volatile memory  707  and the memory  705  are both coupled to the one or more buses  709  using known interfaces and connection techniques. A display controller  711  is coupled to the one or more buses  709  in order to receive display data to be displayed on a display device  713  which can display any one of the user interface features or embodiments described herein. The display device  713  can include an integrated touch input to provide a touch screen. The data processing system  701  can also include one or more input/output (I/O) controllers  715  which provide interfaces for one or more I/O devices, such as one or more mice, touch screens, touch pads, joysticks, and other input devices including those known in the art and output devices (e.g. speakers). The input/output devices  717  are coupled through one or more I/O controllers  715  as is known in the art. While  FIG. 7  shows that the non-volatile memory  707  and the memory  705  are coupled to the one or more buses directly rather than through a network interface, it will be appreciated that the data processing system may utilize a non-volatile memory which is remote from the system, such as a network storage device which is coupled to the data processing system through a network interface such as a modem or Ethernet interface or wireless interface, such as a wireless WiFi transceiver or a wireless cellular telephone transceiver or a combination of such transceivers. As is known in the art, the one or more buses  709  may include one or more bridges or controllers or adapters to interconnect between various buses. In one embodiment, the I/O controller  715  includes a USB adapter for controlling USB peripherals and can control an Ethernet port or a wireless transceiver or combination of wireless transceivers. It will be apparent from this description that aspects of the present invention may be embodied, at least in part, in software. That is, the techniques and methods described herein may be carried out in a data processing system in response to its processor executing a sequence of instructions contained in a tangible, non-transitory memory such as the memory  705  or the non-volatile memory  707  or a combination of such memories, and each of these memories is a form of a machine readable, tangible storage medium. In various embodiments, hardwired circuitry may be used in combination with software instructions to implement the present invention. Thus the techniques are not limited to any specific combination of hardware circuitry and software nor to any particular source for the instructions executed by the data processing system. 
         [0034]    In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will be evident that various modifications may be made thereto without departing from the broader spirit and scope of the invention as set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense. 
         [0035]    Embodiments of the invention may include various steps as set forth above. The steps may be embodied in machine-executable instructions which cause a general-purpose or special-purpose processor to perform certain steps. Alternatively, these steps may be performed by specific hardware components that contain hardwired logic for performing the steps, or by any combination of programmed computer components and custom hardware components. Elements of the present invention may also be provided as a machine-readable medium for storing the machine-executable program code. The machine-readable medium may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, or other type of media/machine-readable medium suitable for storing electronic program code. 
         [0036]    Throughout the foregoing description, for the purposes of explanation, numerous specific details were set forth in order to provide a thorough understanding of the invention. It will be apparent, however, to one skilled in the art that the invention may be practiced without some of these specific details. For example, it will be readily apparent to those of skill in the art that the functional modules and methods described herein may be implemented as software, hardware or any combination thereof. Moreover, although some embodiments of the invention are described herein within the context of a client P2P application, the underlying principles of the invention may be implemented in the form of a server application or any other form of client application. Accordingly, the scope and spirit of the invention should be judged in terms of the claims which follow.