Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > e05c4514608e650af9b28d9be1d35a18 > files > 1157

howto-html-it-10.1-4mdv2008.1.noarch.rpm

<HTML
><HEAD
><TITLE
>Routing issues on a LAN</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="Linux PPP HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Using /etc/ppp/ip-down"
HREF="c1477.html"><LINK
REL="NEXT"
TITLE="Note on Security"
HREF="x1500.html"></HEAD
><BODY
CLASS="CHAPTER"
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"
><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="c1477.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1500.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN1482">Chapter 27. Routing issues on a LAN</H1
><P
>If you are connected to a LAN but still want to use PPP on your personal
Linux machine , you need to address some issues of the routes packets
need to take from your machine to reach your LAN (through your Ethernet
interface) and also to the remote PPP server and beyond.</P
><P
>This section does NOT attempt to teach you about routing - it deals only
with a simple, special case of (static) routing!</P
><P
>I strongly urge you to read the Linux Network Administrator Guide (NAG)
if you are NOT familiar with routing. Also the O'Reilly book "TCP/IP
Network Administration" covers this topic in a very understandable form.</P
><P
>The basic rule of static routing is that the DEFAULT route should be the
one that points to the MOST number of network addresses. For other
networks, enter specific routes to the routing table.</P
><P
>The ONLY situation I am going to cover here is where your Linux box is
on a LAN that is not connected to the Internet - and you want to dial
out to the Internet for personal use whilst still connected to the LAN.</P
><P
>First of all, make sure that your Ethernet route is set up to the
specific network addresses available across your LAN - NOT set to the
default route!</P
><P
>Check this by issuing a route command, you should see something like the
following:-</P
><P
>&#13;<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>[root@hwin /root]# route -n
Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
loopback        *               255.255.255.0   U     1936   0       50 lo
10.0.0.0        *               255.255.255.0   U     1436   0      565 eth0</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>If your Ethernet interface (eth0) is pointing at the default route, (the
first column will show "default" in the eth0 line) you need to change
your Ethernet initialization scripts to make it point at the specific
network numbers rather than the default route (consult the Net2 HOWTO
and NAG).</P
><P
>This will allow pppd to set up your default route as shown below:-</P
><P
>&#13;<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>[root@hwin /root]# route -n
Kernel routing table

Destination     Gateway         Genmask         Flags MSS    Window Use Iface
10.144.153.51   *               255.255.255.255 UH    488    0        0 ppp0
127.0.0.0       *               255.255.255.0   U     1936   0       50 lo
10.1.0.0        *               255.255.255.0   U     1436   0      569 eth0
default         10.144.153.51   *               UG    488    0        3 ppp0</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>As you can see, we have a host route to the PPP server ( 10.144.153.51)
via ppp0 and also a default network route that uses the PPP server as
its gateway.</P
><P
>If your set up needs to be more complex than this - read the routing
documents already mentioned and consult an expert at your site!</P
><P
>If your LAN already has routers on it, you will already have gateways
established to the wider networks available at your site. You should
STILL point your default route at the PPP interface - and make the other
routes specific to the networks they serve.</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="c1477.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="x1500.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Using <TT
CLASS="LITERAL"
>/etc/ppp/ip-down</TT
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Note on Security</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>