Hi,

I use the following with T-Online for few years already
and it works stable, but I don't know how correct is this:

pref:afarber {1005} sudo crontab -l
32      *       *       *       *       /usr/local/sbin/check-ppp.sh

pref:afarber {1006} cat /usr/local/sbin/check-ppp.sh
#!/bin/sh

TIMEOUT=180
WEBPAGES="http://www.heise.de           \
          http://www.spiegel.de         \
          http://www.slashdot.org  

# If at least one of the web pages works, then the net connection is alive
for url in $WEBPAGES; do
    /usr/local/bin/curl --max-time $TIMEOUT --proxy '' --silent \
        --output /dev/null $url && exit 0
done

# Otherwise kill ppp, wait $TIMEOUT seconds and then restart ppp again
echo >&2 "Fetching web pages failed: $?"

echo >&2 'Killing ppp:'
pppctl /var/run/ppp/tdsl quit all

echo >&2 "Waiting for $TIMEOUT seconds..."
sleep $TIMEOUT

echo >&2 'Starting ppp:'
ppp -ddial tdsl

pref:afarber {1008} head /etc/rc.local

if [ -e /etc/ppp/ppp.conf ]; then
        echo 'Connecting to T-DSL...'
        mkdir -p /var/run/ppp
        /usr/sbin/ppp -ddial tdsl
        sleep 10
fi

pref:afarber {1010} cat /etc/ppp/ppp.conf
default:
        set log phase chat lcp ipcp ccp tun command warning error alert filter
 
tdsl:
        accept lqr
        deny acfcomp
        disable acfcomp protocomp ipv6cp
        
        enable mssfixup
        set authkey XXXXXX
        set authname "[EMAIL PROTECTED]"
        set device "!/usr/sbin/pppoe -i fxp0" 
        set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0
        set mru max 1454
        set mtu max 1454
        set redial 120.120 0
        set speed sync
        set socket /var/run/ppp/tdsl "" 0177
        add default HISADDR

pref:afarber {1011} cat /etc/ppp/ppp.linkup
tdsl:
        shell /sbin/pfctl -f /etc/pf.conf
        bg su afarber -c '/usr/local/bin/fetchmail -a -e 10 -n'

pref:afarber {1012} cat /etc/ppp/ppp.linkdown
tdsl:
        bg su afarber -c '/usr/local/bin/fetchmail -q'

HTH
Alex



2005/7/11, Sebastian Benoit <[EMAIL PROTECTED]>:
> i have a problem with PPPoE and t-online. Right now i'm using userspace pppd
> with the following ppp.conf:
> 
>  default:
>   set log Phase Chat IPCP CCP tun command
>   set redial 20+10-8 0
>   set reconnect 15 5
> 
>  pppoe:
>   set device "!/usr/sbin/pppoe -i ep2"
>   disable acfcomp protocomp
>   deny acfcomp
>   set mtu max 1454
>   set crtscts off
>   set speed sync
>   enable lqr
>   set lqrperiod 5
>   set dial
>   set login
>   set timeout 0
>   set authname "xxxxxxxxx"
>   set authkey "xxxxxxxxx"
>   add! default HISADDR
>   enable dns
>   resolv readonly
>   enable mssfixup
>   set urgent tcp 22
>   set socket /var/run/pppctl.%d "" 600
> 
> everything works fine - except when the link dies. After that, I get the
> following in ppp.log:
> 
>  [...]
>  Jul  8 12:03:14 plato ppp[25280]: tun0: IPCP:  IPADDR[6] 217.0.116.36
>  Jul  8 12:03:14 plato ppp[25280]: tun0: IPCP: deflink: Oops, RCR in Initial.
>  Jul  8 12:03:17 plato ppp[25280]: tun0: IPCP: deflink: RecvConfigReq(119)
>                                    state = Initial
>  Jul  8 12:03:17 plato ppp[25280]: tun0: IPCP:  IPADDR[6] 217.0.116.36
>  Jul  8 12:03:17 plato ppp[25280]: tun0: IPCP: deflink: Oops, RCR in Initial.
>  Jul  8 12:03:18 plato ppp[25280]: tun0: Phase: Clearing choked output queue
>  [... and more of the same ...]
> 
> I am starting pppd this way:
> 
> # cat /etc/hostname.tun0
> !/usr/sbin/ppp -ddial -unit 0 pppoe
> 
> Any ideas what the problem might be?
> 
> note: i also tried using kernel pppoe when setting up the system, but that
> did not work at all.

Reply via email to