Sharing Ilmu

Sharing for useful things

Network Address Translation (NAT) on Cisco Packet Tracer

In this tutorial I’ll discuss about NAT on cisco packet tracer.  NAT is a method for local address translation become public ip so that local network can be connected to internet.

On cisco packet tracer, has several types :

 

NAT on cisco has several terminology :

  • Inside Local Address    :  Source address before translation on private ip
  • Outside Local Address  : Destination address before translation on private ip
  • Inside Global Address  :  Inside host after translation on public ip
  • Outside Global Address  : Outside destination host after translation on public ip

And in this article I’ll discuss about Static NAT.  Static NAT is on-to-one NAT, which means one private ip will be translate to one public ip.

The following is the topologi :

Configure IP Address on R1 :

R1(config)#int g0/0/0
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int g0/0/1
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown

Configure IP Address on R2 :

R2(config)#int g0/0/0
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int g0/0/1
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit

Configure IP Address on PC0 :

Configure IP Address on PC1 :

 

Configure IP Address on PC2 :

Configure IP Address on PC3 :

 

Test ping from pc0 to ip R2 :

The PC can’t be reach the router ip because network PC0 is behind the Router R1.

Now configure static nat on R1 :

R1(config)#int g0/0/0
R1(config-if)#ip nat outside
R1(config-if)#exit
R1(config)#int g0/0/1
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#ip nat inside source static 192.168.1.2 10.10.10.1
R1(config)#

 

Test ping again from PC0 to R2 :

now PC0 has been connected to ip R2.

Check ip nat translation from R1 :

But if you try to ping ip R2 from PC1 it doesn’t connected.  Because the this is Static NAT.

 

To be able connected as well, do the configure NAT for ip PC1 from R1.  for example the nat public ip for pc1 is 10.10.10.10.

R1(config)#ip nat inside source static 192.168.1.3 10.10.10.10

Test ping again :

 

For R2 do the same configuration.

R2(config)#int g0/0/0
R2(config-if)#ip nat outside
R2(config-if)#exit
R2(config)#int g0/0/1
R2(config-if)#ip nat inside
R2(config-if)#exit
R2(config)#ip nat inside source static 192.168.2.2 10.10.10.2
R2(config)#ip nat inside source static 192.168.2.3 10.10.10.20
R2(config)#

Test ping from PC2 and PC3 to ip address of R1 (10.10.10.1). And then check the ip nat translation from R2

As the shown above,  Local address 192.168.2.2 will be translate to 10.10.10.2 and local address 192.168.2.3 will be translate to 10.10.10.20.

z

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>