Page Content

Tutorials

Advantages Of Network Address Translation NAT And Types

What is network address translation NAT?

Network address translation NAT
Network address translation NAT

Multiple devices on a private network can utilize one public IP address to access the Internet via NAT. Remapping one IP address space into another modifies the IP header of packets passing via a router or firewall. NAT translates private IP addresses to public ones and vice versa. Additionally, it has the ability to translate port numbers, hiding the host’s port number in the packet that is sent to the destination with a different one, and logging these mappings in a network address translation database.

Why Network Address Translation is Needed

NAT was built to address IPv4 address exhaustion. The Internet’s rapid growth drained IPv4 address space with approximately 4.3 billion addresses. By enabling several devices on a private network to share a single public IP address, NAT offers a crucial workaround and helps to preserve public IP addresses.

  • Strengthens Security: NAT serves as a security layer by concealing devices’ internal, private IP addresses. The inability of external entities to directly “see” or access individual devices on the private network hinders their ability to conduct assaults and improves privacy.
  • Network Migrations and Mergers: It helps get around address overlap problems that can arise when two intranets with redundant addressing schemes are combined.
  • Flexibility: NAT makes network administration and configuration simpler, particularly in settings where IP addresses are assigned dynamically.
  • Load Balancing: To manage workload, client-server applications can employ NAT to map a representative IP address of a server cluster to particular hosts.

How deos Network Address Translation Works

At the intersection between a private network and the open Internet, NAT usually functions on a router or firewall. The procedure involves these steps:

  1. Outgoing Request: When it needs to connect to the Internet, a private network device like PC0 with a private IP sends a request using its private IP address and source port number.
  2. NAT Device Interception: The NAT router intercepts this packet.
  3. Address and Port Translation: The router assigns a distinct public port number and substitutes its own public IP address for the private source IP address. A translation table, sometimes referred to as a NAT table, contains this important mapping (private IP + original port to public IP + new port).
  4. Forwarding to Internet: The router’s public IP address and port are used to forward the modified packet to the Internet. The destination server interprets the request as originating from the router’s public IP.
  5. Masking Port Numbers: NAT masks source port numbers to identify inside hosts requesting the same destination and port. By doing this, the NAT is guaranteed to know which internal host the reply is from, avoiding confusion when replies return.
  6. Incoming Response: The response packet reaches the router’s public IP address and the designated public port upon receiving a response from the target server.
  7. Reverse Translation: The NAT device searches its translation table for that connection’s private IP address and beginning port number. Private IP and port are replaced with public IP and port in packet destination fields.
  8. Delivery to Device: The packet is then delivered to the private network device.

Also Read About Characteristics Of A Network Operating System And Advantages

Types of Network Address Translation

Three primary methods exist for configuring NAT:

Static NAT

An inner local address and an inside global address are permanently mapped one to one by static network address translation (NAT). It is helpful for hosts like web servers or email servers that need a fixed address that can be accessed across the Internet. Untimed static NAT entries persist in the NAT table until they are removed.

Dynamic NAT

An unregistered (private) IP address from a pool of public IP numbers becomes a registered (public) IP address with dynamic NAT. When an internal host starts traffic, the mapping happens dynamically on a first-come, first-served basis. The packet will be dropped if there are no public IP addresses in the pool. If a company needs to buy a lot of worldwide IP addresses for the pool, this approach could be expensive.

NAT Overload/IP Masquerading/Port Address Translation (PAT)

This is the most popular and economical kind of NAT. By employing distinct port numbers to identify the traffic, it enables the translation of numerous local (private) IP addresses into a single registered (public) IP address. It is very efficient because a single public IPv4 address can be shared by thousands of internal hosts. Because PAT is so widely used for IPv4 address conservation, the terms “NAT” and “NAT” are now almost interchangeable.

Additional NAT-related techniques and terminology include:

  • Destination Network Address Translation (DNAT): A method for changing a routed packet’s destination IP address transparently and carrying out the opposite operation for replies. It is frequently used to expose a whole server (DMZ) to the WAN or to forward ports.
  • The opposite of DNAT, Source Network Address Translation (SNAT) is frequently used to refer to one-to-many NAT for outgoing connections. SNAT can signify different things to different vendors.
  • NAT Hair pinning (also known as NAT loopback or NAT reflection): If port forwarding is enabled, this router feature enables a LAN machine to connect to another Local area networks(LANs) machine using the router’s external public IP address.

Advantages of network address translation

Advantages of network address translation
Advantages of network address translation

IP Address Conservation: In order to protect the finite number of public IPv4 addresses, NAT is essential. It delays the full exhaustion of available addresses by enabling several devices on a private network to share a single public IP address.

Increased Security: NAT automatically acts as a firewall.Internal device IP addresses are hidden to prevent outside threats from attacking private network devices.

Flexible Private Addressing: NAT enables local networks utilise non-routable private IP addresses like 192.168.x.x. Without applying for or monitoring device public IP addresses, network management is easier. Without changing your public IP address, you can add or remove devices from your private network.

Simplified Re-addressing: Switching ISPs requires only one public IP address change. All devices have private IP addresses, simplifying movement and administration.

NAT Terminology

NAT employs particular words to distinguish addresses at different translation stages:

  • An IP address assigned to a host on the inside (local) network is known as an inside local address. The address is most likely a private IP address, meaning it was not given by the service provider. From the inside network, this is the inside host.
  • Inside global address: The public IP address that, after being translated by the external network, appears to the outside world as one or more inside local IP addresses.
  • Outside local address: The target host’s real IP address in the local network following translation, as seen by the inside network. This usually matches the external global address.
  • An Internet host’s external global address is its IPv4 address, such as 209.165.201.1. This is the destination host’s actual IP address.

Limitations and Issues of NAT

Notwithstanding its advantages, NAT presents a number of restrictions and issues:

  • Performance Degradation: Translating each IP address requires time, which delays switching and packet forwarding.
  • Many Internet protocols and applications require direct host-to-host connection. NAT blocks these activities by modifying packet headers, interfering with services that need outside parties to connect (such as VoIP, VPNs, and some online games), or using stateless protocols like UDP.
  • End-to-End IP Traceability Loss: Tracing packets with many NAT hop address changes makes network troubleshooting harder.
  • Complicates Tunnelling Protocols: IPsec and other protocols depend on header value integrity checks. These settings are altered by NAT, which interferes with the tests and makes using them more difficult.
  • Port Exhaustion: Although PAT is effective, a high volume of outgoing connections (about 4000 per IP, theoretically 64K) can exhaust the available port range.
  • Because internal hosts’ private IP addresses are hidden, external hosts cannot directly connect to some internal hosts. Video conferencing and P2P apps need STUN or ICE NAT traversal.
  • Fragmentation and Checksums: After translation, NAT must reassemble fragmented IP datagrams and recalculate TCP/UDP checksums, which include IP addresses, for communication to succeed.
  • Cache poisoning attacks may target DNS servers if NATs de-randomize UDP source port numbers for outbound DNS requests.

Also Read About Advantages And Disadvantages Of Personal Area Network PAN

NAT in IPv6

In IPv6, network address translation is not frequently employed. Restoring end-to-end network connectivity was one of the main design objectives of IPv6, which eliminates the requirement for address conservation by offering a much bigger addressing space. In an IPv6 network, any device might potentially be given a globally routable address. Although some IPv6 architects think NAT is superfluous in IPv6, methods like network prefix translation in conjunction with unique local addresses can accomplish outcomes that are comparable to NAT. IPv6-to-IPv6 NAT (NAT66) may also be helpful in certain specialised situations, such as when an ISP offers a very small number of address prefixes.

Hemavathi
Hemavathihttps://govindhtech.com/
Myself Hemavathi graduated in 2018, working as Content writer at Govindtech Solutions. Passionate at Tech News & latest technologies. Desire to improve skills in Tech writing.
Index