Abstract: LaBrie explains how to configure the /ppp/ioptions files which provide the ipppd connections with the options for your accounts. grep commands in the /usr/sbin/isdn-off-exec file adjust the wc and auxw variables. In the isdnlog can be recorded the password (ps), phone and IP numbers. In /usr/sbin/ you place all the files that are open for user operations.

Laurent J. LaBrie, management and financial consultant

Who is he?

Resumé

Bio (basically the same, just more personal detail)

Awards

Recommendations

How can he benefit me as a financial advisor?

Moneywatch Advisors, Inc.

What is his perspective on investing?

Investment portfolios (.pdf format - Adobe Acrobat necessary to read)

How we are swimming in a sinking US dollar.

His stock picks and pans.

What articles has he published on management?

Investigating problems in the workplace (.pdf format)

Mentoring, correcting, and disciplining employees

An inside look at a peer evaluation system

Examples of Websites created, maintained, and promoted:


Casa Biblica: #4 Italian bookstore in its market segment


Romania's #1 site about HIV
Romania's #1 site about HIV
(Logo by LJ LaBrie)

Global Assistance
for Medical Equipment, Kosovo
Global Assistance for Medical Equipment, Kosovo (Logo by LJ LaBrie)

Romania's #3 site in its market segmentRomania's #3 site in its market segment (Logo by LJ LaBrie)

navigator for the writings of Laurent J. LaBrie

ISDN Setup using RedHat Linux 9.0


Execution and options files

Contents of the 

5 page series:

Introduction
Configuration files
Execution & options files
Password files
"Bells, whistles" & Troubleshooting
Understanding your debug file
Your donations are valued. This site is advertizement-free.  We depend on your donations to continue to provide high quality information.   If I have helped you resolve your problem, please support our work.     Use check or credit card secured by PayPal.

/usr/local/bin/isdn-on.ippp0

This is the file that brings up the connection.  Type its name to activate the connection.

/usr/local/bin/isdn-on.ippp0

 
#!/bin/sh
# Datei: /usr/local/sbin/isdn-on.ippp0 (callando - callisa by night)
# http://www.callando.de/
#
export INTERFACE=ippp0
export INTERFACE_NUMBER=0
export PROVIDER=019193131 # this is your ISP's telephone number.
export OUTGOING_NUMBER=928084 # this is YOUR telephone number without area code !
export DEFAULT_LOCAL_IP=198.168.1.1 # This is the IP number you assign to your ISDN port.
# The ISP will change it.
export NETMASK=255.255.0.0
export DEFAULT_REMOTE_IP=62.180.158.14 # This is the tentative IP number of your ISP.
# The ISP will change it.
echo
echo "##################################################"
echo " Trying to set up $INTERFACE ..."
echo "##################################################"
exec sudo /usr/local/sbin/isdn-on-exec

Now make executable with 'chmod 700 isdn-on.ippp0'

Execute the command by typing 'isdn-on.ippp0'

Setting up the `ioptions' files

The daemon that links to the ISDN card is 'ipppd', and it communicates via interfaces 'ippp0', 'ippp1' etc. just like 'eth0' communicates with the Network adaptor. Several instances of ipppd can be running at the same time. The file /etc/ppp/ioptions is read by ipppd whenever it is loaded. To be able to dialout to an ISP, and allow external access to this host, or even dialout to a different host or ISP, you must run an ipppd for each interface you want active. Since ipppd (see 'man ipppd') always reads /etc/ppp/ioptions, only common values should be present in /etc/ppp/ioption. The values specific to an interface will be stored in /etc/ppp/ioption.ippp0, and /etc/ppp/ioptions.ippp1 etc.

The `ippp0' interface is added in the script above. Type `ifconfig' and you should see the interface details.
I will concentrate on the option files necessary to bring up the link to Demon Internet. Later I will cover accessing an ISP using dynamice IP's.

Create `/etc/ppp/ioptions'. It should contain -

#/etc/ppp/ioptions.
# Options file with common parameters.
debug
lock
-vj
-vjccomp
-bsdcomp
noccp
-ac
-pc


NOTE: The lines -vj, -ac -pc, etc disable various compression options. Using no compression has given the most reliable connection with some versions of isdn4k-utils, but it is worth checking with newer versions to see if compression options are now available.

/etc/ppp/ioptions.ippp0

Now create the /etc/ppp/ioptions.ippp0 file with details for Demon Internet.

# /etc/ppp/ioptions.ippp0
# internet@expressnet.de
# http://www.callando.de/
#
/dev/ippp0
ipcp-accept-local
ipcp-accept-remote
noipdefault
defaultroute
debug
ms-get-dns
user "internet@expressnet.de"
name "internet"
kdebug 7
#-chap # wegen: rcvd [0][LCP ConfReq id=0x1 <auth chap md5>
-pap #
#-vjccomp # rcvd [0][IPCP ConfReq id=0x4 <compress VJ 0f 01>
vj-max-slots 16
# Unklar wegen:
-ac # wegen: rcvd [0][LCP ConfRej id=0x1 <pcomp> <accomp>]
-pc # Siehe vorher.
#
#
-bsdcomp # wegen: rcvd [0][LCP ProtRej id=0x5 80 fd 01 01 00 07 15 03 2f]
noccp # dto.

More details for these options are available in the ipppd man page (`man ipppd').

/usr/sbin/isdn-off-exec:

/usr/sbin/isdn-off-exec:

#!/bin/sh
############ How many ippp's have been set up ? #################
number=$( /sbin/isdnctrl list all 2> /dev/null | \
grep "Current" | awk '{ print $5 }' | wc -l )
echo
echo "################### isdn-off ######################"
echo
echo "$number ippp's detected"
########### default route: ###########
variable=$( /sbin/route -n | awk '{print $1} ' | \
grep 0.0.0.0 | wc -w )
if [ $variable != 0 ] ; then
/sbin/route del default
else
echo "no default route set up"
fi
#
# Under 2.1.x no longer needed:
#
#/sbin/route del -net 132.180.0.0 netmask 255.255.0.0 ippp0
i=0
while [[ $i -lt $number ]] ; do
variable=$( /sbin/ifconfig | grep ippp$i | awk '{print $1}' | wc -w )
if [ $variable != 0 ] ; then
echo "shutting down ippp$i"
/sbin/isdnctrl hangup ippp$i
/sbin/isdnctrl pppunbind ippp$i
/sbin/ifconfig ippp$i down
fi
/sbin/isdnctrl delif ippp$i
i=$(( $i + 1 ))
done
####### ipppd: ############
variable=$( ps auxw | grep ipppd | grep -v grep | \
awk '{print $2}' | wc -w )
if [ $variable = 0 ] ; then
echo "no ipppd present"
else
echo "killing ipppd " ; killall ipppd
fi
###### isdnlog: ##########
variable=$( ps auxw | grep isdnlog | grep -v grep | \
awk '{print $1}' | wc -w )
if [ $variable = 0 ] ; then
echo "no isdnlog present"
else
echo "killing isdnlog " ; killall isdnlog
fi
######### xmonisdn: ############
variable=$( ps auxw | grep xmonisdn | grep -v grep | \
awk '{print $1}' | wc -w )
if [ $variable = "0" ] ; then
echo "no xmonisdn present"
else
echo "killing xmonisdn " ; killall xmonisdn
fi
######### xisdnload: ##############
variable=$( ps auxw | grep xisdnload | grep -v grep | \
awk '{print $1}' | wc -w )
if [ $variable = "0" ] ; then
echo "no xisdnload present"
else
echo "killing xisdnload " ; killall xisdnload
fi
############ imon: ##############
variable=$( ps auxw | grep imon | grep -v grep | \
awk '{print $2}' | wc -w )
if [ $variable = 0 ] ; then
echo "imon has already exited " ;
else
killall imon
fi
########## ipppstats: ##########
variable=$( ps auxw | grep ipppstats | grep -v grep | \
awk '{print $2}' | wc -w )
if [ $variable = 0 ] ; then
echo "ipppstats has already exited " ;
else
killall ipppstats
fi
########### netstat #############
variable=$( ps auxw | grep netstat | grep -v grep | \
awk '{print $2}' | wc -w )
if [ $variable = 0 ] ; then
echo "netstat has already exited " ;
else
killall netstat
fi
############# syslog ##########
variable=$( ps auxw | grep tail | grep -v grep | \
awk '{print $2}' | wc -w )
if [ $variable = 0 ] ; then
echo "tail -f ... has already exited " ;
else
killall tail
fi
# /sbin/modprobe -r hisax
/sbin/modprobe -r isdn_lzscomp
/sbin/modprobe -r isdn_bsdcomp
/sbin/modprobe -r isdn
/sbin/modprobe -r slhc
/sbin/rmmod -a
Make it executable with 'chmod 700 isdn-off-exec'

May not be needed:  /root/bin/isdndown

Now create a script to remove the ISDN set-up.

# /root/bin/isdndown
# Script to remove the ISDN setup
kill `cat /var/run/ipppd.pid`
ifconfig ippp0 down
isdnctrl delif ippp0
kill `cat /var/run/isdnlog.isdnctrl0.pid`
#modprobe -r hisax

The last line removes the hisax driver, and is currently commented out. Note that the quote marks around the `cat` command on the kill lines are both open quote marks

Make this executable.

Other pages:

Introduction
Configuration files
Execution & options files
Password files
"Bells, whistles" & Troubleshooting
Understanding your debug file



e-mail:  e-mail address   Y!messenger ID: laurent_labrie



"A good manager is a man who isn't worried about his own career but rather the careers of those who work for him... Don't worry about yourself! Take care of those who work for you and you'll float to greatness on their achievements."---HSM Burns

Copyright Laurent J. LaBrie 2004-2006