2 LFS VERSION: 3.3 and higher
3 AUTHOR: Eric Dillenseger <eric@naxalite.homelinux.org>
6 Setting up ISDN on LFS and using ISDN4Linux.
15 2° Setting up ISDN support in the linux kernel.
16 3° Installing ISDN4Linux
17 4° Configuring ISDN interfaces
23 For this hint I used a 2.4.18 kernel and isdn4k-utils.v3.1pre1
25 -Linux kernel sources at http://kernel.org
26 -ISDN4Linux at http://www.isdn4linux.de
27 (requires sgml2html for FAQ installation and gdbm for isdnlog)
28 -Know how to compile a kernel
31 2° Setting up ISDN support in the linux kernel.
32 -----------------------------------------------
34 I suppose you have the source for your kernel in /usr/src/linux
35 We start from a clean source by runing:
39 Now you can choose your own way to configure it (config/menuconfig/xconfig).
44 There you set up your configuration the way you want it.
45 For ISDN support, you need to go in 'ISDN subsytem' then select
46 -'ISDN support' as a module <M>
47 (Activates ISDN subsystem)
48 -'Support synchronous PPP' <Y>
49 (To use synchronous transmit on ISDN line)
50 -'Use VJ-compression with synchronous PPP' <Y>
51 (Van Jacobson compression)
52 -'Support generic MP (RFC 1717)' <Y>
53 (To be able to connect at 128k)
54 -'Support BSD compression' as a module <M>
57 Depending on your card, choose the appropriate driver from
60 It depends of your card' chipset.
62 I have an Olitec card with ISDN 128 Gazel chipset so:
64 +->HiSax SiemensChipset driver support <M>
65 |+->HiSax support for EURO/DSS1 <Y>
68 Once again, this is my configuration, adapt to yours.
71 If you have an Olitec 128 RNIS PCI card (like me), there's a little trick
72 to make it work before compiling the new kernel.
73 Here it is for 2.2.17 kernel:
77 there should be an entry like
79 Network controler : PLX Unknown device?
80 Vendor id=10b5. Device id=1187
82 Write down this device id and go to /usr/src/linux/drivers/isdn/hisax
83 edit gazel.c and replace
84 #DEFINE GAZEL_R753 0x1152
86 #DEFINE GAZEL_R753 0x1187
89 go to /usr/src/linux/include/linux
90 edit pci_ids.h and replace line 766
91 #define PCI_DEVICE_ID_PLX_R753 0x1152
93 #define PCI_DEVICE_ID_PLX_R753 0x1187
95 Don't ask me where to find it for other kernel, i don't know.
96 But it seems that they're keeping the 2.4.18 way.
97 Let's see how it'll be in 2.6.x next year (or maybe 2004 ;)
99 Ok, now we can compile the kernel as usual:
101 #: make dep && make bzImage && make modules && make modules_install
103 copy the kernel to /boot
105 #: cp arch/i386/boot/bzImage /boot/lfskernel-isdn
106 #: cp System.map /boot/System.map-isdn
107 #: rm /boot/System.map
108 #: ln -s /boot/System.map-isdn /boot/System.map
110 Edit /etc/lilo.conf to reflect the new configuration
112 # Begin /etc/lilo.conf
117 install=/boot/boot-menu.b
121 image=/boot/lfskernel-isdn
124 image=/boot/lfskernel
130 Then run lilo to update the mbr
136 And now, the moment of truth, reboot your system.
137 Log in as root, and type:
139 #: modprobe hisax type=xx protocol=x
141 Replace by the values corresponding to your card, in doubt, read
142 /usr/src/linux/Documentation/isdn/README.hisax
143 It should load without problem.
145 3° Installing ISDN4Linux
146 ------------------------
148 Unpack the source in a directory:
150 #: tar xzf isdn4k-utils.v3.1pre1.tar.gz
152 go to the new directory and run:
156 This brings you to a screen looking like menuconfig for the kernel.
157 There you can choose what you want to enable/disable and set the path where
158 the stuff will be installed.
159 Use help anytime if you don't know the meaning of an item.
160 Once you're done, you may save your config to a file for further use or
161 simply exit. The program will configure everything.
163 #: make && make install
165 At the end of make install, devices are automatically created.
167 #: ls /dev/ippp* && ls /dev/isdn*
169 Should show them, and you should have isdnctrl, hisaxctrl and ipppd in /sbin
171 4° Configuring ISDN interfaces
172 ------------------------------
174 First, we're going to write the config file for isdnctrl that will set ippp0
175 interface for single channel connection.
176 Feel free to modify it to suit your needs.
178 /etc/isdn/isdn1B.conf
183 EAZ = <EAZ> #this is your line number w/o <>
184 PHONE_OUT = <ISP> #this is the phone number of your ISP
198 for dual channel connection:
200 /etc/isdn/isdn2B.conf
235 Now we can test our configuration by passing the file to isdnctrl with:
238 #: ln -s isdn1B.conf device.conf
239 #: isdnctrl readconf /etc/isdn/device.con
241 You should see something like:
243 #:> isdnctrl readconf device.conf
245 EAZ/MSN for ippp0 is <EAZ>
246 Security for ippp0 is on
247 Dialmax for ippp0 is 1 times.
248 Hangup-Timeout for ippp0 is 180 sec.
249 Incoming-Hangup for ippp0 is on
250 Charge-Hangup for ippp0 is off
251 Layer-2-Protocol for ippp0 is hdlc
252 Layer-3-Protocol for ippp0 is trans
253 Encapsulation for ippp0 is syncppp
254 Slave-activation delay for ippp0 is 10 sec.
256 ISDN Configuration read from device.conf.
258 Now you should be able to connect to internet. You have no gateway
259 or nameserver set so you may not browse the net.
262 #: isdnctrl dial ippp0
264 To erase this configuration, type
266 #: isdnctrl delif ippp0
268 Now we're going to set some startup script to automate the configuration
269 of ipppd daemon. ipppd expect to find a file called ioptions in /etc/ppp
270 even if it's empty so create it to avoid some errors:
272 #: touch /etc/ppp/ioptions
274 For one channel (64kb):
278 # Begin /etc/isdn/ioptions1B
284 name !!login-name!! # replace with your ISP login name
286 # End /etc/isdn/ioptions1B
288 For two channels (128kb):
292 # Begin /etc/isdn/ioptions2B
300 name !!login-name!! # replace with your ISP login name
302 # End /etc/isdn/ioptions2B
304 Now we need to create a chap-secrets or pap-secrets file.
307 #: echo "\"login-name\" * \"password\"" > /etc/ppp/chap-secrets
308 #: chmod 600 /etc/ppp/chap-secrets
310 As this file contains our login/password for our ISP, we don't want everybody
311 to be able to read them.
312 At this point, don't forget to add users who will be able to connect to
313 internet to the dialout group:
315 #: usermod -G dialout user
317 Check the rights on /dev/isdninfo and /dev/isdnctrl*
318 All should belong to user root and group dialout and be crw-rw----
319 except /dev/isdnctrl wich is a symlink to /dev/isdnctrl0
322 crw-rw---- 1 root dialout 45, 255 nov 3 20:14 /dev/isdninfo
324 lrwxrwxrwx 1 root dialout 9 nov 3 20:14 /dev/isdnctrl -> isdnctrl0
326 crw-rw---- 1 root dialout 45, 64 nov 3 20:14 /dev/isdnctrl0
329 #: chown root:dialout /dev/isdninfo
330 #: chmod 660 /dev/isdninfo
331 #: chown root:dialout /dev/isdnctrl
333 Now we can start ipppd to see if everything works fine:
335 #: ipppd file /etc/isdn.ioptions1B
336 #: ps aux | grep ipppd
337 root 4705 0.0 0.2 2088 1068 ? S 21:10 0:00 ipppd file /etc/i
339 This means that everything is ok, you can check your logs to be sure, I'm using
340 metalog so I give you the files from sysklogd from my old debian:
341 in /var/log/kern.log:
342 Nov 3 15:56:38 naxalite kernel: ippp, open, slot: 0, minor: 0, state: 0000
343 Nov 3 15:56:38 naxalite kernel: ippp_ccp: allocated reset data structure c4f29
344 Nov 3 15:56:38 naxalite kernel: ippp_ccp: freeing reset data structure c384080
345 Nov 3 15:56:38 naxalite kernel: ippp0: dialing 1 0860095557...
346 Nov 3 15:56:40 naxalite kernel: isdn_net: ippp0 connected
348 This shows a succesfull connection.
349 in /var/log/messages:
350 Nov 3 15:56:38 naxalite ipppd[231]: reinit_unit: 0
351 Nov 3 15:56:38 naxalite ipppd[231]: Connect[0]: /dev/ippp0, fd: 8
352 Nov 3 15:56:38 naxalite kernel: ippp0: dialing 1 ...
353 Nov 3 15:56:40 naxalite ipppd[231]: Local number: , Remote number: , Type: out
354 Nov 3 15:56:40 naxalite kernel: isdn_net: ippp0 connected
355 Nov 3 15:56:40 naxalite ipppd[231]: ChapReceiveChallenge: Rcvd id 27.
356 Nov 3 15:56:40 naxalite ipppd[231]: ChapReceiveChallenge: received name field:
357 Nov 3 15:56:41 naxalite ipppd[231]: ChapReceiveSuccess: Rcvd id 27.
358 Nov 3 15:56:41 naxalite ipppd[231]: MPPP negotiation, He: Yes We: Yes
359 Nov 3 15:56:41 naxalite ipppd[231]: CCP enabled! Trying CCP.
360 Nov 3 15:56:41 naxalite ipppd[231]: ccp_resetci!
361 Nov 3 15:56:41 naxalite ipppd[231]: Compressor BSD Compress loaded!
362 Nov 3 15:56:41 naxalite ipppd[231]: ccp_resetci!
363 Nov 3 15:56:41 naxalite ipppd[231]: Compressor BSD Compress loaded!
364 Nov 3 15:56:41 naxalite ipppd[231]: local IP address 212.83.145.79
365 Nov 3 15:56:41 naxalite ipppd[231]: remote IP address 212.47.226.2
367 This shows ipppd connection.
369 Now we almost have a working internet connection via ISDN, we just need to
370 setup some system boot scripts to load ipppd and set the default gateway on
373 #: touch /etc/rc.d/init.d/hisax
375 Edit /etc/rc.d/init.d/hisax
378 # Begin of /etc/rc.d/init.d/hisax
381 /sbin/modprobe hisax type=34 protocol=2
382 /sbin/isdnctrl readconf /etc/isdn/device.conf
383 /sbin/ipppd file /etc/isdn/ioptions1B
386 /sbin/ifconfig ippp0 down
387 /sbin/isdnctrl delif ippp0
395 echo "Usage: $0 {start|stop|restart}"
401 # End /etc/rc.d/init.d/hisax
405 #: chmod +x /etc/rc.d/init.d/hisax
407 Link it to the differents runlevels, replace XX by the levels tou want:
409 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc0.d/KXXhisax
410 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc1.d/KXXhisax
411 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc2.d/KXXhisax
412 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc3.d/SXXhisax
413 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc4.d/SXXhisax
414 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc5.d/SXXhisax
415 #: ln -sf /etc/rc.d/init.d/hisax /etc/rc.d/rc6.d/KXXhisax
417 We need to define a gateway:
419 /etc/ppp/ip-down.local
422 # Begin of /etc/ppp/ip-down.local
423 route add default dev ippp0
424 # End of /etc/ppp/ip-down.local
426 Now we can create a small script to dial/hangup or check the status of
433 /sbin/isdnctrl dial ippp0
436 /sbin/isdnctrl hangup ippp0
439 /sbin/isdnctrl list ippp0 | egrep "Dial mode|Hangup-Timeout" \
440 && /sbin/isdnctrl status ippp0
443 echo "Usage: $0 {on|off|info}"
451 #: chmod +x /bin/isdn
453 Don't forget to set tour nameservers in /etc/resolv.conf and check
454 /etc/sysconfig/network-devices/ifconfig.ethX for GATEWAY=xxx.xxx.xxx.xxx
456 I wrotte this hint while installing isdn4linux on my box without problem.
457 I repeat it again, the main problem comes from your chipset and how you load
458 the hisax module. Check your reseller or the card box to figure out wich
459 chipset your card use.
461 If you have an ISA/PnP card, dont forget to add io= and irq= to modprobe
462 (cat /proc/isapnp is your friend)
464 You may create /etc/isapnp.conf with pnpdump:
466 #: pnpdump > /etc/isapnp.conf
468 For more information, check the kernel documentation, isdn4linux website,
469 newsgroups, IRC, google, etc.
474 Well, we're done, we have a working ISDN connection.
475 This document is a very beta version, it may contain some erros, feel free to
476 mail me any correction or addition I should/may add.
477 If you have question, I may try to help you in the scope of my little knowledge
478 but don't expect too much ;)
480 Some script from this document are from a french document written by
481 Philippe Latu, and the adaptation to LFS and is from me ;p
483 I hope this document helped you.