How to Configure Dynamic NAT in Cisco Packet Tracer

Dynamic NAT maps private IP addresses to idle IP addresses in the NAT pool allocated by the ISP and transfers them to the global environment.

How to Configure Dynamic NAT in Cisco Packet Tracer

How to Configure Dynamic NAT on Cisco Router

In this structure, you must create a pool for the IP address range purchased by your ISP. And you need to specify which local networks on your router to map to these public addresses.

When a computer on the local network goes to the Internet, it uses the idle IP address in the NAT pool configured on the Router.

Now follow the steps below to configure Dynamic NAT on the Router with Packet Tracer software to better understand the logic of NAT.

   Step 1

Open Cisco network software and add two Routers to the work environment, specify INSIDE and OUTSIDE for NAT.

IP NAT Inside and Outside

   Step 2

After adding two computers to the network topology, configure their TCP/IP settings according to your IP block as follows.

IP Addressing to a PC with Packet Tracer

   Step 3

After opening the CLI prompt by clicking on the router, first, assign the IP address to the GigabitEthernet and Serial interfaces. Then, perform the following commands to create a new NAT pool and define the access-list and local network to this pool.

Router# conf t
Router(config)# interface gigabitethernet 0/0
Router(config-if)# ip address 192.168.10.1 255.255.255.0
Router(config-if)# ip nat inside
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface gigabitethernet 0/1
Router(config-if)# ip address 10.0.0.1 255.0.0.0
Router(config-if)# ip nat outside
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# ip nat pool DYNAMICNAT 10.0.0.5 10.0.0.10 netmask 255.0.0.0
Router(config)# ip access-list 1 permit 192.168.10.0 0.0.0.255
Router(config)# ip nat inside source list 1 pool DYNAMICNAT
Router(config)# end
Router# wr

 
Enabling NAT on the Router

   Step 4

After configuring Dynamic NAT, test the connection from PC0 to Router1’s Serial interface (10.0.0.2).

Ping from PC to Outside NAT Router

   Step 5

Likewise, if you Ping from PC1 to Cisco Router1, the process will be successful.

Ping from PC to Router

   Step 6

On Router0, you can examine the NAT records after pinging by executing the show ip nat translations command.

As we can see in the records, the 192.168.10.10 and 192.168.10.20 IP addresses have been translated into the global 10.0.0.5 and 10.0.0.6 IP addresses in the NAT pool.

show ip nat translations

Show Commands

Router#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 10.0.0.5:1 192.168.10.10:1 10.0.0.2:1 10.0.0.2:1
icmp 10.0.0.5:2 192.168.10.10:2 10.0.0.2:2 10.0.0.2:2
icmp 10.0.0.5:3 192.168.10.10:3 10.0.0.2:3 10.0.0.2:3
icmp 10.0.0.5:4 192.168.10.10:4 10.0.0.2:4 10.0.0.2:4
icmp 10.0.0.5:5 192.168.10.10:5 10.0.0.2:5 10.0.0.2:5
icmp 10.0.0.5:6 192.168.10.10:6 10.0.0.2:6 10.0.0.2:6
icmp 10.0.0.5:7 192.168.10.10:7 10.0.0.2:7 10.0.0.2:7
icmp 10.0.0.5:8 192.168.10.10:8 10.0.0.2:8 10.0.0.2:8
icmp 10.0.0.6:1 192.168.10.20:1 10.0.0.2:1 10.0.0.2:1
icmp 10.0.0.6:2 192.168.10.20:2 10.0.0.2:2 10.0.0.2:2
icmp 10.0.0.6:3 192.168.10.20:3 10.0.0.2:3 10.0.0.2:3
icmp 10.0.0.6:4 192.168.10.20:4 10.0.0.2:4 10.0.0.2:4

 

Router#show running-config
Building configuration...

Current configuration : 806 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
ip cef
no ipv6 cef
!
license udi pid CISCO1941/K9 sn FTX1524A5WO
!
spanning-tree mode pvst
!
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 10.0.0.1 255.0.0.0
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip nat pool DYNAMICNAT 10.0.0.5 10.0.0.10 netmask 255.0.0.0
ip nat inside source list 1 pool DYNAMICNAT
ip classless
!
ip flow-export version 9
!
!
access-list 1 permit 192.168.10.0 0.0.0.255
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
end
Router#

 

Router#show ip nat statistics
Total translations: 0 (0 static, 0 dynamic, 0 extended)
Outside Interfaces: GigabitEthernet0/1
Inside Interfaces: GigabitEthernet0/0
Hits: 9 Misses: 12
Expired translations: 12
Dynamic mappings:
-- Inside Source
access-list 1 pool DYNAMICNAT refCount 0
pool DYNAMICNAT: netmask 255.0.0.0
start 10.0.0.5 end 10.0.0.10
type generic, total addresses 6 , allocated 0 (0%), misses 0
Router#

 

Router#show running-config
Building configuration...

Current configuration : 613 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
ip cef
no ipv6 cef
!
license udi pid CISCO1941/K9 sn FTX152407TL
!
!
spanning-tree mode pvst
!
!
interface GigabitEthernet0/0
ip address 10.0.0.2 255.0.0.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
Router#

 
   Video

You can watch the video below to enable Dynamic NAT on the router using the Cisco simulator and also subscribe to our YouTube channel to support us!

   Final Word


In this article, we have examined how to configure Dynamic Network Address Translation on the Router on a simple network topology with Packet Tracer simulator software. Thanks for following us!

   Related Articles


Cisco NAT PAT
Cisco Static NAT
Cisco DHCP
♦ Cisco Static Route
♦ Cisco RIP

Add a Comment

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

Show Buttons
Hide Buttons