Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 1996 14:00:51 -0700
From:      Nate Williams <nate@sri.MT.net>
To:        John Hay <jhay@mikom.csir.co.za>
Cc:        freebsd-questions@FreeBSD.ORG (FreeBSD-questions)
Subject:   Re: Multiple PPP dialins
Message-ID:  <199603242100.OAA23447@rocky.sri.MT.net>
In-Reply-To: <199603241942.VAA28952@zibbi.mikom.csir.co.za>
References:  <199603241942.VAA28952@zibbi.mikom.csir.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
> What I want to do is to set up a machine with 2 or 3 modems to allow PPP
> dialins. My problem isn't to get a single PPP dialin connection going, but
> how to get multiple connections going with dynamic addresses. I don't want
> to give everyone their own ip address.

This is pretty easy to do.  Basically, in your login script, you have it
call tty to determine which tty is being used and then assign the IP
address based on the particular line.

#!/bin/sh
#
# Dynamic PPP login account
#

PATH=:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
export PATH

mesg n
stty -tostop
case `tty` in
'*ttyd1')
   exec pppd `hostname`:machine-A debug
   ;;
'*ttyd2')
   exec pppd `hostname`:machineB debug
   ;;

esac
exit 0

I just whipped this up, so it probably won't work but it should give you
an idea on how one could set it up.  This also assumes you are using
kernel-PPP, but the ideas should be relevant for iijppp as well.


Nate



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