NAT (address translation technology) learning

First, what is the background NAT, NAT produced

NAT typically deployed in an organization network egress position, by replacing the internal IP address of the network to provide connectivity to the public network reachability and the upper layer protocol is IP address of the exporter.

Background NAT produced in order to solve the problem of shortage of IPv4 addresses.

Second, the principle of NAT technology and features

Throughout the NAT conversion, several key processes:

  • Network is divided into private and public networks in two parts, NAT gateway setting in the private network to the public network routing exit position, two-way traffic must go through the NAT gateway
  • Network access can only be initiated first by the private network side, the public can not take the initiative to access the private network host;

2.1 Static NAT

One mapping local LAN IP public IP.

2.2 Dynamic NAT

LAN IP Local IP and public IP address pool, one to one mapping.

2.3 NAT Overload

By combining different ports and IP addresses, the plurality of local LAN addresses mapped to a public IP address. Also known as the PAT (Port Address Translation Port Address Translation).

There is a problem here, multiple LAN users to access the same public sites, public sites know how the data should be returned to whom?

For example, 172.18.250.6 and client server communication Baidu 202.108.22.5, 172.18.250.6 when transmission data is first converted to 219.155.6.240:1723 (arbitrary> random port 1024), and then use this data to the identity of the sender Baidu server, then Baidu server response data and sends 219.155.6.240:1723,NAT gateway check their association table, realize that this is their own private network packet to 172.18.250.6, and then sends this data to the client

Third, the advantages and disadvantages of NAT technology

advantage:

  • IPv4 saves resources

Disadvantages:

  • IP tracking can not be end to end (from within the network of thousands of hosts, find the attacker)

Reference Documents

[. 1]: the NAT (Address Translator) Comments
[2]: "depth understanding of computer networks"

Guess you like

Origin www.cnblogs.com/fonxian/p/11265914.html