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

Re: isdn, kisdn and ipppd




Hello Avi,

First of all, welcome to Linux.

Now for some work.
In order for your ISDN card to work you need to do the following:
1. Make sure your kernel supports it. 
2. Make sure you have the needed binaries on your system
3. Edit the scripts that you need in order to dial and hangup
4. Surf the net at ISDN speed.

Lets take it from the top:
1. Make sure your kernel supports it.

The Linux kernel has a lot of sub-systems and drivers in it.
For ISDN to work you need the ISDN sub-system compiled into the kernel or
loaded as a module.
For AVM Fritz! PCI you need a driver called HiSax to exist in your kernel
(either loaded as a module or compiled into the kernel).

IIRC, Redhat makes every module possible available on the generic system,
so if you are lucky, you already have this on your system.
To check, login as root and write:
   modprobe hisax type=27 protocol=2
This makes the kernel load a module called hisax and passes two
parameters: type=27 , which means AVM Fritz!PCI
           protocol=2 , which means you are not using the card in Germany.

When you write "lsmod" you should see a list of all the modules loaded,
and among them - this module.
When you write "dmesg" or check /var/log/messages you should see any
messages the module wrote on loading.

2. Make sure you have the needed binaries on your system
Once we've established that the kernel can use the card, we need to add
user programs to call the kernel API and use the card.
For this, we need isdn4k-utils.
The package you downloaded is a tar.gz file, which translates to a zip
file to the average Windows user. Breaking down the suffix, .tar means it
is an archive made by a program called tar and .gz means it was gzipped
(using gzip).
One way to open this up is to run
   tar xfz <filename>

BUT.
This file probably contains Source Code, and it doesn't know how to
install itself (like RPM). <grin> Real Linux users make their own RPM
packages </grin>, but newbies are allowed to download them from freshmeat
( http://www.freshmeat.net ) or from ftp://contrib.redhat.com (or any
mirror thereof).

You could try to use the file you got. Read the READMEs and all and any
configuration documents you can find in the package. A background in
programming will help.

3. Create the scripts that you need in order to dial and hangup
Here is the deal:
In order to connect to anything, you need a networking device to be
active.
This device is created using the isdnctrl program (in the isdn4k-utils
package). After you create the device, you need to initialize certain
parameters, after which you can dial out.
The TCP/IP connection from your computer to the ISP is provided by a
program called ipppd (also from the isdn4k-utils package). This program is
in charge of passing any information over the device using PPP.

<Note>You need to make a script that does this for you</Note>

Also, everything I have written here can be found in the man pages 
man isdnctrl
man ipppd
man ifconfig

and in the HOWTOs and isdn4k-utils documentation.
All the options I put here are what I think are good for you.
DON'T TRUST ME. MAKE UP YOUR OWN MIND AND READ THE DOCUMENTATION.

So:
After you insert the module into your kernel (using modprobe, see above),
you write (as root)
isdnctrl addif ippp0
isdnctrl eaz ippp0 <your ISDN phone number>
isdnctrl addphone ippp0 out <your ISP ISDN phone number - where you want 
                             to dial to>
isdnctrl huptimeout ippp0 60
isdnctrl encap ippp0 syncppp
isdnctrl l2_prot ippp0 hdlc
isdnctrl l3_prot ippp0 trans
isdnctrl verbose ippp0 2

Now that we have finished setting up the ISDN card, we take care of
regular networking details:

ifconfig ippp0 10.0.0.1 pointtopoint 10.0.0.2
ifconfig ippp0 up

After this, the ippp0 device is defined and (after setting up ipppd) we
are ready to dial out.

Setting up ipppd:
(man ipppd)
1.Add your password to /etc/ppp/chap-secrets or /etc/ppp/pap-secrets
  (whatever your ISP uses).
2.Create an options file for ipppd (usually /etc/ppp/ioptions, but consult
  the man page) that has the needed switches. For example:

lock
user <your username>
noipdefault
defaultroute
ipcp-accept-local
ipcp-accept-remote

3. When you connect to your ISP, the username will be taken from this file
   and the password will be taken from pap-secrets or chap-secrets.
4. Run ipppd as follows
ipppd file /etc/ppp/ioptions /dev/ippp0
5. Connect to the net
isdnctrl dial ippp0

Disconnecting is easy too.
Just "isdnctrl hangup ippp0"

All the steps (except the actual connection and disconnection) need only
be done once per reboot.

Good Luck,
    Lior Okman


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il