Changes

Line 13: Line 13:  
[[File:Private public ip 3 v2.png|1000px]]
 
[[File:Private public ip 3 v2.png|1000px]]
   −
The scheme above roughly describes how devices with private IP addresses communicate with a remote host on the Internet (and ''vice versa'') with the help of NAT. Bellow the scheme is a depiction of a NAT mapping table. It illustrates how the router differentiates to which device in the local network to redirect incoming data packets.
+
The scheme above roughly describes how devices with private IP addresses communicate with a remote host on the Internet (and ''vice versa'') with the help of NAT. Bellow the scheme is a depiction of a '''NAT forwarding table'''. It illustrates how the router differentiates to which device in the local network to redirect incoming data packets. But lets go through the example step-by-step:
 +
 
 +
Lets say a user behind the computer with the IP address '''192.168.1.3''' wants to check a news site whose address is '''68.1.31.1'''. The computer generates a package containing its IP address, the destination IP address and the request to access website. The computer cannot send the packet through the Internet directly to the website's IP address as it would not receive any response. This is because the host would not know how to reach the computer's IP address of 192.168.1.3 since there might be thousands of devices using that same IP address at any given moment.
 +
 
 +
This is where NAT comes in. Instead of sending the package directly to the host, it goes through the router who then changes the sender's IP address into its own Public IP Address:port, in this case '''101.89.101.12:8801'''.So now when the host receives the package it knows exactly where to send the response. It then generates a response package and sends it to 101.89.101.12:8801. The router then receives that response on the specific port and knows exactly where to re-route it - to '''192.168.1.3:1025'''

Navigation menu