Vous êtes sur la page 1sur 3

Network Address Translation (NAT)

A.Need (Why Required?)


Need/Prob-1
The number of home users and small businesses that want to use the Internet is ever increasing.
In the beginning, a user was connected to the Internet with a dial-up line, which means that she was
connected for a specific period of time. An ISP with a block of addresses could dynamically assign an
address to this user. An address was given to a user when it was needed.
But the situation is different today. Home users and small businesses can be connected by an ADSL line
or cable modem. In addition, many are not happy with one address; many have created small networks
with several hosts and need an IP address for each host.
With the shortage of addresses, this is a serious problem.
A quick solution to this problem is called network address translation (NAT).

Need/Prob-2
If in a network, two hosts A and B are connected and both of them request for same destination on the
same port no (say 1000) on the host side at the same time, it will be unclear to NAT as to which reply
belongs to which host (because source port numbers for both A and B are same).
Hence, to avoid such a problem, NAT masks the source port number as well and makes an entry in the
NAT table.

B. Defination
Network Address Translation (NAT) is a process in which one or more local private IP
address is translated into one or more Global public IP address and vice versa in order to
allow/provide Internet access to the multiple local hosts through a single public address.

C. Facts
1)Also, it does the translation of port numbers i.e. masks the port number of the host with another port
number, in the packet that will be routed to the destination.
2)It then makes the corresponding entries of IP address and port number in the NAT table
3)NAT generally operates on router (Generally, the border router is configured for NAT i.e the router
which has one interface in local (inside) network and one interface in the global (outside) network) or
firewall.

D. Types
There are three types of address translation:
1. Static NAT – translates one private IP address to a public one. The public IP address is
always the same.

2. Dynamic NAT – private IP addresses are mapped to the pool of public IP addresses

3. Port Address Translation (PAT) – one public IP address is used for all internal devices,
but a different port is assigned to each private IP address. Also known as NAT Overload.

E. Working of Address Translation –


A)All the outgoing packets go through the NAT router, which replaces the source address in the
packet with the global NAT address.

B)All incoming packets also pass through the NAT router, which replaces the destination address
in the packet (the NAT router global address) with the appropriate private address

C)If NAT run out of addresses, i.e., no address is left in the pool configured then the packets will
be dropped and an Internet Control Message Protocol (ICMP) host unreachable packet to the
destination is sent.

Advantages of NAT –
 NAT conserves legally registered IP addresses .
 It provides privacy as the device IP address, sending and receiving the traffic, will be
hidden.
 Eliminates address renumbering when a network evolves.
Disadvantage of NAT –
 Translation results in switching path delays.
 Certain applications will not function while NAT is enabled.
 Complicates tunneling protocols such as IPsec.
 Also, router being a network layer device, should not tamper with port numbers(transport
layer) but it has to do so because of NAT.

Vous aimerez peut-être aussi