主权项 |
1. An address translation device comprising:
a receiver that receives a packet that is from a communication apparatus on a private network to a communication apparatus on a global network; a processor; a memory which stores a plurality of instructions, which when executed by the processor, cause the processor to execute: determining whether a destination address of a first packet received by the receiver matches a destination address of a second packet that was received before the first packet; translating, when the determining makes a determination of no matching, a source private address of the first packet to a source global address that has been allocated to the second packet; a transmitter that transmits the first packet that has been translated by the translator, wherein translating, when the determining makes a determination of no matching, a source private port number of the first packet to a source global port number of the second packet; determining whether the destination address and a destination port number of the first packet match the destination address and a destination port number of the second packet, and whether the source private address and the source private port number of the first packet match a source private address and a source private port number of the second packet; and translating, when it is determined that the destination address of the first packet matches the destination address of the second packet and it is determined that the destination port number of the first packet is different from the destination port number of the second packet or it is determined that the source private address of the first packet is different from the source private address of the second packet or it is determined that the source private port number of the first packet is different from the source private port number of the second packet, the source private address of the first packet to the source global address of the second packet and the source private port number of the first packet to a global port number that is in a global port number group corresponding the source global address and that is different from the source global port number of the second packet; and a transmitter that transmits the first packet that has been translated. |