How to Configure NAT PAT in Cisco Packet Tracer

PAT (Port Address Translation) uses port numbers to convert private IP addresses to global IP addresses.

Configuring NAT PAT in Packet Tracer

How to Configure NAT PAT on a Cisco Router

PAT is the most commonly used method according to Static NAT and Dynamic NAT configuration. Home users or small businesses often use it. ADSL Modems access the Internet with a single ISP IP address. PAT is applied when all computers over the local network access the Internet with a single global IP address.

PAT is also called NAT Overload. When a computer on the local network or remote network sends a packet to the destination computer, the port number is added to the IP address.

By default, PAT is enabled on the ADSL modem device used by home users.

To enable PAT with Packet Tracer, follow the steps below.

   Step 1

First, open the Cisco simulator program and create a topology as in the image below, then assign IP addresses to the devices and add comments to the workspace.

IP NAT Inside and Outside

   Step 2

Configure the TCP/IP settings of PC0 and PC1 as follows.

Assigning IP Addresses to PCs in Packet Tracer

   Step 3

To enable PAT at the Cisco Router‘s CLI command prompt, perform the following commands in order.

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.255.255.0
Router(config-if)# ip nat outside
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# access-list 1 permit 192.168.10.0 0.0.0.255
Router(config)# ip nat inside source list 1 interface gigabitethernet0/1 overload
Router(config)# end
Router# wr

Enabling NAT

   Step 4

After configuring PAT, test the network connection by pinging the 10.0.0.2 IP address from the computers on the local network.

The computers on the local network have successfully connected to the Cisco Router R1, as shown in the following image.

Ping Test from Computers to Router

   Step 5

Click Router0, execute the show IP nat translations command in privileged configuration mode, and examine the NAT records.

show IP nat translations

Show Commands

Router0#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 10.0.0.1:1024 192.168.10.20:1 10.0.0.2:1 10.0.0.2:1024
icmp 10.0.0.1:1025 192.168.10.20:2 10.0.0.2:2 10.0.0.2:1025
icmp 10.0.0.1:1026 192.168.10.20:3 10.0.0.2:3 10.0.0.2:1026
icmp 10.0.0.1:1027 192.168.10.20:4 10.0.0.2:4 10.0.0.2:1027
icmp 10.0.0.1:2 192.168.10.10:2 10.0.0.2:2 10.0.0.2:2
icmp 10.0.0.1:3 192.168.10.10:3 10.0.0.2:3 10.0.0.2:3
icmp 10.0.0.1:4 192.168.10.10:4 10.0.0.2:4 10.0.0.2:4

 

Router0#show ip nat statistics
Total translations: 0 (0 static, 0 dynamic, 0 extended)
Outside Interfaces: GigabitEthernet0/1
Inside Interfaces: GigabitEthernet0/0
Hits: 7 Misses: 8
Expired translations: 8
Dynamic mappings:

 

Router0#show running-config
Building configuration...
Current configuration : 772 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 FTX1524V4OL
!
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.255.255.0
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
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#

 

Router1#show running-config
Building configuration...
Current configuration : 617 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 FTX15247004
!
!
spanning-tree mode pvst
!
!
interface GigabitEthernet0/0
ip address 10.0.0.2 255.255.255.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 configure Port Address Translation on the Cisco router and also subscribe to our YouTube channel to support us!

Conclusion

In this article, we have examined how to configure NAT PAT with simulator software. The PAT process is the most widely used method and uses more than 64,000 port numbers, and it is unlikely that router addresses will be exhausted. Thanks for following us!

Add a Comment

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