Network Address Translation(NAT) and Port Address Translation(PAT) September 26, 2008
Posted by Ravindu Jayalath in Technical.trackback
Here again we are going to discuss about another importanat topic in networking. We have mainly 3 types of NATTING. They are Static ,Dynamic and NAT overloading usually known as PAT. I will give you some basic examples why we need this concept. Let’s say that you have one public IP given by the ISP and you need to connect 20 PCs to the internet. There you can use this technique. Another example is you have a PC with IP 172.16.5.1 and you need to connect one of your application in that machine to another server in another network.But that netwoks firewall allowes only source IP 10.10.10.1 only to access that server. In that case you can NAT IP 172.16.5.1 in to 10.10.10.1 where you can access that server now.
Let’s define NAT terms:
• Inside local address – The IP address assigned to a host on the inside network. The address is usually not an IP address assigned by the Internet Network Information Center (InterNIC) or service provider. This address is likely to be an RFC 1918 private address.
• Inside global address – A legitimate IP address assigned by the InterNIC or service provider that represents one or more inside local IP addresses to the outside world.
• Outside local address – The IP address of an outside host as it is known to the hosts on the inside network.
• Outside global address – The IP address assigned to a host on the outside network. The owner of the host assigns this address.
Let’s configure a static NAT between the private IP 10.6.1.2 & the public 171.69.68.10
Router(config)#ip nat inside source static 10.6.1.2 171.69.68.10
Router(config)#int e0
Router(config-if)#ip nat inside
Router(config-if)#int e1
Router(config-if)#ip nat outside
To configure dynamic inside source address translation an access list must permit only those addresses that are to be translated. Remember that there is an implicit “deny all” at the end of each access list.
Now lets NAT 2 PCs 10.1.1.1 and 10.1.1.2 in to public IP 194.16.10.1.If you have many public IPs you can use all in the pool as I used only one here.
Router(config)#ip nat pool Ravindu 194.16.10.1 194.16.10.1 netmask 255.255.255
Router(config)#access-list 7 permit 10.1.1.0 0.0.0.3
Router(config)#ip nat inside sourse list 7 pool Ravindu
Router(config)#int e0
Router(config-if)#ip nat inside
Router(config-if)#int s0
Router(config-if)#ip nat outside
--Hope this has been useful for you and thank you for veiwing–

Comments»
No comments yet — be the first.