How to Configure Static NAT in Cisco Packet Tracer

In this article, we will examine how to add Static NAT on the Router in the Packet Tracer network simulator.

How to Configure Static NAT in Cisco Packet Tracer

How to Configure Static NAT on Cisco Router

With static NAT, when a computer on the local network sends a packet to the port of an external or optional interface, it maps the destination IP address to a port behind the firewall.

This means that each computer on the private network must have a public IP address assigned to access the Internet. The main disadvantage of this is that you need to add a manual route for each computer you want to access the Internet.

You cannot configure static NAT for connections to a trusted or custom interface. For example; VPN connections.

For Static NAT configuration, you must specify the Inside and Outside fields according to your network design. For the local network, you need to set the Router’s internal interface with the IP NAT Inside command and the external interface with the IP NAT Outside command.

You can follow the steps below to configure a static NAT record on the Router.

   Step 1

First, open the Packet Tracer and create a network topology as shown in the image below, then specify the Inside and Outside fields and add comments to the workspace.

In the topology below, the interface to the Internet is GigabitEthernet0/0 and is selected as Outside.

Identifying IP NAT Inside and Outside Sections in Network Topology

   Step 2

After specifying and configuring the IP blocks for the topology, add two computers to the workspace and configure the TCP/IP settings.

Configuring PCs in Packet Tracer

   Step 3

Now, select the Inside and Outside interfaces at the CLI command prompt of Router0 and perform the following commands to add static records for computers with IP addresses 192.168.10.1 and 192.168.20.1.

You can use the command (write / wr) in the privileged mode to save your settings.

Router# enable
Router(config)# interface gigabitethernet 0/0
Router(config-if)# ip address 10.0.0.1 255.255.255.252
Router(config-if)# ip nat outside
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface gigabitethernet 0/1
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)# ip nat inside source static 192.168.10.1 10.0.0.1
Router(config)# ip nat inside source static 192.168.20.1 10.0.0.1
Router(config)# end
Router# wr

 
Adding a Static NAT Record to a Router

   Step 4

Now, ping Router1 from computers on the LAN and then check out the NAT records created on the Router using the show ip nat translations command in the CLI.

show ip nat translations

Show Commands

Router#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 10.0.0.1:3 192.168.10.20:3 10.0.0.2:3 10.0.0.2:3
icmp 10.0.0.1:4 192.168.10.20:4 10.0.0.2:4 10.0.0.2:4
icmp 10.0.0.1:5 192.168.10.20:5 10.0.0.2:5 10.0.0.2:5
icmp 10.0.0.1:6 192.168.10.20:6 10.0.0.2:6 10.0.0.2:6
--- 10.0.0.1 192.168.10.20 --- ---

 

Router#show running-config
Building configuration...

Current configuration : 768 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 FTX1524T6MD
!
spanning-tree mode pvst
!
interface GigabitEthernet0/0
ip address 10.0.0.1 255.255.255.252
ip nat outside
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.10.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip nat inside source static 192.168.10.10 10.0.0.1
ip nat inside source static 192.168.10.20 10.0.0.1
ip classless
!
ip flow-export version 9
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
Router#

 

Router#show ip nat statistics
Total translations: 3 (2 static, 1 dynamic, 3 extended)
Outside Interfaces: GigabitEthernet0/0
Inside Interfaces: GigabitEthernet0/1
Hits: 11 Misses: 12
Expired translations: 6
Dynamic mappings:

 

Router#show running-config
Building configuration...

Current configuration : 619 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 FTX1524B4CT
!
spanning-tree mode pvst
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
ip address 10.0.0.2 255.255.255.252
duplex auto
speed auto
!
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 add Static NAT to Router and also subscribe to our YouTube channel to support us!

   Final Word


In this article, we have examined how to create a static NAT record on a Router using the simulator software. Thanks for following us!

   Related Articles


DHCP Configuration in Router
Telnet Configuration in Router
Console Settings in Packet Tracer
SSH Configuration in Router
VLAN Configuration in Switch

Add a Comment

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

Show Buttons
Hide Buttons