FT Lecture Note 9 NAT PAT Fall22

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Chapter 9

NAT & PAT

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.

9.2 Private Network


A private network is any connection within a specified network wherein restrictions are established
to promote a secured environment. This type of network can be configured in such a way that
devices outside the network cannot access it. Only a selected set of devices can access this type of
network depending on the settings encoded in the network routers and access points. On the other
hand, a public network is defined as a network that anyone can freely connect to little or no
restriction.
A private network is more of a usage designation rather than a proper network type or
topology. There is not much of a technical difference between a private and a public network in
terms of hardware technology and infrastructure, except for the way that access rights and security
measures are set up. The terms "private" and "public" simply denote who can and cannot use the
network. However, it is more complicated to set up a private network due to all the security
measures and access restrictions that need to be put in place; sometimes even extra hardware not
that's not required on public networks is used.

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)

9.3 Types of NAT

• Static NAT: The simplest type of NAT provides a one-to-one translation of IP


addresses. It is often also referred to as one-to-one NAT. In this type of NAT only the
IP addresses, IP header checksum and any higher level checksums that include the IP
address need to be changed. The rest of the packet can be left untouched (at least for
basic TCP/UDP functionality, some higher level protocols may need further
translation). Basic NATs can be used when there is a requirement to interconnect two
IP networks with incompatible addressing. With static NAT, translations exist in the
NAT translation table as soon as you configure static NAT command(s), and they
remain in the translation table until you delete the static NAT command(s).

Figure 9.1 Static NAT

• 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.

Figure 9.2 NAT Overload/PAT


9.4 Advantages of NAT

• 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.

9.5 Disadvantages of NAT

• Switching path delays are the outcome of the translation.


• Lack of end-to-end traceability.
• Certain applications are not compatible with NAT.

9.6 Advantages of PAT

• 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.

9.7 Disadvantages of PAT

• 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.

You might also like