How NAT translates public IP addresses to private IP addresses

If you work in the field of IT (Information Technology) then you are most likely familiar with at least the basics of networking such as switches, routers, cabling, IP addresses and so on. But have you ever wondered how the information from the Internet knows how to get to the right computer on your internal network? Or how about at home if you have multiple computers sharing the same Internet connection?

Well it may seem like magic but it's really not unless of course you consider the whole idea of networking as magic. How this works is by using a process called Network Address Translation or NAT for short. What this does is take the information coming into your network from its external IP address and translating it to the appropriate internal IP address of the computer it needs to go to. If it wasn't for NAT you would need to have a public IP address for every computer on your internal network and that would not be possible because we are pretty much out of public IPv4 addresses and they are not cheap to begin with if you want your own.

There are 2 main NAT configurations, static (or 1 to 1) or dynamic NAT. There are other more advanced types but we will stick with the 2 most commonly used versions here. Static NAT uses a mapping table to map a public IP address to an internal private IP address so when data comes in for that public IP address the router which stores the NAT table will know which internal private IP address to send the data to. This is used when you have more than one public IP address and want the mapping to stay consistent and not change. You would use a static NAT mapping for something like a web server so the public IP address of the website always points to the internal address of the web server.

Network Address Translation (NAT)

Dynamic NAT is used in situations where you only have one public IP address and you need Internet access for multiple inside computers. This is most likely the configuration your home router is using for its Internet connection. This is also called IP masquerading or one to many NAT because one IP address is servicing multiple devices. Dynamic NAT uses Port Address Translation (PAT) where the router assigns the internal client a port number to be used with the IP address so the packets are sent to the right computer. This is needed because multiple internal computers are sharing the same external or public IP address at the same time. If this wasn't in use then packets would get lost or you would need to have a way to map the public IP address to each private IP address one at a time as needed which would not work too well. This whole process is transparent to the user so there is nothing for them to do in order to make this connection. And the same goes for static NAT after the network administrator completes the configuration on the NAT device.

Pin It

Join Us On FaceBook

We Recommend:



Join Us On Twitter

Get insights into the computer industry and regular updates on our site. Click Here

OCT Youtube Channel

New tech tip videos posted on a regular basis. Subscribe today! Click Here

Sponsored

LATEST VIDEOS

Cut Yourself Out a Slice of Data As you probably know...

Mount an ISO Image File in a VirtualBox VM Oracle Vi...

Find Your Wireless Password With Ease Many of us have...

3 Ways to Rename your Computer When you install Windo...

Create a Windows iSCSI Storage Server Microsoft Windo...

Learn about Windows 10 Safe Mode and recovery options ...

RECENT TIPS

Get to Know Your Active Directory Groups Microsoft Acti...

Will the New Microsoft ReFS Replace NTFS? Anyone who us...

Cut Yourself Out a Slice of Data As you probably know...

Get free Microsoft Office compatable software with SoftM...

Boot Your Computer Into Safe Mode to Troubleshoot Issues...

Go Shopping For Apps at the Microsoft Store Starting wi...

NEWS

WPA2 May Not Be So Secure After All With WPA2 being the...

WPA3 Wireless Security is Coming to Save Us! Wi-Fi is a...

Will Net Neutrality Save or Destroy the Internet? Back ...

Who Will be the Future King of the Processor? When it c...

Microsoft Holds off on its Next Windows 10 Update Thanks...

YouTube taking money away from the little guys I’m sure...