SuSE Support Database

Title: S.u.S.E. ISDN howto (old: 4.3)

---

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

S.u.S.E. ISDN howto (old: 4.3)

STOP! See http://www.suse.de/Support/sdb/isdn for the current version.

Current version: S.u.S.E. Linux 4.3

This document's most recent version: http://www.suse.de/Support/sdb/kfr_39.html

If you work under S.u.S.E. Linux 4.3 and you have installed the packet i4l, you have a this file's local version too: http://localhost/usr/doc/packages/i4l/README.SuSE.html

Introduction

This text should help, to install ISDN under Linux. But observe the following:
  1. Here is described, how one operates directly ISDN connections (rawip-HDLC) and PPP connections (syncPPP), as they are offered by most of the providers.

    This document canīt cover all situations, but we are anxious to describe further possibilities. At this point we are remitted to your help! Send us your configuration or your experience's report with an special provider or a particular situation.

  2. Youīll find further cross-references below.
  3. THERE IS ABSOLUT NO WARRANTY. The present development is meanwhile very stable, earlier problems e.g. with the Teles 16.3 card don't appear anymore.However notice: You can bring your Linux into abortion with it, destroy your hard disk or maybe kill your hamster too.

Letīs be now a little more optimistic: this compilation is born from some S.u.S.E. employees' personal experiences and there, the use is successful. We try with this to bring into operation your ISDN card at similar conditions too.

Concrete experiences are available but only with the Teles S0/16 or S0/16.3 (this shouldnīt be an announcement).

Cards supported at present by Kernel:

The required drivers are dynamically connected to Kernel at demand (and only then) through modules. Make sure, that the modules isdn and hisax are available (packet kernmod) or generate and install them. For sync PPP you need the module slhc too.

Do not load directly the driver to the Kernel, but as module! With that, you save not only some adjustments at the scripts, but you can essentially work more flexibly too, because e.g. you must not reboot the system, to address the card.

If the network is started (init 2, see below), a connection to the partner can always be established through normal activities like telnet, WWW ftp etc. First the dialling connection is established, which takes around 2-3 seconds. Through I4L_IDLETIME can be adjusted, how many seconds should the connection be inactive, before itīs hanged up. With this one can stay comfortably logged in; without this, programmes are aborted; with pushing a key, one is soon again online. However never stay logged in for a long time, because otherwise a connection is possibly established by the remote station.

Careful: Control your configuration, whether itīs hanged up and when the connections are established. One can easily be, without noticing, for days online. Finally one doesnīt see or hear any dialling like at the good old modems.

Installation

In principle it works of course with other distribution from about Kernel 1.3.97 on too, however here is not described, how one calls directly all required commands, but how one configures them in the S.u.S.E. Linux installed init-script (see below).
  1. Desactivate the network with init 1.
  2. Install the packet i4l.
  3. Install the packet kernmod for the modules.
  4. If you have reinstalled the module (as packet or self compiled), set again the dependencies: depmod -a, at this point shouldnīt appear any error messages.
  5. Configure the network as usual, i.e. as if you would have an Ethernet connection.
    Up to 4 different netcards can be configured, which are marked from _0 to _3. Decide yourself for one, at best _0 (like in the example) and make sure, that this is activated in NETCONFIG.
    Declare the corresponding IP numbers, domain name, nameserver etc.
  6. Enter the IP number and the remote station's name in the file /etc/hosts. E.g.:
    193.102.150.13 eunet-n eunet-n.n.eunet.de
    
  7. Now the following values are entered in the file /etc/rc.config, you can do this as well with YaST menu option "System administration" / "Change the configuration file".
  8. Instead of the device eth0, enter isdn0 (NETDEV_1=isdn0); for PPP enter ippp0.
  9. Set I4L_START=yes
  10. Enter the partner's phone numbers (MSNīs). Notice at this point, that sometimes the number must be declared with area code (but without 0), sometimes without. Take a look at /var/log/isdn.log or /var/log/message, at which number answers your partner at yours. Example: your partner has the area code 012 and the number 345, then enter the following:
            I4L_REMOTE_OUT1_1=345
            I4L_REMOTE_IN1_1=12345
    
  11. Enter your own number (without area code, I think ;-):
            I4L_LOCALMSN=789
    
  12. For Teles cards: specify your cards with the following parameters (see example)
            I4L_TELES_ID=Tel0
            I4L_TELES_MEMBASE
            I4L_TELES_IRQ
            I4L_TELES_PORT
            I4L_PROTOCOL
    
    Hint: if you have loaded the driver as module, set here the IRQ to "". Declare the Id in this way, specified like as Kernel parameter.
  13. For ICN cards: specify your card with the following parameters:
            I4l_ICN_ID
            I4l_ICN_ID2
            I4l_ICN_PORT
            I4l_ICN_MEMBASE
    
    Hint: if you have loaded the driver in Kernel, set here the port address to "", declare the Idīs correspondingly.
  14. Further configuration possibilities in /etc/rc.config:
    #
    # start iprofd ("yes" or "no")
    #     (re-)store ISDN-modem setup in /etc/isdnlog/modemsettings
    #     restore automatically at boot-time
    #     store with "AT&W0" in terminal-emulation
    #
    I4L_IPROFD="no"
    
    
    #
    # idletime before hangup (in seconds)
    #
    I4L_IDLETIME_0=60
    I4L_IDLETIME_1=60
    I4L_IDLETIME_2=60
    I4L_IDLETIME_3=60
    
    #
    # hangup befor next charge info ("on" or "off")
    #   this only works, if your isdn-provider transmits the charge-info during
    #   and after the connection
    #   it does NOT work with the Teles on an EDSS1-Line :-(
    I4L_CHARGEHUP_0=off
    I4L_CHARGEHUP_1=off
    I4L_CHARGEHUP_2=off
    I4L_CHARGEHUP_3=off
    
    #
    # hang-up-timer for incoming calls ("on" or "off")
    #
    I4L_IHUP_0=on
    I4L_IHUP_1=on
    I4L_IHUP_2=on
    I4L_IHUP_3=on
    
    #
    # Set the number of dial atempts for each number
    #   set to "" for unlimited
    #
    I4L_DIALMAX_0=5
    I4L_DIALMAX_1=5
    I4L_DIALMAX_2=5
    I4L_DIALMAX_3=5
    
    #
    # remote station phone number 1 dialout
    #
    I4L_REMOTE_OUT1_0=""
    I4L_REMOTE_OUT1_1=""
    I4L_REMOTE_OUT1_2=""
    I4L_REMOTE_OUT1_3=""
    
    #
    # remote station phone number 2 dialout
    #
    I4L_REMOTE_OUT2_0=""
    I4L_REMOTE_OUT2_1=""
    I4L_REMOTE_OUT2_2=""
    I4L_REMOTE_OUT2_3=""
    
    #
    # remote station phone number 1 dialin
    #
    I4L_REMOTE_IN1_0=""
    I4L_REMOTE_IN1_1=""
    I4L_REMOTE_IN1_2=""
    I4L_REMOTE_IN1_3=""
    
    #
    # remote station phone number 2 dialin
    #
    I4L_REMOTE_IN2_0=""
    I4L_REMOTE_IN2_1=9113247112
    I4L_REMOTE_IN2_2=""
    I4L_REMOTE_IN2_3=""
    
    #
    # my phone number
    #
    I4L_LOCALMSN_0=""
    I4L_LOCALMSN_1=""
    I4L_LOCALMSN_2=""
    I4L_LOCALMSN_3=""
    
    #
    # Debug Level, 4 (some..) to 31 (all messages)
    #
    I4L_DEBUG_0=4
    I4L_DEBUG_1=4
    I4L_DEBUG_2=4
    I4L_DEBUG_3=4
    
    #
    # D-channel protocol 1=1TR6, 2=EDSS1(Euro-ISDN)
    #   remember: when using the ICN card, you have to load different firmwares
    #   see: /usr/src/linux/Documentation/isdn/README
    #
    I4L_PROTOCOL=2
    
    #
    # layer-2 protocol (default: "hdlc")
    # With the ICN-driver and the Teles-driver, "x75i" and "hdlc" is available.
    # With other drivers, "x75ui", "x75bui" may be possible too
    #
    I4L_L2_0="hdlc"
    I4L_L2_1="hdlc"
    I4L_L2_2="hdlc"
    I4L_L2_3="hdlc"
    
    #
    # layer-3 protocol (only "trans" is allowed)
    #
    I4L_L3_0="trans"
    I4L_L3_1="trans"
    I4L_L3_2="trans"
    I4L_L3_3="trans"
    
    #
    # encapsulation
    #   possible values: "rawip" (default), "ip", "cisco-h", "ethernet",
    #     "syncppp", "uihdlc"
    #   see: /usr/src/linux/Documentation/isdn/README
    #
    I4L_ENCAP_0="rawip"
    I4L_ENCAP_1="rawip"
    I4L_ENCAP_2="syncppp"
    I4L_ENCAP_3="rawip"
    
    #
    # secure
    #   "on"  = only defined numbers are allowed to call in
    #   "off" = all numbers are allowed to call in
    #
    I4L_SECURE_0="on"
    I4L_SECURE_1="on"
    I4L_SECURE_2="on"
    I4L_SECURE_3="on"
    
    #
    # callback ("on" or "off")
    #   the other host must accept this
    #
    I4L_CALLBACK_0="off"
    I4L_CALLBACK_1="off"
    I4L_CALLBACK_2="off"
    I4L_CALLBACK_3="off"
    
    #
    # callback delay in seconds (default: 5)
    #
    I4L_CBDELAY_0=5
    I4L_CBDELAY_1=5
    I4L_CBDELAY_2=5
    I4L_CBDELAY_3=5
    
    #
    # activ hangup when getting an incoming call (default: "on")
    #
    I4L_CBHUP_0="on"
    I4L_CBHUP_1="on"
    I4L_CBHUP_2="on"
    I4L_CBHUP_3="on"
    
  15. Hints for PPP: Enter the following values in /etc/rc.config:
      NETDEV_1=ippp0
      I4L_ENCAP_1="syncppp"
      
    Further hints for PPP daemon's start see below.
  16. Edit etc/isdnlog/isdnlog.conf. Here must be defined at least the own number and area code. Example: your number is 012/789, then enter the following:
            MYMSNS=3
            CURRENCY=0.12,DM
            MYPREFIX=012
            789            myself          1 IO *
    
    Further information: /usr/doc/packages/i4l/README.isdnlog
  17. Now start the network and hope: init 2. You can start the script by hand too:
    /sbin/init.d/i4l start
    
    and afterwards start the network, with S.u.S.E. Linux by
    /sbin/init.d/network start
    
    Generally applies, that the file /var/log/messages must be looked at, here are the corresponding messages, warnings and errors. At simpliest you can run on another console or in a xterm a tail -f /var/log/messages /var/log/warn.
  18. Initially try a ping on your gateway computer, e.g. by ping -c 1 111.222.333.444 (of course with the authentic IP number!). If this works out, set the real internet connection and the automatic dialling and login in works! If not, observe the messages.
  19. If you canīt establish now any connection to any computer at this name, you have probably configured wrongly the nameserver.

And how do I finish the ISDN connection?

The connection is dismantled automatically after the given time. See below for some tools, that supervise that. The safest method is to drive the ISDN system down, at S.u.S.E. Linux by:
/sbin/init.d/i4l stop
You can obtain a quick hanging up at rawip too by
        /sbin/isdnctrl hangup isdn0
at PPP by
        /sbin/isdnctrl hangup ippp0.

Examples

Teles S0/16

        I4L_TELES_MEMBASE=0xd2000
        I4L_TELES_IRQ=15
        I4L_TELES_PORT=0xd80
        I4L_PROTOCOL=2

Teles S0/16.3

        I4L_TELES_MEMBASE=0
        I4L_TELES_IRQ=12
        I4L_TELES_PORT=0xd80
        I4L_PROTOCOL=2

PPP connections

At PPP is worked mostly with dynamic IP numbers. i.e. the numbers are first allocated, as soon as a connection is established.

However, how is the network configured (ifconfig), when the numbers are unknown? The special IP numbers 0.0.0.0 (local) and 1.1.1.1 (server) are used. Enter in /etc/rc.config:

IFCONFIG_1="0.0.0.0 pointopoint 1.1.1.1 metric 1"
If e.g. your gateway computer is 193.102.150.13, enter further more:
NETWORK_1="-net 193.102.150.0"
GATEWAY_2=193.102.150.13
NAMESERVER=193.102.150.13
For not S.u.S.E. customers: start the network with:
ifconfig ippp0 0.0.0.0 pointopoint 1.1.1.1 metric 1
Afterwards the PPP daemon /sbin/ipppd is started. This is automatically done in /sbin/init.d/i4l, when the net device is called ippp0.

Besides own files must be created at /etc/ppp, youīll find models in /usr/doc/packages/i4l/pppsample. Copy these files with:

mkdir -p /etc/ppp
cp /usr/doc/packages/i4l/pppsample/* /etc/ppp
Some small adjustments must be still done:
# example for /etc/ppp/pap-secrets

# client       server  pw              iplist
username       *       password  
*              *       ""
This file may only be readable for root! Change the privileges with chmod 600 /etc/ppp/pap-secrets.

Adjust in both files the username and password correspondingly.

If it's worked with chap instead of pap, create a file chap-secrets with the same format.

# /etc/ppp/options
# for isdn4linux/syncPPP and dynamic IP-numbers
#
#
# Klaus Franken, kfr@suse.de
# Stand: 17.08.96
#
# The device
/dev/ippp0
#
# The baud rate is omitted
#
# The IP addresses: :
# just "0.0.0.0:" for dynamic IP
0.0.0.0:
#
# my user name
user Psuse
#
# my system name
name suse-demo
#
#
# don't create a default route
#defaultroute
#
# no CHAP authentification
#-chap
#
# accept IP addresses from peer
ipcp-accept-local
ipcp-accept-remote
noipdefault
#
# try to get IP address from interface
# option specific to ipppd (as opposed to pppd)
useifip
#
# we can't do much with compression
-vj
-vjccomp
-ac
-pc
-bsdcomp
#
#
# max receive unit
mru 1524
# max transmit unit
mtu 1500

Adjust username and system name here correspondingly too. If the remote station allows Haeder compression (Van-Jacobsen), you can try, to comment out the corresponding lines, but it has been already informed several times about problems with this, so change nothing at the first time.

In the files /etc/ppp/ip-up and /etc/ppp/ip-down you must change nothing usually.

Possible problems at PPP

PPP server

Matthias Mohr (SysDesign@T-Online.DE) informs, that the following options must be additionally set in the file /etc/ppp/options.
+pap login         # pap on system user database (/etc/passwd & 
/etc/shadow) 
proxyarp           # Address resolution for network card
usehostname
dns-addr 192.168.0.1 # Sets nameserver for clients
The PAP authentication is done with the clients. The option dns-addr is only necessary at MS clients, to which the nameserver is informed with this (of course adjusted).

Generating own Kernel

With module support

The following parameters are relevant and should be set at least for rawip-HDLC, the other drivers can be additionally generated as modules, along with the Teles driver.
Enable loadable module support (CONFIG_MODULES) [Y/n/?]
Set version information on all symbols for modules (CONFIG_MODVERSIONS) 
[N/y/?] 
Kernel daemon support (e.g. autoload of modules) (CONFIG_KERNELD) [Y/n/?] 
Networking support (CONFIG_NET) [Y/n/?]   
System V IPC (CONFIG_SYSVIPC) [Y/n/?] 
Loopback device support (CONFIG_BLK_DEV_LOOP) [Y/m/n/?] 
TCP/IP networking (CONFIG_INET) [Y/n/?] 
IP: accounting (CONFIG_IP_ACCT) [Y/n/?] 
Network device support (CONFIG_NETDEVICES) [Y/n/?] 
Dummy net driver support (CONFIG_DUMMY) [M/n/y/?] 
ISDN support (CONFIG_ISDN) [M/n/y/?] 
Support synchronous PPP (CONFIG_ISDN_PPP) [M/y/?] 
Use VJ-compression with synchronous PPP (CONFIG_ISDN_PPP_VJ) [Y/n/?] 
Support audio via ISDN (CONFIG_ISDN_AUDIO) [N/y/?] 
ICN 2B and 4B support (CONFIG_ISDN_DRV_ICN) [M/m/?] 
PCBIT-D support (CONFIG_ISDN_DRV_PCBIT) [N/m/?] 
Teles/NICCY1016PC/Creatix support (CONFIG_ISDN_DRV_TELES) [M/n/?] 
Generate and install the Kernel as usual and additionally the modules:
        make modules
        make modules_install

without modules - driver in Kernel

It has been pointed out several times, that is esentially easier to work with modules, and only this variation is tested; he who however needs another: Set the above declared parameter to Y instead of M. You should declare in this occasion only the drivers, that really are available.

This time all parameters for the card must be already defined at compiling or must be declared as Kernel parameter at booting.

Observe, that some values in /etc/rc.config must be set to another ones, see comment in /etc/rc.config.

Otherwise everything goes as described above, but pay attention at booting, that your card is detected, see /var/log/boot.msg.

Tools

  1. chkonline
    Practical for shell scripts, because otherwise one canīt test with ping, whether a connection gets currently through. As argument is passed the number (or its beginning), of which one wants to know, whether a connection gets through. Return value 1 means Offline, O Online.
  2. imon
    ISDN monitor. Very good, because it doesnīt use so much CPU like other tools. Shows always in a text window the current status. Start: 'imon'
  3. imontty
    Like 'imon', but simply shows only the status.
  4. isdnmon
    Tcl/Tk programme, that (what otherwise ;-) shows constantly the status under X. Advantage: small window and the aspect is nice.
    Disadvantage: uses more CPU and memory. (Does anybody know a less demanding programme?)

    Start: 'isdnmon'

  5. isdnmonp
    An isdnmon's patched version. Less widgets are displayed. But important: itīs worked out with the wishx's select command , so only minimum CPU time is used. Disadvantage: the X refresh is slower, but that should not bother anyone, which is only interested at the information.

    Start: 'isdnmonp'

  6. isdnrep
    The complet report, who has called, when, to whom and why. Incoming caller can, provided ISDN, be as well listed. Thatīs why itīs worth to enter the known numbers in /etc/isdnlog/isdnlog.conf, with that the caller is listed with the name.
    Outgoing caller canīt (except on the ISDN card of course) unfortunately be showed, because here no information about that is available on the SO bus (or is read by the card).
    Start: 'isdnrep' or 'isdnrep -a'
    Hint: isdnrep evaluates only the file /var/log/isdn.log, that is written by isdnlog. Check, whether isdnlog really runs, if not, the file /etc/isdnlog/isdnlog.conf doesnīt match.
  7. xosview
    Enter in '/usr/X11R6/lib/X11/app-defaults/XOsview':
            xosview*network:          8000
    
    With that xosview displays at 100% of the whole capacity.
    Advantage: the packet 'ipfwadm' must be installed and Kernel must support IP accounting (CONFIG_IP_ACCT=y).

    This doesnīt seem to work with PPP, why?

Further documentation

ISDN as modem emulation

ISDN4Linux has a built- in model emulation, with which you can perform ISDN mailboxes but normal modem functions too.

As device you use now /dev/ttyI0 (or ttyI1 ... ttyI64) instead of /dev/modem. As initialisation string you use: ATZ&E123, where 123 is the own MSN, that is, telephone number.

See /usr/src/linux/Documentation/isdn/README.

Tip: Set in /etc/rc.config the variable I4L_IPROFD="yes". This daemon saves through AT&W0 the current configuration in /etc/isdnlog/modemsettings and sets it automatically at the next start.

Hints for ICN card

The D channel protocoll can be changed at this card only through a new firmware's load. For this serves the programme /sbin/icnctrl, see file://localhost/usr/src/linux/Documentation/isdn/README.

After the required modules' load, the firmware is to be loaded on the ICN:

Hint: the .bin files are located (currently) only in the source packet i4l_s in the path /usr/src/packages/i4l/isdn4k-utils-2.0/icn/download

The voice functions are at present not possible with the ICN card.

Bugs

Tested variations:

Missing

For not-S.u.S.E. Linux user

Of course you can use the described procedure too, if you have installed another distribution.

Simply create by hand the file /etc/rc.config and enter the values as described above. This file is all init scripts' central configuration file in the S.u.S.E. system. Advantage: Parameters (phone number, IP number etc.) and universally applicable programmes are separated from each other, you only need to save this file.

Hint on the used programmes:

Currently used programmes: You can provide yourself with the original S.u.S.E. i4l packet directly from the net too, packet: i4l.tgz, ftp://ftp.gwdg.de/pub/linux/install/suse/4.3/cd1/suse/n1. or the current S.u.S.E. version, e.g. ftp://ftp.gwdg.de/pub/linux/install/suse/4.4/cd1/suse/n1.

Here is the script /sbin/init.d/i4l:

#!/bin/sh
# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
#
# Authors (in alphabetic order) : 
#    Thomas Fehr, S.u.S.E. GmbH, Fuerth 
#    Klaus Franken, S.u.S.E. GmbH, Fuerth
#    Hubert Mantel, S.u.S.E. GmbH, Fuerth
#    Burchard Steinbild, S.u.S.E. GmbH, Fuerth
#
# Thanks to
#   Andre Beck, ABPSoft, XLink PoP Dresden 
#   Kai Grossjohann, 
#
# Version: 4.3 01.09.96 (kfr)
# Maintainer: kfr@suse.de
#
# /sbin/init.d/i4l
#
# Dont't forget to edit /etc/rc.config!
# For more informatione see:
#    /usr/doc/packages/i4l/* (especially README.SuSE)
#   /usr/src/linux/Documentation/isdn/*


. /etc/rc.config
test "$I4L_START" = yes || exit 0

case "$1" in
start)
    echo "Starting isdn4linux on device ${I4L_DEV}"

    #
    # load modules
    #
    if test ! -z "$I4L_TELES_IRQ"; then
        # load teles modules
        /sbin/modprobe isdn.o
        /sbin/modprobe teles.o teles_id=${I4L_TELES_ID} \
            
io=${I4L_TELES_MEMBASE},${I4L_TELES_IRQ},${I4L_TELES_PORT},${I4L_PRO
TOCOL}
            /sbin/lsmod | grep teles > /dev/null
            if test $? -eq 1; then
        echo ""
        echo "Initialization of Teles S0/16.x failed!"
        echo "Check that the values in '/etc/rc.config' are correct:"
        echo "I4L_TELES_MEMBASE:  ${I4L_TELES_MEMBASE}"
        echo "I4L_TELES_IRQ:      ${I4L_TELES_IRQ}"
        echo "I4L_TELES_PORT:     ${I4L_TELES_PORT}"
        echo "I4L_PROTOCOL:       ${I4L_PROTOCOL}"
        echo ""
        exit 1
        echo "never here"
        fi
    fi
    if test ! -z "$I4l_ICN_PORT"; then
        # load icn modules
        /sbin/modprobe isdn.o
        ICN_PAR="portbase=$I4l_ICN_PORT membase=$I4l_ICN_MEMBASE \
        icn_id=$I4l_ICN_ID"
        test -z "$I4l_ICN_ID2" ||
        ICN_PAR="$ICN_PAR icn_id2=$I4l_ICN_ID2"
        /sbin/modprobe icn "$ICN_PAR"
        /sbin/lsmod | grep icn > /dev/null
        if test $? -eq 1; then
        echo ""
        echo "Initialization of the ICN-modul failed!"
        echo "Check that the values in '/etc/rc.config' are correct:"
        echo "  and see /usr/src/linux/Documentation/README"
        echo "I4L_ICN_ID:      ${I4L_ICN_ID}"
        echo "I4L_ICN_ID2:     ${I4L_ICN_ID2}"
        echo "I4L_ICN_PORT:    ${I4L_ICN_PORT}"
        echo "I4L_ICN_MEMBASE: ${I4L_ICN_MEMBASE}"
        echo ""
        exit 1
        echo "never here"
        fi
    fi

    #
    # configure interfaces
    #
    for I in $NETCONFIG; do
        eval NETDEV=\$NETDEV$I
        eval IFCONFIG=\$IFCONFIG$I
        eval NETWORK=\$NETWORK$I
        eval GATEWAY=\$GATEWAY$I

        eval I4L_IDLETIME=\$I4L_IDLETIME$I
        eval I4L_CHARGEHUP=\$I4L_CHARGEHUP$I
        eval I4L_IHUP=\$I4L_IHUP$I
        eval I4L_DIALMAX=\$I4L_DIALMAX$I
        eval I4L_REMOTE_OUT1=\$I4L_REMOTE_OUT1$I
        eval I4L_REMOTE_OUT2=\$I4L_REMOTE_OUT2$I
        eval I4L_REMOTE_IN1=\$I4L_REMOTE_IN1$I
        eval I4L_REMOTE_IN2=\$I4L_REMOTE_IN2$I
        eval I4L_LOCALMSN=\$I4L_LOCALMSN$I
        eval I4L_DEBUG=\$I4L_DEBUG$I
        eval I4L_L2=\$I4L_L2$I
        eval I4L_L3=\$I4L_L3$I
        eval I4L_ENCAP=\$I4L_ENCAP$I
        eval I4L_SECURE=\$I4L_SECURE$I
        eval I4L_CALLBACK=\$I4L_CALLBACK$I
        eval I4L_CBDELAY=\$I4L_CBDELAY$I
        eval I4L_CBHUP=\$I4L_CBHUP$I

        case $NETDEV in
        ippp*|isdn*)
            # add the inteface $NETDEV:
            /sbin/isdnctrl addif $NETDEV 

            # define local MSN (phone number):
            /sbin/isdnctrl eaz $NETDEV ${I4L_LOCALMSN}

            # add numbers(s) to call out:
            test -z "${I4L_REMOTE_OUT1}" ||
            /sbin/isdnctrl addphone $NETDEV out ${I4L_REMOTE_OUT1}
            test -z "${I4L_REMOTE_OUT2}" ||
            /sbin/isdnctrl addphone $NETDEV out ${I4L_REMOTE_OUT2}

            # add numbers(s) allowed to call in:
            test -z "${I4L_REMOTE_IN1}" ||
            /sbin/isdnctrl addphone $NETDEV in  ${I4L_REMOTE_IN1}
            test -z "${I4L_REMOTE_IN2}" ||
            /sbin/isdnctrl addphone $NETDEV in  ${I4L_REMOTE_IN2}

            # the  layer-2 protocol:
            /sbin/isdnctrl l2_prot $NETDEV $I4L_L2

            # the  layer-3 protocol:
            /sbin/isdnctrl l3_prot $NETDEV $I4L_L3

            # encapsulation
            /sbin/isdnctrl encap $NETDEV $I4L_ENCAP

            # secure?, on = only defined numbers are allowed to call in
            /sbin/isdnctrl secure $NETDEV $I4L_SECURE

            # automatic hangup if idle:
            /sbin/isdnctrl huptimeout $NETDEV ${I4L_IDLETIME}

            # hangup before  next  charge  info?
            /sbin/isdnctrl chargehup $NETDEV $I4L_CHARGEHUP

            # set the number of dial atempts for each number
            test -z "$I4L_DIALMAX" ||
            /sbin/isdnctrl dialmax $NETDEV $I4L_DIALMAX

            # callback features
            /sbin/isdnctrl callback $NETDEV $I4L_CALLBACK
            /sbin/isdnctrl cbdelay $NETDEV $I4L_CBDELAY
            /sbin/isdnctrl cbhup $NETDEV $I4L_CBHUP

            # start iprofd
            test "$I4L_IPROFD" = "yes" &&
                /sbin/iprofd /etc/isdnlog/modemsettings
                
            # enable debugging
            test -z "$I4L_TELES_ID" || 
            /sbin/telesctrl ${I4L_TELES_ID} 1 ${I4L_DEBUG}

            # list the configuration:
            #/sbin/isdnctrl list $NETDEV
            ;;
        *)
            ;;
        esac

        #
        # configure net device
        #
        case $NETDEV in
        isdn*)
            echo "Setting up network device $NETDEV"
            ifconfig $NETDEV $IFCONFIG
            route add $NETWORK dev $NETDEV
            route add default gw $GATEWAY metric 1 dev $NETDEV
            ;;
        ippp*)
            echo "Setting up network device $NETDEV"
            ifconfig $NETDEV $IFCONFIG
            route add $NETWORK dev $NETDEV
            route add default gw $GATEWAY metric 1 dev $NETDEV
            # start ppp-daemon
            echo "Star ippp-daemon for ISDN device $NETDEV"
            /sbin/ipppd
            ;;
        *)
            ;;
        esac

    done
    # start isdnlog
    #/sbin/isdnlog -m16 /dev/isdnctrl0 2>> /var/log/isdncalls &
    /sbin/isdnlog -vw2 -m2048 -D /dev/isdnctrl0 
    # /var/log/isdncalls isn't the right place, but 'isdnrep' is
    # looking there :-(
    ;;
stop)
    echo "Shutting down isdn4linux..."   
    for I in $NETCONFIG; do
        eval NETDEV=\$NETDEV$I
        eval IFCONFIG=\$IFCONFIG$I
        eval NETWORK=\$NETWORK$I
        eval GATEWAY=\$GATEWAY$I

        case "$NETDEV" in
        isdn*)
            echo "Shutting down network device $NETDEV."
            ifconfig $NETDEV down
            ;;
        ippp*)
            # kill ipppd
            # (killall -INT should work, but it doesn't :-( )
            killall -INT /sbin/ipppd
            sleep 1 && killall -KILL /sbin/ipppd 2>/dev/null
            echo "Shutting down network device $NETDEV."
            ifconfig $NETDEV down
            ;;
        *)
            ;;
        esac
        /sbin/isdnctrl delif $NETDEV
    done
    # kill isdnlog
    if [ -e /var/run/isdnlog.pid ] ; then
        /bin/kill `/bin/cat /var/run/isdnlog.pid`
        # sometimes 'isdnlog' have no fun to go away :-(
        sleep 1 && bin/kill -9 `/bin/cat /var/run/isdnlog.pid` 2>/dev/null
        rm -f /var/run/isdnlog.pid
    fi
    # kill iprofd
    test "$I4L_IPROFD" = "yes" &&
        killall iprofd
    # unload modules
    if test ! -z "$I4L_TELES_IRQ"; then
        # unload teles-driver
        /sbin/modprobe -r teles
    fi
    if test ! -z "$I4l_ICN_PORT"; then
        # unload icn modules
        /sbin/modprobe -r icn 
    fi
    /sbin/modprobe -r isdn
    /sbin/modprobe -r slhc
;;
*)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
esac

---

See also:

---

Keywords: ISDN, HOWTO

---

Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-kfr_39)

---

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

SDB-kfr_39, Copyright SuSE GmbH, Nuremberg, Germany - Version:
Impressum - Last generated: 24. Feb 1999 14:55:24 by maddin with sdb_gen 1.00.0