Thread: Nat
-
January 5th, 2005, 02:52 AM
#1
Nat
Ok, I have a very weak understanding of NAT. I know what it is and does, but how does that router know which internal IP is connected to which external IP ? ie: 192.168.10.1 and 192.168.10.2 are connected to the internet. 192.168.10.1 sneds a SYN to 66.55.44.33 and 192.168.10.2 sends a SYN to 99.88.77.66. How does NAT know which is going to which. Also, How do I connect to a computer behind a NAT enabled Router ?
The fool doth think he is wise, but the wiseman knows himself to be a fool - Good Ole Bill Shakespeare
-
January 5th, 2005, 03:18 AM
#2
They have routing tables that are on some sort of memory in the router that contain all that information.
[H]ard|OCP <--Best hardware/gaming news out there--|
pwned.nl <--Gamers will love this one --|
Light a man a fire and you\'ll keep him warm for a day, Light a man ON fire and you\'ll keep him warm the rest of his life.
-
January 5th, 2005, 03:25 AM
#3
OK, but how do I connect to a computer behind the NAT. My friend has a static IP on his DSL Router, but say I wanna connect to his computer and not just his router ?
The fool doth think he is wise, but the wiseman knows himself to be a fool - Good Ole Bill Shakespeare
-
January 5th, 2005, 03:45 AM
#4
Senior Member
Two Words: Port Forwarding
Login to your router, and depending on what brand it is they call it different things
but your looking for somehting like Port Forwards (also Rules or Services) and you have to select which port(s) you want and then type in the private IP of his computer...
Tip: Much more successful he has a static IP
Note: NAT can be a bitch sometimes, especially with DCC transfers
-
January 5th, 2005, 03:46 AM
#5
Connect to his router on the proper port that is open on his router and his computer, and he will have to have that port forwarded on the router most likely as well, and it will go through fine.
/EDIT/ Double cut beat me to it :P
[H]ard|OCP <--Best hardware/gaming news out there--|
pwned.nl <--Gamers will love this one --|
Light a man a fire and you\'ll keep him warm for a day, Light a man ON fire and you\'ll keep him warm the rest of his life.
-
January 5th, 2005, 08:36 AM
#6
Hi
How does NAT know which is going to which.
Outgoing connections
As you know, the Network Address Translation[1] "allows
a single device, such as a router, to act as an agent between the
internet and local network[2]. Your question is, how does this
magic works? There are some mechanisms (dynamic NAT, static NAT,
overloading and overlapping), but the magic is mainly as follows:
The NAT device stores the source IP (internal) and port number
and creates a new table entry. This table entry is how the connection
attempt looks like external, ie one of the external IP's (eg. assigned
by the ISP) and a NAT port number. This combination external IP/NAT port
number is unique per connection.
For example:
You are connecting to the internet from 192.168.1.100 (internal IP)
using Port 3050. The external world thinks you are connecting to
the internet from 216.239.39.104 and port 3080.
192.168.1.100:3050 <-> NAT Device: 216.239.39.104:3080 <-> external webserver
Basically, that's the magic and so "NAT knows which is going to which."
In addition, the NAT device needs to modify quite a few information in
the header, like checksum manipulations and others.
Also, How do I connect to a computer behind a NAT enabled Router ?
Incoming connections
As stated by Double//Cut and The Grunt, your router needs some kind of
knowledge. This is given by a port forwarding entry. You might also
check for "SUA Setup" (Zyxel, ...).
Ie an entry like
80 192.168.1.101
forwards incoming connections to port 80 to 192.168.1.101, which hopefully
is a webserver.
Cheers
[1] http://www.faqs.org/rfcs/rfc1631.html
[2] http://computer.howstuffworks.com/nat.htm
If the only tool you have is a hammer, you tend to see every problem as a nail.
(Abraham Maslow, Psychologist, 1908-70)
-
January 5th, 2005, 10:08 AM
#7
For your information: the term NAT is often used to describe different techniques (to reach a similar goal). You could identify two basic types:
(Static) NAT, or Network Address Translation, lets you have a big pool of IPs (your internal network) connect to the outside network using smaller pool of IPs. You need an 'outside IP' for each simultanious outside connection.
Using PAT, or Port Address Translation (or NAPT, Network Address Port Translation), you let a pool of IPs (again, your internal network) connect to the outside network using one IP. You use portmapping to make it possible for several computers on your network to share a single outside IP.
All kinds of sub-types exist, but these are the basic types.
Here's a link on wikipedia with some more information: http://en.wikipedia.org/wiki/NAT
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|