211 lines
4.0 KiB
HTML
211 lines
4.0 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Using PPP across a null modem (direct serial) connection</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="Setting up the global alias for pppd"
|
|
HREF="x1577.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="PPPoE or PPP over Ethernet"
|
|
HREF="c1609.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="x1577.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="c1609.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="DIRECT"
|
|
>Chapter 29. Using PPP across a null modem (direct serial) connection</A
|
|
></H1
|
|
><P
|
|
>This is very simple - there is no modem in the way so things are much
|
|
simpler.</P
|
|
><P
|
|
>First of all, choose one of the machines as a 'server', setting up a
|
|
getty on the serial port so you can test that you do have connectivity
|
|
using minicom to access the serial port on the 'client'.</P
|
|
><P
|
|
>Once you have this functioning, you can remove the getty UNLESS you want
|
|
to make sure that the connection is validated using user name/password
|
|
pairs as for a dial up connection. As you have 'physical control' of
|
|
both machines, I will presume that you do NOT want to do this.</P
|
|
><P
|
|
>Now, on the server, remove the getty and make sure that you have the serial
|
|
ports on both machines configured correctly using 'setserial'.</P
|
|
><P
|
|
>All you need to do now is to start pppd on both systems. I will assume
|
|
that the connection uses /dev/ttyS34 on both machines. So, on both
|
|
machines execute the command:-</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>pppd -detach crtscts lock <local IP>:<remote IP> /dev/ttyS3 38400 &</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> </P
|
|
><P
|
|
>This will bring up the link - but as yet you have no routing specified.
|
|
You can test the link by pinging to and fro to each machine. If this
|
|
works, bring down the link by killing one of the pppd processes.</P
|
|
><P
|
|
>The routing you need will of course depend on exactly what you are
|
|
trying to do. Generally, one of the machines will be connected
|
|
to an Ethernet (and beyond) and so the routing required is exactly the
|
|
same as for a PPP server and client.</P
|
|
><P
|
|
>So on the Ethernet equipped machine, the pppd command would be...</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>pppd -detach crtscts lock proxyarp <local IP>:<remote IP> /dev/ttyS3 38400 &</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> </P
|
|
><P
|
|
>and on the other machine
|
|
...</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>pppd -detach crtscts lock defaultroute <local IP>:<remote IP> /dev/ttyS3 38400 &</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
> </P
|
|
><P
|
|
>If you are linking two networks (using a serial link!) or have more
|
|
complex routing requirements, you can use /etc/ppp/ip-up in exactly the
|
|
same way as mentioned earlier in this 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="x1577.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="c1609.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Setting up the global alias for pppd</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>PPPoE or PPP over Ethernet</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |