Jim Laferriere wrote:

> 
>   ---------------------------------------------------------------------------
> 
> Subject: 3Com/USR I-Modem (v.everything) , Please a sample /etc/ppp/options .
> Date: Wed, 31 Mar 1999 23:18:06 -0800 (PST)
> From: "Mr. James W. Laferriere" <[EMAIL PROTECTED]>
> To: linux-isdn <[EMAIL PROTECTED]>
> 
>         Hello All, I remember someone out there was using a USR I-Modem
>         I am hoping the individual would be kind enough to share their
>         ppp 'options' file (Minus Ph#'s , username, passwd's) of course .
> 
>         I am still getting the mtu setting of 1526 & everything I try
>         to telnet/ssh/ftp/... to will work once or maybe twice then
>         just plain locks .  ping'ng from either end gets no responces ,
>         heck my ISP says the TermServers don't see any traffic either .
>         They even tried pinging my ip when all showed established on the
>         terminal server .  Details below .
> 
>                                 Tia, JimL



Hi Jim, 
We used the Courier I-modem for over a year using this option file.  I
never had time to play with it much, but we were dedicated on both B
channels, which, of course we were limited to 115200 BPS because of the
serial port settings.

I also never played with the MTU settings, however, I'm about to come up on
ISDN again.  Ameritech offers 1 B channel at the same cost of standard
dialup, so thought I'd give it a try.

Attached is the options file, and I included a script I wrote to redial if
it
detects that the link has gone down using ping to check that the other end
of the isdn link was still there.  If it couldn't get a response it
shutdown and restarted.  

Good Luck...

Dave Records
lock
defaultroute
noipdefault
modem
/dev/ttyS2
115200
crtscts
debug
mru 552
mtu 552
passive
asyncmap 0
lcp-echo-interval 150
lcp-echo-failure 3
name "xxxxxx"
ipcp-accept-local
ipcp-accept-remote
0.0.0.0:10.10.10.10
#!/bin/sh
#
#  A PPP Line monitor script 
#  Written By Dave Records of Emerald Database Innovations, Inc.
#  May 11, 1998, Version 1.0
#
#  PLEASE, do not kill this using Signal 9 unless absolutely necessary.
#  A kill with a signal 2 or 15 will perform an orderly shutdown, including
#  writing the log file with this information.
#
#  This scrip monitors an IP address put in the value remote and reports 
#  when connectivity fails.  A program to page, email, or whatever, may be used
#  to alert the SysAdmin of the problem.
#

PATH="/etc/ppp:/sbin:/bin:/usr/bin:/usr/sbin"
REMOTE="192.168.0.3"           # Remote address
DONE="DO"
PPPHOME="/etc/ppp"
LOGDIR="/etc/ppp"
LOGNAME=pppmond.log

trap "" 0 1 3 4 14
trap d15trap 15
trap d02trap 2

longchk() 
{
#   ping -c 5 -i 1 $REMOTE  > /dev/null 2>&1
   ping -c 5 -i 30 $REMOTE  > /dev/null 2>&1
   longchk=$?
}

shortchk() 
{
   ping -c 2  -i 1 $REMOTE  > /dev/null 2>&1
   shortchk=$?
}

checklnk()     # checklink returns 1 if the link is down, 0 if up
               # it also checks for pppd still running and considers the  
               # link up until pppd is not in the program list.
{
   linkup=`ifconfig | grep ppp0`
   pppdup=`ps ax | grep ' pppd connect'`

   if [ -n "$linkup" ]
   then
     checklnk=01
   fi

   if [ -n "$pppdup" ]
   then
     checklnk=10
   fi

   if [ -n "$linkup" -a -n "$pppdup" ]
   then
     checklnk=0
   fi
}

closelnk()
{
  checklnk
  while [ $checklnk -eq 0 ]
  do
#    echo "shutting down the link"
    $PPPHOME/pppd stop >> $LOGDIR/$LOGNAME  2>> $LOGDIR/$LOGNAME
    sleep 5
    $PPPHOME/pppd stop >> $LOGDIR/$LOGNAME  2>> $LOGDIR/$LOGNAME
    checklnk
  done
  echo "* Link Shutdown at `date`." >> $LOGDIR/$LOGNAME
}

startlnk()
{
  checklnk
  startcount=1
  while [ $checklnk -ne 0 ]
  do
    $PPPHOME/pppd start >> $LOGDIR/$LOGNAME  2>> $LOGDIR/$LOGNAME
    sleep 10        # 10 seconds is adequate for ISDN Modems only!
                    # Use a longer sleep period for analog modems, like 45!
    checklnk
    echo "Checklnk - $checklnk" >> $LOGDIR/$LOGNAME  2>> $LOGDIR/$LOGNAME
    shortchk
    sleep 2
#    echo "shortchk $shortchk"
    startcount=`expr $startcount + 1`
    if [ $startcount -gt 11 ]
    then
      echo `date` | mail -s "LINK IS DOWN! DO SOMETHING!!" [EMAIL PROTECTED]
      echo "****** `date`:Attempted 12 times to restart link and it failed!" >> 
$LOGDIR/$LOGNAME
      echo "****** NOW WHAT KEMOSABE?." >> $LOGDIR/$LOGNAME
      exit 1
    fi
  done
  echo "* Link Restart at `date`." >> $LOGDIR/$LOGNAME
}

d15trap()
{
  echo "Signal 15: Exiting the PPP Monitor Program at `date`." >> $LOGDIR/$LOGNAME
  exit 0
}

d02trap()
{
  echo "Signal 02: Exiting the PPP Monitor Program at `date`." >> $LOGDIR/$LOGNAME
  exit 0
}

###########################################################################
# Main Program Starts here..
#

echo "Starting the PPP Monitor Program at `date`." >> $LOGDIR/$LOGNAME
while [ $DONE = "DO" ]
do
  longchk
#  echo "longchk $longchk"
  sleep 2
  if [ $longchk -gt 0 ]
  then
    echo "******  Link appears to be down, attempting restart at `date`" >> 
$LOGDIR/$LOGNAME
    checklnk
#    echo $checklnk
    if [ $checklnk -eq 1 ]
    then
#      echo "Link is physically down, do a startlnk"
      echo "LINK IS DOWN AT `date`!  Attempting a Restart!! " >> $LOGDIR/$LOGNAME
      startlnk
    else
      sleep 1         # Give it a time out to ensure it's not a just a fluke
      shortchk        # and check again
      if [ $shortchk -ne 0 ]
      then
        echo "****** Link is physically up, but not responding at `date`" >> 
$LOGDIR/$LOGNAME
        closelnk      # Looks like line is up but not responding, so shutdown
        startlnk      # and restart
      fi
    fi
  fi
  echo "Link is up at `date`" >> $LOGDIR/$LOGNAME
done
begin:vcard 
n:Records;Dave
tel;fax:616.222.9556
tel;work:616.222.9556
x-mozilla-html:FALSE
org:Thirdware Systems, Pty, Ltd
adr:;;6560 Crownpointe Drive;Wyoming;MI;49509;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Systems Analyst
x-mozilla-cpt:;-29088
fn:Dave Records
end:vcard

Reply via email to