Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Feb 2000 00:39:30 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Mike Nowlin <mike@argos.org>
Cc:        freebsd-net@FreeBSD.ORG, brian@hak.lan.Awfulhak.org
Subject:   Re: PPP handling of multiple connection options (long-ish) 
Message-ID:  <200002060039.AAA37732@hak.lan.Awfulhak.org>
In-Reply-To: Message from Mike Nowlin <mike@argos.org>  of "Fri, 04 Feb 2000 02:54:29 EST." <Pine.LNX.4.05.10002040206240.10767-100000@jason.argos.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> (Best subject I could think of... :) )
> 
> I've been digging into some of the more "rarely used" options in ppp(8) in
> 3.4-STABLE, and have a few questions/ideas...
> 
> Got PPP over UDP working between two internet-connected hosts, which I'm
> (possibly) planning on using to connect one of our satellite offices to
> our LAN -- drop a cheap dynamic-IP'd cable modem line in at the remote
> office, and have PPP create a sorta-static address for the remote
> machine..  So far, so good.
> 
> Noticing that you can "set device /dev/cuaa0 /dev/cuaa1 /dev/cuaa2" to
> have it select the first possible modem, and I'm able to type in
> "set device rimmer:6669/udp /dev/cuac04" without generating tons of
> errors, will that actually work -- try the direct udp connection first, 
> and if it times out/fails, try the serial device?

It'll work, but not as expected.  Ppp goes through the list of 
devices attempting to ``open'' them.  Opening a serial port consists 
of obtaining the lock and achieving an open().  Opening a udp 
connection consists of connect()ing the udp socket.

The udp open will only fail if nothing's listening.

> Assuming THAT works, we come to the dialing/logging-in portion of it...
> Obviously, the cable modem won't respond to ATDT555-1212 the same way that
> a modem will...  It seems to me that although you can specify multiple
> serial ports to use, you can only specify one dial chat script...  The
> chat script required for the modem is "ABORT BUSY...OK-AT-OK
> \\dATDT\\T..." (stuff removed), and the chat script for the UDP connection
> is "".  Is it possible, or would it be helpful for me to add, the ability
> to do something like:
> 
> set dial "ATDTblahblah"         <-- set the default dial script
> set foodial rimmer:6669/udp ""  <-- set the dial script for the udp conn.

At the moment, ppp doesn't allow this sort of thing :-(  It expects 
all the devices to be of the same type.

> ...  same with some other values, such as authname, authkey, timeout,
> etc...  This would also be useful when dealing with multiple serial ports
> with modems connected that require completely different dial strings,
> or if you want to connect to different ISPs with "ppp -background anyisp"...
> 
> 98.6% of this is to provide an automatic dial-backup of the UDP-based PPP
> connection -- if somebody at MCI decides to trip over another cable, PPP
> will blow up, try the UDP connection again, fail, and then try dialing
> directly into the main LAN over the modem...  If THAT fails, (like if the
> corporate head office goes up in flames, which might not be a bad idea),
> try dialing into a local ISP instead.
> 
> 
> 
> Now that I've typed all this in, I realize that this could be done with
> "ppp -background" and checking the return value, but I'll send it anyway..
> Some of the ideas still make sense, such as the different dial strings for
> different modems......     :)

Indeed.  I'll put it on my TODO list, but that's a pretty big list...

Bear in mind that with PPPoUDP, the server side is a bit stupid at 
the moment and doesn't realize when other hosts talk to the same udp 
port - allowing anybody to interfere with your conversation.  This is 
dangerous and needs to be fixed.  The udp device needs to do more 
processing on the sockaddr obtained from the recvfrom() in 
udp_RecvFrom(), and each udp link needs to know of the existence of 
all other udp links - passing packets to other link input routines as 
necessary and creating new incoming udp links when required.

This should be fairly easy, but also fairly easy to screw up...

> --mike

-- 
Brian <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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