AW: linux-l: News ueber PPP
Robert Sander
gurubert at cs.tu-berlin.de
Mo Okt 26 22:47:48 CET 1998
On Mon, 26 Oct 1998, Michael Müller wrote:
> Ich arbeite gerade daran, über ISDN eine PPP-Zugang zur TU einzurichten.
> Ich bin
> aber noch nicht dazu gekommen, die Uni-Nummer zu wählen! Deswegen könnte
> ich dies bezüglich einige Tips gebrauchen!
Folgend mein Skript, um eine DialOnDemand Verbindung zur TU zu erstellen.
Die ***MYMSN*** usw. mußt Du natürlich ersetzen und auch das ISDNDIR
anpassen.
--- schnipp ---
#!/bin/sh
#
# isdn This script takes care of starting and stopping
# the ISDN subsystem.
#
#
ISDNDIR=/usr/local/isdn/current
downif () {
$ISDNDIR/sbin/isdnctrl hangup $1
/sbin/ifconfig $1 down
$ISDNDIR/sbin/isdnctrl delif $1
}
base_config () {
IFNAME=$1
MYNR=$2
PROVIDER=$3
$ISDNDIR/sbin/isdnctrl eaz $IFNAME $MYNR
$ISDNDIR/sbin/isdnctrl addphone $IFNAME out $PROVIDER
$ISDNDIR/sbin/isdnctrl secure $IFNAME on
$ISDNDIR/sbin/isdnctrl l2_prot $IFNAME hdlc
$ISDNDIR/sbin/isdnctrl l3_prot $IFNAME trans
$ISDNDIR/sbin/isdnctrl ihup $IFNAME off
$ISDNDIR/sbin/isdnctrl status $IFNAME on
}
syncppp_config () {
IFNAME=$1
MYNR=$2
PROVIDER=$3
base_config $IFNAME $MYNR $PROVIDER
$ISDNDIR/sbin/isdnctrl encap $IFNAME syncppp
$ISDNDIR/sbin/isdnctrl pppbind $IFNAME
}
config_tu () {
echo "Configuring TU ippp0"
$ISDNDIR/sbin/isdnctrl addif ippp0 # Create new interface
syncppp_config ippp0 ***MYMSN*** ***TUMSN***
$ISDNDIR/sbin/isdnctrl dialmax ippp0 20
$ISDNDIR/sbin/isdnctrl dialtimeout ippp0 0
$ISDNDIR/sbin/isdnctrl huptimeout ippp0 12
$ISDNDIR/sbin/isdnctrl chargehup ippp0 on
# configure IP-parameters of interface
echo "Setting up Interface ippp0"
/sbin/ifconfig ippp0 ***MYIP*** pointopoint ***TUIP*** -arp
# bring the connection up
/sbin/route add ***TUIP*** ippp0
/sbin/route add default gw ***TUIP*** ippp0
echo "Starting ipppd ippp0"
$ISDNDIR/sbin/ipppd file /etc/ppp/ioptions.ippp0 pidfile /var/run/ipppd.ippp0
}
# See how we are called.
case "$1" in
start)
config_tu
;;
stop)
# Stop daemons.
echo "Shutting down ISDN: "
downif ippp0
killall -9 ipppd
;;
reload)
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
--- schnapp ---
Robert Sander "Is it Friday yet?"
@Home http://home.pages.de/~gurubert
pgp available there
Mehr Informationen über die Mailingliste linux-l