
Īll IP packets have a source IP address and a destination IP address. When the router receives inbound traffic from the Internet, it uses the connection tracking data it stored during the outbound phase to determine to which private address (if any) it should forward the reply. The router tracks basic data about each active connection (particularly the destination address and port).
As traffic passes from the network to the Internet, the router translates the source address in each packet from a private address to the router's own public address. The public address (typically assigned by an Internet service provider) is used by the router for communicating with the rest of the Internet. The private address is used by the router for communicating with other devices in the private local network. The network has a router having both a private and a public address. A local network uses one of the designated private IP address subnets (RFC 1918 ). The majority of network address translators map multiple private hosts to one publicly exposed IP address. Basic NAT can be used to interconnect two IP networks that have incompatible addressing. In this type of NAT, only the IP addresses, IP header checksum, and any higher-level checksums that include the IP address are changed. RFC 2663 refers to this type of NAT as basic NAT it is also called a one-to-one NAT. The simplest type of NAT provides a one-to-one translation of IP addresses. The specifics of NAT behavior are not commonly documented by vendors of equipment containing NAT implementations. Īs network address translation modifies the IP address information in packets, NAT implementations may vary in their specific behavior in various addressing cases and their effect on network traffic. One Internet-routable IP address of a NAT gateway can be used for an entire private network.
It has become a popular and essential tool in conserving global address space in the face of IPv4 address exhaustion.
The technique was originally used to bypass the need to assign a new address to every host when a network was moved, or when the upstream Internet service provider was replaced, but could not route the network's address space. Network address translation ( NAT) is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device.
Network address translation between a private network and the Internet