DSL

Charles Steinkuehler charles at steinkuehler.net
Tue Sep 24 00:19:04 CDT 2002


> To catch up from my first post (first attempt at a LEAF box using
> Bering)... I am able to use cat, ps, ls, etc. and an ifconfig look
alike
> called ip.  It was late, I was stuck in stupid... that's my excuse,
and
> I'm stickin to it....

:-)

> I believe everything is working as it should, but the last piece I
can't
> get is authentication to SBC.  (I think.... lol)

Sounds believeable...

> Also, the Win PC I set this up on originally, works fine,
authenticates
> great.
>
> Ok, so I've configured the following per the Bering Users guide, PPPoE
> section.
>
> I've declared all the packages.
>
> I've edited /etc/modules with the following:
>
<snip>

I guess this is OK...I'm not up on the 2.4 modules required for the new
kernel-mode PPPoE code...

> I've done very little with PPP other than the pap_secrets file because
> this isn't a serial dial-up.  Is this a correct assumption on my part?
>
> #pap_secrets
> #papname * papsecret
> user.name * password (correct values used, these are for
demonstration)
> user.name at sbcglobal.net * password
>
> I've tried both of the above.
>
> The PPP HOWTO calls the following format pap_secrets, in Bering, they
> call it the chap_secrets file:
>
> # Secrets for authentication using PAP
> #client    server    secret     acceptable local ip addresses
> user.name    *       password
>
> I've tried to connect using chap_secrets and pap_secrets and only
> pap_secrets. Do I need to configure chap_secrets?  I've tried with and
> without, and it didn't seem to make a difference.

I have the following in *BOTH* chap_secrets & pap_secrets on my test
PPPoE disk (dachstein based):

"charles at steinkuehler.net"      *       "abc"

> PPPoE configs:
>
> edit /etc/ppp/peers/dsl-provider
>
> name "user.name at sbcglobal.net"
> name user.name at sbcglobal.net
> name "user.name"
> name user.name
>
> (I found a dsl howto at linuxdoc.org that suggested dropping the
> @sbcglobal.net.  I've tried all of the above formats, with double
quotes
> and without, and with the @sbcglobal.net and without.  Nothing seems
to
> make a difference)  The users guide states "if you have special
> characters in secret or username, you should put them in quotes."
> I should use the quotes I believe.

This I think you'll have to determine by experimentation...

> /etc/networks/interfaces file:
>
> auto lo
> iface lo inet loopback
>
> auto ppp0
> iface ppp0 inet ppp
> pre-up ip link set eth0 up
> provider dsl-provider eth0
>
> auto eth1
> iface eth1 inet static
> address 192.168.1.254
> masklen 24
> broadcast 192.168.1.255

This I can't help with...it's totally different from the Dachstein
setup.

> Entering "pppd call dsl-provider" on the command line returns the
> following to the console.
>
> Plugin /usr/lib/ppd/pppoe.so loaded
> PPPoE Plugin Initialized
>
> and the following to /var/log/syslog
>
<snip>
>
> and then just sits there.
>
> I don't think I want to use "call" as this isn't serial as I stated
> above, but I'm clutchig at straws now, and was trying anything to get
a
> response in hopes of gleaning a clue.

Crawl through the adsl-connect script (below) that is used to start the
PPPoE link on Dachstein systems.  I didn't port the PPPoE code, or write
the scripts, so I'm no expert, but it might help you with a couple of
wierd ppp options you might not otherwise think of using.

As I recall, when I was trying to get PPPoE working, it was a royal
PITA.  Finally, I setup the roaring penguin PPPoE server for testing,
and tweaked my disk image until it could connect.  Then there's not much
to try and figure out when testing "live" on the wire...possible
differences in nameing convention (ie the @sbcglobal.net you refer to
above), and potential differences in the PPPoE servers (should be fairly
minimal, if everything adheres properly to standards).

NOTE:  The actual pppoe details will likely differ with the 2.4 kernel
version of pppoe (vs the user-mode roaring-penguin PPPoE the
adsl-connect script is based on), but the pppd stuff should be pretty
much identical, AFAIK.

> One other thought I had driving home (scary, I know..a single
> thought).... Do I need to use a crossover cable between the LEAF
router,
> and the DSL modem?

You typically don't need an X-Over cable here...check the link lights to
be sure (if you use a straight-through & need X-Over, the link lights
won't come on).

Charles Steinkuehler
charles at steinkuehler.net

<adsl-connect>
#!/bin/sh
# Generated automatically from adsl-connect.in by configure.
#***********************************************************************
#
# adsl-connect
#
# Shell script to connect to an ADSL provider using PPPoE
#
# Copyright (C) 2000 Roaring Penguin Software Inc.
#
# $Id: adsl-connect.in,v 1.32 2001/01/01 20:20:35 dfs Exp $
#
# This file may be distributed under the terms of the GNU General
# Public License.
#
# Usage: adsl-connect [config_file]
#        adsl-connect interface user [config_file]
# Second form overrides USER and ETH from config file.
# If config_file is omitted, defaults to /etc//ppp/pppoe.conf
#
#***********************************************************************

# From AUTOCONF
prefix=/usr
exec_prefix=${prefix}
localstatedir=/var

# Paths to programs
IFCONFIG=/sbin/ifconfig
PPPD=/usr/sbin/pppd
SETSID=/usr/bin/setsid
PPPOE=${exec_prefix}/sbin/pppoe
LOGGER="/usr/bin/logger -t `basename $0`"

# Must be root
#if test "`/usr/bin/id -u`" != 0 ; then
#    echo "$0: You must be root to run this script" >& 2
#    exit 1
#fi

if test "$SETSID" != "" -a ! -x "$SETSID"; then
    SETSID=""
fi

CONFIG=/etc//ppp/pppoe.conf
USER=""
ETH=""

# Sort out command-line arguments
case "$#" in
    1)
        CONFIG="$1"
        ;;
    3)
        CONFIG="$3"
        ;;
esac

if test ! -f "$CONFIG" -o ! -r "$CONFIG" ; then
    echo "$0: Cannot read configuration file '$CONFIG'" >& 2
    exit 1
fi

. $CONFIG

PPPOE_PIDFILE="$PIDFILE.pppoe"
PPPD_PIDFILE="$PIDFILE.pppd"

# Check for command-line overriding of ETH and USER
case "$#" in
    2|3)
        ETH="$1"
        USER="$2"
        ;;
esac

# Check that config file is sane
if test "$USER" = "" ; then
    echo "$0: Check '$CONFIG' -- no setting for USER" >& 2
    exit 1
fi
if test "$ETH" = "" ; then
    echo "$0: Check '$CONFIG' -- no setting for ETH" >& 2
    exit 1
fi

PPPD_PID=0

# Catch common error
if test "$DEBUG" = "1" ; then
    echo "*** If you want to use DEBUG, invoke adsl-start, not
adsl-connect."
    exit 1
fi

if test "$DEBUG" != "" ; then
    echo "ETH=$ETH; USER=$USER" >> $DEBUG
    echo "---------------------------------------------" >> $DEBUG
fi

# MTU of Ethernet card attached to modem MUST be 1500.  This apparently
# fails on some *BSD's, so we'll only do it under Linux

if test `uname -s` = Linux ; then
    $IFCONFIG $ETH up mtu 1500
fi

if test "$SYNCHRONOUS" = "yes" ; then
        PPPOE_SYNC=-s
        PPPD_SYNC=sync
        # Increase the chances of it working on Linux...
        if test `uname -s` = Linux ; then
            modprobe n_hdlc > /dev/null 2>&1
        fi
else
        PPPOE_SYNC=""
        PPPD_SYNC=""
fi

if test "$CLAMPMSS" = "no" ; then
        CLAMPMSS=""
else
        CLAMPMSS="-m $CLAMPMSS"
fi

if test "$USEPEERDNS" = "yes" ; then
        USEPEERDNS="usepeerdns"
else
        USEPEERDNS=""
fi

# Backward config file compatibility
if test "$DEMAND" = "" ; then
        DEMAND=no
fi

if test "$DEMAND" = "no" ; then
        DEMAND=""
else
        DEMAND="demand persist idle $DEMAND
10.112.112.112:10.112.112.113 ipcp-a
ccept-remote ipcp-accept-local connect true noipdefault ktune"
fi

case "$FIREWALL" in
    STANDALONE)
        . /etc/ppp/firewall-standalone
        ;;
    MASQUERADE)
        . /etc/ppp/firewall-masq
        ;;
esac

# Standard PPP options we always use
PPP_STD_OPTIONS="noipdefault noauth defaultroute hide-password nodetach
$USEPEER
DNS local mtu 1492 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp n
ovj novj
ccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure
$LCP_FAILURE $
PPPD_EXTRA"

# PPPoE invocation
PPPOE_CMD="$PPPOE -p $PPPOE_PIDFILE -I $ETH -T $PPPOE_TIMEOUT
$PPPOE_SYNC $CLAMP
MSS $PPPOE_EXTRA"
if test "$DEBUG" != "" ; then
    if test "$DEMAND" != "" ; then
        echo "(Turning off DEMAND for debugging purposes)"
        DEMAND=""
    fi
    echo "pppd invocation" >> $DEBUG
    echo "$SETSID $PPPD pty '$PPPOE_CMD' $PPP_STD_OPTIONS $PPPD_SYNC
debug" >> $
DEBUG
    echo "---------------------------------------------" >> $DEBUG
    $SETSID $PPPD pty "$PPPOE_CMD -D $DEBUG-0"         $PPP_STD_OPTIONS         $PPPD_SYNC         
debug >> $DEBUG 2>&1
    echo "---------------------------------------------" >> $DEBUG

    echo "Extract from /var/log/messages" >> $DEBUG
    grep 'ppp' /var/log/messages | tail -150 >> $DEBUG
    date >> $DEBUG
    echo "---------------------------------------------" >> $DEBUG
    echo "rp-pppoe debugging dump" >> $DEBUG
    cat $DEBUG-0 >> $DEBUG
    rm -f $DEBUG-0
    for i in 1 2 3 4 5 6 7 8 9 10 ; do
    echo ""
    echo ""
    echo ""
    done
    echo "*** Finished debugging run.  Please review the file"
    echo "*** '$DEBUG' and make sure it does not contain"
    echo "*** any sensitive information.  Once you are satisfied with
it,"
    echo "*** e-mail it to 'pppoe at roaringpenguin.com' for diagnosis."
    echo ""
    echo "*** BUT BEFORE YOU DO THIS, make sure you have read the
HOW-TO-CONNECT"
    echo "*** file which came with the rp-pppoe package."
    exit 0
fi

echo $$ > $PIDFILE

while [ true ] ; do
    $SETSID $PPPD pty "$PPPOE_CMD"         $PPP_STD_OPTIONS         $DEMAND         $PPPD_SYNC &
    echo "$!" > $PPPD_PIDFILE
    wait

    # Otherwise, re-establish the connection
    $LOGGER -p daemon.notice         "ADSL connection lost; attempting re-connection."
done




More information about the Kclug mailing list