Xiaobai must see! Router NAT technology

[Reminder] Need information or need to enter the deduction group communication to the bottom

Router NAT technology
Insert picture description here

NAT (Network Address Translation), when some hosts in the private network have been assigned a local IP address (that is, a private address used only in the private network), but now they want to communicate with hosts on the Internet (not required Encryption), the NAT method can be used.

In layman's terms, NAT technology allows a small number of public IP addresses to be shared by a large number of hosts using private addresses. This mechanism allows far more hosts to share the network than supported by the IP address space. At the same time, because NAT shields the internal network, it also provides security for the machines in the local area network.

There are three ways to implement NAT, namely static conversion Static Nat, dynamic conversion Dynamic Nat and port multiplexing OverLoad.
Insert picture description here

Here is an example of static conversion.

Assuming that the IP address segment used by the internal LAN is 192.168.0.1~192.168.0.254, the IP address of the router's LAN side (default gateway) is 192.168.0.1, and the subnet mask is 255.255.255.0.

The legal IP address range allocated by the network is 61.159.62.128 61.159.62.135, the IP address of the router in the WAN is 61.159.62.129, and the subnet mask is 255.255.255.248. The IP address range that can be used for conversion is 61.159.62.130 61.159.62.134.

It is required to convert the internal URLs 192.168.0.2 and 192.168.0.6 into legal IP addresses 61.159.62.130 61.159.62.134 respectively.

The first step is to set the external port.

interface serial 0

ip address 61.159.62.129 255.255.255.248

ip nat outside

The second step is to set up the internal port.

interface ethernet 0

ip address 192.168.0.1 255.255.255.0

ip nat inside

Finally, a static address translation is established between the internal local and internal legal addresses.

ip nat inside source static Internal local address The internal legal address.

as follows:

ip nat inside source static 192.168.0.2 61.159.62.130 // Convert the internal network address 192.168.0.2 to a legal IP address 61.159.62.130

ip nat inside source static 192.168.0.3 61.159.62.131 //Convert the internal network address 192.168.0.3 to a legal IP address 61.159.62.131

ip nat inside source static 192.168.0.4 61.159.62.132 //Convert the internal network address 192.168.0.4 to a legal IP address 61.159.62.132

ip nat inside source static 192.168.0.5 61.159.62.133 // Convert the internal network address 192.168.0.5 to a legal IP address 61.159.62.133

ip nat inside source static 192.168.0.6 61.159.62.134 // Convert the internal network address 192.168.0.6 to a legal IP address 61.159.62.134

At this point, the static address translation configuration is complete.

Before configuring NAT (Network Address Translation), you first need to understand the distribution of internal local addresses and internal global addresses. According to different needs, perform the following different configuration tasks:

( 1) Internal source address NAT configuration
(2) Internal source address NAPT configuration
(3) Overlapping address NAT configuration
(3) TCP load balancing

NAT technology can solve many headaches. The solution to the problem is: use the internal address in the internal network, translate the internal address into a legal IP address through NAT, and use it on the Internet. The specific method is to replace the address field in the IP packet with a legal IP address.

I still have a lot of organized data files and video files, and get more data files. The
previous teaching videos are mainly for the novice Xiaobai to make some detours. I want a full set of videos, materials, Q&A, or Huawei, H3C, related certification learning materials + Q group: 787295480 The
materials are a bit too much, I will not list them all, first write here, if you have any questions, please leave a message, private message exchanges and discussions~

Guess you like

Origin blog.csdn.net/ZYJY2020/article/details/114023619