Results 1 to 7 of 7

Thread: Nat

  1. #1
    Senior Member
    Join Date
    Dec 2004
    Posts
    320

    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

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,024
    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.

  3. #3
    Senior Member
    Join Date
    Dec 2004
    Posts
    320
    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

  4. #4
    Senior Member
    Join Date
    Jan 2005
    Posts
    128
    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
    http://sfx-images.mozilla.org/affili...88x31/take.gif
    If You\'ve Done Something Right. People Wont Know You\'ve Done Anything At All - God (futurama)

  5. #5
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,024
    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.

  6. #6
    Senior Member
    Join Date
    Mar 2004
    Posts
    557
    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 &lt;-&gt; NAT Device: 216.239.39.104:3080 &lt;-&gt; 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)

  7. #7
    Hi mom!
    Join Date
    Aug 2001
    Posts
    1,103
    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
  •