What is NAT and how does it work?

NAT

You have probably heard of the term NAT referred to the field of connections and Internet browsing. The meaning of these acronyms is Network Address Translator, that is, “network address translator”. It is, in any case, a fundamental element to be able to use our network, a technology that practically all domestic and professional routers incorporate.

As its name indicates, the main function of NAT is precisely that: translate addresses to make connections possible. In this post we are going to analyze what it is about, highlighting its importance, its strengths and weaknesses. In short, everything you need to know about NAT.

While all devices connected to a network (phones, tablets, computers, etc.) have a unique IP address, NAT is responsible for providing a joint public IP address for that entire network. In this way, instead of assigning a different IP address for each of the devices, NAT provides a single address for all (between 192.168.0.0 and 192.168.255.255). The great advantage that this entails is avoiding IPv4 address exhaustion and guaranteeing a good connection.

IPv4 addresses are made up of 32 bits, which allows the creation of a total of 4.294.967.296 addresses. It seems an unattainable figure, but in reality it is if we multiply the number of IPs in the world by the number of devices connected to each of them. Hence the importance of the task performed by the NAT.

How does it work

ipv4

The operation of NAT is bidirectional. This means that it serves both to translate a private IP address and translate it to a public IP address or the opposite. It might seem like a redundant task, since there is no obstacle to directly using a public IP. However, its importance lies in the problems it solves. These are the clearest examples:

  • It provides a workaround for the previously mentioned problem of IPv4 exhaustion.
  • Reduces the high cost of obtaining public IPs.
  • It allows thousands of devices to connect to the internet using a single public IP address.

Today almost all routers, both for private users and for public administrations and private companies, make one of the NAT for their connections. And this is also done for an additional reason: safety. And it is that, in addition to the basic function for which it was conceived, NAT also acts as a kind of filter that prevents only authorized and verified data packets from accessing our private devices.

Obviously, this does not guarantee an absolute degree of protection, although it does provide an extra layer of privacy and security that is highly recommended for any private Internet network.

NAT types

There are several different types of NAT, although the most important ones boil down to the following three:

static NAT

The private address is articulated so that it is always translated into the same public address. It is a simple solution and recommended in some cases (such as for use in devices that always have to have the same address to be accessible). On the other hand, it presents certain risks, since our device is visible at all times from the Internet.

dynamic NAT

It is the opposite case to the previous example. Here NAT does not always choose the same IP address, but rather plays with a set of different public IP addresses. Each time a translation is performed, a new IP address will be assigned.

PAT

They are the acronyms of Port Address Translator. This modality allows the Internet connection from several private IPs to be connected through a single public IP. An operation that is carried out through the ports. Its main advantage is that we will be able to hide all the private IP addresses that we have on our local network, which translates into more security. Of course, there is a limitation to a maximum of 216 connections, which makes this option not very practical in large networks.

NAT: advantages and disadvantages

NAT

As a summary, we will list all the points for and against that we must assess regarding the use of NAT in our connections:

Pro

  • allows us the saving IPv4 addresses, since several devices can be connected to the Internet with the use of a single public IP address.
  • The setup method is direct and easy.
  • Es compatible with almost all communication protocols.
  • It hardly requires maintenance. 
  • It means providing our connections with a security plus, since the devices of our local network are not visible from the outside.*.
  • Es more flexible for group connections.

(*) Except for static NAT, as we have seen.

Contra

  • demands a increased processing power to the router.
  • Does not support certain protocols, such as ICM.
  • Decreases the end-to-end IP tracking.
  • can sometimes cause conflicts with online games, which need the best possible bandwidth and latency.
  • La remote troubleshooting it is more complicated.

Leave a Comment

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

*

*

  1. Responsible for the data: Actualidad Blog
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.