Patent attributes
A NAPT apparatus and method implemented with hardware circuits inside a network switch controller is provided. The NAPT apparatus comprises: a translation table for storing related information of NAPT connections; an IP table for storing available translated IPs; a packet parser for receiving a packet to be performed NAPT, parsing related fields of the packet, and generating part of required indexes according to transmission direction of the packet; and a packet translation module for performing NAPT. For a forward packet, the NAPT method employs an indexing means of the translation table and IP table and a recording means to generate a translated IP and a translated port number of the forward packet. For a backward packet, a restoring action corresponding to the recording means is performed to restore required values, thereby checking validity of the backward packet and performing subsequent NAPT.