From owner-freebsd-hackers Wed May 15 10:09:40 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA05043 for hackers-outgoing; Wed, 15 May 1996 10:09:40 -0700 (PDT) Received: from rocky.sri.MT.net (rocky.sri.MT.net [204.182.243.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA05029 for ; Wed, 15 May 1996 10:09:25 -0700 (PDT) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id LAA19463; Wed, 15 May 1996 11:08:54 -0600 Date: Wed, 15 May 1996 11:08:54 -0600 From: Nate Williams Message-Id: <199605151708.LAA19463@rocky.sri.MT.net> To: Gary Aitken Cc: freebsd-hackers@freebsd.org Subject: Re: user ppp with dedicated line In-Reply-To: <3199FF85.21E7@ics.com> References: <3199FF85.21E7@ics.com> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I'm using user ppp on a dedicated 56K line, successfully but > probably not correctly :-( > > Under freebsd version 2.1 > > Some questions: > > 1. What is the difference between direct and dedicated modes? > I'm using a dedicated 56K line; is "direct" a hardwired link > (e.g. port to port), and "dedicated" a dedicated telco link? The documention isn't very good, but as I understand it 'direct' means connect to the current tty. It's mainly used for use on the dialin side. 'dedicated' means there is no need for dialing or other handling, since the line is a 'dedicated' line. However, it *may* have some stuff to setup the line initially. (It looks like it from the code). But, it doesn't 'redial' the line when the carrier drops. I posted a set of patches a *long* time ago which adds the 'ddial' mode, which is a 'dedicated modem' connection which attempts to keep the connection up all the time, but understands the modem dialing stuff. You don't need that though. > 2. In order to get ppp to work on my dedicated line, I needed > to make the following mods to force packet mode: > > *** /cdrom/usr/src/usr.sbin/ppp/main.c Thu Oct 5 14:24:42 1995 > --- main_new.c Wed May 1 07:46:56 1996 > *************** > *** 599,604 **** > --- 599,610 ---- > } else if (mode & MODE_DEDICATED) { > if (!modem) > modem = OpenModem(mode); > + /* > + * garya@dreamchaser.org > + * Force packet mode as for a direct connection > + */ > + PacketMode(); > } > Without looking at the code, how else would the 'dedicated' mode go into packet mode? Is there some code that would cause packet mode it would fall into later? > 3. I'm having trouble getting ppp.linkup to be read when used with a > dedicated line. It appears to be totally ignored when ppp is > started as follows, with the above mods: > > ppp -dedicated myline > > The only way I could get a default route added for my dedicated > line was to start it in /etc/start_if.tun0 as follows: > > ppp -dedicated myline > sleep 10 > route add default 199.2.139.16 > > The sleep is ugly and theoretically unreliable; > but since ppp.linkup wasn't getting read or properly executed, > I needed the sleep to wait for the network to come up and the > routing table to get established. > > What's the *right* way to do this? I have all my stuff in ppp.conf, don't know if it's applicable on your system. > 4. I tried putting some logprintf debug code in SelectSystem, > to check to see if ppp.linkup was even being read; > but doing so caused a core dump. Can someone explain why, and > give me a hint as to how to debug this? Where/why is it dumping core? > 5. Invalid lines in ppp.linkup are apparently ignored, > or executed with the output directed to /dev/null. > (At least nothing shows up in ppp.log) > How do I tell if it is reading ppp.linkup? See question 4. :) > 6. When running in dedicated (or direct, I think) mode, > attempting to connect via a telnet to port 3000 appears > to work, but typing commands produces no output and you > have to kill the telnet session to recover. Is this a > known problem? Or, as usual, I'm screwing something up? ... I don't think you need to run it in direct mode. Nate