NATing
Allowing multiple devices to access the internet (Wider Network) with a single address, a public address
For computers outside of your local (private) network to communicate with computers within your local network, there must be a least one public (global) IP address amongst the set of computers that all have local IP addresses.
Your computer can not communicate with another computer that does not have an address in the same ‘subnet’. The router ‘translates’ different subnets for you, allowing you to communicate outside of your subnet.
Network Address Translation (NAT) is a process in which one or more local IP address is translated into one or more Global IP address and vice versa in order to provide Internet access to the local hosts. NATing also provides port masking and mapping so that many processes on the same local host can share the same public IP address.
The border routers are configured for NAT. When a packet traverses outside the local network, the NAT converts the local IP address to a public IP address. Then a packet enters the local network, the NAT converts the public IP address into a local IP address. It does translation by storing the outgoing packet details (local IP address and Port number) so that when the reply comes in can map the public IP address to the correct local IP address.
Masking Port Numbers
Port numbers must also be masked/mapped
When a request leaves the local network from a single host and a reply comes back, the router needs to be able to route the response to the correct process on the single host. For example page requests on two different browsers from the same host.