Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Aug 1997 18:47:07 +0200 (MET DST)
From:      Dick van den Burg <burg@is.ge.com>
To:        marc@bowtie.nl
Cc:        Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>, peter@grendel.IAEhv.nl (Peter Korsten), hackers@FreeBSD.ORG
Subject:   Re: ISDN drivers/cards 
Message-ID:  <199708101647.SAA29206@burg.is.ge.com>
In-Reply-To: <199708100859.KAA27622@nietzsche.bowtie.nl>
References:  <199708091332.PAA00255@helbig.informatik.ba-stuttgart.de> <199708100859.KAA27622@nietzsche.bowtie.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is how I did it ....:
$Id: bisdn-howto.txt,v 1.3 1997/07/15 18:46:57 burg Exp $

HOW TO use the bisdn package with FreeBSD.

1. fetch ftp://ftp.muc.ditec.de/isdn/bisdn-097.tar.gz
   fetch ftp://ftp.muc.ditec.de/isdn/BISDN-ppp-FreeBSD2.2.tgz
   fetch ftp://ftp.muc.ditec.de/isdn/bisdntest-2.tar.gz

   Read and follow the instruction in the README in bisdntest-2.tar.gz
   This will give you a new kernel with support for the ISDN adapter.

2. Read the instruction in Readme.PPP and do only the bisdnd and isdnpppd
   parts of the instruction. The kernel has already been built in step 1.


10. Configure bisdnd. The following examples are from my setup:
   I have a local lan (10.228.100.0) and I want to connect (only from
   my host) to my ISP with dynamic IP addresses and to my place of work
   where I have a fixed IP address.

   The entry in /etc/bisdn/bisdnd.cfg for the fixed IP address:

   ############################################################################
   
   entry                           # this keyword starts a configuration entry
                                   # =========================================
   name         = WORK             # symbolic name for this entry/link
                                   # any alphanumeric value, just for identificatio
   n
   interface    = ippp1            # name of the interface / service
                                   # possible entries for interface are:
                                   # ipi<n> IP over ISDN, <n> = i/f number
                                   # tty    login via a tty
                                   # answ   telephone answering
                                   # play   telephone playback
   controller   = 0                # controller number to use for outgoing calls
                                   # (is configured by the 'isdntype' keyword)
   isdntype     = dss1             # isdn protocol type for this controller
                                   # possible values are '1tr6' and 'dss1'
   telnrem-ldo  = 0203334444       # telephone number used to dial out to the
                                   # remote site
   telnrem-rdi  = 999              # telephone number used to detect/verify a
                                   # remote site calling into the local system
                                   # a '*' indicates anyone can call in
   telnloc-ldo  = 070111222       # my own local telephone number used to tell
                                   # the remote site who i am when dialing out.
                                   # (in case of the 1TR6 protocol this must be
                                   #  the local systems 'EAZ')
   telnloc-rdi  = 999              # my own local telephone number used to verify
                                   # me as a correct destination when i'm called
                                   # by a remote site.
                                   # (in case of the 1TR6 protocol this must be
                                   #  the local systems 'EAZ')
   reaction     = reject   # what to do when remote site calls in
                                   # possible values are:
                                   # accept     - accept incoming call
                                   # reject     - reject incoming call
                                   # callback   - hangup and call back
                                   # calledback - after dialing i'm called back
                                   # alert      - only Juergen knows ...
   
   protocol     = raw              # protocol to use for this link, values:
                                   # raw - raw HDLC frames
                                   # ui  - ui frames
                                   # x75 - X.75 encapsulation
                                   # t70 - T.70 protocol
                                   # t90 - T.90 protocol
                                   # iso - ISO 8208 protocol
   dialretries  = 3                # number of retries when dialing out
                                   #
   recoverytime = 5                # time in seconds to wait between dial retries
                                   #
   callbackwait = 5                # time in seconds to wait before attempting
                                   # to call back a site which will be called back
                                   # by this site
   idletime-in  = 180              # close incoming connection after being idle
                                   # this time in seconds
   idletime-out = 120              # close outgoing connection after being idle
                                   # this time in seconds
   unitlength-dyn = off            # calculate the idle time for outgoing
                                   # connections dynamically based on the time
                                   # between two charging units. possible values
                                   # are either 'on' or 'off'.
   blocksize    = 1900             # max number of byte for an isdn block
                                   #
   ratetype     = 1                # which rate entry to use from bisdnd.rates
   changeproc = "|/etc/bisdn/start_ppp_%D %N %I" #
   ############################################################################
   
The entry for my ISP:
   
   ############################################################################
   
   entry                           # this keyword starts a configuration entry
                                   # =========================================
   name         = Euronet          # symbolic name for this entry/link
                                   # any alphanumeric value, just for identificatio
   n
   interface    = ippp0            # name of the interface / service
                                   # possible entries for interface are:
                                   # ipi<n> IP over ISDN, <n> = i/f number
                                   # tty    login via a tty
                                   # answ   telephone answering
                                   # play   telephone playback
   controller   = 0                # controller number to use for outgoing calls
                                   # (is configured by the 'isdntype' keyword)
   isdntype     = dss1             # isdn protocol type for this controller
                                   # possible values are '1tr6' and 'dss1'
   #telnrem-ldo  = 08450798667     # telephone number used to dial out to the
   telnrem-ldo  = 0793600111       # telephone number used to dial out to the
                                   # remote site
   telnrem-rdi  = 999              # telephone number used to detect/verify a
                                   # remote site calling into the local system
                                   # a '*' indicates anyone can call in
   telnloc-ldo  = 070111222       # my own local telephone number used to tell
                                   # the remote site who i am when dialing out.
                                   # (in case of the 1TR6 protocol this must be
                                   #  the local systems 'EAZ')
   telnloc-rdi  = 999              # my own local telephone number used to verify
                                   # me as a correct destination when i'm called
                                   # by a remote site.
                                   # (in case of the 1TR6 protocol this must be
                                   #  the local systems 'EAZ')
   reaction     = reject   # what to do when remote site calls in
                                   # possible values are:
                                   # accept     - accept incoming call
                                   # reject     - reject incoming call
                                   # callback   - hangup and call back
                                   # calledback - after dialing i'm called back
                                   # alert      - only Juergen knows ...
   protocol     = raw              # protocol to use for this link, values:
                                   # raw - raw HDLC frames
                                   # ui  - ui frames
                                   # x75 - X.75 encapsulation
                                   # t70 - T.70 protocol
                                   # t90 - T.90 protocol
                                   # iso - ISO 8208 protocol
   dialretries  = 3                # number of retries when dialing out
                                   #
   recoverytime = 5                # time in seconds to wait between dial retries
                                   #
   callbackwait = 5                # time in seconds to wait before attempting
                                   # to call back a site which will be called back
                                   # by this site
   idletime-in  = 180              # close incoming connection after being idle
                                   # this time in seconds
   idletime-out = 120              # close outgoing connection after being idle
                                   # this time in seconds
   unitlength-dyn = off            # calculate the idle time for outgoing
                                   # connections dynamically based on the time
                                   # between two charging units. possible values
                                   # are either 'on' or 'off'.
   blocksize    = 1900             # max number of byte for an isdn block
                                   #
   ratetype     = 1                # which rate entry to use from bisdnd.rates
                                   #
   changeproc = "|/etc/bisdn/start_ppp_%D %N %I" #
   #===========================================================================
   ############################################################################
   
The current bisdnd has some prblems with parsing the changeproc entries and
currently does not allow more than one changeproc entry. The following
patches are a workaround. You only need those patches when you have more
than one destination.
   
   diff -r -c -P bisdn/bisdnd/config.c bisdn.old/bisdnd/config.c
   *** bisdn/bisdnd/config.c	Sun Jul 13 21:01:15 1997
   --- bisdn.old/bisdnd/config.c	Sun Jul 13 19:12:08 1997
   ***************
   *** 232,238 ****
     
     		else if((!strncmp(buffer, CF_CHANGEPROC, strlen(CF_CHANGEPROC))) && (mode == MODE_ENTRY))
     		{
   ! 			if((handle_eflag(&flags, FL_CHANGEPROC, CF_CHANGEPROC, config_entries, line)) == ERROR)
     				goto config_error;
     			if((optstr(buffer, &conf[config_entries].changeproc[0], 0, line)) == ERROR)
     				goto config_error;
   --- 232,238 ----
     
     		else if((!strncmp(buffer, CF_CHANGEPROC, strlen(CF_CHANGEPROC))) && (mode == MODE_ENTRY))
     		{
   ! 			if((handle_sflag(&sflags, FL_CHANGEPROC, CF_CHANGEPROC, line)) == ERROR)
     				goto config_error;
     			if((optstr(buffer, &conf[config_entries].changeproc[0], 0, line)) == ERROR)
     				goto config_error;
   ***************
   *** 784,797 ****
     		ptr++;
     
     	bptr = dest;
   ! 	if (*ptr == '"') {
   ! 	    *bptr++ = *ptr++;
   ! 	    while (*ptr && (*ptr != '"'))
     		*bptr++ = *ptr++;
   ! 	}
   ! 	else
   ! 		while (*ptr && (*ptr != '#') && (isprint(*ptr)) && (!isspace(*ptr)))
   ! 			*bptr++ = *ptr++;
     	*bptr = '\0';
     	return(GOOD);
     }
   --- 784,793 ----
     		ptr++;
     
     	bptr = dest;
   ! 
   ! 	while (*ptr && (*ptr != '#') && (isprint(*ptr)) && (!isspace(*ptr)))
     		*bptr++ = *ptr++;
   ! 
     	*bptr = '\0';
     	return(GOOD);
     }
   diff -r -c -P bisdn/bisdnd/mux.c bisdn.old/bisdnd/mux.c
   *** bisdn/bisdnd/mux.c	Sun Jul 13 19:03:25 1997
   --- bisdn.old/bisdnd/mux.c	Sun Jul 13 19:12:08 1997
   ***************
   *** 326,332 ****
     		  for(i=4;i<m;i++) {
     		    close(i);
     		  }
   ! 		  execv(argv[0],argv);
     		  /* This shouldn't return if it did ...*/
     		  /* CAN'T USE STDIO ANYMORE !!! */
     		  { 
   --- 326,332 ----
     		  for(i=4;i<m;i++) {
     		    close(i);
     		  }
   ! 		  execv(command,argv);
     		  /* This shouldn't return if it did ...*/
     		  /* CAN'T USE STDIO ANYMORE !!! */
     		  { 

4. Bring up the interface. I have added the following to rc.conf

   network_interfaces="lo0 ed1 ppp0 ppp1"  # List of network interfaces
   ifconfig_lo0="inet 127.0.0.1"   # default loopback device configuration.
   ifconfig_ed1="inet 10.228.100.2 netmask 0xfffffc00"
   ifconfig_ppp0="inet 194.134.9.27  194.134.2.1 netmask 0xffffff00 up"
   ifconfig_ppp1="inet 10.98.240.2  10.98.240.1 netmask 0xfffffc00 up"

   For the ISP (194.134.0.0) I know the destination, but I think that any
   address would work. I picked a 'random' source address.

5. Edit /etc/bisdn/start_ppp_out:

   #!/bin/sh
   case $1 in
	Euronet)
		exec /usr/sbin/isdnpppd  -d -detach defaultroute name burg
		;;
	WORK)
		exec /usr/sbin/isdnpppd  -d -d -detach 10.98.240.2:10.98.240.1 defaultroute name burg
		;;
   esac

6. Edit /etc/ppp/pap-secrets or /etc/ppp/chap-secrets

7. Edit /etc/ppp/ip-up

   #!/bin/sh
   case $5 in
	194.134*)
		route flush
		/sbin/ifconfig ppp0 $4 $5 up
		/sbin/route change default $5
		cp /etc/resolv.conf.eu /etc/resolv.conf
		;;
	10.98.*)
		/sbin/route change default $5
		;;
   esac

   Here I am cheating by having a different resolv.conf for WORK and Euronet.
   I also do a route change, because the route add that isdnppp tries to do
   will fail because there already is a deafult route.

8. Start bisdnd. I do this from .fvwmrc becasue I want to see what is going
on while I am trting to esatblish the connection.

+ "I" exec xterm -geometry 80x40 -e /usr/local/bin/bisdnd -f -d 1&

9. If your default route is set up to point to the destination of a fixed
   IP address connection, any activity will start a call. Currently this
   call will never terminate. kill -INT `cat /var/run/pppX.pid` will
   terminate the session.

   If you have a dynamic IP address configuration try a ping -c 1 destination
   where destination is 194.134.2.1 in my case. This will set up the call,
   and the correct IP addresses and route will be set up by /etc/ppp/ip-up.
   The ping will never come back, because the source IP address is invalid.
   Just kill the ping.

10. Send feedback on omissions, errors and improvements on this document to

    Dick van den Burg
    burg@is.ge.com


Marc van Kempen wrote:
> 
> > and firewalling.
> > 
> > So there is at least some use of bisdn-097 and it should be similar
> > in other Eurorpean countries.
> > 
> > > I need PPP to make my ISDN card of use and though the bisdn code
> > > may be okay (I can neither confirm nor deny that), installing it
> > > is a real pain in the you-know-what and the PPP-hack looks really
> > > yuckie to me.
> > > 
> > > I would be very happy with ISDN-card support as a LKM and a PPP
> > > daemon that can talk to something else than a serial line. If
> > > I could offer help in this, feel free to mail me.
> > 
> > Just grab bisdntest-2 (if you're running FreeBSD 2.2.2), bisdn-097
> > and BISDN-ppp-FreeBSD2.2.tgz from ftp.muc.ditec.de, try to make it
> > work, and fix it if it doesn't. I understand that bisdn is rewritten
> > by Hellmuth.  The next release might hit the disks in about a year.
> > For the time being, a tutorial is needed for installing/configuring
> > bisdn and ppp. So if you want to help ...
> > 
> 
> Yeahh, go for it Peter ;)
> 
> (you might even be able to persuade me to help too)
> 
> Marc.
> 
> 
> ----------------------------------------------------
> Marc van Kempen                 BowTie Technology     
> Email: marc@bowtie.nl            WWW & Databases
> tel. +31 40 2 43 20 65         
> fax. +31 40 2 44 21 86         http://www.bowtie.nl
> ----------------------------------------------------
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708101647.SAA29206>