01-14-2024 06:43 AM - edited 01-14-2024 06:50 AM
I want to know in what scenarios do we need to use NAT.
Suppose we have two networks connected via point to point link. Can we just establish communication between those two networks via static route configuration at both ends?
Or is NAT only needed to access public websites? As an example, if I have a router on which internet uplink is connected and I want to allow local devices to connect to internet. So, I need to configure PAT on my router.
01-14-2024 06:55 AM
Hello @Sagar4
NAT is commonly used to enable devices with private IP addresses to access the internet. Private IP addresses are reserved for use within private networks and are not routable on the public internet. When devices within a private network need to communicate with the internet, NAT is used to translate the private IP addresses of the internal devices to a single or a pool of public IP addresses associated with the network's edge router.
There are different types of NAT, and one common form is PAT. In PAT, multiple private IP addresses are mapped to a single public IP address, and the translation is differentiated by the use of unique port numbers.
Regarding your specific scenario of two networks connected via a point-to-point link, you can establish communication between them using static routes. However, if these networks use private IP addresses and need to communicate with other networks, such as the internet, NAT might be required to translate their private addresses to a public address for internet access.
01-14-2024 11:22 AM
In addition to what M02@rt37
From my notes :
Network Address Translation
===========================
Each computer and device within an IP network is assigned a unique IP address that identifies the host.
Because of a shortage of public IPv4 addresses, most of these IP addresses are private and not routable anywhere outside of the private company network.
RFC 1918 defines the private IP addresses you can use internally that should not be advertised:
10.0.0.0 through 10.255.255.255
172.16.0.0 through 172.31.255.255
192.168.0.0 through 192.168.255.255
One of the main functions of Network Address Translation (NAT) is to enable private IP networks to connect to the Internet.
NAT replaces a private IP address with a public IP address, translating the private addresses in the internal private network into legal,
routable addresses that can be used on the public Internet.
In this way, NAT conserves public addresses because it can be configured to advertise at a minimum only one public address for the entire network to the outside world.
Other functions of NAT include:
Security-Keeping internal IP addresses hidden discourages direct attacks.
IP routing solutions-Overlapping IP addresses are not a problem when you use NAT.
Flexibility-You can change internal IP addressing schemes without affecting the public addresses available externally;
for example, for a server accessible to the Internet, you can maintain a fixed IP address for Internet use, but internally, you can change the server address.
Translating between IPv4 and IPv6 (Routed mode only)-If you want to connect an IPv6 network to an IPv4 network, NAT lets you translate between the two types of addresses.
Static network address translation SNAT.
SNAT maps unregistered IP addresses using 1 to 1 network address translation to match up with registered IP addresses. It is particularly useful when a device needs to be accessible from outside the network.
Dynamic network address translation DNAT.
This form of NAT selects a target from a group of registered IP addresses and maps an unregistered IP address to the registered version.
Reverse network address translation RNAT.
RNAT allows users to connect to themselves using the internet or public network.
Overloading network address translation NAT.
This is also known as NAT overload, port-level multiplexed NAT, single address NAT, or port address translation (PAT).
This form of dynamic NAT uses different ports to map multiple private, local, unregistered IP addresses to a single registered IP address and distinguish which traffic belongs to which NAT IP address. In terms of port address translation vs network address translation, PAT is often most cost-effective when many users are connected to the internet through just one public IP address.
Overlapping network address translation NAT.
Overlapping NAT can happen either when two organizations whose networks both use RFC 1918 IP addresses merge,
or when registered IP addresses are assigned to multiple devices or otherwise in use on more than one internal network.
In both cases, the networks need to communicate, and the organization(s) use overlapping NAT to achieve this without readdressing all devices.
01-14-2024 07:10 AM
NAT use in two case
1- reachable one subnet to network
2- access public network' the internet not accept private IP
MHM
01-14-2024 10:40 AM
There have been several suggestions about needing NAT when devices using private IPs want to access the Internet. There is another situation where NAT would be needed. Let us assume that the OP is in a network that uses private network 192.168.10.0/24. And that the OP is setting up a point to point to another site, which also uses 192.168.10.0/24. You would implement NAT so that the 2 sites could communicate with each other.
01-14-2024 12:56 PM
"I want to know in what scenarios do we need to use NAT."
Whenever there's an address overlap conflict, and you don't, or cannot, for some reason, don't remediate by re-adressing.
"Suppose we have two networks connected via point to point link. Can we just establish communication between those two networks via static route configuration at both ends?"
Insufficient information to say.
"Or is NAT only needed to access public websites?"
Nope, and NAT not necessarily needed for that either.
"As an example, if I have a router on which internet uplink is connected and I want to allow local devices to connect to internet. So, I need to configure PAT on my router."
Again, insufficient information to say.
The other posted replies provide additional information that hopefully explains the "why" for my above answers to your questions, but if not, ask further.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide