old-www/HOWTO/IP-Masquerade-HOWTO/addressing-the-lan.html

206 lines
4.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Assigning Private Network IP Addresses to the Internal LAN</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux IP Masquerade HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Setting Up IP Masquerade"
HREF="c472.html"><LINK
REL="PREVIOUS"
TITLE="Checking your existing kernel for MASQ functionality"
HREF="ipmasq-compiling3.1.html"><LINK
REL="NEXT"
TITLE="Configuring IP Forwarding Policies"
HREF="firewall-examples.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux IP Masquerade HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="ipmasq-compiling3.1.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Setting Up IP Masquerade</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="firewall-examples.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="ADDRESSING-THE-LAN"
></A
>3.3. Assigning Private Network IP Addresses to the Internal LAN</H1
><P
>Since all <STRONG
>INTERNAL MASQed</STRONG
> machines should
NOT have official Internet assigned addressees, there must be a specific and
accepted way to allocate addresses to those machines without conflicting with
anyone else's Internet address. </P
><P
>From the original IP Masquerade FAQ:</P
><P
><A
HREF="http://www.cis.ohio-state.edu/cgi-bin/rfc/INDEX.rfc.html"
TARGET="_top"
>RFC
1918</A
> is the official document on which IP addresses are to be used in
a non-connected or "private" network. There are 3 blocks of numbers set aside
specifically for this purpose.</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Section 3: Private Address Space
The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private networks:
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
We will refer to the first block as "24-bit block", the second as "20-bit
block", and the third as "16-bit" block". Note that the first block is
nothing but a single class A network number, while the second block is a set
of 16 continuous class B network numbers, and the third block is a set of 255
continuous class C network numbers.</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>For the record, my preference is to use the 192.168.0.0 network with a
255.255.255.0 Class-C subnet mask and thus this HOWTO reflects this. Any of
the above private networks are valid, but just be SURE to use the correct
subnet-mask.</P
><P
>So, if you're using a Class-C network, you should number your TCP/IP enabled
machines as 192.168.0.1, 192.168.0.2, 192.168.0.3, .., 192.168.0.x </P
><P
>192.168.0.1 is usually set as the internal gateway or Linux MASQ machine which
reaches the external network. Please note that 192.168.0.0 and 192.168.0.255
are the Network and Broadcast address respectively (these addresses are
RESERVED). Avoid using these addresses on your machines or your network will
not function properly. </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="ipmasq-compiling3.1.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="firewall-examples.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Checking your existing kernel for MASQ functionality</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c472.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Configuring IP Forwarding Policies</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>