My Blog List

Thursday, April 5, 2012

network address translation (Dynamic NAT)

Dynamic NAT/PAT:  to map one to many or many to many IP address (public ip to privet ip).

1. First of all you must create access list
(Create ACL for which network or IP address you want to access internet)

Router(config)#access-list 10 permit 192.168.0.0 0.0.0.255
Router(config)#access-list 10 permit host 192.168.0.4
Router(config)#access-list 10 permit host 192.168.0.5
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip access-group 10 in
Router(config-if)#exit
Router(config)#

2.Create NAT pool
 Router(config)#ip nat pool abc 200.10.10.3 200.10.10.5 netmask 255.255.255.0
Router(config)#ip nat inside source list 10 pool abc

3. Then ping PC4 to the Cisco.com server by the commnd prompt  as - ping 170.1.1.1

Network address translation (NAT)

Static NAT: to map one to one IP address (public ip to privet ip)


1.First of all open the Nat file
2.assign the ip address for PC1,PC2,PC3,PC4

 3.assign the ip of serial port in office router as 200.100.1.1 cuz its the public ip address of  given by ISP.
4. Configure a default route in the office router for Internet connectivity.

 as follows - -  - Router(config)#ip route 0.0.0.0 0.0.0.0 serial 2/0

5.assign the inbound and out bound of office router !!!
Fa0/0 of office router is inbound of the private network.
Se2/0 of office router is the outbound of the network.


go to interface of fa0/0


Router(config)#interface fastEthernet 0/0
Router(config-if)#ip nat inside
Router(config-if)#exit

go to se 2/0

Router(config)#interface serial 2/0
Router(config-if)#ip nat outside
Router(config-if)#exit

6. Now Map the private ip address to public ip address !!!

Router(config)#ip nat inside source static 192.168.0.2 200.100.1.1
 // this command give the static ip for pc1 .
map the 192.168.0.2 private ip for 200.100.1.1 public ip !!
 7. ping the Cisco.com server by PC1 command prompt by - ping 170.1.1.1


thats all about the static NAT :) :) :)