[4542] in linux-net channel archive
Re: SLIP config problems with dip
daemon@ATHENA.MIT.EDU (Francesco Conti)
Fri Sep 27 00:38:39 1996
Date: Thu, 26 Sep 1996 14:26:34 +0200 (MET DST)
From: Francesco Conti <fconti@iper.net>
Reply-To: Francesco Conti <fconti@iper.net>
To: Eddy Young <young@freenet.hut.fi>
cc: "linux-config@vger.rutgers.edu" <linux-config@vger.rutgers.edu>,
"linux-net@vger.rutgers.edu" <linux-net@vger.rutgers.edu>,
"'Michael Pagano'" <mnpagano@mtepel.student.harvard.edu>
In-Reply-To: <01BBAA1F.ACF89160@bow.intnet.mu.bow.intnet.mu>
Hi Eddy,
On Tue, 24 Sep 1996, Eddy Young wrote:
> Hello,
> I'm getting problems writing a script file for dip.
> My ISP does not provide shell accounts; I was thinking maybe this could be the problem. The only prompts that come up when connection is established are:
>
> login:
> password:
>
> Can anyone write small script and attach it to a message for me?
Here's one script; you have to substitute the block size parameters
(example: YOUR_HOST_NAME) with your personal data.
Hope this helps
Franz
#!/usr/sbin/dip
main:
# First of all, set up our name for this connection.
# I am called "uwalt.hacktic.nl" (== 193.78.33.238)
# get $local uwalt.hacktic.nl
get $local YOUR_HOST_NAME
# Next, set up the other side's name and address.
# My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
# get $remote xs4all.hacktic.nl
get $remote YOUR_ISP_HOST_NAME
# Set netmask on sl0 to 255.255.255.0
netmask 255.255.255.0
# Set the desired serial port and speed.
port modem
speed 38400
# Reset the modem and terminal line.
# This seems to cause trouble for some people!
reset
# Note! "Standard" pre-defined "errlvl" values:
# 0 - OK
# 1 - CONNECT
# 2 - ERROR
# 3 - BUSY
# 4 - NO CARRIER
# 5 - NO DIALTONE
#
# You can find those grep'ping for "addchat()" in *.c...
# You can change thise with the "chatkey" command.
# Prepare for dialing.
print Initializing modem...
send ATZ\r
wait OK 2
if $errlvl != 0 goto modem_init_trouble
print OK
componi:
print Dialing...
dial YOUR_ISP_TELEPHONE_NUMBER
if $errlvl != 1 goto modem_dialing_trouble
# We are connected. Login to the system.
login:
print Login procedure...
sleep 2
wait sername: 20
if $errlvl != 0 goto login_error
send YOUR_USER_NAME\n
wait ord: 20
if $errlvl != 0 goto password_error
send YOUR_PASSWORD\n
loggedin:
# Set up the SLIP operating parameters.
get $mtu 296
# Ensure "route add -net default xs4all.hacktic.nl" will be done
default
get $locip YOUR_IP_ADDRESS
get $rmtip ISP_IP_ADDRESS
# Say hello and fire up!
done:
print Login status: OK
print CONNECTED $locip ---> $rmtip
mode CSLIP
goto exit
prompt_error:
print TIME-OUT waiting for SLIPlogin to fire up...
goto error
login_trouble:
print Trouble waiting for the Login: prompt...
goto error
password_error:
print Trouble waiting for the Password: prompt...
goto error
modem_init_trouble:
print Trouble occurred with the modem initialization phase...
goto error
modem_dialing_trouble:
print Trouble occurred with the modem dialing phase...
goto error
error:
send ATZ\\N2\r
print CONNECT FAILED to $remote
quit
exit:
exit
*--------------------------+-----------------------------------------------*
| Francesco Conti | Coordinatore PLUTO Linux Users Group - Rimini |
| Viale Regina Elena N. 10 | Membro LSD (Libero Scambio Dati) Association |
| Rimini (RN) 47037 ITALY | Email: fconti@rebel.net fconti@iper.net |
*--------------------------+-------------------------------*---------------*
| MY HOME PAGE => http://www.rebel.net/~pluto/magmush.html | ComeOn Linux! |
| PLUTO => http://www.rebel.net/~pluto | adherent |
*----------------------------------------------------------*---------------*
"Lor^H^H^HVincenzo io ti ammazzero', sei troppo stupido per vivere..."