If you don’t know NAT, you can’t be a good network engineer

If you don’t know NAT, you can’t be a good network engineer

[[436174]]

1. Network Address Translation Technology Background

Due to the shortage of IPv4 addresses, NAT technology came into being to slow down the exhaustion of IPv4 address resources. By dividing IP into private addresses and public addresses, private addresses do not require payment and can be designed and allocated by enterprise administrators. Public addresses need to be applied for from the IANA address distribution agency and require payment. When users access internal enterprise resources, they use private addresses for access, and only when internal enterprise users access Internet resources, they use public network addresses. NAT technology is a technology that converts private addresses into public addresses. In other words, NAT technology allows private users to access the Internet by sharing one or more public IP addresses.

2. NAT Terminology

3. Types of NAT

(1) static NAT (static network address translation): one-to-one address mapping

(2) Dynamic NAT (Dynamic Network Address Translation): Many-to-many address mapping

(3) PAT (Port Address Translation): many-to-one address mapping

4. NAT configuration

  1. ØStatic NAT configuration
  2. Router (config) #ip nat inside source static 11.1.1.1 12.1.1.1
  3. Router (config-if) #ip nat inside
  4. Router (config-if) #ip nat outside
  1. ØDynamic NAT configuration
  2. Router (config) #ip nat pool xmws 12.1.1.10 12.1.1.100 netmask 255.255.255.0
  3. Router (config) #access-list 100 permit ip 11.1.1.0 0.0.0.255 any
  4. Router (config) #ip nat inside source list 100 pool xmws
  5. Router (config-if) #ip nat inside
  6. Router (config-if) #ip nat outside
  1. ØPAT configuration
  2. Router (config) #access-list 100 permit ip 11.1.1.0 0.0.0.255 any
  3. Router (config) #ip nat inside source list 100 interface serial 0/1/0 overload -- All private addresses are converted to the address of the public network interface.
  4. // Router(config)#ip nat inside source list 100 pool youhj overload You can also deploy a pool address pool. Then convert all private addresses to public network addresses in the address pool.
  5. Router (config-if) #ip nat inside
  6. Router (config-if) #ip nat outside

5. Static PAT publishes internal servers

Technical Background: The server resources of an enterprise are generally provided to internal employees for access. However, some enterprises need to provide internal service resources to external users, such as the enterprise portal website. Since the internal servers of the enterprise use private IP addresses, external network devices cannot obtain the path information to reach the internal servers of the enterprise, that is, external users cannot access the server resources of the enterprise. In order to solve this problem, static PAT is deployed to publish the internal servers of the enterprise to the Internet for external users to access.

Configuration implementation:

  1. outer (config) #ip nat inside source static tcp 11.1.1.1 80 12.1.1.1 80
  2. Router (config-if) #ip nat inside
  3. Router (config-if) #ip nat outside

6. Check NAT configuration

(1) Is there an ACL, or is it denying the corresponding data packets from entering the NAT router?

(2) Whether the NAT command correctly specifies the data packet to be translated

(3) Are there enough addresses in the NAT pool?

(4) Are the positions of the ip nat inside and ip nat outside commands correct?

(5) View the corresponding NAT table: Router# show ip nat translations

<<:  Five myths about instant messaging that every entrepreneur needs to know

>>:  What do Wi-Fi 4/5/6/7 stand for? Learn about the evolution of Wi-Fi in one article

Recommend

LoRa and 5G: Can they be used for IoT network connectivity at the same time?

There is no doubt that 5G is the new technology o...

Use Qt to create your own serial port debugging assistant

[[376484]] In my work, the thing I deal with most...

LOCVPS: 20% off on all VPS hosts, 30% off on German/Netherlands/US KVM for life

LOCVPS has launched a promotional activity for th...

POTN - the only way for network integration in the new era

In the 21st century, the communication network on...

Network knowledge: Detailed explanation of DNS access principle

Today I will introduce the DNS access principle t...

7 ways to understand the 5G standards in June

MicrosoftInternetExplorer402DocumentNotSpecified7....

Flink 1.14 New Features Preview

This article is compiled by community volunteer C...

Huawei: 5G+AI opens a new era of smart city twins

On November 15, the "Huawei Smart City Summi...