Hi,

I will try to explain it using a live example, so it would be clear.
I administer a small network at home. 2 computers, which are connected with
a simple wire.
Host A is 192.168.1.1 on the local network, and Host B is 192.168.1.2 .
Now let's say that Host A has a connection to the Internet using a 
simple modem,
which entitle it another IP.  let's say it is 212.10.10.10  .  through 
this IP host A can
communicate with the outside world.
Host B on the other hand, cannot talk to the Web, because it doesn't 
have an assigned
Internet IP, and here NAT (Network Address Translating - or something 
like it) comes
into action.
I can configure Host A to do NAT for Host B, so it could also use the web.
Whenever Host B send a packet to the outside world, it does it through 
Host A
(cause I told it to use Host A as a default gateway).
Whenever Host A gets this packet from host B, it changes the source address
(which was 192.168.1.2) to its own (212.10.10.10), and changes the 
source port
( whatever it was, let's say 80) to a new one ( let's say 43434),
and sends the changed packet out to the Web.
Now once it gets packets back from the internet to port number 43434, it 
knows they belong
to host B, so it changes the destination address back to 192.168.1.2, 
the destination port back
to 80 (it remembered the port number host B initially used), and deliver 
the new packet
to Host B on the local network.

The whole process could be done to many hosts, and to many ports on each 
host.
The host that does the NAT actually handle some sort of translating 
table, so it
would remember what packets belong to who.

Hope I was more helpful than cumbersome,

centipede.

Muhamad Salem Sugui wrote:

>    I belived that I understood how NAT works. But I think not.
>    How NAT works exactly? How my computers in LAN can be reached from
>outside world with NAT and without NAT?
>    Thanks in advance to everyone.
>
>--
>  Muhamad Salem Sugui
>
>
>
>
>


Reply via email to