When communicating to devices in a public network, your device needs to use a source address that is a public address. NAT device enables private IPv4 to connect to the Internet. NAT enable you to change an IP address in a packet to a different address. Usually, NAT connects two networks and translates the private (inside local) addresses into public addresses (inside global) before packets are forwarded to another network. In other word Address translation allows you to translate your internal private addresses to public addresses before these packets leave your network.
Situation where you should use NAT
- Your ISP did not provide you sufficient public IP address
- Your company is going to merge in a company which use same address space
- Where you want to hide your internal IP address space from outside
- You want to assign the same IP address to multiple machines
There are three types of NAT
- Static
- Dynamic
- PAT
STATIC NAT
Dynamic NAT
Dynamic NAT is used when inside use wants to access external resource. When an inside user sends traffic through the address translation device, say a router, it examines the source IP address and compares it to the internal local address pool. If it finds a match, then it determines which inside global address pool it should use for the translation. It then dynamically picks an address in the global address pool that is not currently assigned to an inside device. The router adds this entry in its address translation table, the packet is translated, and the packet is then sent to the outside world. If no matching entry is found in the local address pool, the address is not translated and is forwarded to the outside world in its original state.
When returning traffic comes back into your network, the address translation device examines the destination IP addresses and checks them against the address translation table. Upon finding a matching entry, it converts the global inside address to the local inside address in the destination IP address field of the packet header and forwards the packet to the inside network
PAT
Major difference between NAT and PAT is In NAT Only IP addresses are translated (not port numbers).
NAT serves three main purposes:
No comments:
Post a Comment
its cool