You are on page 1of 5

Network Address Translation

Computer Networks

1
Network Address Translation (NAT)

• NAT (Network Address Translation) Maps Private IPs to Public IPs


• It is required because of shortage of IPv4 Address

H1 H2 H3 H4

10.0.1.2 10.0.1.3 10.0.1.2 10.0.1.3

10.0.1.1 10.0.1.1
Private network 1 Private network 1
Internet
R1 128.195.4.119 128.143.71.21 R2

213.168.112.3

H5
Private and Public IP Addresses

• Whatever connects directly into Internet must have public


(globally unique) IP address
• There is a shortage of public IPv4 address
• So Private IP addresses can be used within a private network
• A private IP is mapped to a Public IP, when the machine has to
access the Internet
Network Address Translation (NAT)

• A short term solution to the problem of the deficiency of IP


addresses
– Long term solution is IPv6
– CIDR (Classless Inter Domain Routing ) is a possible short
term solution
– NAT is another
• NAT is a way to conserve IP addresses
– Can be used to hide a number of hosts behind a single IP
address
• Three address ranges are reserved for private usage
• 10.0.0.0-10.255.255.255,
• 172.16.0.0-172.32.255.255 or
• 192.168.0.0-192.168.255.255
Basic Operation of NAT

Private Network Internet

Source = 10.0.1.2 Source 128.143.71.21


= 10.0.1.2 Source = 128.143.71.21
Destination = 64.236.24.4 Destination = 64.236.24.4 Destination = 64.236.24.4

private address: 10.0.1.2 NAT


public address: 128.143.71.21 Device
Host
Source = 64.236.24.4 Source = 64.236.24.4 Source = 64.236.24.4 Public Host
Destination = 10.0.0.2 Destination = 128.59.16.21
10.0.0.2 Destination = 128.59.16.21 64.236.24.4

Private Public
Address Address
10.0.1.1 128.59.16.21

• NAT device stores the IP address and port translation tables


– In this example, mapped only IP addresses.

You might also like