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

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

Try out some interesting free software from Kaspersky ...

Learn How to Create a RAID 1 Mirrored Drive Set ...

Use the ipconfig command to troubleshoot network problem...

Avoid having to put in your password when you start your...

Kill stubborn tasks that refuse to die with Taskkill ...

Find out how much information Microsoft is gathering fro...

RECENT TIPS

Another utility you can use to fight off spyware As you...

Get those programs uninstalled completely with Revo Unin...

Make your computer easier to use with the Windows Ease o...

Learn the history of wireless technology and how it work...

Try out some interesting free software from Kaspersky ...

Tweak Windows 10 to have it work the way you want it to ...

NEWS

Microsoft to release Windows 10 Pro for Workstations If...

Microsoft wants to change how we use Windows 10 with Win...

FCC challenges the current net neutrality regulations A...

Mozilla takes things up a notch with its new faster and ...

Qualcomm Inc. has come out with a new server level proce...

Once again it's time for a Microsoft security breach tha...