Network Address Translation - NAT
(Static)
Syntax to implement NAT on Router
Syntax:
Router(config)#interface <type> <no>
Router(config-if)#ip NAT inside
This command need to be given on interface where LAN (Private) Network is present
Router(config-if)#ip NAT outside
This command need to be given on interface where WAN (Private) Network is present
Syntax for configuring static NAT is as Follows:
Router(config)#ip nat inside source static <Private IP> <Public IP>
Configuration of static NAT:
Delhi#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Delhi(config)#
Delhi(config)#interface serial 0/0/1
Delhi(config-if)#ip address 201.2.0.15 255.255.255.248
Delhi(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up
Delhi(config-if)#
Delhi(config-if)#encapsulation ppp
Delhi(config-if)#ip nat outside
Delhi(config-if)#exit
Delhi(config)#
Delhi(config)#interface fastEthernet 0/0
Delhi(config-if)#ip nat inside
Delhi(config-if)#exit
Delhi(config)#ip nat inside source static 192.168.1.20 201.2.0.16
Delhi(config)#exit
Delhi#
Show command:
Delhi#sh ip nat translation
Delhi#debug ip nat
Verify the output using following commands:
OUTPUT:
Delhi#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
--- 201.2.0.16 192.168.1.20 --- ---
Delhi#debug ip nat
IP NAT debugging is on
Delhi#
No comments:
Post a Comment