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

TCP is not that difficult, right? This is a must-read

[[242081]] Munich, 2013 Nowadays, many programmer...

Network Slicing "Hot Pot Theory": Same Pot, Different Dreams

In the dog days of summer, when people are "...

Three things you need to know about IoT and fog computing in 2018

Today, from wearable devices to smart homes to in...

5G: What it means and why we'll never need 6G

The launch of 5G isn’t all that far away, with ro...

CMIVPS Seattle VPS (AS4837) simple test

We have previously shared information about CMIVP...

What is WebSocket and how is it different from HTTP?

HTTP HTTP is one-way, the client sends a request ...

An article about Google Cherry IPU

[[431841]] I always thought it was a bit strange ...

5G services market expected to exceed $919.4 billion by 2031

According to a recent report by Transparency Mark...