🔹 CCNP-ENCOR V1.1 350-401 | Chapter 15: IP Services – Lesson 3 🔹

Lesson 3: Network Address Translation (NAT) 🌍

What is NAT? 🦎

Imagine your private network is like a cozy house 🏡 with multiple rooms (devices). The internet is the big city outside. Network Address Translation (NAT) is like the front door of your house—it’s the way devices inside (on your private network) communicate with the outside world (the internet), without revealing all the individual rooms inside.

NAT allows multiple devices on a private network to share a single public IP address when communicating with the outside world. It’s like sending all your mail through one shared mailbox 📬, and the mailman only sees your house address, not which specific room (device) sent the letter.

Why Do We Need NAT? 🤔

The reason we need NAT is because there are a limited number of public IP addresses available. Instead of assigning a unique public IP address to every single device (which is impossible), NAT lets you use a single public IP for all the devices in your network, saving valuable IP addresses.

Think of it like sharing a Netflix account. You only have one subscription, but everyone in the house gets to watch their own shows on different devices, all under one shared login 📱🎥.


Types of NAT 🌍

🏡 Static NAT: The Permanent Address

With Static NAT, each device on your private network gets one permanent public IP address. This is useful when you need a specific internal device, like a web server, to always be reachable from the outside world.

Real-Life Example: Imagine you live in a house with a dedicated parking spot 🚗. No matter what, your car always parks in the same spot, and everyone in the neighborhood knows where to find you.

Use Case: Static NAT is typically used for devices that need to be accessible from outside the network, like a company’s web server or email server.

Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# ip nat inside source static 192.168.1.10 200.200.200.1
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip nat inside
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip nat outside
Router(config-if)# exit

This configuration does the following:

  • Defines which internal IPs (192.168.1.0/24) can use NAT.
  • Maps the internal server at 192.168.1.10 to the public IP 200.200.200.1.
  • Identifies the private network interface as GigabitEthernet0/0 and the public network interface as GigabitEthernet0/1.

🔄 Dynamic NAT: First Come, First Served

In Dynamic NAT, your private devices get assigned a public IP address from a pool of available addresses, but the mapping changes. It’s like walking into a busy restaurant—when you arrive, the host assigns you the first available table. Next time you visit, you might sit at a different table, depending on what’s available 🪑.

Real-Life Example: It’s like parking at a mall 🛍️. When you arrive, you park wherever there’s an open spot, but the next time you come, you’ll park in a different spot. As long as there’s a spot available, you’re good to go!

Use Case: Dynamic NAT is useful when you have multiple devices that need temporary access to the internet but don’t need a permanent public IP address.
Dynamic NAT Configuration:

Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# ip nat pool MY_POOL 200.200.200.2 200.200.200.5 netmask 255.255.255.0
Router(config)# ip nat inside source list 1 pool MY_POOL
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip nat inside
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip nat outside
Router(config-if)# exit

This configuration does the following:

  • Creates an ACL to define the internal network 192.168.1.0/24.
  • Defines a public IP pool (200.200.200.2 to 200.200.200.5) to be used for NAT.
  • Applies Dynamic NAT to the internal network (192.168.1.0/24) so that devices in this range get a public IP from the pool.
  • Configures the private interface as GigabitEthernet0/0 and the public interface as GigabitEthernet0/1.

🔢 PAT (Port Address Translation): The Multi-Tasker

PAT, also known as NAT Overload, is like Dynamic NAT on steroids. Instead of assigning each device a unique public IP address, PAT allows many devices to share a single public IP by using different ports to identify the traffic.

Real-Life Example: Imagine you live in a large apartment building 🏢 with only one main mailbox. When the mail arrives, each letter has an apartment number (port) on it to make sure it gets to the right resident. All your neighbors use the same street address (public IP), but the apartment number (port) makes sure the right person gets their mail.

Here’s how PAT works:

  • One Public IP Address: All devices on the private network share a single public IP.
  • Unique Ports: Each device is assigned a unique port number to distinguish its traffic.

Use Case: PAT is the most commonly used NAT method, especially in home networks. You can have many devices (laptops, phones, smart TVs) all using the same public IP to access the internet, and PAT manages the different connections using ports.


PAT Configuration:

Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# ip nat inside source list 1 interface GigabitEthernet0/1 overload
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip nat inside
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip nat outside
Router(config-if)# exit

This configuration does the following:

  • Creates an ACL to match internal devices in the 192.168.1.0/24 range.
  • Configures PAT on interface GigabitEthernet0/1, which is the public interface.
  • Enables NAT Overload (overload), allowing multiple devices to share the same public IP with unique ports.
  • Identifies the private network interface as GigabitEthernet0/0 and the public network interface as GigabitEthernet0/1.

Real-World Example: How NAT Helps You Browse the Web 🌐

Let’s say you’re at home browsing the web on your laptop, and your sibling is streaming a movie on their tablet. Both devices are on your private network, but you only have one public IP assigned by your internet provider. How does this work?

  1. NAT at Work: When you (the laptop) send a request to a website, your private IP is translated into your shared public IP by your router.
  2. PAT in Action: PAT assigns a unique port to your connection (say, port 1024 for your laptop), while your sibling’s connection to Netflix gets a different port (say, port 1025).
  3. The Internet Responds: When the website or Netflix sends data back, the router knows which internal device to send the response to based on the port number. Your laptop gets the website data, and your sibling gets their movie stream—all thanks to NAT and PAT!

🌟 Summary of Lesson 3

In Lesson 3, we covered the different types of NAT and how they help your private network communicate with the outside world:

  • Static NAT: Provides a permanent one-to-one mapping of private to public IPs, useful for devices like servers.
  • Dynamic NAT: Assigns public IPs from a pool on a temporary basis, changing as needed.
  • PAT: The most efficient form of NAT, allowing multiple devices to share a single public IP using ports to distinguish between them.

These NAT methods ensure that your network is efficient and secure, while saving valuable IP addresses.


Call to Action! 🚀

Now that you’ve learned about NAT, try exploring the NAT settings on your home router! See if you can identify which type of NAT is being used (hint: it’s probably PAT). And if you have access to a router emulator, try configuring Static, Dynamic, and PAT NAT settings yourself! 🌐

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top