Wednesday, July 16, 2014

NATING and PATING


NAT stands for Network Address Translation  and PAT stands for Port Address Translation. For the understanding NAT you should understand how it works. For example if you are opening a web site in your office or in a cafe. There are hundred of computers sharing a common IP. Have you ever experienced that you requested abc.com and your friend requested for xyz.com at the same time but your computer opened xyz.com and your friend's computer opened abc.com ?? Answer is No. While opening a web site your computer send the request packet contains you public IP. After receiving the request from your computer Web site's Server send the requested page to your public IP. Now suppose you are opening XYZ.com from IP 192.168.1.1 and at the same time your colleague is opening ABC.com from 192.168.1.2. Both of the computers are sharing the same public IP e.g x.x.x.x
Both Web site's Server i.e. ABC.com and XYZ.com will serve the request to IP x.x.x.x. After reaching the request to your router or firewall, this request redirects to concerned local IP.



Similarly PATING works, using NATING and PATING you can use single WAN IP to serve multiple Servers in your network for the requests coming from global network.

For example you are running 2 Web servers, both are running on port 80 and you have only one WAN IP x.x.x.x. In this scenario you can use x.x.x.x to sever both the servers using PATTING. For the outer network you have to use different ports but after PATING it will redirect for different servers. e.g. http://x.x.x.x:80 and http://x.x.x.x:8080

NATING and PATING takes place on firewall level. Using the same you can use single WAN IP to serve multiple servers using common port.


No comments:

Post a Comment