old-www/LDP/nag2/x7261.html

229 lines
3.6 KiB
HTML

<HTML
><HEAD
><TITLE
>Debugging Your PPP Setup</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="Linux Network Administrators Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="The Point-to-Point Protocol"
HREF="x-087-2-ppp.html"><LINK
REL="PREVIOUS"
TITLE="Authentication with PPP"
HREF="x-087-2-ppp.authentication.html"><LINK
REL="NEXT"
TITLE="More Advanced PPP Configurations"
HREF="x7297.html"></HEAD
><BODY
CLASS="SECT1"
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"
>Linux Network Administrators Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x-087-2-ppp.authentication.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 8. The Point-to-Point Protocol</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x7297.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN7261"
>8.9. Debugging Your PPP Setup</A
></H1
><P
>&#13;
By default, <B
CLASS="COMMAND"
>pppd</B
> logs any warnings and error messages
to <B
CLASS="COMMAND"
>syslog</B
>&#8201;'s <SPAN
CLASS="SYSTEMITEM"
>daemon</SPAN
>
facility. You have to add an entry to <TT
CLASS="FILENAME"
>syslog.conf</TT
> that redirects
these messages to a file or even the console; otherwise, <B
CLASS="COMMAND"
>syslog</B
>
simply discards them. The following entry
sends all messages to <TT
CLASS="FILENAME"
>/var/log/ppp-log</TT
>:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>daemon.* /var/log/ppp-log</PRE
></TD
></TR
></TABLE
></P
><P
>If your PPP setup doesn't work right away, you should look in this log
file. If the log messages don't help, you can also turn on extra
debugging output using the <TT
CLASS="OPTION"
>debug</TT
> option. This output makes
<B
CLASS="COMMAND"
>pppd</B
> log the contents of all control packets sent
or received to <B
CLASS="COMMAND"
>syslog</B
>. All messages then go to the
<SPAN
CLASS="SYSTEMITEM"
>daemon</SPAN
> facility.</P
><P
>
Finally, the most drastic way to check a problem is to enable kernel-level
debugging by invoking <B
CLASS="COMMAND"
>pppd</B
> with the <TT
CLASS="OPTION"
>kdebug</TT
>
option. It is followed by a numeric argument that is the sum of the
following values: 1 for general debug messages, 2 for printing the contents of
all incoming HDLC frames, and 4 to make the driver print all outgoing
HDLC frames. To capture kernel debugging messages, you must either run
a <B
CLASS="COMMAND"
>syslogd</B
> daemon that reads the
<TT
CLASS="FILENAME"
>/proc/kmsg</TT
> file, or the <B
CLASS="COMMAND"
>klogd</B
> daemon.
Either of them directs kernel debugging to the <B
CLASS="COMMAND"
>syslog</B
>
<SPAN
CLASS="SYSTEMITEM"
>kernel</SPAN
> facility.&#13;</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="x-087-2-ppp.authentication.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="x7297.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Authentication with PPP</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x-087-2-ppp.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>More Advanced PPP Configurations</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>