Network Address Translation

Posted: July 7, 2010 in Hacking & Security

Like This!

For a computer to communicate with other computers, it must have an IP address. With the explosion of the Internet and the increase in home networks and business networks, the number of available IP addresses is simply not enough. The obvious solution is to redesign the address format to allow for more addresses IPv6 but will take several years to implement because it requires modification of the entire infrastructure of the Internet. Network Address Translation (NAT) allows a single device, such as a router, to act as agent between the Internet (public network) and a local (private) network. This means that only a single unique IP address is required to represent an entire group of computers to outside their network.

Reasons to use NAT:
1. Shortage of IP addresses
2. Security and Administration

How NAT Works

Suppose an inside host (192.168.65.29) wants to communicate with an google server (209.85.231.104). It sends a packet to the NAT-configured router. The router reads the source IP address of the packet and checks if the packet matches the criteria specified for translation. The router has an ACL (Access Control List) that identifies the inside network as valid hosts for translation. Therefore, it translates an inside local IP address ( 192.168.65.29) into inside global IP address( 117.240.114.18). It stores this translated local to global address in the NAT table. The router then sends the packet to its destination.

When the google server responds back, the packet comes back to the router (117.240.114.18). The router looks its NAT table and finds it as previously translated IP address. Then, it translates the inside global address (117.240.114.18) to the inside local address (192.168.65.29), and the packet is forwarded to host at IP address 192.168.65.29. If it does not find a translation that match, the packet is dropped.

NOTE:
NAT is sometimes confused with proxy servers but they are different. In NAT neither one realizes that it is dealing with a third device, but in proxy server source computer knows that it is making a request to the proxy server and must be configured to do so. The destination computer thinks that the proxy server is the source computer and deals with it directly. Also, proxy servers usually work at Layer 4 (Transport) of the OSI Reference Model or higher, while NAT is a Layer 3 (Network) protocol. Working at a higher layer makes proxy servers slower than NAT devices in most cases.

Types Of NATing
Static NAT: Mapping an local IP address to a external IP address on a one-to-one basis.
Dynamic NAT: Maps an local IP address to a external IP address from a group of external IP addresses.

NAT Overloading: Maps multiple local IP addresses to a single external IP address by using different ports. Also known also as PAT (Port Address Translation).
In overloading, each computer on the local network (like 192.168.65.29, 192.168.65,101 etc.) is translated to the same IP address (117.240.114.18) but with a different port number.

NAT Overlapping: Maps an external IP address to another external IP address.

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to Yahoo BuzzAdd to Newsvine

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s