ISDN and Linux—Surfing at Warp Speed
There are a number of ISDN network adapters on the market. As the Linux kernel advances to 2.2, additional devices are being supported by the Linux built-in ISDN support. I should mention that an ISDN network adapter is not a modem. It does not consume a serial port and thus does not have the speed limitations problems of a serial port. One such ISDN network adapter is the SpellCaster DataCommute/BRI. SpellCaster is a Canadian company that is developing the Linux driver and is targeting the Linux market for their product. The card was reviewed recently in the October 1997 issue of Linux Journal.
An ISDN network adapter is an ideal solution for someone who cannot afford a full-fledged ISDN router and who does not want to be bogged down by a serial port's overhead. ISDN Network Adapters typically have high throughput compared to an ISDN modem. For example, the SpellCaster card uses a 16K memory buffer to transfer data from the ISDN line to the system and so generates fewer interrupts. Also, the card is not limited to 115K of a serial port. A two-B channel connection with an ISDN network adapter is usually at the full 128K speed. Yes, there are now higher speed serial ports; however, any non-intelligent serial card requires the processor's attention more often than an ISDN network adapter.
An ISDN network adapter can also be used to roll your own ISDN router; out of Linux. Linux's firewall support is exceptional. This, perhaps, can give that old 386-40 a new lease on life. An ISDN modem also can be used to roll out a router, however, an intelligent serial card would be required to get comparable performance.
To demonstrate the setup of an ISDN network adapter, I will discuss the installation and use of the SpellCaster DataCommute/BRI. The DataCommute uses the ISDN4Linux support of the 2.x kernels. At the time of this writing, SpellCaster is hard at work on a new driver named Babylon, currently available in beta release. It promises to provide additional functionally and overcome some of the shortcomings of ISDN4Linux. Babylon also promises to be easier to set up as the biggest hurdle in getting the DataCommute to work is understanding the ISDN4Linux operation.
The same test system was used to test the SpellCaster DataCommute/BRI. Both dedicated and dial-up situations were tried again to UUNET Canada's ISDN service. The dedicated setup proved to be very fast. Transfer rates greater then an ISDN router were observed.
Setting up the SpellCaster DataCommute/BRI:
Compile your 2.x kernel with ISDN support. Run make config and say YES to: “ISDN Support”, “Support Synchronous PPP”, “Use VJ-compression with Synchronous PPP” and “Support generic MP”. Compile and install the new kernel.
Download the current driver and the ISDN4Linux support files from the SpellCaster web page (see Resources). The driver is the one named scis not dcbri.
Extract the driver and compile it by typing make in the driver's /src directory. This creates two executable files, scctrl and sctrace, along with the driver module, sc.o. Use scctrl to configure the DataCommute for the correct ISDN switch type and SPIDs.
As root, run make install to install the driver to the /lib/modules directory. Change the setup for your Linux distribution to have the driver load automatically on the next boot and then insert it into memory for this session (e.g., insmod sc.o).
Extract the ISDN4Linux package and compile it by typing make. As root, run make install to install the ISDN4Linux files. This will place ipppd and isdnctrl in the /sbin directory along with other programs. ipppd is the synchronous version of pppd. isdnctrl sets up the ISDN interface and talks to ipppd to control the ISDN link.
Perform the following tasks with scctl as root:
Reset the DataCommute by typing scctl -r. All the lights on the back of the card will go out.
Start the firmware on the card by typing scctrl -g. The top light on the card will flash to indicate the firmware is running.
Program the ISDN switch type by typing scctl -w NI1 (Use your telco's switch type here; type scctl -h to see the available switch types.)
Program the SPIDs and directory numbers:
scctl -c 1 -s 4165551234 -d 5551234\ - the first channel scctl -c 2 -s 4165551235 -d 5551235\ - the second channel
If all went well, the top light on the card will be flashing and the rest of the lights will be on, indicating the card has negotiated with the ISDN switch successfully. Running scctl -u will also show the card's status. The Switch Status will show CONNECTED. Some patience is required, as the negitiation between the ISDN switch and your card can take up to two minutes.
Note that once the card has been programmed for the ISDN switch type and SPIDs, it need not be done again unless new firmware is loaded into the card. Thus, the above is only done once and not every time the system is booted.
Open another VT or Xterm and run tail<\!s>-f<\!s>/var/log/messages. This will give a constant output of the syslog file. ipppd outputs all debug information to the syslog, and it's handy to see what's going on while initially setting up the connection.
Type in the script shown in Listing 4, making the changes to the phone numbers, etc., where appropriate, and save it as isdnsetup. This script sets up the ISDN subsystem and runs ipppd.
Finally, do steps 11 and 12 from the list shown earlier for setting up Bitsurfr Pro.
Assuming everthing has gone well, run:
isdnctrl dial ippp0
to dial up your ISP. If you have configured two B channels, type:
isndctrl addlink ippp0to bring up the second channel. To kill the connection at any time, type:
isdnctrl hangup ippp0Incidentally, the above procedure is by no means the standard for configuring the ISDN subsystem and setting up a connection. With some experimentation in the case where a dedicated link is used, it should be possible to set up the link when the system is booted. Check the man page for isdnctrl for additional information. Be sure to disable the debug feature in the isdnsetup script once everything is working to avoid filling up the syslog file.
There is one more thing to note about using the card. Some PCI systems require that the BIOS be set up to reserve the IRQ and memory space for the DataCommute/BRI; this was true in the case of our test system. Generally, this is in the system setup under some form of Plug and Play menu. Otherwise, this card just works and is well worth the money.
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- New Products
- Users, Permissions and Multitenant Sites
- Flexible Access Control with Squid Proxy
- Security in Three Ds: Detect, Decide and Deny
- High-Availability Storage with HA-LVM
- DevOps: Everything You Need to Know
- Tighten Up SSH
- Non-Linux FOSS: MenuMeters
- Solving ODEs on Linux
- diff -u: What's New in Kernel Development