Briefly describe the types and characteristics of network address translation

Which types of network address translation

One of the most important functions of the router is NAT I do not know the owner remembers the previous operation is to limit the use of the router, the principle of its detection: routing is generally used in the way of NAT is put in the IP packet into a special bit to mark which subnet within the packet, as long as ISPs detect the presence of this special IP packet can be considered you are The ISP can assume that you are using a router to access the Internet as long as it detects this special IP packet.

NAT with port translation support can be further divided into two categories: source address translation and destination address translation. In the former case the IP address of the computer initiating the connection will be rewritten so that packets sent from an intranet host can reach an extranet host.

In the latter case, the IP address of the connected computer is rewritten so that packets from the external host can reach the internal host. In practice, both of these methods are often used together to support bidirectional communication.

Basic Network Address Translation (BasicNAT):

This type of NAT, also known as NAT or “static NAT”, is provided in RFC2663. It is technically simple and supports only address translation, not port mapping.BasicNAT requires that a public IP address be assigned to each current connection, so a pool of addresses on the public network is maintained.

Broadband routers typically use this approach to allow a designated device to manage all external links, even when the router itself has only one available external IP, which is sometimes labeled as a DMZ host. Since the IP source address is changed, the checksum must be recalculated when the packet is re-encapsulated.

Reference: Baidu Encyclopedia – Network Address Translation

What is network address translation and how many types are there

Network address translation is NAT, and there are three types of NAT: static NAT (staticNAT), NAT pooledNAT, and port NAT (PAT). Static NAT is the easiest to set up, with each host on the internal network permanently mapped to a legal address on the external network. A NAT pool, on the other hand, defines a set of legal addresses in the external network that are mapped to the internal network using a dynamic allocation method. pAT maps internal addresses to different ports of an IP address on the external network. There are pros and cons to the various NAT schemes depending on the need.

What is NAT?What are the characteristics of NAPT?What are the advantages and disadvantages of NAT?What are the advantages and disadvantages of NAT?

NAT (Network Address Translation) was introduced in 1994, when some hosts within a private network have already been assigned a local IP address (i.e., a private address that is used only within the private network), but now want to communicate with hosts on the Internet (and do not need to be encrypted), NAT can be used. method.

Advantages of NAT: Through NAT translation, the access subnet can use private IPs, and when connecting externally, the route binds the relationship between the private IPs and the external IPs, and modifies the addresses on the transmitted IP packets, so that only 255 external IPs are needed to satisfy the external connectivity needs of the internal access subnet.


1. Hosts under a NAT-enabled router do not create real IP addresses and cannot participate in some Internet protocols. Some TCP connections and stateless protocols (such as UDP) that require initialization to be created from an external network cannot be implemented.

Unless the NAT router manager has pre-set rules, incoming packets will not reach the correct destination address. Some protocols can sometimes accommodate an instance of NAT between hosts participating in NAT with the assistance of an application-layer gateway (see below), such as FTP.NAT can also complicate security protocols, such as IPsec.

2. In addition to the convenience and cost of NAT, the lack of support for full-duplex connections can be viewed in some cases as a feature with benefits instead of a not a limitation.

To the extent that NAT relies on a machine on the local network to initialize any connection to a host on the other side of the router, it can block malicious activity from hosts on the external network. This blocks network worms to improve the reliability of the local system, and blocks malicious browsing to improve the

Advantages of NAPT: Ability to use a globally valid IP address to gain commonality.

Disadvantage: it is limited to TCP or UDP. when all communication is TCP or UDP, NAPT allows an internal computer to access multiple external computers, and allows multiple internal hosts to access the same external computer without conflicting with each other.

ABC Network Classification Methods and Characteristics

When two computers connected to a network communicate with each other, the packets they transmit contain certain additional information, which is the address of the computer that sends the data and the address of the computer that receives the data. When there is IP protocol-based communication on a network, these addresses for sending and receiving data are IP addresses. Basic Address Format Today’s IP networks use 32-bit addresses expressed in dotted decimal notation, such as The address format is: IP address = network address + host address or IP address = host address + subnet address + host address.IP Address TypesWhen interconnecting networks were initially designed for ease of addressing and for the hierarchical construction of the network, each IP address consisted of two identifiers ( IP addresses are divided into five types according to the network ID, class A address, class B address, class C address, class D address and class E address. 1. Class A IP address A Class A IP address consists of a 1-byte network address and a 3-byte host address, the highest bit of the network address must be a “0”, and the address range is from to There are 126 available Class A networks, each of which can accommodate more than 100 million hosts. 2. Class B IP address A Class B IP address consists of a 2-byte network address and a 2-byte host address, the highest bit of the network address must be “10”, and the address range is from to There are 16,382 Class B networks available, and each of them can accommodate more than 60,000 hosts. A Class C IP address consists of a 3-byte network address and a 1-byte host address, and the highest bit of the network address must be “110.” The range is from to The range is from to There are more than 2,090,000 Class C networks, each with a capacity of 254 hosts. 4. Class D addresses are used for Multicast. It is a reserved address. It does not refer to a specific network and is currently used in Multicast. Multicast addresses are used to address a group of computers at a time, and identify a group of computers sharing the same protocol.5. Class E IP addresses begin with “llll0” and are reserved for future use. An all-zero (“”) address corresponds to the current host. The all “1” IP address (“”) is the broadcast address of the current subnet. Within each of the three main types of IP addresses, three areas are reserved for private addresses, with the following address ranges: Class A addresses: to Class B addresses: to Class C addresses: to