Linux-Networking Digest #3, Volume #10 Tue, 26 Jan 99 03:13:38 EST
Contents:
[Fwd: Need help with stumper re: RedHat 5.2 / diald-0.16-1 / pppd] (Scott Harvey)
----------------------------------------------------------------------------
From: Scott Harvey <[EMAIL PROTECTED]>
Subject: [Fwd: Need help with stumper re: RedHat 5.2 / diald-0.16-1 / pppd]
Date: Tue, 26 Jan 1999 05:39:17 +0000
This is a multi-part message in MIME format.
==============706C43A83D23E8E38630DA6C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Scott Harvey wrote:
> Joseph Morrison wrote:
>
> > Hello folks,
> >
> > I've been using diald-0.16-1 (with a couple of patches) with RedHat 5.1
> > for months with no problems whatsoever. Recently I installed RedHat 5.2
> > on a friend's machine, and cannot get diald to work properly. I
> > installed the same version of diald (0.16-1 with patches), but when I
> > couldn't get that to work, I tried a newer version (I think it was
> > 0.16-5). In both cases, the same problem occurred. The symptoms are
> > *very* weird:
> >
> > 1. During boot, diald starts with no apparent problems. After boot,
> > diald correctly waits for network requests, and when one is made, diald
> > calls the chat script, which calls the ISP and connects successfully.
> > Then diald reports that it is starting pppd, which hangs. A minute later
> > pppd gives up and diald hangs up. A minute later, diald tries again, and
> > the whole sequence repeats. pppd never starts up properly.
> >
> > 2. If I kill diald (or reboot without starting diald), I can use the
> > RedHat control panel to start ppp manually ("activate ppp device"),
> > which works fine and establishes a connection normally (although for
> > some reason there is a long delay before it actually dials the phone).
> >
> > So far, one would think that my pppd options are wrong in my diald.conf
> > file or something. However....
> >
> > 3. After I start ppp manually and then disconnect manually, here's the
> > weird part: I can restart diald, and it works perfectly.
> >
> > 4. If I reboot the machine, I'm back to square one - diald doesn't work
> > again, until I manually connect and disconnect once.
> >
> > So it appears that starting ppp manually and then disconnecting does
> > something which makes diald work, but I can't figure out what it is.
> >
> > I'm a pretty seasoned Linux user and I'm at a loss on this one. My
> > guesses have been that the problem is related to stale lock files
> > somewhere, but I can't find evidence to support that theory. I've
> > downloaded source RPMs and read the code for pppd, diald, ifup-ppp, etc.
> > The only lock file that seems like a candidate for explaining this
> > problem is /var/lock/LCK..modem. However, that file seems to be there
> > when it's supposed to be, and it seems to not be there when it's not
> > supposed to be... so it doesn't seem like it can be the problem.
> >
> > I've tried reading up on "uucp style locks", but I'm still not sure what
> > they are. I've checked permissions of the serial devices, done "find"
> > commands to see what files are touched after manually connecting and
> > disconnecting the ppp device - and can still not come up with a good
> > theory to explain this diald problem.
> >
> > I'm wondering if my ppp options are wrong in the /etc/diald.conf file
> > (shown below) but that seems unlikely, since it does work fine once I do
> > the manual connect/disconnect.
> >
> > Any ideas would be very much appreciated! I've been singing the praises
> > of RedHat Linux to my friend, who is getting less and less impressed ;-)
> >
> > Thanks,
> > - Joe Morrison
> >
> > ------------ /etc/diald.conf -------------
> > mode ppp
> > connect "/usr/sbin/chat -v -f /etc/sysconfig/network-scripts/chat-ppp0"
> > device /dev/modem
> > speed 115200
> > modem
> > lock
> > crtscts
> > local 192.168.1.1
> > remote 0.0.0.0
> > dynamic
> > defaultroute
> > include /usr/lib/diald/standard.filter
> >
> > -------------------------------------------
>
> The set up looks right but ,I have just goten my set up to work on 5.2 and
> I documented what I did to the set up files in order for things to work. I
> have included a text file which contains all of the set up details I had to
> change in order for diald to work on my system. A diagnostic aid: use
> tail -f /var/log/messages to look at the system log as you try to bring up
> diald.
>
> ------------------------------------------------------------------------
>
> Notes of tweaks you need to perform to the diald-0.16.5a-1 scripts and
> set up files to run in RH5.0 RH5.1 or RH5.2 systems after installing the
> RPM file.
> 1.) copy diald.conf file to /etc/diald.conf from /usr/lib/diald directory.
> create the directory /etc/diald. Copy diald.ctl and standard.filter to
> /etc/diald/ directory.
> Important assumption: You have a working dial up set up working.
> If you do not have that working yet. It is strongly re that you
> get this working first before you attempt to get diald functioning.
> Change the diald.conf file to reference a working chat script file
> as shown from the excerpt from a working diald.conf file below.
>
> 2.) The --> is where you must provide the information based on your set up
> 3.) To test the diald set up you can type diald at a terminal window.
> 4.) To view the system log real time open an xterm window and type the command
> tail -f /var/log/messages. This will display the last view lines of the
> messages file.
> 5.) When you are happy with the set up and you want to run diald whenever you
> system boots you will need to copy diald.init to /etc/rc.d/init.d/diald
> Note: To little bash scripts that start diald come with the installation
> one is called diald-on contents:
> ***********************************************
> #! /bin/sh
>
> /etc/rc.d/init.d/diald.init start
> The other is called diald-off contents:
> **********************************************
> #!/bin/bash
> /etc/rc.d/init.d/diald.init stop
> Modify both scripts change the name of the diald.init to diald
> **********************************************
> for example
> diald-off /etc/rc.d/init.d/diald stop
>
> diald-on /etc/rc.d/init.d/diald start
> 5.a) The /etc/rc.d/init.d/diald initialization script should look like:
> *******************************************************
> #!/bin/sh
> #
> # diald The on demand TCP/IP networking program
> #
> #
> # chkconfig: 2345 57 5
> # description: Diald is the smart demand-dial PPP/SLIP networking daemon. \
> # It selectively activates the SLIP/PPP link to the Internet when \
> # traffic is detected that is considered important.
> #
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> # Source networking configuration.
> . /etc/sysconfig/network
>
> # Check that networking is up.
> if [ ${NETWORKING} = "no" ]
> then
> exit 0
> fi
>
> [ -f /usr/sbin/diald ] || exit 0
> # Changed 1/24/99 Scott Harvey
> [ -f /etc/diald.conf ] || exit 0
>
> # See how we were called.
> case "$1" in
> start)
> # Start daemons.
> echo -n "Starting diald: "
> daemon /usr/sbin/diald
> echo
> touch /var/lock/subsys/diald
> ;;
> stop)
> # Stop daemons.
> echo -n "Shutting down diald: "
> killproc diald -TERM
> echo
> rm -f /var/lock/subsys/diald
> ;;
> restart)
> $0 stop
> $0 start
> ;;
> status)
> status diald
> ;;
> *)
> echo "Usage: diald {start|stop|restart|status}"
> exit 1
> esac
>
> exit 0
> ********************end of /etc/rc.d/init.d/diald script*******
> 5.b) To install diald into the system V initialization boot up scheme you need
> to run the ntsysv program. Diald will be one of the choices.
> make sure it has an "*" in the checked field. This means it will be
> started whenever your system is booted.
> ******cut from a working diald.conf set up file**********************
> include /etc/diald/standard.filter
> # or use the filter that brings the link up for use on a line shared with
> # a phone
> # as you lean more about diald you can modify phone.filter to suit your needs
> # include /etc/diald/phone.filter
> # stuff to set up the diald connection
> # the device information can be found in the file
> # /etc/sysconfig/network-scripts/ifcfg-ppp0 or
> # ifcfg-pppX where X is the designation of your ppp interface.
> -->device /dev/cua1 # determine from your set up
> speed 115200
> lock
> mode ppp
> # We may get another terminal server, thus use
> # 'dynamic' and do not tell PPP the IP number of the other end
> # For use with gated, comment out the 'dynamic' option, and
> # set remote to be the same as local
> dynamic
> local 10.0.0.1
> remote 10.0.0.2
> # Red hat sets up ppp to use PAP "Personal Authorization Protocol" This means
> # your password information to your ISP is in the /etc/ppp directory.
> --> pppd-options name your-username-at-your-ISP :
> # Delay sending packets for 5 seconds after PPP device opens -
> # this allows routes to be established back to the appropriate dialup server.
> up-delay 5
> defaultroute
> modem
> crtscts
> # note:If you have selected another ppp device use that name in place of
> # ppp0. For example if your interfaces name is ppp1 your would refer
> # to the script chat-ppp1. These script files can be found in the
> # /etc/sysconfig/network-scripts directory.
> --> connect "/usr/sbin/chat -v -f /etc/sysconfig/network-scripts/chat-ppp0"
> # this is all you have to do provided that you currently have a working ppp
> # set up
> radial-timeout 10
> fife /etc/diald/diald.ctl
> # restrict 9:00:00 17:45:00 1 * *
> # or-restrict 9:00:00 17:45:00 2 * *
> # or-restrict 9:00:00 17:45:00 3 * *
> # or-restrict 9:00:00 17:45:00 4 * *
> # or-restrict 9:00:00 17:45:00 5 * *
> # up
==============706C43A83D23E8E38630DA6C
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Mozilla-Status2: 00000000
Message-ID: <[EMAIL PROTECTED]>
Date: Tue, 26 Jan 1999 05:34:31 +0000
From: Scott Harvey <[EMAIL PROTECTED]>
Organization: Harvey's Computer Works
X-Mailer: Mozilla 4.5 [en] (X11; U; Linux 2.0.34 i586)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.linux.networking
Subject: Re: Need help with stumper re: RedHat 5.2 / diald-0.16-1 / pppd
References: <[EMAIL PROTECTED]>
Content-Type: multipart/mixed;
boundary="------------9E2D026243784761890898BF"
This is a multi-part message in MIME format.
==============9E2D026243784761890898BF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Joseph Morrison wrote:
> Hello folks,
>
> I've been using diald-0.16-1 (with a couple of patches) with RedHat 5.1
> for months with no problems whatsoever. Recently I installed RedHat 5.2
> on a friend's machine, and cannot get diald to work properly. I
> installed the same version of diald (0.16-1 with patches), but when I
> couldn't get that to work, I tried a newer version (I think it was
> 0.16-5). In both cases, the same problem occurred. The symptoms are
> *very* weird:
>
> 1. During boot, diald starts with no apparent problems. After boot,
> diald correctly waits for network requests, and when one is made, diald
> calls the chat script, which calls the ISP and connects successfully.
> Then diald reports that it is starting pppd, which hangs. A minute later
> pppd gives up and diald hangs up. A minute later, diald tries again, and
> the whole sequence repeats. pppd never starts up properly.
>
> 2. If I kill diald (or reboot without starting diald), I can use the
> RedHat control panel to start ppp manually ("activate ppp device"),
> which works fine and establishes a connection normally (although for
> some reason there is a long delay before it actually dials the phone).
>
> So far, one would think that my pppd options are wrong in my diald.conf
> file or something. However....
>
> 3. After I start ppp manually and then disconnect manually, here's the
> weird part: I can restart diald, and it works perfectly.
>
> 4. If I reboot the machine, I'm back to square one - diald doesn't work
> again, until I manually connect and disconnect once.
>
> So it appears that starting ppp manually and then disconnecting does
> something which makes diald work, but I can't figure out what it is.
>
> I'm a pretty seasoned Linux user and I'm at a loss on this one. My
> guesses have been that the problem is related to stale lock files
> somewhere, but I can't find evidence to support that theory. I've
> downloaded source RPMs and read the code for pppd, diald, ifup-ppp, etc.
> The only lock file that seems like a candidate for explaining this
> problem is /var/lock/LCK..modem. However, that file seems to be there
> when it's supposed to be, and it seems to not be there when it's not
> supposed to be... so it doesn't seem like it can be the problem.
>
> I've tried reading up on "uucp style locks", but I'm still not sure what
> they are. I've checked permissions of the serial devices, done "find"
> commands to see what files are touched after manually connecting and
> disconnecting the ppp device - and can still not come up with a good
> theory to explain this diald problem.
>
> I'm wondering if my ppp options are wrong in the /etc/diald.conf file
> (shown below) but that seems unlikely, since it does work fine once I do
> the manual connect/disconnect.
>
> Any ideas would be very much appreciated! I've been singing the praises
> of RedHat Linux to my friend, who is getting less and less impressed ;-)
>
> Thanks,
> - Joe Morrison
>
> ------------ /etc/diald.conf -------------
> mode ppp
> connect "/usr/sbin/chat -v -f /etc/sysconfig/network-scripts/chat-ppp0"
> device /dev/modem
> speed 115200
> modem
> lock
> crtscts
> local 192.168.1.1
> remote 0.0.0.0
> dynamic
> defaultroute
> include /usr/lib/diald/standard.filter
>
> -------------------------------------------
The set up looks right but ,I have just goten my set up to work on 5.2 and
I documented what I did to the set up files in order for things to work. I
have included a text file which contains all of the set up details I had to
change in order for diald to work on my system. A diagnostic aid: use
tail -f /var/log/messages to look at the system log as you try to bring up
diald.
==============9E2D026243784761890898BF
Content-Type: text/plain; charset=us-ascii;
name="RH5.2-notes.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="RH5.2-notes.txt"
Notes of tweaks you need to perform to the diald-0.16.5a-1 scripts and
set up files to run in RH5.0 RH5.1 or RH5.2 systems after installing the
RPM file.
1.) copy diald.conf file to /etc/diald.conf from /usr/lib/diald directory.
create the directory /etc/diald. Copy diald.ctl and standard.filter to
/etc/diald/ directory.
Important assumption: You have a working dial up set up working.
If you do not have that working yet. It is strongly re that you
get this working first before you attempt to get diald functioning.
Change the diald.conf file to reference a working chat script file
as shown from the excerpt from a working diald.conf file below.
2.) The --> is where you must provide the information based on your set up
3.) To test the diald set up you can type diald at a terminal window.
4.) To view the system log real time open an xterm window and type the command
tail -f /var/log/messages. This will display the last view lines of the
messages file.
5.) When you are happy with the set up and you want to run diald whenever you
system boots you will need to copy diald.init to /etc/rc.d/init.d/diald
Note: To little bash scripts that start diald come with the installation
one is called diald-on contents:
***********************************************
#! /bin/sh
/etc/rc.d/init.d/diald.init start
The other is called diald-off contents:
**********************************************
#!/bin/bash
/etc/rc.d/init.d/diald.init stop
Modify both scripts change the name of the diald.init to diald
**********************************************
for example
diald-off /etc/rc.d/init.d/diald stop
diald-on /etc/rc.d/init.d/diald start
5.a) The /etc/rc.d/init.d/diald initialization script should look like:
*******************************************************
#!/bin/sh
#
# diald The on demand TCP/IP networking program
#
#
# chkconfig: 2345 57 5
# description: Diald is the smart demand-dial PPP/SLIP networking daemon. \
# It selectively activates the SLIP/PPP link to the Internet when \
# traffic is detected that is considered important.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
exit 0
fi
[ -f /usr/sbin/diald ] || exit 0
# Changed 1/24/99 Scott Harvey
[ -f /etc/diald.conf ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting diald: "
daemon /usr/sbin/diald
echo
touch /var/lock/subsys/diald
;;
stop)
# Stop daemons.
echo -n "Shutting down diald: "
killproc diald -TERM
echo
rm -f /var/lock/subsys/diald
;;
restart)
$0 stop
$0 start
;;
status)
status diald
;;
*)
echo "Usage: diald {start|stop|restart|status}"
exit 1
esac
exit 0
********************end of /etc/rc.d/init.d/diald script*******
5.b) To install diald into the system V initialization boot up scheme you need
to run the ntsysv program. Diald will be one of the choices.
make sure it has an "*" in the checked field. This means it will be
started whenever your system is booted.
******cut from a working diald.conf set up file**********************
include /etc/diald/standard.filter
# or use the filter that brings the link up for use on a line shared with
# a phone
# as you lean more about diald you can modify phone.filter to suit your needs
# include /etc/diald/phone.filter
# stuff to set up the diald connection
# the device information can be found in the file
# /etc/sysconfig/network-scripts/ifcfg-ppp0 or
# ifcfg-pppX where X is the designation of your ppp interface.
-->device /dev/cua1 # determine from your set up
speed 115200
lock
mode ppp
# We may get another terminal server, thus use
# 'dynamic' and do not tell PPP the IP number of the other end
# For use with gated, comment out the 'dynamic' option, and
# set remote to be the same as local
dynamic
local 10.0.0.1
remote 10.0.0.2
# Red hat sets up ppp to use PAP "Personal Authorization Protocol" This means
# your password information to your ISP is in the /etc/ppp directory.
--> pppd-options name your-username-at-your-ISP :
# Delay sending packets for 5 seconds after PPP device opens -
# this allows routes to be established back to the appropriate dialup server.
up-delay 5
defaultroute
modem
crtscts
# note:If you have selected another ppp device use that name in place of
# ppp0. For example if your interfaces name is ppp1 your would refer
# to the script chat-ppp1. These script files can be found in the
# /etc/sysconfig/network-scripts directory.
--> connect "/usr/sbin/chat -v -f /etc/sysconfig/network-scripts/chat-ppp0"
# this is all you have to do provided that you currently have a working ppp
# set up
radial-timeout 10
fife /etc/diald/diald.ctl
# restrict 9:00:00 17:45:00 1 * *
# or-restrict 9:00:00 17:45:00 2 * *
# or-restrict 9:00:00 17:45:00 3 * *
# or-restrict 9:00:00 17:45:00 4 * *
# or-restrict 9:00:00 17:45:00 5 * *
# up
==============9E2D026243784761890898BF==
==============706C43A83D23E8E38630DA6C==
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.networking) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Networking Digest
******************************