0% found this document useful (0 votes)
14 views21 pages

NAT(Network Address Translation) (1)

Uploaded by

Md. Abir Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views21 pages

NAT(Network Address Translation) (1)

Uploaded by

Md. Abir Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

NAT(Network address translation)

Md. Monarul Islam Mithu


Lecturer, CSE,DIU
Background

● The number of home users and small businesses that


want to use the Internet is ever increasing.
● In the beginning user was connected to the Internet
with a dial-up line, which means that she was
connected for a specific period of time.
● Home users and small businesses can be connected
by an ADSL line or cable modem.
Background

● 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).
NAT

● Network Address Translation (NAT) is a service that


allows private networks to use the internet by translating
private IP addresses to public IP addresses.
● In network address translation, a network device, often a
router, assigns a computer or computers inside a private
network a public address.
NAT

● In a network that uses Network Address Translation, there


are two types of IP addresses:
Private address(inside address)
Public address(Outside address)
NAT

Private ip address:
10.0.0.0 to 10.255.255.255 (A class)
172.16.0.0 to 172.31.255.255(B class)
192.168.0.0 to 192.168.255.255(C class)
NAT

Q. Advantages of NAT???
Private Ip addresses
NAT implementation
NAT implementation
NAT address translation (Two column table)
NAT address translation (Two column table)
● When the router translates the source address of the
outgoing packet, it also makes note of the destination
address-where the packet is going.

● When the response comes back from the destination, the


router uses the source address of the packet (as the
external address) to find the private address of the packet.
Motivation for five column NAT
Q:What if two or more private host can access a outside server at a time?
Solution is: Using Both IP Addresses and Port Numbers.
❖ To allow a many-to-many relationship between private-network hosts and
external server programs, we need more information in the translation table.
NAT address translation (Five column table)
● Since the NAT router has only one global address, only one private network
host can access the same external host.
● To remove this restriction, the NAT router uses a pool of global addresses.
● For example, instead of using only one global address (200.24.5.8), the NAT
router can use four addresses (200.24.5.8, 200.24.5.9,200.24.5.10, and
200.24.5.11).
● Four private network hosts can communicate with the same external host at
the same time because each pair of addresses defines a connection.
● Note, no private-network host can access two external server programs (e.g.,
HTTP and FfP) at the same time.
Five column table (Solved the problem when multiple host)

● For example, suppose two hosts with addresses 172.18.3.1 and 172.18.3.2
inside a private network need to access the HTTP server on external host
25.8.3.2. If the translation table has five columns, instead of two, that include
the source and destination port numbers of the transport layer protocol, the
ambiguity is eliminated.
Five column table
Types of NAT
❖ Static NAT
❖ Dynamic NAT
❖ PAT(Port address translation)
Static NAT
● In static NAT, every internal IP address is mapped to a unique
external IP address.
● This is one-to-one mapping.
● When outgoing traffic arrives at the router, the router replaces the
destination IP address with the mapped global IP.
● When the return traffic comes back to the router, the router replaces
the mapped global IP address with the source IP address.
● Static NAT is mostly used in servers(Email server, Web server)
Dynamic NAT
● In dynamic network address translation, internal IP addresses are
mapped to a pool of external IP addresses.
● This is one-to-many mapping.
● When the outgoing traffic arrives at the router, the router replaces the
destination IP address with a free global IP address from the pool.
PAT
● PAT is a type of dynamic NAT that maps multiple internal IP
addresses to a single external IP address via port numbers.
● This is many-to-one mapping.
● When a computer connects to the internet, the router assigns it a port
number that it then appends to the computer's internal IP address, in
turn giving the computer a unique IP address. When a second
computer connects to the internet, it gets the same external IP
address but a different port number.
Thank You

You might also like