SuSE Support Database

Title: dynamic IP numbers : setting the (default-) route

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

dynamic IP numbers : setting the (default-) route

Symptom:

The PPP connection via ISDN works, however the default route is erased whenever a connection is being established or disconnected.

Cause:

Dynamic IP numbers are being used. Thus, whenever a connection is being established or disconnected ifconfig is called in order to set the new IP number.

The side-effect of this is that all routes for the device (z.B. ippp0) are erased. Unfortunately they are not restored automatically.

Solution:

If an executable script /etc/ppp/ip-up (or ip-down) exists, it will be executed automatically by ipppd at every connection set-up and tear-down. This script sets the route again.

Copy the script from the example directory and ensure that it is executable. ip-down must be a symbolic link :

        cd /etc/ppp
        cp /usr/doc/packages/i4l/pppsample/ip-up .
        chmod 700 ip-up
        ln -s ip-up ip-down

Here is again the complete script :

#!/bin/sh
# (c) '97, S.u.S.E. GmbH, Fuerth, Germany
# Klaus Franken <kfr@suse.de>
# 01.06.97

BASENAME=`basename $0`
INTERFACE=$1
DEVICE=$2
SPEED=$3
LOCALIP=$4
REMOTEIP=$5

case "$BASENAME" in
ip-up)
        /sbin/route add default gw $REMOTEIP dev $INTERFACE
        #/sbin/init.d/route start $INTERFACE
        ;;
ip-down)
        /sbin/route add default gw $REMOTEIP dev $INTERFACE
        #/sbin/init.d/route start $INTERFACE
        ;;
*)
        ;;
esac

---

See also:

---

Keywords: SYNCPPP, ISDN, DEFAULTROUTE, IP-UP, IP-DOWN, IPPPD

---

Categories: PPP

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-isdn_defroute, Copyright SuSE GmbH, Nuremberg, Germany - Version: 26. Mar 1998
Impressum - Last generated: 24. Feb 1999 14:48:37 by maddin with sdb_gen 1.00.0