New Zealand ADSL Mailing List


Re: Question about IPs and the DSL modem

From: List Server Account <lists_at_bagel.gen.nz>
Date: Fri, 2 Feb 2001 00:54:28 +1300 (NZDT)
Message-ID: <Pine.LNX.4.20.0102020041080.15479-100000@bagel.gen.nz>

> I'm still a little confused about why there is a need for pinholes etc. I've got a
> picture in my mind of how the ips work etc.
>
> I have my connection set up with an internal ip, 192.168.1.1 and gateway, 192.168.1.254..
> but not too sure how the ports work on either side.
>
> How do incoming and outgoing connections work with the router?

World --------------------Nokia ADSL Router-----------------client
                        valid ip reserved IP | reserved IP
                                                  |
                                                  ----------Client 2
                                                        reserved IP

Pinholes are primarily needed when you are running servers, or when the
software you are running has server like elements.

In the simplest case of using the net, for example e-mail and web,
you don't need pinholes. What happens is your reserved IP requests data
on the Internet. Your router modifys this request, so that it appears to
have come from the router, then gets it using its valid IP, and gives it
back to the client computer (This is called NAPT on Nokia
M1122's. Variants are also referred to as NAT and Masquerading, which
perform a similar function even if they are not identical)

However, if you want to run a server (eg a web server), you need to run it
on one of the machines with a reserved IP. The problem here is that the
world can't see the IP. A pinhole maps the invalid IP address onto a
valid ip address (this is simplistic, and is explained in more detail
below if you require it).

A typical piece of Internet data is a TCP packet. (There are other types
also, but they work in a similar way). A TCP packet has the following
information :

Source Address, Source Port, Target Address, Target Port.

The Port (more importantly, the target port) indicates what type of
information is expected, for example, web is on 80, incoming mail is on
110, outgoing mail is on 25 etc. (These are normally defined in a file
called services if you want to look through your OS for a list).

If you have multiple machines, you can only run 1 web server on the
accepted port, which means only 1 machine can act as a web server. You
need to use pinholes to tell the Nokia which machine this is going to be.

Hope this explanation is not _too_ bad. (Its late, I should be asleep)

Cheers,
David Gottschalk
Web InterNet Ltd

This message is part of the NZ ADSL mailing list.
see http://unixathome.org/adsl/ for archives, FAQ,
and various documents.
To unsubscribe: send mail to majordomo@unixathome.org
with "unsubscribe adsl" in the body of the message
Received on Fri Feb 2 00:56:05 2001


This archive was generated by hypermail 2.2.0 : Thu Nov 30 11:48:08 2006 EST