250 lines
5.7 KiB
HTML
250 lines
5.7 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>IP Numbers</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux PPP HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="PPP configuration tools"
|
|
HREF="x100.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Aims of this Document"
|
|
HREF="c143.html"></HEAD
|
|
><BODY
|
|
CLASS="CHAPTER"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
><A
|
|
HREF="http://www.linuxports.com/howto/ppp"
|
|
TARGET="_top"
|
|
>Linux PPP HOWTO</A
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x100.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="c143.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="AEN112"
|
|
>Chapter 3. IP Numbers</A
|
|
></H1
|
|
><P
|
|
>Every device that connects to the Internet must have its own, unique IP
|
|
number. These are assigned centrally by a designated authority for each
|
|
country.</P
|
|
><P
|
|
>If you are connecting a local area network (LAN) to the Internet,
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>YOU MUST</I
|
|
> use an IP number from your own assigned network range for
|
|
all the computers and devices you have on your LAN. You <I
|
|
CLASS="EMPHASIS"
|
|
>MUST NOT</I
|
|
>
|
|
pick IP numbers out of the air and use these whilst connecting to
|
|
another LAN (let alone the Internet). At worst this will simply not work
|
|
at all and could cause total havoc as your 'stolen' IP number starts
|
|
interfering with the communications of another computer that is already
|
|
using the IP number you have picked out of the air.</P
|
|
><P
|
|
>Please note that the IP numbers used throughout this document (with some
|
|
exceptions) are from the 'unconnected network numbers' series that are
|
|
reserved for use by networks that are not (ever) connected to the
|
|
Internet.</P
|
|
><P
|
|
>There are IP numbers that are specifically dedicated to LANs that do not
|
|
connect to the Internet. The IP number sequences are:-</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>One A Class Network Address
|
|
|
|
10.0.0.0 (netmask 255.0.0.0)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>16 B Class Network Addresses
|
|
|
|
172.16.0.0 - 172.31.0.0 (netmask 255.255.0.0)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>256 C Class Network Addresses
|
|
|
|
192.168.0.0 - 192.168.255.0 (netmask 255.255.255.0)</P
|
|
></LI
|
|
></UL
|
|
> </P
|
|
><P
|
|
>If you have a LAN for which you have <I
|
|
CLASS="EMPHASIS"
|
|
>not</I
|
|
> been allocated IP
|
|
numbers by the responsible authority in your country, you should use one
|
|
of the network numbers from the above sequences for your machines.</P
|
|
><P
|
|
>These numbers should <I
|
|
CLASS="EMPHASIS"
|
|
>never</I
|
|
> be used on the Internet.</P
|
|
><P
|
|
>However, they can be used for the local Ethernet on a machine that is
|
|
connecting to the Internet. This is because IP numbers are actually
|
|
allocated to a network interface, not to a computer. So whilst your
|
|
Ethernet interface may use 10.0.0.1 (for example), when you hook onto
|
|
the Internet using PPP, your PPP interface will be given another (and
|
|
valid) IP number by the server. Your PC will have Internet connectivity,
|
|
but the other computers on your LAN will not.</P
|
|
><P
|
|
>However, using Linux and the IP Masquerade (also known as NAT - Network
|
|
address Translation) capabilities of the Linux and the ipfwadm
|
|
software, you can connect your LAN to the Internet (with some
|
|
restriction of services), even if you do not have valid IP numbers for the
|
|
machines on your Ethernet.</P
|
|
><P
|
|
>For more information on how to do this see the IP Masquerade mini-HOWTO
|
|
at <A
|
|
HREF="http://metalab.unc.edu/mdw/HOWTO/IP-Masquerade-HOWTO.html"
|
|
TARGET="_top"
|
|
>Linux IP Masquerade mini HOWTO</A
|
|
></P
|
|
><P
|
|
>For most users, who are connecting a single machine to an Internet
|
|
service provider via PPP, obtaining an IP number (or more accurately, a
|
|
network number) will not be necessary.</P
|
|
><P
|
|
>If you wish to connect a small LAN to the Internet, many Internet
|
|
Service Providers (ISPs) can provide you with a dedicated subnet (a specific
|
|
sequence of IP numbers) from their existing IP address space.
|
|
Alternatively, use IP Masquerading.</P
|
|
><P
|
|
>For users, who are connecting a single PC to the Internet via an ISP,
|
|
most providers use <I
|
|
CLASS="EMPHASIS"
|
|
>dynamic</I
|
|
> IP number assignment. That is, as part
|
|
of the connection process, the PPP service you contact will tell your
|
|
machine what IP number to use for the PPP interface during the current
|
|
session. This number will not be the same every time you connect to your
|
|
ISP. </P
|
|
><P
|
|
>With dynamic IP numbers, you are <I
|
|
CLASS="EMPHASIS"
|
|
>not</I
|
|
> necessarily
|
|
given the same IP number each time you connect. This has implications for
|
|
server type applications on your Linux machine such as sendmail, ftpd, httpd
|
|
and so forth. These services are based on the premise that the computer
|
|
offering the service is accessible at the same IP number all the time
|
|
(or at least the same fully qualified domain name - FQDN - and that DNS
|
|
resolution of the name to IP address is available).</P
|
|
><P
|
|
>The limitations of service due to dynamic IP number assignment (and ways
|
|
to work around these, where possible) are discussed later in the
|
|
document.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x100.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="c143.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>PPP configuration tools</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Aims of this Document</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |