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

Industry recognized H3C won eight network awards

Recently, New H3C Group, a subsidiary of Tsinghua...

Stop praising 5G!

On January 17, Huawei founder and CEO Ren Zhengfe...

Microsoft redesigns the calling interface in Teams

[[356857]] Microsoft Corp. has reportedly begun r...

Let’s talk about what communication is.

For many people, communication is a very general ...

A Five-Star End-User Experience Requires Unified Digital Experience Management

Introduction To deliver a five-star digital exper...

Eight surprising ways remote work can help your business

The rise of remote work is arguably the biggest c...

What is the Internet? — Talking about the development of the Internet

A brief discussion on the Internet of Things (I):...