• Networking
  • Programming
  • DBMS
  • Operating System
  • Internet
  • Hardware
  • Software

Tech Differences

Know the Technical Differences

Difference Between NAT and PAT

NAT vs PATNetwork Address Translation (NAT) and Port Address Translation (PAT) are the protocols used to map the unregistered private (inside local) address of an internal network to a registered public (inside global) address of an external network before transferring the packet. The main difference between them is that NAT is used to map public IP addresses to private IP addresses, it could be a one-to-one or many-to-one relation. On the other hand, PAT is a type of NAT where the multiple private IP addresses are mapped into a single public IP (many-to-one) by using ports.

An internal network user having a private IP (unregistered) could not connect to the internet or external network because each device in a network must have a unique IP address. NAT works on a router connecting two networks together, and it translates the internal network private address (i.e. not globally unique) into the legal public address.

Additionally, it was devised to conserve the IP addresses. As the internet users were facing a problem of IP address scarcity, where the number of users was increased more than the limited range of IP addresses. For the certain reason, NAT and PAT protocols are used.

Content: NAT Vs PAT

    1. Comparison Chart
    2. Definition
    3. Key Differences
    4. Advantages and Disadvantages of NAT
    5. Advantages and Disadvantages of NAT
    6. Conclusion

Comparison Chart

Basis for comparisonNATPAT
BasicTranslates the private local IP address to the public global IP address.Similar to NAT it also translates the private IP addresses of an internal network to the public IP address with the help of Port numbers.
RelationshipSuperset of PAT.Variant of NAT (form of a Dynamic NAT).
UsesIPv4 addressIPv4 addresses along with the port number.
TypesStatic NAT
Dynamic NAT
Static PAT
Overloaded PAT

Definition of NAT

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. NAT exampleFurthermore, only one address can be configured in NAT to represent the entire network to the outside world. Therefore it provides security as the translation process is transparent. NAT can be used as a tool for network migration and merging, server load sharing, virtual server creation, etc.

NAT can be of three types :

  • Static NAT – In this type of NAT a local address is mapped to a global address, and there exists a one-to-one relationship. Static NAT is useful when a host requires a consistent address, which must be accessed from the internet. For example, enterprise servers or networking devices.
  • Dynamic NAT – Dynamic NAT allows unregistered private IP address to be translated into registered public IP address from a pool of public IP addresses.
  • PAT/ NAT Overloading/IP masquerading – PAT is most popular type among the three types. It is a variant of Dynamic NAT and is similar to it, but it maps multiple private IP addresses to a single public IP address by making use of ports.

Definition of PAT

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. PAT exampleIf PAT doesn’t get any available port from the appropriate port group and if more than one external IPv4 address is configured, PAT moves to the next IPv4 address and attempts to allocate the original source port until it runs out of available ports and external IPv4 addresses.

Key Differences Between NAT and PAT

  1. NAT translates the inside local addresses into inside global addresses similarly PAT translates the private unregistered IP addresses into public registered IP addresses, but unlike NAT it uses source port numbers also, and multiple hosts can be assigned with the same IP having different port numbers.
  2. PAT is a form of Dynamic NAT.
  3. NAT uses IP addresses in the process of translation whereas PAT uses IP addresses along with port numbers.

Advantages and Disadvantages of NAT

Advantages 

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

Disadvantages 

  • Switching path delays are the outcome of the translation.
  • Lack of end-to-end traceability.
  • Certain applications are not compatible with NAT.

Advantages and Disadvantages of PAT

Advantages

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

Disadvantages

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

Conclusion

NAT and PAT protocols are used for minimizing the requirement of globally unique IP addresses, allowing a host whose address is not globally unique to connect to the internet, by converting the addresses into global address space which is routable. There is a slight difference between NAT and PAT is that NAT doesn’t use ports while PAT uses source ports in the translation process.

Related Differences:

  1. Difference Between Local and Global Variable
  2. Difference Between LAN and VLAN
  3. Difference Between Static and Dynamic Routing
  4. Difference Between Primary key and Unique key
  5. Difference Between Subnetting and Supernetting

Comments

  1. Abdullah says

    May 13, 2018 at 6:27 am

    good work

    Reply
  2. Nicholas Woods says

    June 24, 2018 at 8:23 am

    Nice and concise article.

    Reply
  3. Saily says

    May 15, 2019 at 10:20 am

    Good definitions appreciate your efforts, thank you.

    Reply
  4. DJAMEL AMRI says

    October 17, 2019 at 3:13 pm

    Thank you for the clarity of the presentation

    Reply
  5. diego says

    December 24, 2019 at 12:56 pm

    Good, very interesting … the question is the ISP that need to distribute the IP PAT or NAT?

    Reply
  6. anonymous says

    April 26, 2020 at 2:02 am

    Thank you

    Reply
  7. Yacine says

    August 29, 2022 at 9:38 am

    Thanks for the article…

    Reply
  8. sd says

    January 12, 2023 at 10:48 am

    Thanks for the article…

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 10 Differences

  • Difference Between OLTP and OLAP
  • Difference Between while and do-while Loop
  • Difference Between Guided and Unguided Media
  • Difference Between Preemptive and Non-Preemptive Scheduling in OS
  • Difference Between LAN, MAN and WAN
  • Difference Between if-else and switch
  • Difference Between dispose() and finalize() in C#
  • Difference Between for and while loop
  • Difference Between View and Materialized View
  • Difference Between Server-side Scripting and Client-side Scripting

Recent Addition

  • Difference Between Unit Testing and Integration Testing
  • 4G Vs 5G
  • Raster Vs Vector Images
  • JPEG Vs TIFF
  • RJ11 Vs RJ12

Categories

  • DBMS
  • Hardware
  • Internet
  • Networking
  • Operating System
  • Programming
  • Software

Copyright © 2023 · Tech Differences · Contact Us · About Us · Privacy