15
8/26/22 08:58:34 PM NAT 1 C.K.PITHAWALLA COLLEGE OF ENGINEERING AND TECHNOLOGY, SURAT. SUBMITTED BY: GUIDED BY: MANDALIYA DEEP(1107901) Prof. NEELAM SURTI PRESENTATION ON Network Address Translation (NAT) (5 th sem. Computer)

Nat

Embed Size (px)

DESCRIPTION

Network Address Translation which convert the Private IP address to the Global IP address.

Citation preview

Page 1: Nat

04/13/2023 10:03:30 AMNAT 1

C.K.PITHAWALLA COLLEGE OF ENGINEERING AND TECHNOLOGY, SURAT.

SUBMITTED BY: GUIDED BY: MANDALIYA DEEP(1107901) Prof. NEELAM SURTI

PRESENTATIONON

Network Address Translation(NAT)

(5th sem. Computer)

Page 2: Nat

04/13/2023 10:03:30 AMNAT 2

NETWORK ADDRESS TRANSLATION (NAT)

Providing IP level access between host at a site and the rest of the Internet, using valid globally valid IP address known as NAT.

The address used for private network are strongly recommends the following address be used:

10.0.0.0 - 10.255.255.255172.16.0.0 - 172.31.255.255192.168.0.0 - 192.168.255.255

These address never appear on the internet.

Network address translation (NAT) allows a site to use a set of private addresses for internal communication and a set of global Internet addresses for communication with another site.

Page 3: Nat

04/13/2023 10:03:30 AM NAT 3

198.1.1.2

The site must have only one single connection to the global Internet through a router that runs NAT software.

10.0.0.1

LAN

1

2

3

4

This software is known as NAT box, all datagram pass through the NAT box as they travel form the site out to the Internet or form Internet to site.

Web

Server

Packet before translation

Packet after translation

NAT

Page 4: Nat

04/13/2023 10:03:30 AM NAT 4

What the NAT do?

NAT translate the address outgoing datagram replacing the each source address by to the Global Address.

198.1.1.2

1

2

3

4

NAT

10.0.0.1

Web

Server

Source Address Global Address

Page 5: Nat

04/13/2023 10:03:30 AM NAT 5

What the NAT do?continue…

NAT translate the address incoming datagram replacing the each Global address with the private Address of the correct host.

198.1.1.2

1

2

3

4

NAT

10.0.0.1

Web

Server

Private Address Global Address

Page 6: Nat

04/13/2023 10:03:30 AM NAT 6

NAT Translation Table Creation

How the NAT know which Internal host should receive a datagram that arrives form the Internet. So the NAT maintain a Translation Table that is used for mapping.

Each Entry of the Table specifies the two item:1. IP address of a host on the Internet.2. The Internet IP address of a host at the site.

There are several way to initialize the table:1. Manual Initialization.2. Outgoing datagram's.3. Incoming name lookups.

Page 7: Nat

04/13/2023 10:03:30 AM NAT 7

Continue…

1. Manually Initialization: Configures the translation table manually before any communication occurs.

2. Outgoing datagram: When it receive a datagram for the internal host, NAT create an entry in the translation table as a record of the both host and the destination addressees.

3. Incoming name lookup: It is built as a side-effect of handing domain name lookups. When a host on the Internet looks up the domain name of an internal host to find its IP address, the domain name software creates an entry in the NAT translation table, and then answers the request by sending address G. Thus, from outside the site, it appears that all host names at the site map to address G.

Out of this three the mostly implementations of NAT use outgoing datagram to initialize the table.

Page 8: Nat

04/13/2023 10:03:30 AM NAT 8

Page 9: Nat

04/13/2023 10:03:30 AM NAT 9

Multi Address NAT

As we have simplistic the NAT perform a 1-to-1 address mapping between external address and internal address.

But NAT want to permits concurrency by retaining the 1-to-1 mapping, by allowing the NAT box to hold multiple Internet address.

This is Known as Multi-Address NAT which is done by the NAT box. It set of K globally valid address G1,G2,…,Gk.

Thus, multi-address NAT allow up to K internal host to access a given destination concurrently.

Page 10: Nat

04/13/2023 10:03:30 AM NAT 10

Port Mapping NAT

NAT provide concurrency by translating TCP or UDP protocol port number as well as address.

It is known as Network Address Port Translation (NAPT), Which is included in the translation table With the source and destination IP address.

PrivateAddress

Private Port

External Address

External Port

NAT Port

Protocol Used

10.0.0.5 21023 128.10.19.20 80 14003 TCP

10.0.0.1 386 128.10.19.20 80 14010 TCP

10.0.2.6 26600 207.200.77.200 21 14012 TCP

10.0.0.3 1247 128.210.1.5 80 14007 TCP

Page 11: Nat

04/13/2023 10:03:30 AM NAT 11

Continue…

The table contain the four internal computers that are currently accessing destination on global Internet and all of them are using TCP.

In the table two internal host accessing protocol port 80 (web server) on computer 128.10.19.20.

However the source port cannot be guaranteed it turn the two internal host have same port number. To avoid this NAT assign a unique port number to each communication that is used on the Internet.

Page 12: Nat

04/13/2023 10:03:30 AM NAT 12

Continue…

As in the table the first two item correspond to the TCP connection.Such as:

10.0.0.5, 21023, 128.10.20, 8010.0.0.1, 386, 128.10.20, 80

After the computer in the Internet that receive datagram after the NAPT perform the translation such as:

G, 14003, 128.10.20, 80G, 14010, 128.10.20, 80

Where G is the Globally valid address of the NAT box.

Page 13: Nat

04/13/2023 10:03:30 AM NAT 13

Pros and Cons Of the NAT

Pros: NAT increases the design

space available for an intranet.

Saves address space.Can be deployed incrementally and (almost) transparently.

Method of choice for home network.

Cons: IP addresses and ports lose

their end-to-end significance.

Increases amount of state information in the network.

Increases the complexity of an edge router (protocol dependent).

Some protocols don‘t work across NAT’s.

Page 14: Nat

04/13/2023 10:03:30 AM NAT 14

Conclusion

NAT can be static or dynamic.

Uses a set of predefined private addresses.

Conserves legal IPv4 addresses.

NAT plus PAT often used .

PAT uses unique source port numbers on the inside global IP address to distinguish between translations.

Page 15: Nat

04/13/2023 10:03:30 AM NAT 15

Thank You

Any Question