Using ISDN in FreeBSD

When I had to move from my beloved cable modem link to areas so rural that ADSL was but a faint promise from the big city, I decided that ISDN was the least I should treat myself to, in ways of bandwidth. OK, there's isdn4bsd, (ISDN for FreeBSD) which is the utility to use if you have installed an internal ISDN card, but rumour (and thousands of disgruntled FBSD users) find isdn4bsd somewhat difficult to configure.

The easier alternative is to use an external ISDN modem, a terminal adapter. The T/A will use the traditional PPP protocol to communicate with the network, and can be set up the same way. The difference (hopefully) is the increase in speed (64 or 128 K/second).

My T/A is a Dynalink TAS 400E, and this is significant mainly concerning the modem initialization string in the /etc/ppp/ppp.conf file. Other than that, most of the settings here mentioned, can be used as they are. But, as always, YMMV and you replace the values with your own, do your own footwork and look before you cross.

First

A T/A is installed the same way as an ordinary modem, the same connections and the same ports. Refer to your T/As documentation.

Files

At time of writing, I was using FreeBSD 4.4-stable. This is the files I edited for use with ISDN/PPP:

In /etc/host:

hosts
bind

In /etc/resolv.conf :
(Naturally, here is where you enter your ISPs domain and primary and secondary nameserver. You knew that, right?)

domain c2i.net
nameserver 193.216.1.10
nameserver 193.216.69.10

I'm not sure the options and ppp.linkup files are needed anymore, but hey.

In /etc/ppp/options:

/dev/cuaa0 115200
crtscts
modem
passive
noipdefault
defaultroute
domain c2i.net

Notes:

If your ISP uses PAP or CHAP authentification, you put the following in the /etc/ppp/pap-secrets or /etc/ppp/chap-secrets file:
"yourusername with your ISP" * "Password"

...but these things go in the most important file anways, namely

/etc/ppp/ppp.conf

The defaults are fine to a degree (except username, phone number and password, of course) but I hereby give you my file, with the alterations I have made.
#################################################################
# PPP  Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.2.2.5 2001/07/13 10:55:23 brian Exp $
#################################################################

default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)

 # Ensure that "device" references the correct serial port
 # for your modem. (cuaa0 = COM1, cuaa1 = COM2)
 #
 set device /dev/cuaa0 

 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
           \"\" AT OK-AT-OK ATE1Q0 OK \\dATB4DT\\T TIMEOUT 40 CONNECT"
 set timeout 0			# 3 minute idle timer is the default,
                                                                        #0 means never time out.
 enable dns				# request DNS info (for resolv.conf)
 #enable chap
 accept PAP #exactly what it says

tele2:
 deny lqr
 set phone 150221312064
 set authname myusername
 set authkey mypassword

 set openmode active 5
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR			# Add a (sticky) default route
Things to note: