How To Configure Static NAT in Cisco Router
How To Configure Static NAT in Cisco Router
Router
This tutorial explains Static NAT configuration in detail. Learn how configure static NAT,
map address (inside local address, outside local address, inside global address and
outside global address), debug and verify Static NAT translation step by step with
practical examples in packet tracer.
In order to configure NAT we have to understand four basic terms; inside local, inside
global, outside local and outside global. These terms define which address will be
mapped with which address.
Term Description
Inside Local IP Address Before translation source IP address located inside the local network.
Inside Global IP Address After translation source IP address located outside the local network.
Outside Global IP Address Before translation destination IP address located outside the remote netwo
Outside Local IP Address After translation destination IP address located inside the remote network.
For this tutorial I assume that you are familiar with these basic terms. If you want to
learn these terms in detail please go through the first part of this article which explains
them in details with examples.
This tutorial is the second part of our article “ Learn NAT (Network Address
Translation) Step by Step in Easy Language with Examples ”. You can read other
parts of this article here.
To explain Static NAT Configuration, I will use packet tracer network simulator software.
You can use any network simulator software or can use real Cisco devices to follow this
guide. There is no difference in output as long as your selected software contains the
commands explained in this tutorial.
Create a practice lab as shown in following figure or download this pre-created practice
lab and load in packet tracer
If require, you can download the latest as well as earlier version of Packet Tracer from here. Download Packet
Tracer
Initial IP Configuration
By default interfaces on router are remain administratively down during the start up. We
need to configure IP address and other parameters on interfaces before we could
actually use them for routing. Interface mode is used to assign the IP address and other
parameters. Interface mode can be accessed from global configuration mode. Following
commands are used to access the global configuration mode.
Router>enable
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Before we configure IP address in interfaces let’s assign a unique descriptive name to
router.
Router(config)#hostname R1
R1#
Now execute the following commands to set IP address in FastEthernet 0/0 interface.
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit
interface FastEthernet 0/0 command is used to enter in interface mode.
Serial interface needs two additional parameters clock rate and bandwidth. Every serial
cable has two ends DTE and DCE. These parameters are always configured at DCE end.
We can use show controllers interface command from privilege mode to check the
cable’s end.
R1(config)#exit
R1#show controllers serial 0/0/0
Interface Serial0/0/0
Hardware is PowerQUICC MPC860
DCE V.35, clock rate 2000000
[Output omitted]
Fourth line of output confirms that DCE end of serial cable is attached. If you see DTE
here instead of DCE skip these parameters.
R1#configure terminal
R1(config)#interface Serial0/0/0
R1(config-if)#ip address 100.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
Router#configure terminal Command is used to enter in global configuration mode.
In real life environment this parameter controls the data flow between serial links and
need to be set at service provider’s end. In lab environment we need not to worry about
this value. We can use any valid rate here.
Router(config-if)#bandwidth 64
Initial IP configuration in R2
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 192.168.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface Serial0/0/0
R2(config-if)#ip address 100.0.0.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
That’s all initial IP configuration we need. Now this topology is ready for the practice of
static nat.
Since static NAT use manual translation, we have to map each inside local IP address
(which needs a translation) with inside global IP address. Following command is used to
map the inside local IP address with inside global IP address.
Let’s implement all these commands together and configure the static NAT.