[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ISDN-Einwahl an WIndows-Rechner



Hallo,

der hat das +49 an der Telefonummer +49xxxx nicht geschluckt...

OK, jetzt geht es :-)

Einziges verbleibendes Problem ist nun, dass ipppd die defaultroute auf
die Verbindung setzt und nachher löscht.

Setzen und löschen soll eine route auf das Netzwerk, mit dem er sich
verbunden hat. Die defaultroute soll bitte auf meinem Router bleiben.

Ich sehe aber nicht, warum das geschieht:

########################### device.ippp0 ##########################


#!/bin/sh

set -e

device=`basename $0`
device=${device#*.}
devtype=${device%%[0-9]*}
devnums=${device##$devtype}
device=$devtype${devnums#[0-9]*+}
dowhat="$1"
masterslave="$2"

case "x$masterslave" in
  xmaster)
    master=true
    slave=false
    ;;
  xslave)
    master=false;
    slave=true;
    masterdevice="$3"
    ;;
  x)
    master=false
    slave=false
    ;;
  *)
    echo "Error, $0 called with unknown 2nd arg '$masterslave',
aborting!"
    exit 1
    ;;
esac

LOCALIP=1.1.1.1
REMOTEIP=1.1.1.1

LOCALMSN=02319698472
REMOTEMSN=02314770702

DIALMODE=manual
if expr ${device} : ippp > /dev/null
  then  ENCAP=syncppp
  else  ENCAP=rawip
fi

case "$dowhat" in
  start)
    [ -f /proc/sys/net/ipv4/ip_dynaddr ] && echo 5 >
/proc/sys/net/ipv4/ip_dynaddr

    if $slave
      then      isdnctrl addslave ${masterdevice} ${device}
      else      isdnctrl addif ${device}
    fi

    isdnctrl eaz ${device} $LOCALMSN

    if [ ! -z "$REMOTEMSN" ]; then
        for MSN in $REMOTEMSN; do
              isdnctrl addphone ${device} out $LEADINGZERO$MSN
        done
    fi

    isdnctrl secure ${device} on
    isdnctrl huptimeout ${device} 300
    isdnctrl dialmode ${device} $DIALMODE
    isdnctrl dialmax ${device} 5
    isdnctrl encap ${device} $ENCAP
    isdnctrl l2_prot ${device} hdlc
    isdnctrl l3_prot ${device} trans
    isdnctrl verbose 2
    isdnctrl chargehup ${device} on
    bindnum=`expr $device : 'ippp\(.*\)'` || true

    if [ ! -z "$bindnum" ]; then
        isdnctrl pppbind ${device} $bindnum
    fi

    if ! $slave; then
        ifconfig ${device} $LOCALIP pointopoint $REMOTEIP netmask
255.255.255.255
        set +e  # ignore errors from here on
        route del -host $REMOTEIP ${device} 2>/dev/null
            route add -host $REMOTEIP ${device}

    fi

    if $slave
      then      isdnctrl dialmode $device auto      >/dev/null 2>&1
      else      isdnctrl dialmode $device $DIALMODE >/dev/null 2>&1
    fi

    ;;
  stop)
    set +e
    isdnctrl dialmode $device off >/dev/null 2>&1

    if ! $slave; then
        route del $REMOTEIP $device     2> /dev/null
        bindnum=`expr $device : 'ippp\(.*\)'`
            ifconfig $device down       2> /dev/null
        isdnctrl delif $device  2> /dev/null
    fi

    ;;
  *)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
esac

exit 0



######################### ipppd.ippp0 ###############################

debug
lock

lcp-echo-failure 5
lcp-echo-interval 5
lcp-restart 1
lcp-max-terminate 5
lcp-max-configure 5
lcp-max-failure 5

name dfue
user dfue

noaccomp
nopcomp
novj
novjccomp
nobsdcomp
nodeflate
nopredictor1
noccp
nolzs

noipdefault
netmask 255.255.255.255
nodefaultroute
nohostroute
mru 1524
mtu 1500

ipcp-accept-local
ipcp-accept-remote

-- 
Michael Hierweck
EDV-Serviceteam
http://www.edv-serviceteam.net



Reply to: