Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 1995 23:01:31 -0600
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        hackers@freebsd.org
Subject:   SLIP with chat/slattach (was Re: startslip ...)
Message-ID:  <199510240501.XAA24885@rocky.sri.MT.net>
In-Reply-To: <5064.814507576@time.cdrom.com>
References:  <199510240302.MAA04077@genesis.atrad.adelaide.edu.au> <5064.814507576@time.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > Guys!  Use slattach and chat, and save yourselves the stress 8)
> 
> I've never managed to get that combo to work!  Chat just dies
> immediately.. :-(

OK, here is a quick README along with some files that may make your life
easier.  If someone feels it's worth adding to the FAQ, by all means
feel free.


Nate
-----
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	README
#	etc/ppp/slip-dial
#	etc/start_if.sl0
#	etc/sysconfig.dif
#	etc/host.conf
#
echo x - README
sed 's/^X//' >README << 'END-of-README'
XQuick README for Nate's simple slattach/chat scripts.  These scripts
Xassume the connection is a full-time connection and that you have a
Xpermanent IP address assigned to your box.  Also, any necessary routing
Xhas been taken care of by your ISP in the form of 'proxy arp' and/or
Xrouting tables.
X
XINFORMATION NEEDED:
X===================
Xa) Your Internet hostname
Xb) Your Internet IP address
Xc) The IP address of the machine you are connecting to
Xd) Phone #, account, and password of the 'slip' account on the remote
X   machine
X
X
X
XPROVIDED FILE LIST
X==================
X/etc/ppp/slip-dial:
X	The dial script
X/etc/sysconfig.dif:
X	Changes made to the stock sysconfig file to add SLIP support
X/etc/start_if.sl0:
X	Commands to run on startup before the network device is ifconfig'd.
X/etc/host.conf:
X	Sets up the resolver to attempt to resolve hostnames locally before
X	going to the BIND host to save bandwidth.  Add any common hosts
X        into /etc/hosts, and make sure 'localhost' and your IP name/address
X	are correctly listed.
X
XLOCAL MODS
X==========
X/etc/sysconfig;
X1) Modify sysconfig to have your hostname as given by your IP provider
X
X2) Disable TCP extensions as they cause some routers to reboot and/or
X   they can cause your connection to be very 'slow'
X
X3) Modify the 'ifconfig_sl0' line to contain first your IP address, and
X   then the IP address of the machine you are connecting to.
X
X4) Modify the 'defaultrouter' to also contain the IP address of the
X   machine you are connecting to, since all of your traffic must route
X   through your SLIP connection.
X
X/etc/ppp/slip-dial:
X1) Modify the phone #, Account name, and password for your setup.
X2) Modify the device to use to your local serial device.
X2) Modify the 'chat' script if your login is more complicated.  See the
X   man page for chat for help.
X
X/etc/start_if.sl0:
X1) Modify the speed and device to match your configuration.
X
X/etc/host.conf:
XNo changes necessary, this should work.
X
XTODO
X====
X
X- Modify the startup and dialing files in such a manner so that you need
X  only specify the device, speed, and other information in only one place.
X
X- Provide more complicated chat script examples.
END-of-README
echo x - etc/ppp/slip-dial
sed 's/^X//' >etc/ppp/slip-dial << 'END-of-etc/ppp/slip-dial'
X#!/bin/sh
X#
X#
X# This program uses the chat program to (re)dial and connect back up to the
X# SLIP host
X
XPHONE=1234567
XUSER=slipit
XPASSWORD=secret
XDEVICE=cuaa1
X 
X# XXX - As it stands now, we try to dial the remote site every 10 seconds
X# or so until it answers.  It would be better to have an exponential
X# backoff algorithm, but this way is much easier to write and guarantees
X# a connection as soon as one is available.
X
X# Wait just a little for the line to settle down
Xsleep 10
X
X(if chat -v ABORT "NO CARRIER" ABORT BUSY "" ATZ1 OK ATM0 OK ATDT$PHONE CONNECT "" ogin: $USER ssword: \\q$PASSWORD
Xthen
X    exit 0
Xelse
X    exit 1
Xfi
X) < /dev/$DEVICE > /dev/$DEVICE
END-of-etc/ppp/slip-dial
echo x - etc/start_if.sl0
sed 's/^X//' >etc/start_if.sl0 << 'END-of-etc/start_if.sl0'
X#!/bin/sh
Xslattach -a -h -r /etc/ppp/slip-dial -s 115200 cuaa1
END-of-etc/start_if.sl0
echo x - etc/sysconfig.dif
sed 's/^X//' >etc/sysconfig.dif << 'END-of-etc/sysconfig.dif'
X*** sysconfig.orig	Mon Oct 23 22:36:39 1995
X--- sysconfig	Mon Oct 23 22:37:53 1995
X***************
X*** 58,64 ****
X  ######################### Start Of Netconfig Section #######################
X  
X  # Set to the name of your host - this is pretty important!
X! hostname=myname.my.domain
X  
X  # Set to the NIS domainname of your host, or NO if none
X  defaultdomainname=NO
X--- 58,64 ----
X  ######################### Start Of Netconfig Section #######################
X  
X  # Set to the name of your host - this is pretty important!
X! hostname="sliphost.do.main"
X  
X  # Set to the NIS domainname of your host, or NO if none
X  defaultdomainname=NO
X***************
X*** 68,74 ****
X  # TCP options.  If TCP connections randomly hang, try disabling this,
X  # and bug the vendor of the losing equipment.
X  #
X! tcp_extensions=YES
X  
X  #
X  # Set to the list of network devices on this host.  You must have an
X--- 68,74 ----
X  # TCP options.  If TCP connections randomly hang, try disabling this,
X  # and bug the vendor of the losing equipment.
X  #
X! tcp_extensions=NO
X  
X  #
X  # Set to the list of network devices on this host.  You must have an
X***************
X*** 79,85 ****
X  #	ifconfig_ed0="inet 10.0.0.1 netmask 0xffffff00"
X  #	ifconfig_sl0="inet 10.0.1.0 netmask 0xffffff00"
X  #
X! network_interfaces="lo0"
X  ifconfig_lo0="inet localhost"
X  
X  #
X--- 79,86 ----
X  #	ifconfig_ed0="inet 10.0.0.1 netmask 0xffffff00"
X  #	ifconfig_sl0="inet 10.0.1.0 netmask 0xffffff00"
X  #
X! network_interfaces="sl0 lo0"
X! ifconfig_sl0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.0"
X  ifconfig_lo0="inet localhost"
X  
X  #
X***************
X*** 91,100 ****
X  route_loopback="${hostname} localhost"
X  
X  # Set to the host you'd like set as your default router, or NO for none.
X! defaultrouter=NO
X  
X  # These are the flags you'd like to start the routing daemon with
X! routedflags=-q
X  
X  # timed flags, or NO if you don't want to start the time daemon
X  timedflags=NO
X--- 92,101 ----
X  route_loopback="${hostname} localhost"
X  
X  # Set to the host you'd like set as your default router, or NO for none.
X! defaultrouter="10.0.0.2"
X  
X  # These are the flags you'd like to start the routing daemon with
X! routedflags="-q"
X  
X  # timed flags, or NO if you don't want to start the time daemon
X  timedflags=NO
END-of-etc/sysconfig.dif
echo x - etc/host.conf
sed 's/^X//' >etc/host.conf << 'END-of-etc/host.conf'
X# $Id: host.conf,v 1.2 1993/11/07 01:02:57 wollman Exp $
X# If that doesn't work, then try the /etc/hosts file
Xhosts
X# Default is to use the nameserver first
Xbind
X# If you have YP/NIS configured, uncomment the next line
X# nis
END-of-etc/host.conf
exit




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