Patent ID: 7385983
Filing Date: 2008-06-10
Classification: H04L

Abstract:
1. A network address-port translation (NAPT) apparatus used in a switch controller, comprising: a translation table comprising a plurality of cache lines, wherein each of the cache lines comprising of at least one first storage element for storing an internet IP address and an internet port number; an IP table comprising a plurality of second storage elements, wherein each of the second storage elements stores a translated IP address; a packet parser generating indexes EIDX and GIDX according to related fields of forward packet, wherein the index EIDX corresponds to the translation table and is used to select one cache line in the translation table, and the index GIDX corresponds to the IP table and is used to select the available translated IP addresses in the IP table; and a packet translation module coupled to the translation table, the IP table and the packet parser, generating a translated port number though a recording procedure based on the indexes EIDX and GIDX, and retrieving one translated IP address from the IP table according to the index GIDX; the packet translation module further translating a source IP and a source port of the forward packet into the retrieved translated IP address and the translated port number respectively; and when the packet parser receives a backward packet, the packet parser and the packet translation module cooperating to perform a restoring procedure corresponding to the recording procedure to determine whether the backward packet is to be performed NAPT, wherein the restoring procedure is performed to obtain the translated port number according to the indexes EIDX and GIDX if the internet protocol IP address and the port number of the first storage element with the index EIDX equal the source IP and the source port of the forward packet respectively.