FT Lecture Note 9 NAT PAT Fall22
FT Lecture Note 9 NAT PAT Fall22
FT Lecture Note 9 NAT PAT Fall22
Without network address translation (NAT) or port address translation (PAT) you probably
wouldn’t be able to access the internet from your computer or at least you’ll be the only one in the
house having internet access…in this lesson an explanation is given why and how we use
NAT/PAT for Internet access.
9.1 Definition
Network Address Translation (NAT) basically connects two networks and map the private
(inside local) addresses into public addresses (inside global). Here the term inside local signifies
that the host address belongs to an internal network and not assigned by Network Information
Center or service provider. And the inside global means that the address is a licit address
assigned by the NIC or service provider and it also represents one or more inside local addresses
to the outside world.
The main purpose of NAT was to slow down the rate of depletion of available IP address space by
enabling many private IP addresses to be represented by some smaller number of public IP
addresses.
Port Address Translation (PAT) is a type of Dynamic NAT through which address translation
can be configured at the port level, and the remaining IP address usage is also optimized. PAT
maps multiple source local addresses and ports to a single global IP address and port from a pool
of IP addresses that are routable on the destination network. Here the interface IP address is used
in combination with the port number and multiple hosts could have same IP address because the
port number is unique.
It uses unique source port address on the inside global IP address to identify the distinct
translations. The total number of NAT translations that can be carried out is 65536 because the
port number is encoded in 16 bits.
Original source ports are preserved by the PAT. If the source port is already allocated the available
ports are searched. The port groups are divided into three ranges that are from 0 to 511, 512 to
1023, or 1024 to 65535.
Private networks are most preferred in businesses and private organizations because they
provide high security for vital information. There are some factors that need to be addressed in
order to have a secured connection, making private networks more complicated to set up. First is
the number of users or devices that can connect. Next, Web servers need to be protected, since
exposure to the Internet makes these networks susceptible to malicious attacks. Lastly, high-
security hardware and applications like firewalls need to be installed, as they can greatly help in
making the network private and secure.
There is no doubt that a private network, with all of its bells and whistles, is more expensive
to set up compared to public networks, which only needs to have some access points and a proper
connection to the Internet to function. Private IP range:
• 192.168.0.0 - 192.168.255.255 (65,536 IP addresses)
• 172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses)
• 10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses)
• Dynamic NAT: Dynamic NAT has some similarities and differences compared to static
NAT. Like static NAT, the NAT router creates a one-to-one mapping between an
inside local and inside global address and changes the IP addresses in packets as they
exit and enter the inside network. However, the mapping of an inside local address to
an inside global address happens dynamically. Dynamic NAT sets up a pool of
possible inside global addresses and defines matching criteria to determine which inside
local IP addresses should be translated with NAT. The dynamic entry stays in the table
as long as traffic flows occasionally. With dynamic NAT, translations do not exist in
the NAT table until the router receives traffic that requires translation. Dynamic
translations have a timeout period after which they are purged from the translation table.
• Static PAT: Static PAT translations allow a specific UDP or TCP port on a global
address to be translated to a specific port on a local address. Static PAT is the same
as static NAT, except that it enables you to specify the protocol (TCP or UDP) and port
for the real and mapped addresses. Static PAT enables you to identify the same mapped
address across many different static statements, provided that the port is different for
each statement. You cannot use the same mapped address for multiple static NAT
statements. With static PAT, translations exist in the NAT translation table as soon as
you configure static PAT command(s), and they remain in the translation table until you
delete the static PAT command(s).
• NAT Overload or PAT: It is common to hide an entire IP address space, usually
consisting of private IP addresses, behind a single IP address (or in some cases a small
group of IP addresses) in another (usually public) address space. This type of NAT is
called PAT in overload. The dynamic entry stays in the table as long as traffic flows
occasionally. With PAT in overload, translations do not exist in the NAT table until the
router receives traffic that requires translation. Translations have a timeout period after
which they are purged from the translation table.
• NAT preserves the registered public addresses and slows down the depletion of the IP
address space.
• Occurrence of address overlap significantly reduces.
• Increases flexibility of the connection establishment.
• Removes the process of address renumbering at the time of changing network.
• Conserve IP addresses by assigning single public IP to a group of hosts with the help of the
different port numbers.
• Lessens the vulnerabilities or security attacks as the private address prevent the public
address from being exposed.
• More than one same type of public services cannot be executed with a single IP address in
PAT.
• Number of entries are limited in the internal table for keeping the tracks of the connections.