Abstract:
Network Address Translation (NAT) Traversal methods and systems. First, a web-based server is provided. The server comprises a database storing connection information corresponding to at least one application, wherein the connection information comprises a network address and a connection port corresponding to the application. A first host connects to the server to query and obtain the connection information corresponding to the application. The First host connects to a second host comprising the application in a private domain according to the network address and the connection port in the connection information to use the application.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The disclosure relates generally to network management, and, more particularly to NAT (Network Address Translation) traversal methods and systems. 
         [0003]    2. Description of the Related Art 
         [0004]    In a network environment, due to specific reasons such as security or asymmetry between network addresses of hosts in the private and public domains, NAT provides translation for communication therebetween. When hosts and applications in the network both have NAT traversal capability, specific hosts or applications in the private domains can be accessed via the Internet. 
         [0005]    However, since not all hosts and applications have NAT traversal capability, some hosts and applications can not be accessed externally. In conventional practice, users must upload resources of a private host to a specific and public host in advance. When users need the resources of the private host remotely, they link to the public host to access the resources. In this practice, it takes times for uploading the resources, and the resources cannot be immediately accessed and controlled. The resources on the public and private hosts may contain inconsistencies, thereby increasing management difficulty of resources. 
         [0006]      FIG. 1  is a schematic diagram illustrating a conventional NAT traversal mechanism. In  FIG. 1 , A 1 ˜A 5 , B 1 ˜B 5 , C 1 ˜C 5  and D 1 ˜D 5  are ordinary hosts without NAT traversal capability in the private domains. A, B, C and D are super nodes respectively assigned to ordinary nodes A 1 ˜A 5 , B 1 ˜B 5 , C 1 ˜C 5  and D 1 ˜D 5  in the public domain. A super node means a node having NAT traversal capability. A super node stores a list recording other super nodes with NAT traversal capability. When an ordinary host wants to communicate with a specific host, the ordinary host can transmit communication data to the specific host via the corresponding super nodes in the public domain. For example, when ordinary node A 1  wants to communicate with ordinary node C 2 , super nodes A and C are employed as relay stations to handle the communication between ordinary nodes A 1  and C 2  since super nodes A and C contain related information of ordinary nodes A 1  and C 2 , respectively. That is ordinary node A 1  can transmit data to ordinary node C 2  via relay stations A and C, and receive data from ordinary node C 2  via relay stations A and C. In this mechanism, since the relay stations are specially set for specific hosts, additional costs for set up are required. Further, when the hosts are changed, related management thereto becomes complex. Additionally, since all communications between the ordinary nodes must be forwarded by the relay stations, the load on the relay stations is heavy, thus reducing the efficiency of the relay stations. When specific relay stations malfunction, the whole service will most likely be suspended. 
       BRIEF SUMMARY OF THE INVENTION 
       [0007]    NAT traversal methods and systems are provided. 
         [0008]    In an embodiment of a NAT traversal method, a web-based server is provided. The server comprises a database storing connection information corresponding to at least one application, wherein the connection information comprises a network address and a connection port corresponding to the application. A first host connects to the server to query and obtain the connection information corresponding to the application. The first host connects to a second host comprising the application in a private domain according to the network address and the connection port in the connection information to use the application. 
         [0009]    An embodiment of a NAT traversal system comprises a first host, a second host, and a web-based server. The server comprises a database storing connection information corresponding to at least one application, wherein the connection information comprises a network address and a connection port corresponding to the application. The first host connects to the server via a network to query and obtain the connection information corresponding to the application, and connects to the second host according to the network address and the connection port in the connection information to use the application. 
         [0010]    NAT traversal methods and systems may take the form of a program code embodied in a tangible media. When the program code is loaded into and executed by a machine, the machine becomes an apparatus for practicing the disclosed method. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]    The invention will become more fully understood by referring to the following detailed description with reference to the accompanying drawings, wherein: 
           [0012]      FIG. 1  is a schematic diagram illustrating a conventional NAT traversal mechanism; 
           [0013]      FIG. 2  is a schematic diagram illustrating an embodiment of a NAT traversal system; 
           [0014]      FIG. 3  is a schematic diagram illustrating an embodiment of a web-based server; 
           [0015]      FIG. 4  shows an embodiment of connection information; 
           [0016]      FIG. 5  is a flowchart of an embodiment of a connection information registration 
           [0017]      FIG. 6  is a flowchart of an embodiment of a NAT traversal method; and 
           [0018]      FIG. 7  shows an embodiment of a NAT traversal example. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0019]    NAT traversal methods and systems are provided. 
         [0020]      FIG. 2  is a schematic diagram illustrating an embodiment of a NAT traversal 
         [0021]    As shown in  FIG. 2 , the NAT traversal system comprises a web-based server  220 , and a plurality of hosts  202 ,  204 ,  206 ,  208  and  210 . Each host can couple to the server  220  via the Internet. It is understood that respective hosts may be in different private domains, and the server  220  is in a public domain. Each host has an account with the server  220 , registers related information of resources and applications thereon with the server, and sets authority data corresponding thereto. Each host can query related information such as connection information corresponding to a specific application according to server  220  authorization, and connect to a host providing the specific application according to the connection information to use the specific application. It is understood that, in some embodiments, several servers can be provided as stand-bys or to handle different hosts. 
         [0022]      FIG. 3  is a schematic diagram illustrating an embodiment of a web-based server. 
         [0023]    The web-based server  300  comprises a registration and verification module  310 , an operating interface  320 , a processing module  330 , and a database  340 . The database  340  stores connection information  342  and account/authority data  344 . Hosts can login the server  300  via the operating interface  320 , and register and query the connection information  342 .  FIG. 4  shows an embodiment of connection information. As shown in  FIG. 4 , the connection information  342  comprises fields containing a host ID, an application ID, a protocol type, a network address, and a connection port. Respective applications that can be accessed by other hosts in a host have a record. In the example in  FIG. 4 , host IDs  1001  and  1002  represent different hosts. Application IDs  101 ,  201  and  301  represent different applications on host  1001 , such as an FTP (File Transfer Protocol), a media player, a network camera, a device controller, or a live TV playback. Protocol types 0 and 1 represent different communication protocols. For example, 1 represents TCP (Transmission Control Protocol), and 0 represents UDP (User Datagram Protocol). The network address is an IP (Internet Protocol) address of a host after NAT. The connection port is defined by a host to be coupled with a specific application. The registration and verification module  310  receives account registrations (applications) from hosts, and performs related verification operations according to the account/authority data  344  to confirm whether the hosts are valid users of the server  300 , and determine access authorization of the hosts concerning related connection information. The processing module  330  performs the information registration and query operations. 
         [0024]      FIG. 5  is a flowchart of an embodiment of a connection information registration method. 
         [0025]    In step S 510 , a host connects to and logs on to a web-based server via the Internet. It is understood that, if the host had registered in the server, the host can directly use its account to log on to the server. If the host is not registered in the server, the host must apply for a new account with the server. When the host logs in, the server verifies the host according to the account/authority data in the database. In step S 520 , the host downloads and executes a NAT traversal program (not shown in  FIG. 3 ) from the server. It is noted that the NAT traversal program can help the host to proceed with related operations of registration for connection information of an application. In step S 530 , related settings of the connection information such as the network address of the host in the private domain, application ID and connection port correspond to the application. In step S 540 , the NAT type is checked, and the network address and connection port in the public domain are determined. In step S 550 , the server is connected based on the above settings, and the connection information corresponding to the application is transmitted to the server. It is understood that the network address of the host in the private domain is translated into a network address in the public domain after NAT. NAT devices (related devices with the NAT capability, such as router, gateway, switch hub, modem, and others) will record the mapping relationship between the network addresses in the private and public domains, and the connection port corresponding to the application, and transmit the translated network address of the host in the public domain to the server. It is understood that the host can set a querying authorization for the connection information corresponding to the application in the server. For example, the connection information can be provided for all hosts, partial hosts, or the host itself to query. The server stores the connection information and corresponding authority data in the database. 
         [0026]      FIG. 6  is a flowchart of an embodiment of a NAT traversal method. 
         [0027]    In step S 610 , a host connects to a web-based server via the Internet, and the serer verifies the host and its query authority. If the host does not has the query authority (No in step S 620 ), the procedure is completed. If the host has the query authority concerning a specific application (Yes in step S 620 ), in step S 630 , corresponding connection information is queried and obtained according to the host ID and/or application ID to be sought. After the connection information is obtained, in step S 640 , the host directly connects to a host providing the application according to the connection information to use the application. It is understood that since NAT devices will record the mapping relationship between the network addresses in the private and public domains, and the connection port corresponding to the application, when an access request is received, a host and an application to be accessed can be determined according to the connection port. 
         [0028]      FIG. 7  shows an embodiment of an NAT traversal example.  FIGS. 4 and 7  are referred to, to assist in explaining the following example. In this example, host  1001  is in the private domain A, and has a network address and a connection port “192.168.1.1:1234” in the private domain. Host  1001  couples to the public domain via a NAT device NAT  1  having a network address “58.86.128.50” in the public domain. Host  1002  is in the private domain B, and has a network address and a connection port “192.168.1.100:5678” in the private domain. Host  1002  couples to the public domain via a NAT device NAT  2  having a network address “219.91.85.30” in the public domain. 
         [0029]    Host  1001  can register connection information  342   a  corresponding to an FTP application through NAT  1  using the NAT traversal program in advance with the server  300 , as the first record shown in  FIG. 4  (S 710 ), wherein the host ID is “1001”, the application ID is “101”, the protocol type is “1 (TCP)”, the network address is “58.86.128.50”, and the connection port is “1025”. The server  300  stores the connection information  342   a  to the database  340 . As described, NAT device NAT  1  will record the mapping relationship between the network addresses of host  1001  in the private and public domains, and the connection port corresponding to the application (the connection port is “1025” in this example), and the NAT traversal program will transmit the translated network address of the host in the public domain after NAT  1  to the server. If host  1002  wants to query FTP services in the network environment, it can log in to the server  300 , and query related connection information according to specific host IDs and/or application IDs (S 720 ). In this example, host  1002  can input host ID “1001” and/or application ID “101” to query and obtain the connection information  342   a  corresponding to the FTP application (S 730 ). After the connection information is obtained, host  1002  can directly connect to host  1001  according to the content of the connection information such as protocol type, network address, and connection port to use the FTP application (S 740 ). In this example, host  1002  can connect to host  1001  according to “58.86.128.50:1025” to use the FTP application. 
         [0030]    The NAT traversal methods and systems have web-based open architectures with an advantage of noncomplex operations which increase users&#39; motivation for use. Additionally, various applications without the NAT capability can be provided for public via the disclosed NAT traversal methods and systems. 
         [0031]    It is understood that, in some embodiments, the connection port corresponding to the application can be periodically modified randomly or manually to enhance the system security. 
         [0032]    NAT traversal methods and systems, or certain aspects or portions thereof, may take the form of a program code (i.e., executable instructions) embodied in tangible media, such as products, floppy diskettes, CD-ROMS, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine thereby becomes an apparatus for practicing the methods. The methods may also be embodied in the form of a program code transmitted over some transmission medium, such as electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the disclosed methods. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates analogously to application specific logic circuits. 
         [0033]    While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. Those who are skilled in this technology can still make various alterations and modifications without departing from the scope and spirit of this invention. Therefore, the scope of the present invention shall be defined and protected by the following claims and their equivalents.